guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] 02/02: Fix baseline compiler bugs


From: Andy Wingo
Subject: [Guile-commits] 02/02: Fix baseline compiler bugs
Date: Sat, 9 May 2020 16:29:47 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit 04e3cece45ec72283ec2a8519c7a73f497896fd1
Author: Andy Wingo <address@hidden>
AuthorDate: Sat May 9 22:23:00 2020 +0200

    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.
---
 module/language/tree-il/compile-bytecode.scm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/module/language/tree-il/compile-bytecode.scm 
b/module/language/tree-il/compile-bytecode.scm
index e327ca4..cb87799 100644
--- a/module/language/tree-il/compile-bytecode.scm
+++ b/module/language/tree-il/compile-bytecode.scm
@@ -1111,8 +1111,8 @@ in the frame with for the lambda-case clause 
@var{clause}."
          (let ((proc-slot (let ((env (push-frame env)))
                             (fold for-push (for-push proc env) args)
                             (stack-height env))))
-           (emit-call asm proc-slot (length args))
-           (emit-receive src dst proc-slot frame-size)))
+           (emit-call asm proc-slot (1+ (length args)))
+           (emit-receive asm (stack-height base) proc-slot frame-size)))
 
         (($ <primcall> src (? variadic-constructor? name) 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)))))))))
 
         (($ <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)))
         (($ <let>)          (visit-let exp env `(value-at . ,base)))
         (($ <fix>)          (visit-fix exp env `(value-at . ,base)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]