Author: Maciej Fijalkowski <[email protected]>
Branch: optresult-unroll
Changeset: r79218:a0b1df551d4d
Date: 2015-08-25 10:38 +0200
http://bitbucket.org/pypy/pypy/changeset/a0b1df551d4d/
Log: fix some tests
diff --git a/rpython/jit/metainterp/compile.py
b/rpython/jit/metainterp/compile.py
--- a/rpython/jit/metainterp/compile.py
+++ b/rpython/jit/metainterp/compile.py
@@ -305,6 +305,7 @@
to the first operation.
"""
from rpython.jit.metainterp.optimizeopt import optimize_trace
+ from rpython.jit.metainterp.optimizeopt.optimizer import BasicLoopInfo
history = metainterp.history
metainterp_sd = metainterp.staticdata
@@ -328,6 +329,7 @@
except InvalidLoop:
# Fall back on jumping to preamble
xxx
+ return None
loop = partial_trace
loop.operations = (loop.operations + loop_info.extra_same_as +
diff --git a/rpython/jit/metainterp/optimizeopt/unroll.py
b/rpython/jit/metainterp/optimizeopt/unroll.py
--- a/rpython/jit/metainterp/optimizeopt/unroll.py
+++ b/rpython/jit/metainterp/optimizeopt/unroll.py
@@ -123,9 +123,9 @@
# the label_op again
label_op.initarglist(label_args + extra)
if new_virtual_state is not None:
- res = self.jump_to_preamble(start_label.getdescr(), end_jump,
- info)
- xxx
+ self.jump_to_preamble(start_label.getdescr(), end_jump, info)
+ return (UnrollInfo(target_token, label_op, []),
+ self.optimizer._newoperations)
#return new_virtual_state, self.optimizer._newoperations
return (UnrollInfo(target_token, label_op,
self.short_preamble_producer.extra_same_as),
diff --git a/rpython/jit/metainterp/test/test_loop.py
b/rpython/jit/metainterp/test/test_loop.py
--- a/rpython/jit/metainterp/test/test_loop.py
+++ b/rpython/jit/metainterp/test/test_loop.py
@@ -657,8 +657,8 @@
self.check_jitcell_token_count(1) # 1 loop, callable from the
interp
def test_example(self):
- myjitdriver = JitDriver(greens = [], #['i'],
- reds = ['i', 'res', 'a'])
+ myjitdriver = JitDriver(greens = ['i'],
+ reds = ['res', 'a'])
CO_INCREASE = 0
CO_JUMP_BACK_3 = 1
CO_DECREASE = 2
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit