[pypy-svn] r53605 - pypy/branch/jit-hotpath/pypy/jit/codegen/i386

arigo at codespeak.net arigo at codespeak.net
Wed Apr 9 12:17:38 CEST 2008


Author: arigo
Date: Wed Apr  9 12:17:38 2008
New Revision: 53605

Modified:
   pypy/branch/jit-hotpath/pypy/jit/codegen/i386/operation.py
   pypy/branch/jit-hotpath/pypy/jit/codegen/i386/regalloc.py
   pypy/branch/jit-hotpath/pypy/jit/codegen/i386/rgenop.py
Log:
Add the missing getkind() methods to the GenVar subclasses.


Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/i386/operation.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/i386/operation.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/i386/operation.py	Wed Apr  9 12:17:38 2008
@@ -9,7 +9,7 @@
 from pypy.objspace.std.multimethod import FailedToImplement
 from pypy.jit.codegen.i386.ri386 import *
 from pypy.jit.codegen.i386.ri386setup import Conditions
-from pypy.jit.codegen.model import GenVar
+from pypy.jit.codegen import model as codegenmodel
 
 
 WORD = 4    # bytes
@@ -19,7 +19,11 @@
     CALL_ALIGN = 1
 
 
-class Operation(GenVar):
+class GenVar386(codegenmodel.GenVar):
+    def getkind(self):
+        return None
+
+class Operation(GenVar386):
     clobbers_cc = True
     side_effects = True
 

Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/i386/regalloc.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/i386/regalloc.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/i386/regalloc.py	Wed Apr  9 12:17:38 2008
@@ -553,7 +553,7 @@
     def generate(self, allocator):
         pass
 dead_operation = DeadOperation()
-gv_frame_base = GenVar()
+gv_frame_base = GenVar386()
 
 class Place(Operation):
     """Place of a variable that must live in the stack.  Its position is

Modified: pypy/branch/jit-hotpath/pypy/jit/codegen/i386/rgenop.py
==============================================================================
--- pypy/branch/jit-hotpath/pypy/jit/codegen/i386/rgenop.py	(original)
+++ pypy/branch/jit-hotpath/pypy/jit/codegen/i386/rgenop.py	Wed Apr  9 12:17:38 2008
@@ -3,7 +3,7 @@
 from pypy.rlib.objectmodel import specialize, we_are_translated
 from pypy.rpython.lltypesystem import lltype, llmemory
 from pypy.jit.codegen.model import AbstractRGenOp, GenLabel, GenBuilder
-from pypy.jit.codegen.model import GenVar, GenConst, CodeGenSwitch
+from pypy.jit.codegen.model import GenConst, CodeGenSwitch
 from pypy.jit.codegen.model import ReplayBuilder, dummy_var
 from pypy.jit.codegen.i386.codebuf import CodeBlockOverflow
 from pypy.jit.codegen.i386.operation import *
@@ -251,7 +251,7 @@
         self.graphctx.ensure_stack_vars(allocator.nstackmax)
         del self.operations[:]
         if renaming:
-            self.inputargs_gv = [GenVar() for v in final_vars_gv]
+            self.inputargs_gv = [GenVar386() for v in final_vars_gv]
         else:
             # just keep one copy of each Variable that is alive
             self.inputargs_gv = final_vars_gv
@@ -617,7 +617,7 @@
         inputargs_gv = []
         inputoperands = []
         for i in range(numargs):
-            inputargs_gv.append(GenVar())
+            inputargs_gv.append(GenVar386())
             ofs = WORD * (GraphCtx.PROLOGUE_FIXED_WORDS+i)
             inputoperands.append(mem(ebp, ofs))
         builder = Builder(self, graphctx, inputargs_gv, inputoperands)



More information about the Pypy-commit mailing list