Author: Armin Rigo <[email protected]>
Branch: partial-virtualizable
Changeset: r44326:308112440941
Date: 2011-05-20 13:33 +0200
http://bitbucket.org/pypy/pypy/changeset/308112440941/
Log: Fix the test.
diff --git a/pypy/jit/metainterp/compile.py b/pypy/jit/metainterp/compile.py
--- a/pypy/jit/metainterp/compile.py
+++ b/pypy/jit/metainterp/compile.py
@@ -684,6 +684,20 @@
else:
finishargs = []
#
+ # must cancel the optimization done by optimize_PARTIAL_VIRTUALIZABLE
+ # in optimizeopt/virtualize.py
+ setoperations = []
+ vinfo = jitdriver_sd.virtualizable_info
+ if vinfo is not None:
+ vablebox = inputargs[jitdriver_sd.index_of_virtualizable]
+ src_index = nb_red_args
+ for descr in vinfo.static_field_descrs:
+ valuebox = inputargs[src_index]
+ setoperations.append(
+ ResOperation(rop.SETFIELD_GC, [vablebox, valuebox], None,
+ descr=descr))
+ # ... arrays ...
+ #
jd = jitdriver_sd
faildescr = propagate_exception_descr
operations = [
@@ -697,6 +711,7 @@
[history.ConstInt(42),
history.ConstInt(0)],
history.BoxInt()))
+ operations = setoperations + operations
operations = get_deep_immutable_oplist(operations)
cpu.compile_loop(inputargs, operations, loop_token, log=False)
if memory_manager is not None: # for tests
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit