callees reserve their own local vars
* libguile/_scm.h (SCM_OBJCODE_MINOR_VERSION): Bump. * libguile/vm-i-system.c (reserve-locals): New instruction, to reserve space for local vars. Other ops renumbered. * module/language/tree-il/compile-glil.scm (flatten-lambda): Emit reserve-locals instructions as necessary. * test-suite/tests/tree-il.test: Update to expect reserve-locals as appropriate.
This commit is contained in:
parent
6c6a44390b
commit
55d9bc947e
3 changed files with 52 additions and 35 deletions
|
|
@ -194,6 +194,9 @@
|
|||
(emit-code #f (make-glil-source (lambda-src x))))
|
||||
;; check arity, potentially consing a rest list
|
||||
(emit-code #f (make-glil-arity nargs nrest #f))
|
||||
;; reserve space for locals, if necessary
|
||||
(if (not (zero? nlocs))
|
||||
(emit-code #f (make-glil-call 'reserve-locals nlocs)))
|
||||
;; write bindings info
|
||||
(if (not (null? ids))
|
||||
(emit-bindings #f ids vars allocation x emit-code))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue