Fix assembler for keyword args
authorAndy Wingo <wingo@pobox.com>
Tue, 22 Oct 2013 20:31:26 +0000 (22:31 +0200)
committerAndy Wingo <wingo@pobox.com>
Tue, 22 Oct 2013 20:31:26 +0000 (22:31 +0200)
* module/system/vm/assembler.scm (begin-kw-arity, kw-prelude): Fix
  functions with keywords.

module/system/vm/assembler.scm

index 6b0ac48..f43acb3 100644 (file)
@@ -659,8 +659,8 @@ returned instead."
   (assert-match req ((? symbol?) ...) "list of symbols")
   (assert-match opt ((? symbol?) ...) "list of symbols")
   (assert-match rest (or #f (? symbol?)) "#f or symbol")
-  (assert-match kw-indices (((? symbol?) . (? integer?)) ...)
-                "alist of symbol -> integer")
+  (assert-match kw-indices (((? keyword?) . (? integer?)) ...)
+                "alist of keyword -> integer")
   (assert-match allow-other-keys? (? boolean?) "boolean")
   (assert-match nlocals (? integer?) "integer")
   (assert-match alternate (or #f (? symbol?)) "#f or symbol")
@@ -726,7 +726,7 @@ returned instead."
                       (pack-flags allow-other-keys? rest?)
                       (+ nreq nopt)
                       ntotal
-                      kw-indices)
+                      (intern-constant asm kw-indices))
     (emit-alloc-frame asm nlocals)))
 
 (define-macro-assembler (label asm sym)