aboutsummaryrefslogtreecommitdiffstats
path: root/csc/linker.csc
diff options
context:
space:
mode:
authorRose Hogenson <rhogenson@posteo.net>2022-07-24 16:20:00 -0700
committerRose Hogenson <rhogenson@posteo.net>2022-07-24 16:20:00 -0700
commitc04e3c7cd6726a95da3d58979f582afb7a5b722f (patch)
tree524f25bb188f90d68626a1f402f8de54e00848d4 /csc/linker.csc
parentc6b74224fe669bc9d180a409ad13ed269631b316 (diff)
downloadchromatopelma-c04e3c7cd6726a95da3d58979f582afb7a5b722f.tar.zst
Export some common comparers from hash-map.
Diffstat (limited to 'csc/linker.csc')
-rw-r--r--csc/linker.csc15
1 files changed, 2 insertions, 13 deletions
diff --git a/csc/linker.csc b/csc/linker.csc
index 3327909..b840c15 100644
--- a/csc/linker.csc
+++ b/csc/linker.csc
@@ -4,8 +4,8 @@
(only (csc encoding) encode)
(only (csc format) sprintf)
(only (csc hash-map)
- hash-bytevector
insert
+ compare-strings
lookup
make-map)
(only (csc list)
@@ -37,19 +37,8 @@
(_ #f)))
- (define (hash-string s)
- (hash-bytevector (string->utf8 s)))
-
-
- (define (cmp-strings s1 s2)
- (cond
- ((string=? s1 s2) 0)
- ((string<? s1 s2) -1)
- (else 1)))
-
-
(define (make-label-map program)
- (let loop ((m (make-map hash-string cmp-strings))
+ (let loop ((m (make-map compare-strings))
(program program)
(i 0))
(match program