[pypy-commit] pypy conditional_call_value_4: translation fix
arigo
pypy.commits at gmail.com
Wed Nov 23 15:38:28 EST 2016
Author: Armin Rigo <arigo at tunes.org>
Branch: conditional_call_value_4
Changeset: r88593:1feae2bc5e13
Date: 2016-11-23 20:55 +0100
http://bitbucket.org/pypy/pypy/changeset/1feae2bc5e13/
Log: translation fix
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
@@ -1731,15 +1731,25 @@
effectinfo = descr.get_extra_info()
assert not effectinfo.check_forces_virtual_or_virtualizable()
exc = effectinfo.check_can_raise()
- if not is_value:
- opnum = rop.COND_CALL
- else:
- opnum = OpHelpers.cond_call_value_for_descr(descr)
+ allboxes = [condbox] + allboxes
# COND_CALL cannot be pure (=elidable): it has no result.
# On the other hand, COND_CALL_VALUE is always calling a pure
# function.
- return self.execute_varargs(opnum, [condbox] + allboxes, descr,
- exc, pure=is_value)
+ if not is_value:
+ return self.execute_varargs(rop.COND_CALL, allboxes, descr,
+ exc, pure=False)
+ else:
+ opnum = OpHelpers.cond_call_value_for_descr(descr)
+ # work around the fact that execute_varargs() wants a
+ # constant for first argument
+ if opnum == rop.COND_CALL_VALUE_I:
+ return self.execute_varargs(rop.COND_CALL_VALUE_I, allboxes,
+ descr, exc, pure=True)
+ elif opnum == rop.COND_CALL_VALUE_R:
+ return self.execute_varargs(rop.COND_CALL_VALUE_R, allboxes,
+ descr, exc, pure=True)
+ else:
+ raise AssertionError
def _do_jit_force_virtual(self, allboxes, descr, pc):
assert len(allboxes) == 2
More information about the pypy-commit
mailing list