[pypy-svn] r63258 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp

arigo at codespeak.net arigo at codespeak.net
Mon Mar 23 21:43:49 CET 2009


Author: arigo
Date: Mon Mar 23 21:43:48 2009
New Revision: 63258

Modified:
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/optimize.py
   pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
Log:
Cool, we don't actually need rebuild_boxes_from_guard_failure any more.


Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/optimize.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/optimize.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/optimize.py	Mon Mar 23 21:43:48 2009
@@ -818,29 +818,22 @@
         result.append(box)
     return result
 
-def rebuild_boxes_from_guard_failure(guard_op, cpu, history, boxes_from_frame):
-##    print
-##    print guard_op.liveboxes
+##def rebuild_boxes_from_guard_failure(guard_op, cpu, history, boxes_from_frame):
+##    currentvalues = {}
+##    assert len(boxes_from_frame) == len(guard_op.liveboxes)
+##    for i in range(len(boxes_from_frame)):
+##        currentvalues[guard_op.liveboxes[i]] = boxes_from_frame[i]
+
+##    # interpret the operations stored in 'rebuild_ops'
 ##    for op in guard_op.rebuild_ops:
-##        print op
-##    print guard_op.unoptboxes
-##    print '^'*79
-##    import pdb; pdb.set_trace()
-    currentvalues = {}
-    assert len(boxes_from_frame) == len(guard_op.liveboxes)
-    for i in range(len(boxes_from_frame)):
-        currentvalues[guard_op.liveboxes[i]] = boxes_from_frame[i]
-
-    # interpret the operations stored in 'rebuild_ops'
-    for op in guard_op.rebuild_ops:
-        argboxes = get_in_list(currentvalues, op.args)
-        # similar to execute_and_record, but not specialized on op.opnum
-        resbox = executor.execute_nonspec(cpu, op.opnum, argboxes, op.descr)
-        history.record(op.opnum, argboxes, resbox, op.descr)
-        if resbox is not None:
-            currentvalues[op.result] = resbox
-    # done
-    return [currentvalues[box] for box in guard_op.unoptboxes]
+##        argboxes = get_in_list(currentvalues, op.args)
+##        # similar to execute_and_record, but not specialized on op.opnum
+##        resbox = executor.execute_nonspec(cpu, op.opnum, argboxes, op.descr)
+##        history.record(op.opnum, argboxes, resbox, op.descr)
+##        if resbox is not None:
+##            currentvalues[op.result] = resbox
+##    # done
+##    return [currentvalues[box] for box in guard_op.unoptboxes]
 
 
 def partition(array, left, right):

Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	(original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py	Mon Mar 23 21:43:48 2009
@@ -933,15 +933,8 @@
             self.history = history.History(self.cpu)
         else:
             self.history = history.BlackHole(self.cpu)
-        boxes_from_frame = guard_failure.args
-        if 0:  # xxx guard_op.rebuild_ops is not None:
-            newboxes = optimize.rebuild_boxes_from_guard_failure(
-                guard_op, self.cpu, self.history, boxes_from_frame)
-        else:
-            # xxx for tests only
-            newboxes = boxes_from_frame
         self.rebuild_state_after_failure(guard_failure.key.resume_info,
-                                         newboxes)
+                                         guard_failure.args)
 
     def handle_exception(self):
         etype = self.cpu.get_exception()



More information about the Pypy-commit mailing list