mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 19:20:23 +02:00
Make 'ptr types more precise, pre-lowering
* module/language/cps/utils.scm (compute-var-representations): $code makes a 'code. bv-contents makes a 'raw-bytevector. * module/language/cps/slot-allocation.scm: * module/language/cps/hoot/tailify.scm: * module/system/vm/assembler.scm: Adapt.
This commit is contained in:
parent
3c83a77da5
commit
34c3467379
4 changed files with 14 additions and 10 deletions
|
@ -212,7 +212,7 @@ be rewritten to continue to the tail's ktail."
|
|||
($continue local-ktail src
|
||||
($calli args ret))))
|
||||
(build-term ($continue kcall src
|
||||
($primcall 'restore '(ptr) ())))))
|
||||
($primcall 'restore '(code) ())))))
|
||||
((or ($ $call) ($ $callk) ($ $calli))
|
||||
;; Otherwise the original term was a tail call.
|
||||
(with-cps cps
|
||||
|
@ -238,7 +238,7 @@ be rewritten to continue to the tail's ktail."
|
|||
(letk kcont ($kargs ('cont) (cont)
|
||||
($continue kexp src
|
||||
($primcall 'save
|
||||
(append reprs (list 'ptr))
|
||||
(append reprs (list 'code))
|
||||
,(append vars (list cont))))))
|
||||
(build-term ($continue kcont src
|
||||
($code (intmap-ref entries k))))))))
|
||||
|
@ -691,7 +691,7 @@ to tail-call the saved continuation."
|
|||
($continue k src ($calli args ret))))
|
||||
(setk label ($kargs names vars
|
||||
($continue kcall src
|
||||
($primcall 'restore '(ptr) ()))))))
|
||||
($primcall 'restore '(code) ()))))))
|
||||
(_ cps)))
|
||||
(intset-fold rewrite-return-to-pop-and-calli body cps))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue