mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-19 03:00:25 +02:00
Add tailify pass
* am/bootstrap.am (SOURCES): Add tailify.scm. * module/language/cps/tailify.scm: New file.
This commit is contained in:
parent
171072ec5a
commit
311c69e6fc
3 changed files with 730 additions and 0 deletions
|
@ -422,6 +422,8 @@ by a label, respectively."
|
|||
'pointer-ref/immediate
|
||||
'tail-pointer-ref/immediate))
|
||||
(intmap-add representations var 'ptr))
|
||||
(($ $primcall 'restore (repr) ())
|
||||
(intmap-add representations var repr))
|
||||
(($ $code)
|
||||
(intmap-add representations var 'ptr))
|
||||
(_
|
||||
|
@ -433,6 +435,10 @@ by a label, respectively."
|
|||
(intmap-add representations var
|
||||
(intmap-ref representations arg)))
|
||||
representations args vars))
|
||||
(($ $primcall 'restore reprs ())
|
||||
(fold (lambda (var repr representations)
|
||||
(intmap-add representations var repr))
|
||||
representations vars reprs))
|
||||
(($ $callk)
|
||||
(fold1 (lambda (var representations)
|
||||
(intmap-add representations var 'scm))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue