[pypy-svn] r63642 - pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp
fijal at codespeak.net
fijal at codespeak.net
Sun Apr 5 00:03:38 CEST 2009
Author: fijal
Date: Sun Apr 5 00:03:38 2009
New Revision: 63642
Modified:
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/pyjitpl.py
pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py
Log:
Fix translation. I think I need to disable --slow, because it seems
armin never run non-obligatory tests :-)
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 Sun Apr 5 00:03:38 2009
@@ -909,13 +909,16 @@
else:
# Found! Compile it as a loop.
if j > 0:
+ assert start >= 0
del self.history.operations[:start]
elif self.extra_rebuild_operations >= 0:
# The history only starts at a bridge, not at the
# full loop header. Complete it as a full loop by
# inserting a copy of the operations from the old
# loop branch before the guard that failed.
- del self.history.operations[:self.extra_rebuild_operations]
+ lgt = self.extra_rebuild_operations
+ assert lgt >= 0
+ del self.history.operations[:lgt]
compile.prepare_loop_from_bridge(self, self.resumekey)
loop = self.compile(original_boxes, live_arg_boxes)
raise GenerateMergePoint(live_arg_boxes, loop)
@@ -1031,7 +1034,6 @@
must_compile = False
if not we_are_translated():
history.log.info("ignoring old version of the guard")
- if must_compile:
self.history = history.History(self.cpu)
extra = len(suboperations) - 1
assert extra >= 0
Modified: pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py
==============================================================================
--- pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py (original)
+++ pypy/branch/pyjitpl5-simplify/pypy/jit/metainterp/warmspot.py Sun Apr 5 00:03:38 2009
@@ -364,9 +364,11 @@
def wrap_into(box, value):
TYPE = lltype.typeOf(value)
- if isinstance(box, history.BoxPtr):
+ if isinstance(TYPE, lltype.Ptr):
+ assert isinstance(box, history.BoxPtr)
box.changevalue_ptr(lltype.cast_opaque_ptr(llmemory.GCREF, value))
- elif isinstance(box, history.BoxInt):
+ elif TYPE == lltype.Signed:
+ assert isinstance(box, history.BoxInt)
box.changevalue_int(cast_whatever_to_int(TYPE, value))
else:
raise AssertionError("box is: %s" % (box,))
More information about the Pypy-commit
mailing list