[pypy-commit] pypy stmgc-c7: Fix some of these tests
arigo
noreply at buildbot.pypy.org
Wed Mar 25 09:13:24 CET 2015
Author: Armin Rigo <arigo at tunes.org>
Branch: stmgc-c7
Changeset: r76556:23ce9fa6042c
Date: 2015-03-25 09:12 +0100
http://bitbucket.org/pypy/pypy/changeset/23ce9fa6042c/
Log: Fix some of these tests
diff --git a/pypy/module/pypyjit/test_pypy_c/model.py b/pypy/module/pypyjit/test_pypy_c/model.py
--- a/pypy/module/pypyjit/test_pypy_c/model.py
+++ b/pypy/module/pypyjit/test_pypy_c/model.py
@@ -327,7 +327,8 @@
ticker0 = getfield_raw(#, descr=<FieldS pypysig_long_struct.c_value .*>)
ticker_cond0 = int_lt(ticker0, 0)
guard_false(ticker_cond0, descr=...)
- """
+ guard_not_invalidated?
+ """ # guard_not_invalidated might be at the end, in pypy-stm
src = src.replace('--TICK--', ticker_check)
#
# this is the ticker check generated if we have threads
diff --git a/pypy/module/pypyjit/test_pypy_c/test_00_model.py b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
--- a/pypy/module/pypyjit/test_pypy_c/test_00_model.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_00_model.py
@@ -446,14 +446,19 @@
assert loop.filename == self.filepath
assert loop.code.co.co_name == 'f'
#
- ops = loop.allops()
- assert log.opnames(ops) == [
- # this is the actual loop
- 'int_lt', 'guard_true', 'int_add',
- # this is the signal checking stuff
- 'guard_not_invalidated', 'getfield_raw', 'int_lt', 'guard_false',
- 'jump'
- ]
+ ops = log.opnames(loop.allops())
+ found = False
+ for SIGCHECK in (
+ ['guard_not_invalidated', 'getfield_raw', 'int_lt', 'guard_false'],
+ ['getfield_raw', 'int_lt', 'guard_false', 'guard_not_invalidated'],
+ ):
+ found |= (ops == [
+ # this is the actual loop
+ 'int_lt', 'guard_true', 'int_add',
+ # this is the signal checking stuff
+ ] + SIGCHECK + ['jump'])
+ #
+ assert found
def test_ops_by_id(self):
def f():
@@ -512,13 +517,18 @@
assert add_ops == ['int_add']
#
ops = log.opnames(loop.allops())
- assert ops == [
- # this is the actual loop
- 'int_lt', 'guard_true', 'force_token', 'int_add',
- # this is the signal checking stuff
- 'guard_not_invalidated', 'getfield_raw', 'int_lt', 'guard_false',
- 'jump'
- ]
+ found = False
+ for SIGCHECK in (
+ ['guard_not_invalidated', 'getfield_raw', 'int_lt', 'guard_false'],
+ ['getfield_raw', 'int_lt', 'guard_false', 'guard_not_invalidated'],
+ ):
+ found |= (ops == [
+ # this is the actual loop
+ 'int_lt', 'guard_true', 'force_token', 'int_add',
+ # this is the signal checking stuff
+ ] + SIGCHECK + ['jump'])
+ #
+ assert found
def test_loop_match(self):
def f():
@@ -534,10 +544,11 @@
guard_true(i6, descr=...)
i8 = int_add(i4, 1)
# signal checking stuff
- guard_not_invalidated(descr=...)
+ guard_not_invalidated?
i10 = getfield_raw(..., descr=<.* pypysig_long_struct.c_value .*>)
i14 = int_lt(i10, 0)
guard_false(i14, descr=...)
+ guard_not_invalidated?
jump(..., descr=...)
""")
#
diff --git a/pypy/module/pypyjit/test_pypy_c/test_thread.py b/pypy/module/pypyjit/test_pypy_c/test_thread.py
--- a/pypy/module/pypyjit/test_pypy_c/test_thread.py
+++ b/pypy/module/pypyjit/test_pypy_c/test_thread.py
@@ -71,7 +71,6 @@
i59 = call(ConstClass(RPyThreadReleaseLock), i37, descr=<Calli . i EF=2>)
i60 = int_is_true(i59)
guard_false(i60, descr=...)
- guard_not_invalidated(descr=...)
--TICK--
jump(..., descr=...)
""")
More information about the pypy-commit
mailing list