[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 02/09: Fix baseline compilation error for make-struct/si
From: |
Andy Wingo |
Subject: |
[Guile-commits] 02/09: Fix baseline compilation error for make-struct/simple |
Date: |
Mon, 11 May 2020 09:08:26 -0400 (EDT) |
wingo pushed a commit to branch master
in repository guile.
commit 527262fef0f5bb21f11ff1b24503b6f54f127260
Author: Andy Wingo <address@hidden>
AuthorDate: Mon May 11 13:31:40 2020 +0200
Fix baseline compilation error for make-struct/simple
* module/language/tree-il/compile-bytecode.scm (compile-closure):
$allocate-struct takes an SCM.
---
module/language/tree-il/compile-bytecode.scm | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/module/language/tree-il/compile-bytecode.scm
b/module/language/tree-il/compile-bytecode.scm
index 6e12a52..c8ecf53 100644
--- a/module/language/tree-il/compile-bytecode.scm
+++ b/module/language/tree-il/compile-bytecode.scm
@@ -1142,12 +1142,14 @@ in the frame with for the lambda-case clause
@var{clause}."
('make-struct/simple
(match args
((vtable . args)
- (let ((len (length args)))
- (emit-$allocate-struct asm 0 vtable len)
- (let lp ((i 0) (args args))
- (when (< i len)
- (emit-struct-init! asm 0 i (car args) 1)
- (lp (1+ i) (cdr args)))))))))
+ (emit-load-constant asm 0 (length args))
+ (emit-$allocate-struct asm 0 vtable 0)
+ (let lp ((i 0) (args args))
+ (match args
+ (() #t)
+ ((arg . args)
+ (emit-struct-init! asm 0 i arg 1)
+ (lp (1+ i) args))))))))
(emit-mov asm dst 0)))
(($ <primcall> src name args)
- [Guile-commits] branch master updated (f168a66 -> 2ba3eb4), Andy Wingo, 2020/05/11
- [Guile-commits] 03/09: Baseline compiler: add pop-fluid primitive., Andy Wingo, 2020/05/11
- [Guile-commits] 06/09: Fix module capture for closures in <fix>, Andy Wingo, 2020/05/11
- [Guile-commits] 01/09: Fix baseline miscompilation of <, Andy Wingo, 2020/05/11
- [Guile-commits] 02/09: Fix baseline compilation error for make-struct/simple,
Andy Wingo <=
- [Guile-commits] 04/09: Fix "cons" compilation in baseline compiler in some cases, Andy Wingo, 2020/05/11
- [Guile-commits] 07/09: Reload FP if needed in bind-rest also, Andy Wingo, 2020/05/11
- [Guile-commits] 08/09: Improve tail recursion in compiler, Andy Wingo, 2020/05/11
- [Guile-commits] 09/09: Fix shuffling assembler for new primcalls, Andy Wingo, 2020/05/11
- [Guile-commits] 05/09: Fix JIT asserts with different code generated by baseline, Andy Wingo, 2020/05/11