guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 01/41: Fix miscompilation of closures allocated as vecto


From: Andy Wingo
Subject: [Guile-commits] 01/41: Fix miscompilation of closures allocated as vectors
Date: Wed, 02 Dec 2015 08:06:43 +0000

wingo pushed a commit to branch master
in repository guile.

commit 92ed7f69894316247e78c29b953bb59b5c3953d7
Author: Andy Wingo <address@hidden>
Date:   Wed Nov 11 16:30:59 2015 +0100

    Fix miscompilation of closures allocated as vectors
    
    * module/language/cps/closure-conversion.scm (convert-one): Fix
      miscompilation of vector closure initialization.
---
 module/language/cps/closure-conversion.scm |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/module/language/cps/closure-conversion.scm 
b/module/language/cps/closure-conversion.scm
index 29577a9..c6f941d 100644
--- a/module/language/cps/closure-conversion.scm
+++ b/module/language/cps/closure-conversion.scm
@@ -587,12 +587,12 @@ bound to @var{var}, and continue to @var{k}."
                   (letk k ($kargs () () ,body))
                   ($ (convert-arg v
                        (lambda (cps v)
-                         (with-cps cps
-                           ($ (with-cps-constants ((idx idx))
-                                (let ((op (cond
-                                           ((not known?) 'free-set!)
-                                           ((<= idx #xff) 
'vector-set!/immediate)
-                                           (else 'vector-set!))))
+                         (let ((op (cond
+                                    ((not known?) 'free-set!)
+                                    ((<= idx #xff) 'vector-set!/immediate)
+                                    (else 'vector-set!))))
+                           (with-cps cps
+                             ($ (with-cps-constants ((idx idx))
                                   (build-term
                                     ($continue k src
                                       ($primcall op (var idx 
v))))))))))))))))))



reply via email to

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