[pypy-svn] r75398 - pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86

jcreigh at codespeak.net jcreigh at codespeak.net
Mon Jun 14 20:17:52 CEST 2010


Author: jcreigh
Date: Mon Jun 14 20:17:49 2010
New Revision: 75398

Modified:
   pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regalloc.py
Log:
remove width_of_type dict that was only used in one place

Modified: pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regalloc.py
==============================================================================
--- pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regalloc.py	(original)
+++ pypy/branch/x86-64-jit-backend/pypy/jit/backend/x86/regalloc.py	Mon Jun 14 20:17:49 2010
@@ -18,12 +18,6 @@
      TempBox
 from pypy.jit.backend.x86.arch import WORD, FRAME_FIXED_SIZE, IS_X86_32, IS_X86_64
 
-width_of_type = {
-    INT : 1,
-    REF : 1,
-    FLOAT : (2 if IS_X86_32 else 1),
-}
-
 class X86RegisterManager(RegisterManager):
 
     box_types = [INT, REF]
@@ -120,17 +114,12 @@
         return RegisterManager.after_call(self, v)
 
 class X86FrameManager(FrameManager):
-
     @staticmethod
     def frame_pos(i, box_type):
-        size = width_of_type[box_type]
-        if size == 1:
-            return StackLoc(i, get_ebp_ofs(i), size, box_type)
-        elif size == 2:
-            return StackLoc(i, get_ebp_ofs(i+1), size, box_type)
+        if IS_X86_32 and box_type == FLOAT:
+            return StackLoc(i, get_ebp_ofs(i+1), 2, box_type)
         else:
-            print "Unimplemented size %d" % i
-            raise NotImplementedError("unimplemented size %d" % i)
+            return StackLoc(i, get_ebp_ofs(i), 1, box_type)
 
 class RegAlloc(object):
     exc = False



More information about the Pypy-commit mailing list