[pypy-commit] pypy default: Fix: un-comment some assertion that is really checking an important
arigo
noreply at buildbot.pypy.org
Tue May 27 17:58:06 CEST 2014
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r71741:2898a860e1fa
Date: 2014-05-27 17:57 +0200
http://bitbucket.org/pypy/pypy/changeset/2898a860e1fa/
Log: Fix: un-comment some assertion that is really checking an important
property; and fix test_string:test_promote_string() by not calling
make_result_of_lastop() indirectly from opimpl_str_guard_value().
diff --git a/rpython/jit/metainterp/pyjitpl.py b/rpython/jit/metainterp/pyjitpl.py
--- a/rpython/jit/metainterp/pyjitpl.py
+++ b/rpython/jit/metainterp/pyjitpl.py
@@ -167,12 +167,11 @@
def make_result_of_lastop(self, resultbox):
got_type = resultbox.type
- # XXX disabled for now, conflicts with str_guard_value
- #if not we_are_translated():
- # typeof = {'i': history.INT,
- # 'r': history.REF,
- # 'f': history.FLOAT}
- # assert typeof[self.jitcode._resulttypes[self.pc]] == got_type
+ if not we_are_translated():
+ typeof = {'i': history.INT,
+ 'r': history.REF,
+ 'f': history.FLOAT}
+ assert typeof[self.jitcode._resulttypes[self.pc]] == got_type
target_index = ord(self.bytecode[self.pc-1])
if got_type == history.INT:
self.registers_i[target_index] = resultbox
@@ -1321,14 +1320,14 @@
self.metainterp.clear_exception()
resbox = self.metainterp.execute_and_record_varargs(opnum, argboxes,
descr=descr)
- if resbox is not None:
- self.make_result_of_lastop(resbox)
- # ^^^ this is done before handle_possible_exception() because we
- # need the box to show up in get_list_of_active_boxes()
if pure and self.metainterp.last_exc_value_box is None and resbox:
resbox = self.metainterp.record_result_of_call_pure(resbox)
exc = exc and not isinstance(resbox, Const)
if exc:
+ if resbox is not None:
+ self.make_result_of_lastop(resbox)
+ # ^^^ this is done before handle_possible_exception() because we
+ # need the box to show up in get_list_of_active_boxes()
self.metainterp.handle_possible_exception()
else:
self.metainterp.assert_no_exception()
More information about the pypy-commit
mailing list