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

Fix baseline compilation error for make-struct/simple

* module/language/tree-il/compile-bytecode.scm (compile-closure):
  $allocate-struct takes an SCM.
This commit is contained in:
Andy Wingo 2020-05-11 13:31:40 +02:00
parent c0a27de50d
commit 527262fef0

View file

@ -1142,12 +1142,14 @@ in the frame with for the lambda-case clause @var{clause}."
('make-struct/simple ('make-struct/simple
(match args (match args
((vtable . args) ((vtable . args)
(let ((len (length args))) (emit-load-constant asm 0 (length args))
(emit-$allocate-struct asm 0 vtable len) (emit-$allocate-struct asm 0 vtable 0)
(let lp ((i 0) (args args)) (let lp ((i 0) (args args))
(when (< i len) (match args
(emit-struct-init! asm 0 i (car args) 1) (() #t)
(lp (1+ i) (cdr args))))))))) ((arg . args)
(emit-struct-init! asm 0 i arg 1)
(lp (1+ i) args))))))))
(emit-mov asm dst 0))) (emit-mov asm dst 0)))
(($ <primcall> src name args) (($ <primcall> src name args)