[pypy-svn] r64541 - in pypy/branch/pyjitpl5-simplify/pypy/jit/backend: llgraph minimal x86

arigo at codespeak.net arigo at codespeak.net
Tue Apr 21 19:11:24 CEST 2009


Author: arigo
Date: Tue Apr 21 19:11:24 2009
New Revision: 64541

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/minimal/runner.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py
Log:
Kill has_lltype and has_ootype and move oo_is to class attributes.


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/llgraph/runner.py	Tue Apr 21 19:11:24 2009
@@ -67,16 +67,10 @@
 
 
 class BaseCPU(model.AbstractCPU):
-    has_lltype = True
-    has_ootype = True
 
     def __init__(self, rtyper, stats=None, translate_support_code=False,
                  annmixlevel=None):
         self.rtyper = rtyper
-        if rtyper is not None:
-            self.is_oo = rtyper.type_system.name == "ootypesystem"
-        else:
-            self.is_oo = False
         self.translate_support_code = translate_support_code
         self.stats = stats or MiniStats()
         self.stats.exec_counters = {}
@@ -89,7 +83,6 @@
         if translate_support_code:
             self.mixlevelann = annmixlevel
 
-
     def compile_operations(self, loop):
         """In a real assembler backend, this should assemble the given
         list of operations.  Here we just generate a similar CompiledLoop
@@ -244,6 +237,7 @@
 
 
 class LLtypeCPU(BaseCPU):
+    is_oo = False
 
     def __init__(self, *args, **kwds):
         BaseCPU.__init__(self, *args, **kwds)
@@ -405,6 +399,7 @@
                                                         self.memo_cast))
 
 class OOtypeCPU(BaseCPU):
+    is_oo = True
 
     @staticmethod
     def fielddescrof(T, fieldname):

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/minimal/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/minimal/runner.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/minimal/runner.py	Tue Apr 21 19:11:24 2009
@@ -7,8 +7,7 @@
 
 
 class CPU(object):
-    has_lltype = True
-    has_ootype = False    # XXX for now
+    is_oo = False    # XXX for now
 
     def __init__(self, rtyper, stats, translate_support_code=False,
                  mixlevelann=None):

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/backend/x86/runner.py	Tue Apr 21 19:11:24 2009
@@ -67,9 +67,7 @@
 
 class CPU386(object):
     debug = True
-    has_lltype = True
-    has_ootype = False
-    is_oo = False # XXX why all of those?
+    is_oo = False
 
     BOOTSTRAP_TP = lltype.FuncType([lltype.Ptr(rffi.CArray(lltype.Signed))],
                                    lltype.Signed)



More information about the Pypy-commit mailing list