Side by Side Diff

Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Keyboard Shortcuts

File
u :up to issue
m :publish + mail comments
M :edit review message
j / k :jump to file after / before current file
J / K :jump to next file with a comment after / before current file
Side-by-side diff
i :toggle intra-line diffs
e :expand all comments
c :collapse all comments
s :toggle showing all comments
n / p :next / previous diff chunk or comment
N / P :next / previous comment
<Up> / <Down> :next / previous line
<Enter> :respond to / edit current comment
d :mark current comment as done
Issue
u :up to list of issues
m :publish + mail comments
j / k :jump to patch after / before current patch
o / <Enter> :open current patch in side-by-side view
i :open current patch in unified diff view
Issue List
j / k :jump to issue after / before current issue
o / <Enter> :open current issue
# : close issue
Comment/message editing
<Ctrl> + s or <Ctrl> + Enter :save comment
<Esc> :cancel edit
Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(277)
Issues Repositories Search
Open Issues | Closed Issues | All Issues | Sign in with your Google Account to create issues and add comments

Side by Side Diff: Lib/opcode.py

Issue 160063: LOAD_METHOD/CALL_METHOD: Avoid allocating bound methods when possible (Closed)
Patch Set: Merge w/ trunk, fix test_profile Created 15 years, 5 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
« no previous file with comments | « JIT/opcodes/call.cc ('k') | Lib/test/test_llvm.py » ('j') | no next file with comments »
('i') | ('e') | ('c') | ('s')
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 132 matching lines...) | | Loading...
143 143
144 def_op('LOAD_CONST', 100) # Index in const list 144 def_op('LOAD_CONST', 100) # Index in const list
145 hasconst.append(100) 145 hasconst.append(100)
146 name_op('LOAD_NAME', 101) # Index in name list 146 name_op('LOAD_NAME', 101) # Index in name list
147 def_op('BUILD_TUPLE', 102) # Number of tuple items 147 def_op('BUILD_TUPLE', 102) # Number of tuple items
148 def_op('BUILD_LIST', 103) # Number of list items 148 def_op('BUILD_LIST', 103) # Number of list items
149 def_op('BUILD_MAP', 104) # Number of dict entries (upto 255) 149 def_op('BUILD_MAP', 104) # Number of dict entries (upto 255)
150 name_op('LOAD_ATTR', 105) # Index in name list 150 name_op('LOAD_ATTR', 105) # Index in name list
151 def_op('COMPARE_OP', 106) # Comparison operator 151 def_op('COMPARE_OP', 106) # Comparison operator
152 hascompare.append(106) 152 hascompare.append(106)
153
153 # name_op('IMPORT_FROM', 108) # Replaced by #@import_from. 154 # name_op('IMPORT_FROM', 108) # Replaced by #@import_from.
154 155 name_op('LOAD_METHOD', 109) # Index in name list
155 jrel_op('JUMP_FORWARD', 110) # Number of bytes to skip 156 jrel_op('JUMP_FORWARD', 110) # Number of bytes to skip
156 jabs_op('JUMP_IF_FALSE_OR_POP', 111) # Target byte offset from beginning of code 157 jabs_op('JUMP_IF_FALSE_OR_POP', 111) # Target byte offset from beginning of code
157 jabs_op('JUMP_IF_TRUE_OR_POP', 112) # "" 158 jabs_op('JUMP_IF_TRUE_OR_POP', 112) # ""
158 jabs_op('JUMP_ABSOLUTE', 113) # "" 159 jabs_op('JUMP_ABSOLUTE', 113) # ""
159 jabs_op('POP_JUMP_IF_FALSE', 114) # "" 160 jabs_op('POP_JUMP_IF_FALSE', 114) # ""
160 jabs_op('POP_JUMP_IF_TRUE', 115) # "" 161 jabs_op('POP_JUMP_IF_TRUE', 115) # ""
161 162
162 name_op('LOAD_GLOBAL', 116) # Index in name list 163 name_op('LOAD_GLOBAL', 116) # Index in name list
163 164
164 jabs_op('CONTINUE_LOOP', 119) # Target address 165 jabs_op('CONTINUE_LOOP', 119) # Target address
165 jrel_op('SETUP_LOOP', 120) # Distance to target address 166 jrel_op('SETUP_LOOP', 120) # Distance to target address
166 jrel_op('SETUP_EXCEPT', 121) # "" 167 jrel_op('SETUP_EXCEPT', 121) # ""
167 jrel_op('SETUP_FINALLY', 122) # "" 168 jrel_op('SETUP_FINALLY', 122) # ""
168 169
169 def_op('LOAD_FAST', 124) # Local variable number 170 def_op('LOAD_FAST', 124) # Local variable number
170 haslocal.append(124) 171 haslocal.append(124)
171 def_op('STORE_FAST', 125) # Local variable number 172 def_op('STORE_FAST', 125) # Local variable number
172 haslocal.append(125) 173 haslocal.append(125)
173 def_op('DELETE_FAST', 126) # Local variable number 174 def_op('DELETE_FAST', 126) # Local variable number
174 haslocal.append(126) 175 haslocal.append(126)
175 176
176 def_op('CALL_FUNCTION', 131) # #args + (#kwargs << 8) 177 def_op('CALL_FUNCTION', 131) # #args + (#kwargs << 8)
177 # def_op('MAKE_FUNCTION', 132) Replaced by #@make_function calls. 178 # def_op('MAKE_FUNCTION', 132) Replaced by #@make_function calls.
179 def_op('CALL_METHOD', 133) # #args + (#kwargs << 8)
178 180
179 def_op('MAKE_CLOSURE', 134) 181 def_op('MAKE_CLOSURE', 134)
180 def_op('LOAD_CLOSURE', 135) 182 def_op('LOAD_CLOSURE', 135)
181 hasfree.append(135) 183 hasfree.append(135)
182 def_op('LOAD_DEREF', 136) 184 def_op('LOAD_DEREF', 136)
183 hasfree.append(136) 185 hasfree.append(136)
184 def_op('STORE_DEREF', 137) 186 def_op('STORE_DEREF', 137)
185 hasfree.append(137) 187 hasfree.append(137)
186 188
187 def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8) 189 def_op('CALL_FUNCTION_VAR', 140) # #args + (#kwargs << 8)
188 def_op('CALL_FUNCTION_KW', 141) # #args + (#kwargs << 8) 190 def_op('CALL_FUNCTION_KW', 141) # #args + (#kwargs << 8)
189 def_op('CALL_FUNCTION_VAR_KW', 142) # #args + (#kwargs << 8) 191 def_op('CALL_FUNCTION_VAR_KW', 142) # #args + (#kwargs << 8)
190 def_op('EXTENDED_ARG', 143) 192 def_op('EXTENDED_ARG', 143)
191 EXTENDED_ARG = 143 193 EXTENDED_ARG = 143
192 194
193 del def_op, name_op, jrel_op, jabs_op 195 del def_op, name_op, jrel_op, jabs_op
OLDNEW
« no previous file with comments | « JIT/opcodes/call.cc ('k') | Lib/test/test_llvm.py » ('j') | no next file with comments »
Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b

AltStyle によって変換されたページ (->オリジナル) /