guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 18/25: Minor compile-cps refactor for cons


From: Andy Wingo
Subject: [Guile-commits] 18/25: Minor compile-cps refactor for cons
Date: Mon, 8 Jan 2018 09:25:04 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 9a1d2d8ec8bd84fcdff350a3624ac3ba44a5c141
Author: Andy Wingo <address@hidden>
Date:   Sun Jan 7 17:57:45 2018 +0100

    Minor compile-cps refactor for cons
    
    * module/language/tree-il/compile-cps.scm (build-list): Pass cons
      through an expander.
---
 module/language/tree-il/compile-cps.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/module/language/tree-il/compile-cps.scm 
b/module/language/tree-il/compile-cps.scm
index 1825846..29bcf46 100644
--- a/module/language/tree-il/compile-cps.scm
+++ b/module/language/tree-il/compile-cps.scm
@@ -588,8 +588,8 @@
     ((v . vals)
      (with-cps cps
        (letv tail)
-       (letk ktail ($kargs ('tail) (tail)
-                     ($continue k src ($primcall 'cons #f (v tail)))))
+       (let$ head (convert-primcall k src 'cons #f v tail))
+       (letk ktail ($kargs ('tail) (tail) ,head))
        ($ (build-list ktail src vals))))))
 
 ;;; The conversion from Tree-IL to CPS essentially wraps every



reply via email to

[Prev in Thread] Current Thread [Next in Thread]