Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(111)

Side by Side Diff: Lib/opcode.py

Issue 20103: http://bugs.python.org/issue2459 -- speed up loops SVN Base: http://svn.python.org/view/*checkout*/python/trunk/
Patch Set: Created 9 months, 1 week ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
OLDNEW
1 1
2 """ 2 """
3 opcode module - potentially shared between dis and other modules which 3 opcode module - potentially shared between dis and other modules which
4 operate on bytecodes (e.g. peephole optimizers). 4 operate on bytecodes (e.g. peephole optimizers).
5 """ 5 """
6 6
7 __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs", 7 __all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs",
8 "haslocal", "hascompare", "hasfree", "opname", "opmap", 8 "haslocal", "hascompare", "hasfree", "opname", "opmap",
9 "HAVE_ARGUMENT", "EXTENDED_ARG"] 9 "HAVE_ARGUMENT", "EXTENDED_ARG"]
10 10
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 def_op('YIELD_VALUE', 86) 119 def_op('YIELD_VALUE', 86)
120 def_op('POP_BLOCK', 87) 120 def_op('POP_BLOCK', 87)
121 def_op('END_FINALLY', 88) 121 def_op('END_FINALLY', 88)
122 def_op('BUILD_CLASS', 89) 122 def_op('BUILD_CLASS', 89)
123 123
124 HAVE_ARGUMENT = 90 # Opcodes from here have an argument: 124 HAVE_ARGUMENT = 90 # Opcodes from here have an argument:
125 125
126 name_op('STORE_NAME', 90) # Index in name list 126 name_op('STORE_NAME', 90) # Index in name list
127 name_op('DELETE_NAME', 91) # "" 127 name_op('DELETE_NAME', 91) # ""
128 def_op('UNPACK_SEQUENCE', 92) # Number of tuple items 128 def_op('UNPACK_SEQUENCE', 92) # Number of tuple items
129 jrel_op('FOR_ITER', 93) 129 jabs_op('FOR_ITER', 93)
130 def_op('LIST_APPEND', 94) 130 def_op('LIST_APPEND', 94)
131 name_op('STORE_ATTR', 95) # Index in name list 131 name_op('STORE_ATTR', 95) # Index in name list
132 name_op('DELETE_ATTR', 96) # "" 132 name_op('DELETE_ATTR', 96) # ""
133 name_op('STORE_GLOBAL', 97) # "" 133 name_op('STORE_GLOBAL', 97) # ""
134 name_op('DELETE_GLOBAL', 98) # "" 134 name_op('DELETE_GLOBAL', 98) # ""
135 def_op('DUP_TOPX', 99) # number of items to duplicate 135 def_op('DUP_TOPX', 99) # number of items to duplicate
136 def_op('LOAD_CONST', 100) # Index in const list 136 def_op('LOAD_CONST', 100) # Index in const list
137 hasconst.append(100) 137 hasconst.append(100)
138 name_op('LOAD_NAME', 101) # Index in name list 138 name_op('LOAD_NAME', 101) # Index in name list
139 def_op('BUILD_TUPLE', 102) # Number of tuple items 139 def_op('BUILD_TUPLE', 102) # Number of tuple items
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 def_op('STORE_DEREF', 137) 178 def_op('STORE_DEREF', 137)
179 hasfree.append(137) 179 hasfree.append(137)
180 180
181 def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8) 181 def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8)
182 def_op('CALL_FUNCTION_KW', 141) # #args + (#kwargs << 8) 182 def_op('CALL_FUNCTION_KW', 141) # #args + (#kwargs << 8)
183 def_op('CALL_FUNCTION_VAR_KW', 142) # #args + (#kwargs << 8) 183 def_op('CALL_FUNCTION_VAR_KW', 142) # #args + (#kwargs << 8)
184 def_op('EXTENDED_ARG', 143) 184 def_op('EXTENDED_ARG', 143)
185 EXTENDED_ARG = 143 185 EXTENDED_ARG = 143
186 186
187 del def_op, name_op, jrel_op, jabs_op 187 del def_op, name_op, jrel_op, jabs_op
OLDNEW

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497