summaryrefslogtreecommitdiff
path: root/module/language
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2015-11-26 16:47:17 +0100
committerAndy Wingo <wingo@pobox.com>2015-12-01 10:57:20 +0100
commite5d7c0f13b51b47115d98874c3a3cd51900ba8a3 (patch)
treed58040505b0aed46afc871eaaa507def3166f5ee /module/language
parent02fc5a772bc95bbd70a81b8589bf261a3822f9bd (diff)
downloadguile-e5d7c0f13b51b47115d98874c3a3cd51900ba8a3.tar.gz
All arities serialize a "closure" binding
* module/language/cps/compile-bytecode.scm (compile-function): Always define a 'closure binding in slot 0. * module/system/vm/frame.scm (available-bindings): No need to futz around not having a closure binding. * module/system/vm/debug.scm (arity-arguments-alist): Expect a closure binding. * test-suite/tests/rtl.test: Emit definitions for the closure.
Diffstat (limited to 'module/language')
-rw-r--r--module/language/cps/compile-bytecode.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/module/language/cps/compile-bytecode.scm b/module/language/cps/compile-bytecode.scm
index 1c7b99bcc..7fa5a003c 100644
--- a/module/language/cps/compile-bytecode.scm
+++ b/module/language/cps/compile-bytecode.scm
@@ -472,7 +472,9 @@
(emit-label asm label)
(set! frame-size (lookup-nlocals label allocation))
(emit-begin-kw-arity asm req opt rest kw-indices allow-other-keys?
- frame-size alt)))
+ frame-size alt)
+ ;; All arities define a closure binding in slot 0.
+ (emit-definition asm 'closure 0 'scm)))
(($ $kargs names vars ($ $continue k src exp))
(emit-label asm label)
(for-each (lambda (name var)