1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-19 03:00:25 +02:00

Add new $calli expression type.

* module/language/cps.scm ($calli): New expression type, calls a label
as a value.  Adapt all callers.
This commit is contained in:
Andy Wingo 2021-05-25 13:48:23 +02:00
parent a1eb526b0c
commit 171072ec5a
21 changed files with 105 additions and 19 deletions

View file

@ -1,6 +1,6 @@
;;; Continuation-passing style (CPS) intermediate language (IL)
;; Copyright (C) 2013-2020 Free Software Foundation, Inc.
;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
;;;; This library is free software; you can redistribute it and/or
;;;; modify it under the terms of the GNU Lesser General Public
@ -117,6 +117,8 @@ corresponding var from REPLACEMENTS; otherwise return VAR."
($call (rename proc) ,(rename* args)))
(($ $callk k proc args)
($callk k (and proc (rename proc)) ,(rename* args)))
(($ $calli args callee)
($calli ,(rename* args) (rename callee)))
(($ $primcall name param args)
($primcall name param ,(rename* args))))))
(($ $branch kf kt src op param args)