[pypy-svn] r71831 - in pypy/trunk/pypy/jit: backend/x86 metainterp

fijal at codespeak.net fijal at codespeak.net
Sat Mar 6 00:11:12 CET 2010


Author: fijal
Date: Sat Mar  6 00:11:09 2010
New Revision: 71831

Modified:
   pypy/trunk/pypy/jit/backend/x86/assembler.py
   pypy/trunk/pypy/jit/backend/x86/runner.py
   pypy/trunk/pypy/jit/metainterp/history.py
   pypy/trunk/pypy/jit/metainterp/optimizeopt.py
   pypy/trunk/pypy/jit/metainterp/resume.py
Log:
(fijal, arigo reviewing)
Merge cleanup-warnings branch. This branch cleans up warnings that
show up during translation. There are still gc-related warnings left.


Modified: pypy/trunk/pypy/jit/backend/x86/assembler.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/assembler.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/assembler.py	Sat Mar  6 00:11:09 2010
@@ -100,6 +100,7 @@
     mc2 = None
     mc_size = MachineCodeBlockWrapper.MC_DEFAULT_SIZE
     _float_constants = None
+    _regalloc = None
 
     def __init__(self, cpu, translate_support_code=False,
                             failargs_limit=1000):

Modified: pypy/trunk/pypy/jit/backend/x86/runner.py
==============================================================================
--- pypy/trunk/pypy/jit/backend/x86/runner.py	(original)
+++ pypy/trunk/pypy/jit/backend/x86/runner.py	Sat Mar  6 00:11:09 2010
@@ -4,7 +4,7 @@
 from pypy.rpython.lltypesystem import lltype, llmemory, rffi
 from pypy.rpython.llinterp import LLInterpreter
 from pypy.rlib.objectmodel import we_are_translated
-from pypy.jit.metainterp import history
+from pypy.jit.metainterp import history, compile
 from pypy.jit.backend.x86.assembler import Assembler386
 from pypy.jit.backend.x86.regalloc import FORCE_INDEX_OFS
 from pypy.jit.backend.x86.profagent import ProfileAgent
@@ -141,3 +141,19 @@
 
 import pypy.jit.metainterp.executor
 pypy.jit.metainterp.executor.make_execute_list(CPU)
+
+# silence warnings
+
+history.LoopToken._x86_param_depth = 0
+history.LoopToken._x86_arglocs = (None, None)
+history.LoopToken._x86_frame_depth = 0
+history.LoopToken._x86_bootstrap_code = 0
+history.LoopToken._x86_direct_bootstrap_code = 0
+history.LoopToken._x86_failure_recovery_bytecode = 0
+history.LoopToken._x86_adr_jump_offset = 0
+history.LoopToken._x86_loop_code = 0
+history.LoopToken._x86_current_depths = (0, 0)
+
+compile._DoneWithThisFrameDescr._x86_current_depths = (0, 0)
+compile._DoneWithThisFrameDescr._x86_failure_recovery_bytecode = 0
+compile._DoneWithThisFrameDescr._x86_adr_jump_offset = 0

Modified: pypy/trunk/pypy/jit/metainterp/history.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/history.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/history.py	Sat Mar  6 00:11:09 2010
@@ -125,6 +125,31 @@
     def _clone_if_mutable(self):
         return self
 
+    def get_extra_info(self):
+        """ Implement in call descr
+        """
+        raise NotImplementedError
+
+    def is_array_of_pointers(self):
+        """ Implement for array descr
+        """
+        raise NotImplementedError
+
+    def is_array_of_floats(self):
+        """ Implement for array descr
+        """
+        raise NotImplementedError
+
+    def is_pointer_field(self):
+        """ Implement for field descr
+        """
+        raise NotImplementedError
+
+    def is_float_field(self):
+        """ Implement for field descr
+        """
+        raise NotImplementedError
+
 class AbstractFailDescr(AbstractDescr):
     index = -1
 
@@ -685,6 +710,7 @@
     terminating = False # see TerminatingLoopToken in compile.py
     # specnodes = ...
     # and more data specified by the backend when the loop is compiled
+    number = 0
 
     def __init__(self, number=0):
         self.number = number
@@ -864,6 +890,7 @@
     compiled_count = 0
     enter_count = 0
     aborted_count = 0
+    history = None
 
     def __init__(self):
         self.loops = []

Modified: pypy/trunk/pypy/jit/metainterp/optimizeopt.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/optimizeopt.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/optimizeopt.py	Sat Mar  6 00:11:09 2010
@@ -47,6 +47,7 @@
     last_guard_index = -1
 
     level = LEVEL_UNKNOWN
+    known_class = None
 
     def __init__(self, box):
         self.box = box
@@ -123,6 +124,21 @@
         # meaning it has been forced.
         return self.box is None
 
+    def getfield(self, ofs, default):
+        raise NotImplementedError
+
+    def setfield(self, ofs, value):
+        raise NotImplementedError
+
+    def getitem(self, index):
+        raise NotImplementedError
+
+    def getlength(self):
+        raise NotImplementedError
+
+    def setitem(self, index, value):
+        raise NotImplementedError
+
 class ConstantValue(OptValue):
     level = LEVEL_CONSTANT
 
@@ -172,6 +188,8 @@
     def _make_virtual(self, modifier):
         raise NotImplementedError("abstract base")
 
+    def _really_force(self):
+        raise NotImplementedError("abstract base")
 
 def get_fielddescrlist_cache(cpu):
     if not hasattr(cpu, '_optimizeopt_fielddescrlist_cache'):

Modified: pypy/trunk/pypy/jit/metainterp/resume.py
==============================================================================
--- pypy/trunk/pypy/jit/metainterp/resume.py	(original)
+++ pypy/trunk/pypy/jit/metainterp/resume.py	Sat Mar  6 00:11:09 2010
@@ -397,6 +397,8 @@
     def set_content(self, fieldnums):
         self.fieldnums = fieldnums
 
+    def debug_prints(self):
+        raise NotImplementedError
 
 class AbstractVirtualStructInfo(AbstractVirtualInfo):
     def __init__(self, fielddescrs):



More information about the Pypy-commit mailing list