mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-17 09:10:22 +02:00
Include nfree in closure-ref, closure-set primcall params
* module/language/cps/closure-conversion.scm (convert-one): Add nfree to the param. This will help the wasm target. * module/language/cps/effects-analysis.scm (closure-ref, closure-set!): * module/language/cps/lower-primcalls.scm (closure-ref,closure-set!): Adapt.
This commit is contained in:
parent
78948ae594
commit
0922cbebb9
3 changed files with 10 additions and 6 deletions
|
@ -551,7 +551,7 @@
|
|||
($primcall 'allocate-words/immediate `(closure . ,nwords) ())))))
|
||||
|
||||
;; precondition: closure is closure, idx is in range
|
||||
(define-primcall-lowerer (closure-ref cps k src idx (closure))
|
||||
(define-primcall-lowerer (closure-ref cps k src (idx . nfree) (closure))
|
||||
(let ((pos (+ idx 2)))
|
||||
(with-cps cps
|
||||
(build-term
|
||||
|
@ -559,7 +559,7 @@
|
|||
($primcall 'scm-ref/immediate `(closure . ,pos) (closure)))))))
|
||||
|
||||
;; precondition: closure is clodure, idx is in range
|
||||
(define-primcall-lowerer (closure-set! cps k src idx (closure val))
|
||||
(define-primcall-lowerer (closure-set! cps k src (idx . nfree) (closure val))
|
||||
(let ((pos (+ idx 2)))
|
||||
(with-cps cps
|
||||
(build-term
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue