1. Sirius Dely
  2. pypy

Commits

Maciej Fijalkowski  committed 51f0700

following armin's suggestion remove the VECTOR type

  • Participants
  • Parent commits b60d7a3
  • Branches backend-vector-ops

Comments (0)

Files changed (2)

File pypy/jit/backend/x86/regalloc.py

View file
 import os
 from pypy.jit.metainterp.history import (Box, Const, ConstInt, ConstPtr,
                                          ResOperation, BoxPtr, ConstFloat,
-                                         BoxFloat, INT, REF, FLOAT, VECTOR,
+                                         BoxFloat, INT, REF, FLOAT,
                                          TargetToken, JitCellToken)
 from pypy.jit.backend.x86.regloc import *
 from pypy.rpython.lltypesystem import lltype, rffi, rstr
 
 class X86XMMRegisterManager(RegisterManager):
 
-    box_types = [FLOAT, VECTOR]
+    box_types = [FLOAT]
     all_regs = [xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7]
     # we never need lower byte I hope
     save_around_call_regs = all_regs
         return pass_on_stack
 
     def possibly_free_var(self, var):
-        if var.type in self.xrm.box_types:
+        if var.type == FLOAT:
             self.xrm.possibly_free_var(var)
         else:
             self.rm.possibly_free_var(var)
 
     def make_sure_var_in_reg(self, var, forbidden_vars=[],
                              selected_reg=None, need_lower_byte=False):
-        if var.type in self.xrm.box_types:
+        if var.type == FLOAT:
             if isinstance(var, ConstFloat):
                 return FloatImmedLoc(var.getfloatstorage())
             return self.xrm.make_sure_var_in_reg(var, forbidden_vars,
 
     def force_allocate_reg(self, var, forbidden_vars=[], selected_reg=None,
                            need_lower_byte=False):
-        if var.type in self.xrm.box_types:
+        if var.type == FLOAT:
             return self.xrm.force_allocate_reg(var, forbidden_vars,
                                                selected_reg, need_lower_byte)
         else:
                                               selected_reg, need_lower_byte)
 
     def force_spill_var(self, var):
-        if var.type in self.xrm.box_types:
+        if var.type == FLOAT:
             return self.xrm.force_spill_var(var)
         else:
             return self.rm.force_spill_var(var)
     def loc(self, v):
         if v is None: # xxx kludgy
             return None
-        if v.type in self.xrm.box_types:
+        if v.type == FLOAT:
             return self.xrm.loc(v)
         return self.rm.loc(v)
 

File pypy/jit/metainterp/history.py

View file
 INT   = 'i'
 REF   = 'r'
 FLOAT = 'f'
-VECTOR = 'e'
 STRUCT = 's'
 HOLE  = '_'
 VOID  = 'v'
     def repr_rpython(self):
         return repr_rpython(self, 'bi')
 
-class BoxVector(Box):
-    type = VECTOR
-
-    def __init__(self):
-        pass
-
-    def _getrepr_(self):
-        return ''
-
 class BoxFloat(Box):
     type = FLOAT
     _attrs_ = ('value',)
     def repr_rpython(self):
         return repr_rpython(self, 'bf')
 
+class BoxVector(BoxFloat):
+    value = float('nan')
+    
+    def _getrepr_(self):
+        return ''
+
 class BoxPtr(Box):
     type = REF
     _attrs_ = ('value',)