Author: Maciej Fijalkowski <[email protected]>
Branch: better-jit-hooks
Changeset: r51118:6249a65d583e
Date: 2012-01-07 15:57 +0200
http://bitbucket.org/pypy/pypy/changeset/6249a65d583e/
Log: oops, a test and a fix
diff --git a/pypy/module/pypyjit/interp_resop.py
b/pypy/module/pypyjit/interp_resop.py
--- a/pypy/module/pypyjit/interp_resop.py
+++ b/pypy/module/pypyjit/interp_resop.py
@@ -79,7 +79,7 @@
def wrap_oplist(space, logops, operations, ops_offset):
return [WrappedOp(jit_hooks._cast_to_gcref(op),
- ops_offset[op],
+ ops_offset.get(op, 0),
logops.repr_of_resop(op)) for op in operations]
@unwrap_spec(num=int, offset=int, repr=str)
diff --git a/pypy/module/pypyjit/test/test_jit_hook.py
b/pypy/module/pypyjit/test/test_jit_hook.py
--- a/pypy/module/pypyjit/test/test_jit_hook.py
+++ b/pypy/module/pypyjit/test/test_jit_hook.py
@@ -56,7 +56,8 @@
greenkey = [ConstInt(0), ConstInt(0), ConstPtr(code_gcref)]
offset = {}
for i, op in enumerate(oplist):
- offset[op] = i
+ if i != 1:
+ offset[op] = i
def interp_on_compile():
pypy_portal.on_compile(pypyjitdriver, logger, JitCellToken(),
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit