From f578fa8972f9a0d3d984bed2020318826ce48df3 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sat, 11 Feb 2017 13:03:44 -0800 Subject: [PATCH] Change generated tables to use characters instead of integers. --- src/etc/ucd-converter.scm | 102 ++++++++++++++++++-------------- src/runtime/char.scm | 102 ++++++++++++++++++-------------- src/runtime/ucd-table-alpha.scm | 2 +- src/runtime/ucd-table-cf.scm | 8 +-- src/runtime/ucd-table-gc.scm | 2 +- src/runtime/ucd-table-glue.scm | 2 +- src/runtime/ucd-table-lc.scm | 8 +-- src/runtime/ucd-table-lower.scm | 2 +- src/runtime/ucd-table-nt.scm | 8 +-- src/runtime/ucd-table-scf.scm | 8 +-- src/runtime/ucd-table-slc.scm | 8 +-- src/runtime/ucd-table-suc.scm | 8 +-- src/runtime/ucd-table-uc.scm | 8 +-- src/runtime/ucd-table-upper.scm | 2 +- 14 files changed, 148 insertions(+), 122 deletions(-) diff --git a/src/etc/ucd-converter.scm b/src/etc/ucd-converter.scm index 00676a529..a2cd08a94 100644 --- a/src/etc/ucd-converter.scm +++ b/src/etc/ucd-converter.scm @@ -433,13 +433,10 @@ USA. (eq? 'comment (car expr)) (pair? (cdr expr)) (null? (cddr expr))) - (if output-comments? - (begin - (write-string ";;; " port) - (display (cadr expr) port))) + (begin + (write-string ";;; " port) + (display (cadr expr) port)) (pp expr port))) - -(define output-comments? #f) (define (generate-property-table-code prop-name) (let* ((metadata (prop-metadata prop-name)) @@ -461,8 +458,8 @@ USA. (define (code-generator:boolean prop-name metadata prop-alist proc-name) (let ((char-set-name (symbol "char-set:" (metadata-full-name metadata)))) - `((define (,proc-name sv) - (scalar-value-in-char-set? sv ,char-set-name)) + `((define (,proc-name char) + (char-in-set? char ,char-set-name)) (define-deferred ,char-set-name (char-set* ',(filter-map (lambda (value-map) @@ -470,7 +467,8 @@ USA. (car value-map))) prop-alist)))))) -(define (hashed-code-generator keep-value? value-converter default-value) +(define (hashed-code-generator keep-value? value-converter default-value + runtime-value-converter) (lambda (prop-name metadata prop-alist proc-name) (let ((table-name (symbol "char-map:" (metadata-full-name metadata))) (mapping @@ -488,19 +486,17 @@ USA. (write-string prop-name port) (write-string ": table pairs = " port) (write (length mapping) port))) - `((define (,proc-name sv) - (hash-table-ref ,table-name sv (lambda () ,(default-value 'sv)))) + `((define (,proc-name char) + (hash-table-ref ,table-name char (lambda () ,(default-value 'char)))) (define-deferred ,table-name (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table + (integer->char (car p)) + ,(runtime-value-converter '(cdr p)))) ',mapping) table)))))) -(define (code-point-filter value) - (and (string? value) - (not (string=? "#" value)))) - (define (string->cp string) (let ((cp (string->number string 16 #t))) (if (not (unicode-code-point? cp)) @@ -515,17 +511,33 @@ USA. (define code-points-splitter (string-splitter #\space #f)) -(define (code-points-default sv) - `(list ,sv)) +(define (code-point-filter value) + (and (string? value) + (not (string=? "#" value)))) (define code-generator:code-point - (hashed-code-generator code-point-filter string->cp (lambda (sv) sv))) + (hashed-code-generator code-point-filter + string->cp + (lambda (char-expr) char-expr) + (lambda (sv-expr) `(integer->char ,sv-expr)))) + +(define (code-points-default char-expr) + `(list ,char-expr)) + +(define (code-points-converter svs-expr) + `(map integer->char ,svs-expr)) (define code-generator:code-point* - (hashed-code-generator code-point-filter string->cps code-points-default)) + (hashed-code-generator code-point-filter + string->cps + code-points-default + code-points-converter)) (define code-generator:code-point+ - (hashed-code-generator code-point-filter string->cps code-points-default)) + (hashed-code-generator code-point-filter + string->cps + code-points-default + code-points-converter)) (define (converter:mapped-enum metadata) (let ((name (symbol->string (metadata-full-name metadata))) @@ -547,7 +559,8 @@ USA. (and (string? value) (not (string=? "None" value)))) (converter:mapped-enum (prop-metadata "nt")) - (lambda (sv) sv #f))) + (lambda (char-expr) char-expr #f) + (lambda (sv-expr) sv-expr))) (define (code-generator:mapped-enum prop-name metadata prop-alist proc-name) (let ((maker (entries-maker)) @@ -623,15 +636,10 @@ USA. (let ((root-entry ((maker 'get-root-entry))) (table-entries ((maker 'get-table-entries)))) - (report-table-statistics prop-name - entry-count - unique-entry-count - byte-count - (length table-entries)) + (report-table-statistics prop-name entry-count unique-entry-count + byte-count (length table-entries)) (generate-top-level (ustring-downcase prop-name) - root-entry - table-entries - proc-name)))) + root-entry table-entries proc-name)))) (define (report-table-statistics prop-name entry-count unique-entry-count byte-count n-entries) @@ -656,31 +664,39 @@ USA. (symbol "ucd-" prop-name "-entry-" index)) (iota (length table-entries))))) - `(,@(generate-entry-definition proc-name root-entry 'sv table-name '(sv)) + `(,@(generate-entry-definition proc-name root-entry 'sv table-name + '(char) + (lambda (body) + `((let ((sv (char->integer char))) + ,@body)))) ,@(append-map (lambda (name entry) - (generate-entry-definition name entry - 'sv 'table '(sv table))) + (generate-entry-definition name entry 'sv 'table + '(sv table) + (lambda (body) body))) entry-names table-entries) (define ,table-name) ,@(generate-table-initializers table-name entry-names)))) - -(define (generate-entry-definition name entry sv-name table-name arg-names) + +(define (generate-entry-definition name entry sv-name table-name + arg-names wrap-body) (receive (comment offsets-expr body) (entry 'offsets sv-name table-name) (let ((defn - (if offsets-expr - `(define-deferred ,name - (let ((offsets ,offsets-expr)) - (named-lambda (,name ,@arg-names) - ,@body))) - `(define (,name ,@arg-names) - ,@body)))) - (if comment + (if offsets-expr + `(define-deferred ,name + (let ((offsets ,offsets-expr)) + (named-lambda (,name ,@arg-names) + ,@(wrap-body body)))) + `(define (,name ,@arg-names) + ,@(wrap-body body))))) + (if (and comment generate-node-comments?) (list `(comment ,comment) defn) (list defn))))) +(define generate-node-comments? #f) + (define (generate-table-initializers table-name entries) (let ((groups (let split-items diff --git a/src/runtime/char.scm b/src/runtime/char.scm index c8c137529..12d08575a 100644 --- a/src/runtime/char.scm +++ b/src/runtime/char.scm @@ -90,38 +90,35 @@ USA. (define-integrable (char-ascii? char) (fix:< (char->integer char) #x80)) -(define (char=? x y) +(define-integrable (char=? x y) (fix:= (char->integer x) (char->integer y))) -(define (charinteger x) (char->integer y))) -(define (char<=? x y) +(define-integrable (char<=? x y) (fix:<= (char->integer x) (char->integer y))) -(define (char>? x y) +(define-integrable (char>? x y) (fix:> (char->integer x) (char->integer y))) -(define (char>=? x y) +(define-integrable (char>=? x y) (fix:>= (char->integer x) (char->integer y))) (define (char-ci=? x y) - (fix:= (char-ci->integer x) (char-ci->integer y))) + (char=? (ucd-scf-value x) (ucd-scf-value y))) (define (char-ciinteger x) (char-ci->integer y))) + (charinteger x) (char-ci->integer y))) + (char<=? (ucd-scf-value x) (ucd-scf-value y))) (define (char-ci>? x y) - (fix:> (char-ci->integer x) (char-ci->integer y))) + (char>? (ucd-scf-value x) (ucd-scf-value y))) (define (char-ci>=? x y) - (fix:>= (char-ci->integer x) (char-ci->integer y))) - -(define-integrable (char-ci->integer char) - (ucd-scf-value (char->integer char))) + (char>=? (ucd-scf-value x) (ucd-scf-value y))) (define (char=-predicate char) (guarantee char? char 'char=-predicate) @@ -133,35 +130,48 @@ USA. (lambda (char*) (char-ci=? char* char))) -(define (char-downcase char) - (if (not (unicode-scalar-value? (char-code char))) - (error:not-a unicode-char? char 'char-downcase)) - (%make-char (ucd-slc-value (char-code char)) - (char-bits char))) - -(define (char-foldcase char) - (if (not (unicode-scalar-value? (char-code char))) - (error:not-a unicode-char? char 'char-foldcase)) - (%make-char (ucd-scf-value (char-code char)) - (char-bits char))) - -(define (char-upcase char) - (if (not (unicode-scalar-value? (char-code char))) - (error:not-a unicode-char? char 'char-upcase)) - (%make-char (ucd-suc-value (char-code char)) - (char-bits char))) - -(define (char-downcase-full char) - (guarantee unicode-char? char 'char-downcase-full) - (map integer->char (ucd-lc-value (char->integer char)))) - -(define (char-foldcase-full char) - (guarantee unicode-char? char 'char-foldcase-full) - (map integer->char (ucd-cf-value (char->integer char)))) - -(define (char-upcase-full char) - (guarantee unicode-char? char 'char-upcase-full) - (map integer->char (ucd-uc-value (char->integer char)))) +(define (char-mapper mapper) + (lambda (char) + (if (fix:= 0 (char-bits char)) + (mapper char) + (%make-char (mapper (%make-char (char-code char) 0)) + (char-bits char))))) + +(define char-downcase + (char-mapper + (lambda (char) + (guarantee unicode-char? char 'char-downcase) + (ucd-slc-value char)))) + +(define char-foldcase + (char-mapper + (lambda (char) + (guarantee unicode-char? char 'char-foldcase) + (ucd-scf-value char)))) + +(define char-upcase + (char-mapper + (lambda (char) + (guarantee unicode-char? char 'char-upcase) + (ucd-suc-value char)))) + +(define char-downcase-full + (char-mapper + (lambda (char) + (guarantee unicode-char? char 'char-downcase-full) + (ucd-lc-value char)))) + +(define char-foldcase-full + (char-mapper + (lambda (char) + (guarantee unicode-char? char 'char-foldcase-full) + (ucd-cf-value char)))) + +(define char-upcase-full + (char-mapper + (lambda (char) + (guarantee unicode-char? char 'char-upcase-full) + (ucd-uc-value char)))) (define-deferred 0-code (char->integer #\0)) ;; Next two codes are offset by 10 to speed up CHAR->DIGIT. @@ -394,14 +404,14 @@ USA. (define (char-general-category char) (guarantee unicode-char? char 'char-general-category) - (sv-general-category (char->integer char))) + (%char-general-category char)) (define (unicode-code-point-general-category cp) (guarantee unicode-code-point? cp 'unicode-code-point-general-category) - (sv-general-category cp)) + (%char-general-category (integer->char cp))) -(define (sv-general-category sv) - (let ((value (ucd-gc-value sv))) +(define-integrable (%char-general-category char) + (let ((value (ucd-gc-value char))) (and (symbol? value) value))) diff --git a/src/runtime/ucd-table-alpha.scm b/src/runtime/ucd-table-alpha.scm index 7e6bad64e..ef5765a5c 100644 --- a/src/runtime/ucd-table-alpha.scm +++ b/src/runtime/ucd-table-alpha.scm @@ -26,7 +26,7 @@ USA. ;;;; UCD property: Alpha -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:17-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) diff --git a/src/runtime/ucd-table-cf.scm b/src/runtime/ucd-table-cf.scm index 6b74c7d44..d9a81d035 100644 --- a/src/runtime/ucd-table-cf.scm +++ b/src/runtime/ucd-table-cf.scm @@ -26,18 +26,18 @@ USA. ;;;; UCD property: cf -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:19-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -(define (ucd-cf-value sv) - (hash-table-ref char-map:case-folding sv (lambda () (list sv)))) +(define (ucd-cf-value char) + (hash-table-ref char-map:case-folding char (lambda () (list char)))) (define-deferred char-map:case-folding (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table (integer->char (car p)) (map integer->char (cdr p)))) '((65 97) (66 98) (67 99) (68 100) (69 101) (70 102) (71 103) (72 104) (73 105) (74 106) (75 107) (76 108) (77 109) (78 110) (79 111) (80 112) (81 113) (82 114) (83 115) (84 116) (85 117) (86 118) (87 119) (88 120) (89 121) (90 122) (181 956) (192 224) (193 225) (194 226) (195 227) (196 228) (197 229) (198 230) (199 231) (200 232) (201 233) (202 234) (203 235) (204 236) (205 237) (206 238) (207 239) (208 240) (209 241) (210 242) (211 243) (212 244) (213 245) (214 246) (216 248) (217 249) (218 250) (219 251) (220 252) (221 253) (222 254) (223 115 115) (256 257) (258 259) (260 261) (262 263) (264 265) (266 267) (268 269) (270 271) (272 273) (274 275) (276 277) (278 279) (280 281) (282 283) (284 285) (286 287) (288 289) (290 291) (292 293) (294 295) (296 297) (298 299) (300 301) (302 303) (304 105 775) (306 307) (308 309) (310 311) (313 314) (315 316) (317 318) (319 320) (321 322) (323 324) (325 326) (327 328) (329 700 110) (330 331) (332 333) (334 335) (336 337) (338 339) (340 341) (342 343) (344 345) (346 347) (348 349) (350 351) (352 353) (354 355) (356 357) (358 359) (360 361) (362 363) (364 365) (366 367) (368 369) (370 371) (372 373) (374 375) (376 255) (377 378) (379 380) (381 382) (383 115) (385 595) (386 387) (388 389) (390 596) (391 392) (393 598) (394 599) (395 396) (398 477) (399 601) (400 603) (401 402) (403 608) (404 611) (406 617) (407 616) (408 409) (412 623) (413 626) (415 629) (416 417) (418 419) (420 421) (422 640) (423 424) (425 643) (428 429) (430 648) (431 432) (433 650) (434 651) (435 436) (437 438) (439 658) (440 441) (444 445) (452 454) (453 454) (455 457) (456 457) (458 460) (459 460) (461 462) (463 464) (465 466) (467 468) (469 470) (471 472) (473 474) (475 476) (478 479) (480 481) (482 483) (484 485) diff --git a/src/runtime/ucd-table-gc.scm b/src/runtime/ucd-table-gc.scm index 335c73608..62803f25c 100644 --- a/src/runtime/ucd-table-gc.scm +++ b/src/runtime/ucd-table-gc.scm @@ -26,7 +26,7 @@ USA. ;;;; UCD property: gc -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:19-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) diff --git a/src/runtime/ucd-table-glue.scm b/src/runtime/ucd-table-glue.scm index a9afa5384..bb73db067 100644 --- a/src/runtime/ucd-table-glue.scm +++ b/src/runtime/ucd-table-glue.scm @@ -32,7 +32,7 @@ USA. (define-deferred char-set:numeric (compute-char-set (lambda (sv) - (eq? 'decimal (ucd-nt-value sv))))) + (eq? 'decimal (ucd-nt-value (integer->char sv)))))) (define-deferred char-set:alphanumeric (char-set-union char-set:alphabetic char-set:numeric)) diff --git a/src/runtime/ucd-table-lc.scm b/src/runtime/ucd-table-lc.scm index 2de552afe..6a4d10f27 100644 --- a/src/runtime/ucd-table-lc.scm +++ b/src/runtime/ucd-table-lc.scm @@ -26,18 +26,18 @@ USA. ;;;; UCD property: lc -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:20-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -(define (ucd-lc-value sv) - (hash-table-ref char-map:lower-case sv (lambda () (list sv)))) +(define (ucd-lc-value char) + (hash-table-ref char-map:lower-case char (lambda () (list char)))) (define-deferred char-map:lower-case (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table (integer->char (car p)) (map integer->char (cdr p)))) '((65 97) (66 98) (67 99) (68 100) (69 101) (70 102) (71 103) (72 104) (73 105) (74 106) (75 107) (76 108) (77 109) (78 110) (79 111) (80 112) (81 113) (82 114) (83 115) (84 116) (85 117) (86 118) (87 119) (88 120) (89 121) (90 122) (192 224) (193 225) (194 226) (195 227) (196 228) (197 229) (198 230) (199 231) (200 232) (201 233) (202 234) (203 235) (204 236) (205 237) (206 238) (207 239) (208 240) (209 241) (210 242) (211 243) (212 244) (213 245) (214 246) (216 248) (217 249) (218 250) (219 251) (220 252) (221 253) (222 254) (256 257) (258 259) (260 261) (262 263) (264 265) (266 267) (268 269) (270 271) (272 273) (274 275) (276 277) (278 279) (280 281) (282 283) (284 285) (286 287) (288 289) (290 291) (292 293) (294 295) (296 297) (298 299) (300 301) (302 303) (304 105 775) (306 307) (308 309) (310 311) (313 314) (315 316) (317 318) (319 320) (321 322) (323 324) (325 326) (327 328) (330 331) (332 333) (334 335) (336 337) (338 339) (340 341) (342 343) (344 345) (346 347) (348 349) (350 351) (352 353) (354 355) (356 357) (358 359) (360 361) (362 363) (364 365) (366 367) (368 369) (370 371) (372 373) (374 375) (376 255) (377 378) (379 380) (381 382) (385 595) (386 387) (388 389) (390 596) (391 392) (393 598) (394 599) (395 396) (398 477) (399 601) (400 603) (401 402) (403 608) (404 611) (406 617) (407 616) (408 409) (412 623) (413 626) (415 629) (416 417) (418 419) (420 421) (422 640) (423 424) (425 643) (428 429) (430 648) (431 432) (433 650) (434 651) (435 436) (437 438) (439 658) (440 441) (444 445) (452 454) (453 454) (455 457) (456 457) (458 460) (459 460) (461 462) (463 464) (465 466) (467 468) (469 470) (471 472) (473 474) (475 476) (478 479) (480 481) (482 483) (484 485) (486 487) (488 489) (490 491) (492 493) (494 495) (497 499) (498 499) (500 501) (502 405) (503 447) (504 505) (506 507) (508 509) (510 511) (512 513) (514 515) (516 517) (518 519) (520 521) (522 523) (524 525) (526 527) (528 529) (530 531) (532 533) diff --git a/src/runtime/ucd-table-lower.scm b/src/runtime/ucd-table-lower.scm index f449d8a35..f91fe46d6 100644 --- a/src/runtime/ucd-table-lower.scm +++ b/src/runtime/ucd-table-lower.scm @@ -26,7 +26,7 @@ USA. ;;;; UCD property: Lower -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:17-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) diff --git a/src/runtime/ucd-table-nt.scm b/src/runtime/ucd-table-nt.scm index 5cc99e5c7..aa4df8876 100644 --- a/src/runtime/ucd-table-nt.scm +++ b/src/runtime/ucd-table-nt.scm @@ -26,18 +26,18 @@ USA. ;;;; UCD property: nt -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:20-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -(define (ucd-nt-value sv) - (hash-table-ref char-map:numeric-type sv (lambda () #f))) +(define (ucd-nt-value char) + (hash-table-ref char-map:numeric-type char (lambda () #f))) (define-deferred char-map:numeric-type (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table (integer->char (car p)) (cdr p))) '((48 . decimal) (49 . decimal) (50 . decimal) (51 . decimal) (52 . decimal) (53 . decimal) (54 . decimal) (55 . decimal) (56 . decimal) (57 . decimal) (178 . digit) (179 . digit) (185 . digit) (188 . numeric) (189 . numeric) (190 . numeric) (1632 . decimal) (1633 . decimal) (1634 . decimal) (1635 . decimal) (1636 . decimal) (1637 . decimal) (1638 . decimal) (1639 . decimal) (1640 . decimal) (1641 . decimal) (1776 . decimal) (1777 . decimal) (1778 . decimal) (1779 . decimal) (1780 . decimal) (1781 . decimal) (1782 . decimal) (1783 . decimal) (1784 . decimal) (1785 . decimal) (1984 . decimal) (1985 . decimal) (1986 . decimal) (1987 . decimal) (1988 . decimal) (1989 . decimal) (1990 . decimal) (1991 . decimal) (1992 . decimal) (1993 . decimal) (2406 . decimal) (2407 . decimal) (2408 . decimal) (2409 . decimal) (2410 . decimal) (2411 . decimal) (2412 . decimal) (2413 . decimal) (2414 . decimal) (2415 . decimal) (2534 . decimal) (2535 . decimal) (2536 . decimal) (2537 . decimal) (2538 . decimal) (2539 . decimal) (2540 . decimal) (2541 . decimal) (2542 . decimal) (2543 . decimal) (2548 . numeric) (2549 . numeric) (2550 . numeric) (2551 . numeric) (2552 . numeric) (2553 . numeric) (2662 . decimal) (2663 . decimal) (2664 . decimal) (2665 . decimal) (2666 . decimal) (2667 . decimal) (2668 . decimal) (2669 . decimal) (2670 . decimal) (2671 . decimal) (2790 . decimal) (2791 . decimal) (2792 . decimal) (2793 . decimal) (2794 . decimal) (2795 . decimal) (2796 . decimal) (2797 . decimal) (2798 . decimal) (2799 . decimal) (2918 . decimal) (2919 . decimal) (2920 . decimal) (2921 . decimal) (2922 . decimal) (2923 . decimal) (2924 . decimal) (2925 . decimal) (2926 . decimal) (2927 . decimal) (2930 . numeric) (2931 . numeric) (2932 . numeric) (2933 . numeric) (2934 . numeric) (2935 . numeric) (3046 . decimal) (3047 . decimal) (3048 . decimal) (3049 . decimal) (3050 . decimal) (3051 . decimal) (3052 . decimal) (3053 . decimal) (3054 . decimal) (3055 . decimal) (3056 . numeric) (3057 . numeric) (3058 . numeric) (3174 . decimal) (3175 . decimal) (3176 . decimal) (3177 . decimal) (3178 . decimal) (3179 . decimal) (3180 . decimal) (3181 . decimal) (3182 . decimal) (3183 . decimal) (3192 . numeric) (3193 . numeric) (3194 . numeric) (3195 . numeric) (3196 . numeric) (3197 . numeric) (3198 . numeric) (3302 . decimal) (3303 . decimal) (3304 . decimal) (3305 . decimal) (3306 . decimal) (3307 . decimal) (3308 . decimal) (3309 . decimal) (3310 . decimal) (3311 . decimal) (3416 . numeric) (3417 . numeric) (3418 . numeric) (3419 . numeric) (3420 . numeric) diff --git a/src/runtime/ucd-table-scf.scm b/src/runtime/ucd-table-scf.scm index 83776bfb9..0a0697377 100644 --- a/src/runtime/ucd-table-scf.scm +++ b/src/runtime/ucd-table-scf.scm @@ -26,18 +26,18 @@ USA. ;;;; UCD property: scf -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:20-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -(define (ucd-scf-value sv) - (hash-table-ref char-map:simple-case-folding sv (lambda () sv))) +(define (ucd-scf-value char) + (hash-table-ref char-map:simple-case-folding char (lambda () char))) (define-deferred char-map:simple-case-folding (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table (integer->char (car p)) (integer->char (cdr p)))) '((65 . 97) (66 . 98) (67 . 99) (68 . 100) (69 . 101) (70 . 102) (71 . 103) (72 . 104) (73 . 105) (74 . 106) (75 . 107) (76 . 108) (77 . 109) (78 . 110) (79 . 111) (80 . 112) (81 . 113) (82 . 114) (83 . 115) (84 . 116) (85 . 117) (86 . 118) (87 . 119) (88 . 120) (89 . 121) (90 . 122) (181 . 956) (192 . 224) (193 . 225) (194 . 226) (195 . 227) (196 . 228) (197 . 229) (198 . 230) (199 . 231) (200 . 232) (201 . 233) (202 . 234) (203 . 235) (204 . 236) (205 . 237) (206 . 238) (207 . 239) (208 . 240) (209 . 241) (210 . 242) (211 . 243) (212 . 244) (213 . 245) (214 . 246) (216 . 248) (217 . 249) (218 . 250) (219 . 251) (220 . 252) (221 . 253) (222 . 254) (256 . 257) (258 . 259) (260 . 261) (262 . 263) (264 . 265) (266 . 267) (268 . 269) (270 . 271) (272 . 273) (274 . 275) (276 . 277) (278 . 279) (280 . 281) (282 . 283) (284 . 285) (286 . 287) (288 . 289) (290 . 291) (292 . 293) (294 . 295) (296 . 297) (298 . 299) (300 . 301) (302 . 303) (306 . 307) (308 . 309) (310 . 311) (313 . 314) (315 . 316) (317 . 318) (319 . 320) (321 . 322) (323 . 324) (325 . 326) (327 . 328) (330 . 331) (332 . 333) (334 . 335) (336 . 337) (338 . 339) (340 . 341) (342 . 343) (344 . 345) (346 . 347) (348 . 349) (350 . 351) (352 . 353) (354 . 355) (356 . 357) (358 . 359) (360 . 361) (362 . 363) (364 . 365) (366 . 367) (368 . 369) (370 . 371) (372 . 373) (374 . 375) (376 . 255) (377 . 378) (379 . 380) (381 . 382) (383 . 115) (385 . 595) (386 . 387) (388 . 389) (390 . 596) (391 . 392) (393 . 598) (394 . 599) (395 . 396) (398 . 477) (399 . 601) (400 . 603) (401 . 402) (403 . 608) (404 . 611) (406 . 617) (407 . 616) (408 . 409) (412 . 623) (413 . 626) (415 . 629) (416 . 417) (418 . 419) (420 . 421) (422 . 640) (423 . 424) (425 . 643) (428 . 429) (430 . 648) (431 . 432) (433 . 650) (434 . 651) (435 . 436) (437 . 438) (439 . 658) (440 . 441) (444 . 445) (452 . 454) (453 . 454) (455 . 457) (456 . 457) (458 . 460) (459 . 460) (461 . 462) (463 . 464) (465 . 466) (467 . 468) (469 . 470) (471 . 472) diff --git a/src/runtime/ucd-table-slc.scm b/src/runtime/ucd-table-slc.scm index 29f1309cd..aa001a4d0 100644 --- a/src/runtime/ucd-table-slc.scm +++ b/src/runtime/ucd-table-slc.scm @@ -26,18 +26,18 @@ USA. ;;;; UCD property: slc -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:21-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -(define (ucd-slc-value sv) - (hash-table-ref char-map:simple-lower-case sv (lambda () sv))) +(define (ucd-slc-value char) + (hash-table-ref char-map:simple-lower-case char (lambda () char))) (define-deferred char-map:simple-lower-case (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table (integer->char (car p)) (integer->char (cdr p)))) '((65 . 97) (66 . 98) (67 . 99) (68 . 100) (69 . 101) (70 . 102) (71 . 103) (72 . 104) (73 . 105) (74 . 106) (75 . 107) (76 . 108) (77 . 109) (78 . 110) (79 . 111) (80 . 112) (81 . 113) (82 . 114) (83 . 115) (84 . 116) (85 . 117) (86 . 118) (87 . 119) (88 . 120) (89 . 121) (90 . 122) (192 . 224) (193 . 225) (194 . 226) (195 . 227) (196 . 228) (197 . 229) (198 . 230) (199 . 231) (200 . 232) (201 . 233) (202 . 234) (203 . 235) (204 . 236) (205 . 237) (206 . 238) (207 . 239) (208 . 240) (209 . 241) (210 . 242) (211 . 243) (212 . 244) (213 . 245) (214 . 246) (216 . 248) (217 . 249) (218 . 250) (219 . 251) (220 . 252) (221 . 253) (222 . 254) (256 . 257) (258 . 259) (260 . 261) (262 . 263) (264 . 265) (266 . 267) (268 . 269) (270 . 271) (272 . 273) (274 . 275) (276 . 277) (278 . 279) (280 . 281) (282 . 283) (284 . 285) (286 . 287) (288 . 289) (290 . 291) (292 . 293) (294 . 295) (296 . 297) (298 . 299) (300 . 301) (302 . 303) (304 . 105) (306 . 307) (308 . 309) (310 . 311) (313 . 314) (315 . 316) (317 . 318) (319 . 320) (321 . 322) (323 . 324) (325 . 326) (327 . 328) (330 . 331) (332 . 333) (334 . 335) (336 . 337) (338 . 339) (340 . 341) (342 . 343) (344 . 345) (346 . 347) (348 . 349) (350 . 351) (352 . 353) (354 . 355) (356 . 357) (358 . 359) (360 . 361) (362 . 363) (364 . 365) (366 . 367) (368 . 369) (370 . 371) (372 . 373) (374 . 375) (376 . 255) (377 . 378) (379 . 380) (381 . 382) (385 . 595) (386 . 387) (388 . 389) (390 . 596) (391 . 392) (393 . 598) (394 . 599) (395 . 396) (398 . 477) (399 . 601) (400 . 603) (401 . 402) (403 . 608) (404 . 611) (406 . 617) (407 . 616) (408 . 409) (412 . 623) (413 . 626) (415 . 629) (416 . 417) (418 . 419) (420 . 421) (422 . 640) (423 . 424) (425 . 643) (428 . 429) (430 . 648) (431 . 432) (433 . 650) (434 . 651) (435 . 436) (437 . 438) (439 . 658) (440 . 441) (444 . 445) (452 . 454) (453 . 454) (455 . 457) (456 . 457) (458 . 460) (459 . 460) (461 . 462) (463 . 464) (465 . 466) (467 . 468) (469 . 470) (471 . 472) (473 . 474) (475 . 476) (478 . 479) (480 . 481) diff --git a/src/runtime/ucd-table-suc.scm b/src/runtime/ucd-table-suc.scm index 31e640ff0..f763e66a8 100644 --- a/src/runtime/ucd-table-suc.scm +++ b/src/runtime/ucd-table-suc.scm @@ -26,18 +26,18 @@ USA. ;;;; UCD property: suc -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:21-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -(define (ucd-suc-value sv) - (hash-table-ref char-map:simple-upper-case sv (lambda () sv))) +(define (ucd-suc-value char) + (hash-table-ref char-map:simple-upper-case char (lambda () char))) (define-deferred char-map:simple-upper-case (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table (integer->char (car p)) (integer->char (cdr p)))) '((97 . 65) (98 . 66) (99 . 67) (100 . 68) (101 . 69) (102 . 70) (103 . 71) (104 . 72) (105 . 73) (106 . 74) (107 . 75) (108 . 76) (109 . 77) (110 . 78) (111 . 79) (112 . 80) (113 . 81) (114 . 82) (115 . 83) (116 . 84) (117 . 85) (118 . 86) (119 . 87) (120 . 88) (121 . 89) (122 . 90) (181 . 924) (224 . 192) (225 . 193) (226 . 194) (227 . 195) (228 . 196) (229 . 197) (230 . 198) (231 . 199) (232 . 200) (233 . 201) (234 . 202) (235 . 203) (236 . 204) (237 . 205) (238 . 206) (239 . 207) (240 . 208) (241 . 209) (242 . 210) (243 . 211) (244 . 212) (245 . 213) (246 . 214) (248 . 216) (249 . 217) (250 . 218) (251 . 219) (252 . 220) (253 . 221) (254 . 222) (255 . 376) (257 . 256) (259 . 258) (261 . 260) (263 . 262) (265 . 264) (267 . 266) (269 . 268) (271 . 270) (273 . 272) (275 . 274) (277 . 276) (279 . 278) (281 . 280) (283 . 282) (285 . 284) (287 . 286) (289 . 288) (291 . 290) (293 . 292) (295 . 294) (297 . 296) (299 . 298) (301 . 300) (303 . 302) (305 . 73) (307 . 306) (309 . 308) (311 . 310) (314 . 313) (316 . 315) (318 . 317) (320 . 319) (322 . 321) (324 . 323) (326 . 325) (328 . 327) (331 . 330) (333 . 332) (335 . 334) (337 . 336) (339 . 338) (341 . 340) (343 . 342) (345 . 344) (347 . 346) (349 . 348) (351 . 350) (353 . 352) (355 . 354) (357 . 356) (359 . 358) (361 . 360) (363 . 362) (365 . 364) (367 . 366) (369 . 368) (371 . 370) (373 . 372) (375 . 374) (378 . 377) (380 . 379) (382 . 381) (383 . 83) (384 . 579) (387 . 386) (389 . 388) (392 . 391) (396 . 395) (402 . 401) (405 . 502) (409 . 408) (410 . 573) (414 . 544) (417 . 416) (419 . 418) (421 . 420) (424 . 423) (429 . 428) (432 . 431) (436 . 435) (438 . 437) (441 . 440) (445 . 444) (447 . 503) (453 . 452) (454 . 452) (456 . 455) (457 . 455) (459 . 458) (460 . 458) (462 . 461) (464 . 463) (466 . 465) (468 . 467) (470 . 469) (472 . 471) (474 . 473) (476 . 475) (477 . 398) (479 . 478) (481 . 480) (483 . 482) (485 . 484) (487 . 486) (489 . 488) (491 . 490) (493 . 492) (495 . 494) (498 . 497) (499 . 497) diff --git a/src/runtime/ucd-table-uc.scm b/src/runtime/ucd-table-uc.scm index 4d56cb807..a7c9ff4f3 100644 --- a/src/runtime/ucd-table-uc.scm +++ b/src/runtime/ucd-table-uc.scm @@ -26,18 +26,18 @@ USA. ;;;; UCD property: uc -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:21-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -(define (ucd-uc-value sv) - (hash-table-ref char-map:upper-case sv (lambda () (list sv)))) +(define (ucd-uc-value char) + (hash-table-ref char-map:upper-case char (lambda () (list char)))) (define-deferred char-map:upper-case (let ((table (make-non-pointer-hash-table))) (for-each (lambda (p) - (hash-table-set! table (car p) (cdr p))) + (hash-table-set! table (integer->char (car p)) (map integer->char (cdr p)))) '((97 65) (98 66) (99 67) (100 68) (101 69) (102 70) (103 71) (104 72) (105 73) (106 74) (107 75) (108 76) (109 77) (110 78) (111 79) (112 80) (113 81) (114 82) (115 83) (116 84) (117 85) (118 86) (119 87) (120 88) (121 89) (122 90) (181 924) (223 83 83) (224 192) (225 193) (226 194) (227 195) (228 196) (229 197) (230 198) (231 199) (232 200) (233 201) (234 202) (235 203) (236 204) (237 205) (238 206) (239 207) (240 208) (241 209) (242 210) (243 211) (244 212) (245 213) (246 214) (248 216) (249 217) (250 218) (251 219) (252 220) (253 221) (254 222) (255 376) (257 256) (259 258) (261 260) (263 262) (265 264) (267 266) (269 268) (271 270) (273 272) (275 274) (277 276) (279 278) (281 280) (283 282) (285 284) (287 286) (289 288) (291 290) (293 292) (295 294) (297 296) (299 298) (301 300) (303 302) (305 73) (307 306) (309 308) (311 310) (314 313) (316 315) (318 317) (320 319) (322 321) (324 323) (326 325) (328 327) (329 700 78) (331 330) (333 332) (335 334) (337 336) (339 338) (341 340) (343 342) (345 344) (347 346) (349 348) (351 350) (353 352) (355 354) (357 356) (359 358) (361 360) (363 362) (365 364) (367 366) (369 368) (371 370) (373 372) (375 374) (378 377) (380 379) (382 381) (383 83) (384 579) (387 386) (389 388) (392 391) (396 395) (402 401) (405 502) (409 408) (410 573) (414 544) (417 416) (419 418) (421 420) (424 423) (429 428) (432 431) (436 435) (438 437) (441 440) (445 444) (447 503) (453 452) (454 452) (456 455) (457 455) (459 458) (460 458) (462 461) (464 463) (466 465) (468 467) (470 469) (472 471) (474 473) (476 475) (477 398) (479 478) (481 480) (483 482) (485 484) (487 486) (489 488) (491 490) (493 492) (495 494) (496 74 780) (498 497) (499 497) (501 500) (505 504) (507 506) (509 508) (511 510) (513 512) diff --git a/src/runtime/ucd-table-upper.scm b/src/runtime/ucd-table-upper.scm index 7624f0c78..6bcc5714e 100644 --- a/src/runtime/ucd-table-upper.scm +++ b/src/runtime/ucd-table-upper.scm @@ -26,7 +26,7 @@ USA. ;;;; UCD property: Upper -;;; Generated from Unicode 9.0.0 UCD at 2017-02-10T19:43:18-08 +;;; Generated from Unicode 9.0.0 (declare (usual-integrations)) -- 2.25.1