[pypy-commit] pypy speedup-list-comprehension: bump the pycode number and the sad case of renaming opcodes
fijal
noreply at buildbot.pypy.org
Fri Feb 24 02:36:09 CET 2012
Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: speedup-list-comprehension
Changeset: r52824:287a83309e74
Date: 2012-02-23 18:35 -0700
http://bitbucket.org/pypy/pypy/changeset/287a83309e74/
Log: bump the pycode number and the sad case of renaming opcodes
diff --git a/lib-python/modified-2.7/opcode.py b/lib-python/modified-2.7/opcode.py
--- a/lib-python/modified-2.7/opcode.py
+++ b/lib-python/modified-2.7/opcode.py
@@ -119,39 +119,40 @@
def_op('POP_BLOCK', 87)
def_op('END_FINALLY', 88)
def_op('BUILD_CLASS', 89)
+def_op('BUILD_LIST_FROM_ARG', 90)
-HAVE_ARGUMENT = 90 # Opcodes from here have an argument:
+HAVE_ARGUMENT = 91 # Opcodes from here have an argument:
-name_op('STORE_NAME', 90) # Index in name list
-name_op('DELETE_NAME', 91) # ""
-def_op('UNPACK_SEQUENCE', 92) # Number of tuple items
-jrel_op('FOR_ITER', 93)
-def_op('LIST_APPEND', 94)
-name_op('STORE_ATTR', 95) # Index in name list
-name_op('DELETE_ATTR', 96) # ""
-name_op('STORE_GLOBAL', 97) # ""
-name_op('DELETE_GLOBAL', 98) # ""
-def_op('DUP_TOPX', 99) # number of items to duplicate
-def_op('LOAD_CONST', 100) # Index in const list
-hasconst.append(100)
-name_op('LOAD_NAME', 101) # Index in name list
-def_op('BUILD_TUPLE', 102) # Number of tuple items
-def_op('BUILD_LIST', 103) # Number of list items
-def_op('BUILD_SET', 104) # Number of set items
-def_op('BUILD_MAP', 105) # Number of dict entries (upto 255)
-name_op('LOAD_ATTR', 106) # Index in name list
-def_op('COMPARE_OP', 107) # Comparison operator
-hascompare.append(107)
-name_op('IMPORT_NAME', 108) # Index in name list
-name_op('IMPORT_FROM', 109) # Index in name list
-jrel_op('JUMP_FORWARD', 110) # Number of bytes to skip
-jabs_op('JUMP_IF_FALSE_OR_POP', 111) # Target byte offset from beginning of code
-jabs_op('JUMP_IF_TRUE_OR_POP', 112) # ""
-jabs_op('JUMP_ABSOLUTE', 113) # ""
-jabs_op('POP_JUMP_IF_FALSE', 114) # ""
-jabs_op('POP_JUMP_IF_TRUE', 115) # ""
+name_op('STORE_NAME', 91) # Index in name list
+name_op('DELETE_NAME', 92) # ""
+def_op('UNPACK_SEQUENCE', 93) # Number of tuple items
+jrel_op('FOR_ITER', 94)
+def_op('LIST_APPEND', 95)
+name_op('STORE_ATTR', 96) # Index in name list
+name_op('DELETE_ATTR', 97) # ""
+name_op('STORE_GLOBAL', 98) # ""
+name_op('DELETE_GLOBAL', 99) # ""
+def_op('DUP_TOPX', 100) # number of items to duplicate
+def_op('LOAD_CONST', 101) # Index in const list
+hasconst.append(101)
+name_op('LOAD_NAME', 102) # Index in name list
+def_op('BUILD_TUPLE', 103) # Number of tuple items
+def_op('BUILD_LIST', 104) # Number of list items
+def_op('BUILD_SET', 105) # Number of set items
+def_op('BUILD_MAP', 106) # Number of dict entries (upto 255)
+name_op('LOAD_ATTR', 107) # Index in name list
+def_op('COMPARE_OP', 108) # Comparison operator
+hascompare.append(108)
+name_op('IMPORT_NAME', 109) # Index in name list
+name_op('IMPORT_FROM', 110) # Index in name list
+jrel_op('JUMP_FORWARD', 111) # Number of bytes to skip
+jabs_op('JUMP_IF_FALSE_OR_POP', 112) # Target byte offset from beginning of code
+jabs_op('JUMP_IF_TRUE_OR_POP', 113) # ""
+jabs_op('JUMP_ABSOLUTE', 114) # ""
+jabs_op('POP_JUMP_IF_FALSE', 115) # ""
+jabs_op('POP_JUMP_IF_TRUE', 116) # ""
-name_op('LOAD_GLOBAL', 116) # Index in name list
+name_op('LOAD_GLOBAL', 117) # Index in name list
jabs_op('CONTINUE_LOOP', 119) # Target address
jrel_op('SETUP_LOOP', 120) # Distance to target address
@@ -192,6 +193,5 @@
def_op('LOOKUP_METHOD', 201) # Index in name list
hasname.append(201)
def_op('CALL_METHOD', 202) # #args not including 'self'
-def_op('BUILD_LIST_FROM_ARG', 203)
del def_op, name_op, jrel_op, jabs_op
diff --git a/pypy/interpreter/pycode.py b/pypy/interpreter/pycode.py
--- a/pypy/interpreter/pycode.py
+++ b/pypy/interpreter/pycode.py
@@ -28,7 +28,7 @@
# Magic numbers for the bytecode version in code objects.
# See comments in pypy/module/imp/importing.
cpython_magic, = struct.unpack("<i", imp.get_magic()) # host magic number
-default_magic = (168686339+2) | 0x0a0d0000 # this PyPy's magic
+default_magic = (168686339+3) | 0x0a0d0000 # this PyPy's magic
# (from CPython 2.7.0)
# cpython_code_signature helper
More information about the pypy-commit
mailing list