From 70c40b1892a606163d0f60ac7b20093724e8e5e5 Mon Sep 17 00:00:00 2001 From: Christophe Rhodes Date: Thu, 18 Apr 2013 18:03:09 +0100 Subject: [PATCH] apply recursive decomposition in DECOMPOSE-STRING We should really precompute the result of the recursion during the build; working on getting tests up and running so that we can check whether we've done that correctly. --- src/code/target-char.lisp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/code/target-char.lisp b/src/code/target-char.lisp index ef51c23..0e12980 100644 --- a/src/code/target-char.lisp +++ b/src/code/target-char.lisp @@ -685,7 +685,14 @@ character exists." ((null end) (push (subseq string start end) result)) (unless (= start end) (push (subseq string start end) result)) - (push (decompose-char (char string end)) result)) + ;; FIXME: this recursive call to DECOMPOSE-STRING is necessary + ;; for correctness given our direct encoding of the + ;; decomposition data in UnicodeData.txt. It would, however, + ;; be straightforward enough to perform the recursion in table + ;; construction, and then have this simply revert to a single + ;; lookup. (Wait for tests to be hooked in, then implement). + (push (decompose-string (decompose-char (char string end)) kind) + result)) (apply 'concatenate 'string (nreverse result))))) (defun sort-combiners (string) -- 1.7.10.4