[pypy-svn] r63093 - pypy/branch/pyjitpl5/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Thu Mar 19 19:37:27 CET 2009


Author: arigo
Date: Thu Mar 19 19:37:26 2009
New Revision: 63093

Modified:
   pypy/branch/pyjitpl5/pypy/jit/metainterp/executor.py
   pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
Log:
RPython fixes.


Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/executor.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/executor.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/executor.py	Thu Mar 19 19:37:26 2009
@@ -218,3 +218,8 @@
     func = get_execute_function(cpu, opnum)
     return func(cpu, argboxes, descr)
 execute._annspecialcase_ = 'specialize:arg(1)'
+
+def execute_nonspec(cpu, opnum, argboxes, descr=None):
+    check_descr(descr)
+    func = cpu._execute_list[opnum]
+    return func(cpu, argboxes, descr)

Modified: pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	(original)
+++ pypy/branch/pyjitpl5/pypy/jit/metainterp/optimize.py	Thu Mar 19 19:37:26 2009
@@ -472,6 +472,7 @@
                                       [newbox, ofs, fieldbox],
                                       None, descr=ld.arraydescr)
                 else:
+                    assert isinstance(ofs, AbstractDescr)
                     op = ResOperation(rop.SETFIELD_GC, [newbox, fieldbox],
                                       None, descr=ofs)
                 rebuild_ops.append(op)
@@ -489,6 +490,7 @@
                                       [box, ofs, fieldbox],
                                       None, descr=ld.arraydescr)
                 else:
+                    assert isinstance(ofs, AbstractDescr)
                     op = ResOperation(rop.SETFIELD_GC, [box, fieldbox],
                                       None, descr=ofs)
                 rebuild_ops.append(op)
@@ -538,6 +540,7 @@
                                        [box, ofs, fieldbox],
                                        None, descr=ad)
                 else:
+                    assert isinstance(ofs, AbstractDescr)
                     op1 = ResOperation(rop.SETFIELD_GC, [box, fieldbox],
                                        None, descr=ofs)
                 rebuild_ops.append(op1)
@@ -853,9 +856,10 @@
         currentvalues[guard_op.liveboxes[i]] = boxes_from_frame[i]
 
     # interpret the operations stored in 'rebuild_ops'
+    cpu = metainterp.cpu
     for op in guard_op.rebuild_ops:
         argboxes = get_in_list(currentvalues, op.args)
-        resbox = metainterp.execute_and_record(op.opnum, argboxes, op.descr)
+        resbox = executor.execute_nonspec(cpu, op.opnum, argboxes, op.descr)
         if resbox is not None:
             currentvalues[op.result] = resbox
     # done



More information about the Pypy-commit mailing list