1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 11:50:28 +02:00

Fix baseline compiler bugs

* module/language/tree-il/compile-bytecode.scm (compile-closure): Fix
  FP-relative computation for "receive" target.  Fix value-at syntax in
  conditional.
This commit is contained in:
Andy Wingo 2020-05-09 22:23:00 +02:00
parent c49ccfbc3d
commit 04e3cece45

View file

@ -1111,8 +1111,8 @@ in the frame with for the lambda-case clause @var{clause}."
(let ((proc-slot (let ((env (push-frame env))) (let ((proc-slot (let ((env (push-frame env)))
(fold for-push (for-push proc env) args) (fold for-push (for-push proc env) args)
(stack-height env)))) (stack-height env))))
(emit-call asm proc-slot (length args)) (emit-call asm proc-slot (1+ (length args)))
(emit-receive src dst proc-slot frame-size))) (emit-receive asm (stack-height base) proc-slot frame-size)))
(($ <primcall> src (? variadic-constructor? name) args) (($ <primcall> src (? variadic-constructor? name) args)
;; Stage result in 0 to avoid stompling args. ;; Stage result in 0 to avoid stompling args.
@ -1164,7 +1164,7 @@ in the frame with for the lambda-case clause @var{clause}."
(apply emit asm dst (for-args args env))))))))) (apply emit asm dst (for-args args env)))))))))
(($ <prompt>) (visit-prompt exp env `(value-at . ,base))) (($ <prompt>) (visit-prompt exp env `(value-at . ,base)))
(($ <conditional>) (visit-conditional exp env `(value-at. ,base))) (($ <conditional>) (visit-conditional exp env `(value-at . ,base)))
(($ <seq>) (visit-seq exp env `(value-at . ,base))) (($ <seq>) (visit-seq exp env `(value-at . ,base)))
(($ <let>) (visit-let exp env `(value-at . ,base))) (($ <let>) (visit-let exp env `(value-at . ,base)))
(($ <fix>) (visit-fix exp env `(value-at . ,base))) (($ <fix>) (visit-fix exp env `(value-at . ,base)))