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

Side by Side Diff: Lib/opcode.py

Issue 27095: Simplify MAKE_FUNCTION
Patch Set: Created 3 years, 4 months ago
Left:
Right:
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", "hasnargs"] 9 "HAVE_ARGUMENT", "EXTENDED_ARG", "hasnargs"]
10 10
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 def_op('LOAD_FAST', 124) # Local variable number 166 def_op('LOAD_FAST', 124) # Local variable number
167 haslocal.append(124) 167 haslocal.append(124)
168 def_op('STORE_FAST', 125) # Local variable number 168 def_op('STORE_FAST', 125) # Local variable number
169 haslocal.append(125) 169 haslocal.append(125)
170 def_op('DELETE_FAST', 126) # Local variable number 170 def_op('DELETE_FAST', 126) # Local variable number
171 haslocal.append(126) 171 haslocal.append(126)
172 172
173 def_op('RAISE_VARARGS', 130) # Number of raise arguments (1, 2, or 3) 173 def_op('RAISE_VARARGS', 130) # Number of raise arguments (1, 2, or 3)
174 def_op('CALL_FUNCTION', 131) # #args + (#kwargs << 8) 174 def_op('CALL_FUNCTION', 131) # #args + (#kwargs << 8)
175 hasnargs.append(131) 175 hasnargs.append(131)
176 def_op('MAKE_FUNCTION', 132) # Number of args with default values 176 def_op('MAKE_FUNCTION', 132) # Flags (default args, kwonly default args, anno tations, free variables)
storchaka 2016/05/27 22:13:11 Too long line.
177 def_op('BUILD_SLICE', 133) # Number of items 177 def_op('BUILD_SLICE', 133) # Number of items
178 def_op('MAKE_CLOSURE', 134)
179 def_op('LOAD_CLOSURE', 135) 178 def_op('LOAD_CLOSURE', 135)
180 hasfree.append(135) 179 hasfree.append(135)
181 def_op('LOAD_DEREF', 136) 180 def_op('LOAD_DEREF', 136)
182 hasfree.append(136) 181 hasfree.append(136)
183 def_op('STORE_DEREF', 137) 182 def_op('STORE_DEREF', 137)
184 hasfree.append(137) 183 hasfree.append(137)
185 def_op('DELETE_DEREF', 138) 184 def_op('DELETE_DEREF', 138)
186 hasfree.append(138) 185 hasfree.append(138)
187 186
188 def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8) 187 def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8)
(...skipping 19 matching lines...) Expand all
208 207
209 def_op('BUILD_LIST_UNPACK', 149) 208 def_op('BUILD_LIST_UNPACK', 149)
210 def_op('BUILD_MAP_UNPACK', 150) 209 def_op('BUILD_MAP_UNPACK', 150)
211 def_op('BUILD_MAP_UNPACK_WITH_CALL', 151) 210 def_op('BUILD_MAP_UNPACK_WITH_CALL', 151)
212 def_op('BUILD_TUPLE_UNPACK', 152) 211 def_op('BUILD_TUPLE_UNPACK', 152)
213 def_op('BUILD_SET_UNPACK', 153) 212 def_op('BUILD_SET_UNPACK', 153)
214 213
215 def_op('FORMAT_VALUE', 155) 214 def_op('FORMAT_VALUE', 155)
216 215
217 del def_op, name_op, jrel_op, jabs_op 216 del def_op, name_op, jrel_op, jabs_op
OLDNEW

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+