[pypy-svn] pypy fast-forward: (lac, arigo)
arigo
commits-noreply at bitbucket.org
Sun Jan 16 19:23:24 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch: fast-forward
Changeset: r40728:3064d380cae9
Date: 2011-01-16 16:57 +0100
http://bitbucket.org/pypy/pypy/changeset/3064d380cae9/
Log: (lac, arigo)
Modify test_dis to work around the pypy optimization of generating
the CALL_LIKELY_BUILTIN bytecode.
diff --git a/lib-python/2.7.0/test/test_dis.py b/lib-python/modified-2.7.0/test/test_dis.py
copy from lib-python/2.7.0/test/test_dis.py
copy to lib-python/modified-2.7.0/test/test_dis.py
--- a/lib-python/2.7.0/test/test_dis.py
+++ b/lib-python/modified-2.7.0/test/test_dis.py
@@ -22,14 +22,16 @@
_f.func_code.co_firstlineno + 2)
+# we "call" rangexxx() instead of range() to disable the
+# pypy optimization that turns it into CALL_LIKELY_BUILTIN.
def bug708901():
- for res in range(1,
- 10):
+ for res in rangexxx(1,
+ 10):
pass
dis_bug708901 = """\
%-4d 0 SETUP_LOOP 23 (to 26)
- 3 LOAD_GLOBAL 0 (range)
+ 3 LOAD_GLOBAL 0 (rangexxx)
6 LOAD_CONST 1 (1)
%-4d 9 LOAD_CONST 2 (10)
More information about the Pypy-commit
mailing list