1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-20 11:40:18 +02:00

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.
This commit is contained in:
Andy Wingo 2020-05-11 13:32:39 +02:00
parent 3b6023d66d
commit 4c3c35c536

View file

@ -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))