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

Delta Between Two Patch Sets: Lib/opcode.py

Issue 11682: PEP 380 reference implementation for 3.3
Left Patch Set: Created 8 years ago
Right Patch Set: Created 7 years, 6 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:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
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 25 matching lines...) Expand all
36 def_op(name, op) 36 def_op(name, op)
37 hasjrel.append(op) 37 hasjrel.append(op)
38 38
39 def jabs_op(name, op): 39 def jabs_op(name, op):
40 def_op(name, op) 40 def_op(name, op)
41 hasjabs.append(op) 41 hasjabs.append(op)
42 42
43 # Instruction opcodes for compiled code 43 # Instruction opcodes for compiled code
44 # Blank lines correspond to available opcodes 44 # Blank lines correspond to available opcodes
45 45
46 def_op('STOP_CODE', 0)
47 def_op('POP_TOP', 1) 46 def_op('POP_TOP', 1)
48 def_op('ROT_TWO', 2) 47 def_op('ROT_TWO', 2)
49 def_op('ROT_THREE', 3) 48 def_op('ROT_THREE', 3)
50 def_op('DUP_TOP', 4) 49 def_op('DUP_TOP', 4)
51 def_op('DUP_TOP_TWO', 5) 50 def_op('DUP_TOP_TWO', 5)
52 51
53 def_op('NOP', 9) 52 def_op('NOP', 9)
54 def_op('UNARY_POSITIVE', 10) 53 def_op('UNARY_POSITIVE', 10)
55 def_op('UNARY_NEGATIVE', 11) 54 def_op('UNARY_NEGATIVE', 11)
56 def_op('UNARY_NOT', 12) 55 def_op('UNARY_NOT', 12)
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 jrel_op('SETUP_WITH', 143) 171 jrel_op('SETUP_WITH', 143)
173 172
174 def_op('LIST_APPEND', 145) 173 def_op('LIST_APPEND', 145)
175 def_op('SET_ADD', 146) 174 def_op('SET_ADD', 146)
176 def_op('MAP_ADD', 147) 175 def_op('MAP_ADD', 147)
177 176
178 def_op('EXTENDED_ARG', 144) 177 def_op('EXTENDED_ARG', 144)
179 EXTENDED_ARG = 144 178 EXTENDED_ARG = 144
180 179
181 del def_op, name_op, jrel_op, jabs_op 180 del def_op, name_op, jrel_op, jabs_op
LEFTRIGHT

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