diff options
author | Peter Bex <peter@more-magic.net> | 2025-08-19 10:20:48 +0200 |
---|---|---|
committer | Peter Bex <peter@more-magic.net> | 2025-08-19 10:20:48 +0200 |
commit | 8209645f45df43cb305691cae1b8653ab1c0efc5 (patch) | |
tree | 54a069491420a2b9a88a78d92cbc7bad3eb705e6 | |
parent | 1007f7aef69d3fe28942ad74cc002b49bd1eefaa (diff) | |
download | slset-8209645f45df43cb305691cae1b8653ab1c0efc5.tar.gz |
Add type annotations to ensure inlining of put! and get in C50.1
Without these, we are doomed to have CPS calls to those procedures.
-rw-r--r-- | slset.scm | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -19,10 +19,10 @@ with-reified-slset reified-slset? reified-slset->slset reified-slset-adjoin! reified-slset-delete! reified-slset-contains?) -(import scheme (chicken base) (chicken plist)) +(import scheme (chicken base) (chicken plist) (chicken type)) (define-inline (mark! x marking) - (when (symbol? x) (put! x marking #t))) + (when (symbol? x) (put! x (the symbol marking) #t))) (define-inline (mark-list! lst marking) (for-each (lambda (x) (mark! x marking)) lst)) @@ -47,7 +47,7 @@ (else (lp (cdr lst)))))) (define-inline (marked? x marking) - (and (symbol? x) (get x marking))) + (and (symbol? x) (get x (the symbol marking) #f))) (define (last lst) (if (null? (cdr lst)) |