guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 08/30: Revert "Slot allocation allows s64/u64 representa


From: Andy Wingo
Subject: [Guile-commits] 08/30: Revert "Slot allocation allows s64/u64 representations of same var"
Date: Fri, 24 Nov 2017 09:24:20 -0500 (EST)

wingo pushed a commit to branch master
in repository guile.

commit 5c38643fc66cbc8efa4907c5eb467d9093ef19a9
Author: Andy Wingo <address@hidden>
Date:   Mon Nov 20 18:00:15 2017 +0100

    Revert "Slot allocation allows s64/u64 representations of same var"
    
    This reverts commit a88614fb17ed7a3c7d891907414222fc8a9ccd24.
---
 module/language/cps/slot-allocation.scm | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/module/language/cps/slot-allocation.scm 
b/module/language/cps/slot-allocation.scm
index 992639f..4315c55 100644
--- a/module/language/cps/slot-allocation.scm
+++ b/module/language/cps/slot-allocation.scm
@@ -744,13 +744,6 @@ are comparable with eqv?.  A tmp slot may be used."
     (match (intmap-ref cps k)
       (($ $kargs names vars) vars)
       (_ '())))
-  (define (meet-s64-u64 old new)
-    (cond
-     ((and (eq? old 's64) (eq? new 'u64))
-      'u64)
-     ((and (eq? old 'u64) (eq? new 's64))
-      'u64)
-     (error "incompatible representations" old new)))
   (intmap-fold
    (lambda (label cont representations)
      (match cont
@@ -761,8 +754,7 @@ are comparable with eqv?.  A tmp slot may be used."
            (match exp
              (($ $values (arg))
               (intmap-add representations var
-                          (intmap-ref representations arg)
-                          meet-s64-u64))
+                          (intmap-ref representations arg)))
              (($ $primcall (or 'scm->f64 'load-f64
                                'bv-f32-ref 'bv-f64-ref
                                'fadd 'fsub 'fmul 'fdiv))
@@ -775,12 +767,12 @@ are comparable with eqv?.  A tmp slot may be used."
                                'uadd/immediate 'usub/immediate 'umul/immediate
                                'ursh/immediate 'ulsh/immediate
                                'bv-u8-ref 'bv-u16-ref 'bv-u32-ref 'bv-u64-ref))
-              (intmap-add representations var 'u64 meet-s64-u64))
+              (intmap-add representations var 'u64))
              (($ $primcall (or 'untag-fixnum
                                'scm->s64 'load-s64 'u64->s64
                                'srsh 'srsh/immediate
                                'bv-s8-ref 'bv-s16-ref 'bv-s32-ref 'bv-s64-ref))
-              (intmap-add representations var 's64 meet-s64-u64))
+              (intmap-add representations var 's64))
              (_
               (intmap-add representations var 'scm))))
           (vars
@@ -788,8 +780,7 @@ are comparable with eqv?.  A tmp slot may be used."
              (($ $values args)
               (fold (lambda (arg var representations)
                       (intmap-add representations var
-                                  (intmap-ref representations arg)
-                                  meet-s64-u64))
+                                  (intmap-ref representations arg)))
                     representations args vars))))))
        (($ $kfun src meta self)
         (intmap-add representations self 'scm))



reply via email to

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