summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Bex <peter@more-magic.net>2025-08-19 10:20:48 +0200
committerPeter Bex <peter@more-magic.net>2025-08-19 10:20:48 +0200
commit8209645f45df43cb305691cae1b8653ab1c0efc5 (patch)
tree54a069491420a2b9a88a78d92cbc7bad3eb705e6
parent1007f7aef69d3fe28942ad74cc002b49bd1eefaa (diff)
downloadslset-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.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/slset.scm b/slset.scm
index 8221089..73904d7 100644
--- a/slset.scm
+++ b/slset.scm
@@ -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))