From 4c3c35c536584fee080652125299e531db37afc8 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Mon, 11 May 2020 13:32:39 +0200 Subject: [PATCH] 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 91a8668e7..deead726f 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))