summaryrefslogtreecommitdiff
path: root/module/language/tree-il/compile-bytecode.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2020-05-11 14:36:00 +0200
committerAndy Wingo <wingo@pobox.com>2020-05-11 14:36:00 +0200
commit73a23027f5cf61365b4fc5049301b727bf29a10b (patch)
tree5e0a6ab65cffea83e0026831538e45fe18f8fbe9 /module/language/tree-il/compile-bytecode.scm
parent1563f5e042e101cc065cff0452e9e842deb38447 (diff)
downloadguile-73a23027f5cf61365b4fc5049301b727bf29a10b.tar.gz
Fix module capture for closures in <fix>
* module/language/tree-il/compile-bytecode.scm (compile-closure): Capture closures for <fix> if needed.
Diffstat (limited to 'module/language/tree-il/compile-bytecode.scm')
-rw-r--r--module/language/tree-il/compile-bytecode.scm2
1 files changed, 2 insertions, 0 deletions
diff --git a/module/language/tree-il/compile-bytecode.scm b/module/language/tree-il/compile-bytecode.scm
index deead726f..ac6ffba17 100644
--- a/module/language/tree-il/compile-bytecode.scm
+++ b/module/language/tree-il/compile-bytecode.scm
@@ -910,6 +910,8 @@ in the frame with for the lambda-case clause @var{clause}."
(let ((env (push-local name sym env)))
(match closure
(($ <closure> label code scope free-vars)
+ ;; FIXME: Allocate one scope per fix.
+ (maybe-cache-module! scope 0)
(emit-maybe-allocate-closure
asm (env-idx env) (length free-vars) label 0)
env))))