[pypy-commit] pypy faster-nested-scopes: nonsense, nonsense. this needs to go to the celldict-versions branch :-(
cfbolz
noreply at buildbot.pypy.org
Fri Aug 26 23:24:35 CEST 2011
Author: Carl Friedrich Bolz <cfbolz at gmx.de>
Branch: faster-nested-scopes
Changeset: r46807:eb646b011bee
Date: 2011-08-26 23:30 +0200
http://bitbucket.org/pypy/pypy/changeset/eb646b011bee/
Log: nonsense, nonsense. this needs to go to the celldict-versions branch
:-(
diff --git a/pypy/module/pypyjit/test_pypy_c/test_call.py b/pypy/module/pypyjit/test_pypy_c/test_call.py
--- a/pypy/module/pypyjit/test_pypy_c/test_call.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_call.py
@@ -67,17 +67,24 @@
assert log.opnames(ops) == ["guard_value",
"getfield_gc", "guard_value",
"getfield_gc", "guard_value",
- "guard_not_invalidated"]
- # LOAD_GLOBAL of OFFSET but in different function folded
+ "getfield_gc", "guard_nonnull_class"]
+ # LOAD_GLOBAL of OFFSET but in different function partially folded
# away
+ # XXX could be improved
ops = entry_bridge.ops_by_id('add', opcode='LOAD_GLOBAL')
- assert log.opnames(ops) == ["guard_not_invalidated"]
+ assert log.opnames(ops) == ["guard_value", "getfield_gc", "guard_value"]
#
# two LOAD_GLOBAL of f, the second is folded away
ops = entry_bridge.ops_by_id('call', opcode='LOAD_GLOBAL')
- assert log.opnames(ops) == []
+ assert log.opnames(ops) == ["getfield_gc", "guard_nonnull_class"]
#
assert entry_bridge.match_by_id('call', """
+ p29 = getfield_gc(ConstPtr(ptr28), descr=<GcPtrFieldDescr pypy.objspace.std.celldict.ModuleCell.inst_w_value .*>)
+ guard_nonnull_class(p29, ConstClass(Function), descr=...)
+ p33 = getfield_gc(p29, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_code .*>)
+ guard_value(p33, ConstPtr(ptr34), descr=...)
+ p35 = getfield_gc(p29, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_w_func_globals .*>)
+ p36 = getfield_gc(p29, descr=<GcPtrFieldDescr pypy.interpreter.function.Function.inst_closure .*>)
p38 = call(ConstClass(getexecutioncontext), descr=<GcPtrCallDescr>)
p39 = getfield_gc(p38, descr=<GcPtrFieldDescr pypy.interpreter.executioncontext.ExecutionContext.inst_topframeref .*>)
i40 = force_token()
@@ -93,16 +100,19 @@
# -----------------------------
loop, = log.loops_by_id('call')
assert loop.match("""
- guard_not_invalidated(descr=...)
- i9 = int_lt(i5, i6)
- guard_true(i9, descr=...)
- i10 = force_token()
- i12 = int_add(i5, 1)
+ i12 = int_lt(i5, i6)
+ guard_true(i12, descr=...)
i13 = force_token()
- i15 = int_add_ovf(i12, 1)
+ i15 = int_add(i5, 1)
+ i16 = int_add_ovf(i15, i7)
+ guard_no_overflow(descr=...)
+ i18 = force_token()
+ i20 = int_add_ovf(i16, 1)
+ guard_no_overflow(descr=...)
+ i21 = int_add_ovf(i20, i7)
guard_no_overflow(descr=...)
--TICK--
- jump(p0, p1, p2, p3, p4, i15, i6, i7, p8, descr=<Loop0>)
+ jump(p0, p1, p2, p3, p4, i21, i6, i7, p8, p9, p10, p11, descr=<Loop0>)
""")
def test_method_call(self):
diff --git a/pypy/module/pypyjit/test_pypy_c/test_globals.py b/pypy/module/pypyjit/test_pypy_c/test_globals.py
--- a/pypy/module/pypyjit/test_pypy_c/test_globals.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_globals.py
@@ -20,9 +20,11 @@
guard_value(p10, ConstPtr(ptr11), descr=...)
p12 = getfield_gc(p10, descr=<GcPtrFieldDescr .*W_DictMultiObject.inst_strategy .*>)
guard_value(p12, ConstPtr(ptr13), descr=...)
+ p15 = getfield_gc(ConstPtr(ptr14), descr=<GcPtrFieldDescr .*ModuleCell.inst_w_value .*>)
+ guard_isnull(p15, descr=...)
guard_not_invalidated(descr=...)
p19 = getfield_gc(ConstPtr(p17), descr=<GcPtrFieldDescr .*W_DictMultiObject.inst_strategy .*>)
guard_value(p19, ConstPtr(ptr20), descr=...)
p22 = getfield_gc(ConstPtr(ptr21), descr=<GcPtrFieldDescr .*ModuleCell.inst_w_value .*>)
guard_nonnull(p22, descr=...)
- """)
+ """)
\ No newline at end of file
diff --git a/pypy/module/pypyjit/test_pypy_c/test_instance.py b/pypy/module/pypyjit/test_pypy_c/test_instance.py
--- a/pypy/module/pypyjit/test_pypy_c/test_instance.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_instance.py
@@ -52,7 +52,7 @@
i10 = int_add_ovf(i5, i7)
guard_no_overflow(descr=...)
--TICK--
- jump(p0, p1, p2, p3, p4, i10, i6, i7, p8, descr=<Loop0>)
+ jump(p0, p1, p2, p3, p4, i10, i6, p7, i7, p8, descr=<Loop0>)
""")
def test_getattr_with_dynamic_attribute(self):
@@ -151,7 +151,6 @@
assert loop.match_by_id('loadattr',
'''
guard_not_invalidated(descr=...)
- i16 = arraylen_gc(p10, descr=<GcPtrArrayDescr>)
i19 = call(ConstClass(ll_dict_lookup), _, _, _, descr=...)
guard_no_exception(descr=...)
i21 = int_and(i19, _)
diff --git a/pypy/module/pypyjit/test_pypy_c/test_math.py b/pypy/module/pypyjit/test_pypy_c/test_math.py
--- a/pypy/module/pypyjit/test_pypy_c/test_math.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_math.py
@@ -47,7 +47,6 @@
assert loop.match("""
i2 = int_lt(i0, i1)
guard_true(i2, descr=...)
- guard_not_invalidated(descr=...)
f1 = cast_int_to_float(i0)
i3 = float_eq(f1, inf)
i4 = float_eq(f1, -inf)
@@ -61,4 +60,4 @@
i7 = int_add(i0, f1)
--TICK--
jump(..., descr=)
- """)
+ """)
\ No newline at end of file
diff --git a/pypy/module/pypyjit/test_pypy_c/test_string.py b/pypy/module/pypyjit/test_pypy_c/test_string.py
--- a/pypy/module/pypyjit/test_pypy_c/test_string.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_string.py
@@ -105,5 +105,5 @@
i58 = int_add_ovf(i6, i57)
guard_no_overflow(descr=...)
--TICK--
- jump(p0, p1, p2, p3, p4, p5, i58, i7, descr=<Loop4>)
+ jump(p0, p1, p2, p3, p4, p5, i58, i7, i8, p9, p10, descr=<Loop4>)
""")
More information about the pypy-commit
mailing list