guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 04/09: Fix "cons" compilation in baseline compiler in so


From: Andy Wingo
Subject: [Guile-commits] 04/09: Fix "cons" compilation in baseline compiler in some cases
Date: Mon, 11 May 2020 09:08:27 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 4c3c35c536584fee080652125299e531db37afc8
Author: Andy Wingo <address@hidden>
AuthorDate: Mon May 11 13:32:39 2020 +0200

    Fix "cons" compilation in baseline compiler in some cases
    
    * module/language/tree-il/compile-bytecode.scm (emit-cons): Fix for case
      where car is dst but cdr isn't.
---
 module/language/tree-il/compile-bytecode.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/language/tree-il/compile-bytecode.scm 
b/module/language/tree-il/compile-bytecode.scm
index 91a8668..deead72 100644
--- a/module/language/tree-il/compile-bytecode.scm
+++ b/module/language/tree-il/compile-bytecode.scm
@@ -72,7 +72,7 @@
   (cond
    ((= car dst)
     (emit-mov asm 1 car)
-    (emit-cons asm dst 1 (if (= cdr dst) 1 dst)))
+    (emit-cons asm dst 1 (if (= cdr dst) 1 cdr)))
    ((= cdr dst)
     (emit-mov asm 1 cdr)
     (emit-cons asm dst car 1))



reply via email to

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