1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 11:10:25 +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:
Andy Wingo 2023-07-04 11:01:50 +02:00
parent 018c5b9ad9
commit d66c1c67a0
3 changed files with 10 additions and 6 deletions

View file

@ -483,8 +483,12 @@ the LABELS that are clobbered by the effects of LABEL."
((string-set! str idx cp) (&write-object &string))
((make-closure code) (&allocate &closure))
((closure-ref code) (&read-field &closure param))
((closure-set! code) (&write-field &closure param)))
((closure-ref code) (match param
((idx . nfree)
(&read-field &closure idx))))
((closure-set! code) (match param
((idx . nfree)
(&write-field &closure idx)))))
(define-primitive-effects* param
((allocate-words size) (&allocate (annotation->memory-kind param)))