Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/CountOperators.golden

Issue 1998203002: [Interpreter] Preserve source positions in peephole optimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nitlet on last patch set. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # 1 #
2 # Autogenerated by generate-bytecode-expectations. 2 # Autogenerated by generate-bytecode-expectations.
3 # 3 #
4 4
5 --- 5 ---
6 pool type: mixed 6 pool type: mixed
7 execute: yes 7 execute: yes
8 wrap: yes 8 wrap: yes
9 9
10 --- 10 ---
11 snippet: " 11 snippet: "
12 var a = 1; return ++a; 12 var a = 1; return ++a;
13 " 13 "
14 frame size: 1 14 frame size: 1
15 parameter count: 1 15 parameter count: 1
16 bytecode array length: 9 16 bytecode array length: 9
17 bytecodes: [ 17 bytecodes: [
18 /* 30 E> */ B(StackCheck), 18 /* 30 E> */ B(StackCheck),
19 /* 42 S> */ B(LdaSmi), U8(1), 19 /* 42 S> */ B(LdaSmi), U8(1),
20 /* 42 E> */ B(Star), R(0), 20 B(Star), R(0),
21 /* 45 S> */ B(Inc), 21 /* 45 S> */ B(Inc),
22 /* 54 E> */ B(Star), R(0), 22 B(Star), R(0),
23 /* 57 S> */ B(Return), 23 /* 57 S> */ B(Return),
24 ] 24 ]
25 constant pool: [ 25 constant pool: [
26 ] 26 ]
27 handlers: [ 27 handlers: [
28 ] 28 ]
29 29
30 --- 30 ---
31 snippet: " 31 snippet: "
32 var a = 1; return a++; 32 var a = 1; return a++;
33 " 33 "
34 frame size: 2 34 frame size: 2
35 parameter count: 1 35 parameter count: 1
36 bytecode array length: 14 36 bytecode array length: 14
37 bytecodes: [ 37 bytecodes: [
38 /* 30 E> */ B(StackCheck), 38 /* 30 E> */ B(StackCheck),
39 /* 42 S> */ B(LdaSmi), U8(1), 39 /* 42 S> */ B(LdaSmi), U8(1),
40 /* 42 E> */ B(Star), R(0), 40 B(Star), R(0),
41 /* 45 S> */ B(ToNumber), 41 /* 45 S> */ B(ToNumber),
42 B(Star), R(1), 42 B(Star), R(1),
43 B(Inc), 43 B(Inc),
44 /* 53 E> */ B(Star), R(0), 44 /* 53 E> */ B(Star), R(0),
45 B(Ldar), R(1), 45 B(Ldar), R(1),
46 /* 57 S> */ B(Return), 46 /* 57 S> */ B(Return),
47 ] 47 ]
48 constant pool: [ 48 constant pool: [
49 ] 49 ]
50 handlers: [ 50 handlers: [
51 ] 51 ]
52 52
53 --- 53 ---
54 snippet: " 54 snippet: "
55 var a = 1; return --a; 55 var a = 1; return --a;
56 " 56 "
57 frame size: 1 57 frame size: 1
58 parameter count: 1 58 parameter count: 1
59 bytecode array length: 9 59 bytecode array length: 9
60 bytecodes: [ 60 bytecodes: [
61 /* 30 E> */ B(StackCheck), 61 /* 30 E> */ B(StackCheck),
62 /* 42 S> */ B(LdaSmi), U8(1), 62 /* 42 S> */ B(LdaSmi), U8(1),
63 /* 42 E> */ B(Star), R(0), 63 B(Star), R(0),
64 /* 45 S> */ B(Dec), 64 /* 45 S> */ B(Dec),
65 /* 54 E> */ B(Star), R(0), 65 B(Star), R(0),
66 /* 57 S> */ B(Return), 66 /* 57 S> */ B(Return),
67 ] 67 ]
68 constant pool: [ 68 constant pool: [
69 ] 69 ]
70 handlers: [ 70 handlers: [
71 ] 71 ]
72 72
73 --- 73 ---
74 snippet: " 74 snippet: "
75 var a = 1; return a--; 75 var a = 1; return a--;
76 " 76 "
77 frame size: 2 77 frame size: 2
78 parameter count: 1 78 parameter count: 1
79 bytecode array length: 14 79 bytecode array length: 14
80 bytecodes: [ 80 bytecodes: [
81 /* 30 E> */ B(StackCheck), 81 /* 30 E> */ B(StackCheck),
82 /* 42 S> */ B(LdaSmi), U8(1), 82 /* 42 S> */ B(LdaSmi), U8(1),
83 /* 42 E> */ B(Star), R(0), 83 B(Star), R(0),
84 /* 45 S> */ B(ToNumber), 84 /* 45 S> */ B(ToNumber),
85 B(Star), R(1), 85 B(Star), R(1),
86 B(Dec), 86 B(Dec),
87 /* 53 E> */ B(Star), R(0), 87 /* 53 E> */ B(Star), R(0),
88 B(Ldar), R(1), 88 B(Ldar), R(1),
89 /* 57 S> */ B(Return), 89 /* 57 S> */ B(Return),
90 ] 90 ]
91 constant pool: [ 91 constant pool: [
92 ] 92 ]
93 handlers: [ 93 handlers: [
94 ] 94 ]
95 95
96 --- 96 ---
97 snippet: " 97 snippet: "
98 var a = { val: 1 }; return a.val++; 98 var a = { val: 1 }; return a.val++;
99 " 99 "
100 frame size: 3 100 frame size: 3
101 parameter count: 1 101 parameter count: 1
102 bytecode array length: 26 102 bytecode array length: 26
103 bytecodes: [ 103 bytecodes: [
104 /* 30 E> */ B(StackCheck), 104 /* 30 E> */ B(StackCheck),
105 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), 105 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
106 B(Star), R(1), 106 B(Star), R(1),
107 /* 42 E> */ B(Star), R(0), 107 B(Star), R(0),
108 /* 54 S> */ B(Star), R(1), 108 /* 54 S> */ B(Star), R(1),
109 B(LoadIC), R(1), U8(1), U8(1), 109 B(LoadIC), R(1), U8(1), U8(1),
110 B(ToNumber), 110 B(ToNumber),
111 B(Star), R(2), 111 B(Star), R(2),
112 B(Inc), 112 B(Inc),
113 /* 66 E> */ B(StoreICSloppy), R(1), U8(1), U8(3), 113 /* 66 E> */ B(StoreICSloppy), R(1), U8(1), U8(3),
114 B(Ldar), R(2), 114 B(Ldar), R(2),
115 /* 70 S> */ B(Return), 115 /* 70 S> */ B(Return),
116 ] 116 ]
117 constant pool: [ 117 constant pool: [
118 InstanceType::FIXED_ARRAY_TYPE, 118 InstanceType::FIXED_ARRAY_TYPE,
119 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 119 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
120 ] 120 ]
121 handlers: [ 121 handlers: [
122 ] 122 ]
123 123
124 --- 124 ---
125 snippet: " 125 snippet: "
126 var a = { val: 1 }; return --a.val; 126 var a = { val: 1 }; return --a.val;
127 " 127 "
128 frame size: 2 128 frame size: 2
129 parameter count: 1 129 parameter count: 1
130 bytecode array length: 21 130 bytecode array length: 21
131 bytecodes: [ 131 bytecodes: [
132 /* 30 E> */ B(StackCheck), 132 /* 30 E> */ B(StackCheck),
133 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1), 133 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(0), U8(1),
134 B(Star), R(1), 134 B(Star), R(1),
135 /* 42 E> */ B(Star), R(0), 135 B(Star), R(0),
136 /* 54 S> */ B(Star), R(1), 136 /* 54 S> */ B(Star), R(1),
137 B(LoadIC), R(1), U8(1), U8(1), 137 B(LoadIC), R(1), U8(1), U8(1),
138 B(Dec), 138 B(Dec),
139 /* 65 E> */ B(StoreICSloppy), R(1), U8(1), U8(3), 139 /* 65 E> */ B(StoreICSloppy), R(1), U8(1), U8(3),
140 /* 70 S> */ B(Return), 140 /* 70 S> */ B(Return),
141 ] 141 ]
142 constant pool: [ 142 constant pool: [
143 InstanceType::FIXED_ARRAY_TYPE, 143 InstanceType::FIXED_ARRAY_TYPE,
144 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 144 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
145 ] 145 ]
146 handlers: [ 146 handlers: [
147 ] 147 ]
148 148
149 --- 149 ---
150 snippet: " 150 snippet: "
151 var name = 'var'; var a = { val: 1 }; return a[name]--; 151 var name = 'var'; var a = { val: 1 }; return a[name]--;
152 " 152 "
153 frame size: 5 153 frame size: 5
154 parameter count: 1 154 parameter count: 1
155 bytecode array length: 33 155 bytecode array length: 33
156 bytecodes: [ 156 bytecodes: [
157 /* 30 E> */ B(StackCheck), 157 /* 30 E> */ B(StackCheck),
158 /* 45 S> */ B(LdaConstant), U8(0), 158 /* 45 S> */ B(LdaConstant), U8(0),
159 /* 45 E> */ B(Star), R(0), 159 B(Star), R(0),
160 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1), 160 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
161 B(Star), R(2), 161 B(Star), R(2),
162 /* 60 E> */ B(Star), R(1), 162 B(Star), R(1),
163 /* 72 S> */ B(Star), R(2), 163 /* 72 S> */ B(Star), R(2),
164 /* 81 E> */ B(Ldar), R(0), 164 /* 81 E> */ B(Ldar), R(0),
165 B(Star), R(3), 165 B(Star), R(3),
166 B(KeyedLoadIC), R(2), U8(1), 166 B(KeyedLoadIC), R(2), U8(1),
167 B(ToNumber), 167 B(ToNumber),
168 B(Star), R(4), 168 B(Star), R(4),
169 B(Dec), 169 B(Dec),
170 /* 86 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(3), 170 /* 86 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(3),
171 B(Ldar), R(4), 171 B(Ldar), R(4),
172 /* 90 S> */ B(Return), 172 /* 90 S> */ B(Return),
173 ] 173 ]
174 constant pool: [ 174 constant pool: [
175 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 175 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
176 InstanceType::FIXED_ARRAY_TYPE, 176 InstanceType::FIXED_ARRAY_TYPE,
177 ] 177 ]
178 handlers: [ 178 handlers: [
179 ] 179 ]
180 180
181 --- 181 ---
182 snippet: " 182 snippet: "
183 var name = 'var'; var a = { val: 1 }; return ++a[name]; 183 var name = 'var'; var a = { val: 1 }; return ++a[name];
184 " 184 "
185 frame size: 4 185 frame size: 4
186 parameter count: 1 186 parameter count: 1
187 bytecode array length: 28 187 bytecode array length: 28
188 bytecodes: [ 188 bytecodes: [
189 /* 30 E> */ B(StackCheck), 189 /* 30 E> */ B(StackCheck),
190 /* 45 S> */ B(LdaConstant), U8(0), 190 /* 45 S> */ B(LdaConstant), U8(0),
191 /* 45 E> */ B(Star), R(0), 191 B(Star), R(0),
192 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1), 192 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(0), U8(1),
193 B(Star), R(2), 193 B(Star), R(2),
194 /* 60 E> */ B(Star), R(1), 194 B(Star), R(1),
195 /* 72 S> */ B(Star), R(2), 195 /* 72 S> */ B(Star), R(2),
196 /* 83 E> */ B(Ldar), R(0), 196 /* 83 E> */ B(Ldar), R(0),
197 B(Star), R(3), 197 B(Star), R(3),
198 B(KeyedLoadIC), R(2), U8(1), 198 B(KeyedLoadIC), R(2), U8(1),
199 B(Inc), 199 B(Inc),
200 /* 87 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(3), 200 /* 87 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(3),
201 /* 90 S> */ B(Return), 201 /* 90 S> */ B(Return),
202 ] 202 ]
203 constant pool: [ 203 constant pool: [
204 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, 204 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
205 InstanceType::FIXED_ARRAY_TYPE, 205 InstanceType::FIXED_ARRAY_TYPE,
206 ] 206 ]
207 handlers: [ 207 handlers: [
208 ] 208 ]
209 209
210 --- 210 ---
211 snippet: " 211 snippet: "
212 var a = 1; var b = function() { return a }; return ++a; 212 var a = 1; var b = function() { return a }; return ++a;
213 " 213 "
214 frame size: 2 214 frame size: 2
215 parameter count: 1 215 parameter count: 1
216 bytecode array length: 26 216 bytecode array length: 26
217 bytecodes: [ 217 bytecodes: [
218 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1), 218 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1),
219 B(PushContext), R(1), 219 B(PushContext), R(1),
220 /* 30 E> */ B(StackCheck), 220 /* 30 E> */ B(StackCheck),
221 /* 42 S> */ B(LdaSmi), U8(1), 221 /* 42 S> */ B(LdaSmi), U8(1),
222 /* 42 E> */ B(StaContextSlot), R(context), U8(4), 222 /* 42 E> */ B(StaContextSlot), R(context), U8(4),
223 /* 53 S> */ B(CreateClosure), U8(0), U8(0), 223 /* 53 S> */ B(CreateClosure), U8(0), U8(0),
224 /* 53 E> */ B(Star), R(0), 224 B(Star), R(0),
225 /* 78 S> */ B(LdaContextSlot), R(context), U8(4), 225 /* 78 S> */ B(LdaContextSlot), R(context), U8(4),
226 B(Inc), 226 B(Inc),
227 /* 87 E> */ B(StaContextSlot), R(context), U8(4), 227 /* 87 E> */ B(StaContextSlot), R(context), U8(4),
228 /* 90 S> */ B(Return), 228 /* 90 S> */ B(Return),
229 ] 229 ]
230 constant pool: [ 230 constant pool: [
231 InstanceType::SHARED_FUNCTION_INFO_TYPE, 231 InstanceType::SHARED_FUNCTION_INFO_TYPE,
232 ] 232 ]
233 handlers: [ 233 handlers: [
234 ] 234 ]
235 235
236 --- 236 ---
237 snippet: " 237 snippet: "
238 var a = 1; var b = function() { return a }; return a--; 238 var a = 1; var b = function() { return a }; return a--;
239 " 239 "
240 frame size: 3 240 frame size: 3
241 parameter count: 1 241 parameter count: 1
242 bytecode array length: 31 242 bytecode array length: 31
243 bytecodes: [ 243 bytecodes: [
244 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1), 244 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U 8(1),
245 B(PushContext), R(1), 245 B(PushContext), R(1),
246 /* 30 E> */ B(StackCheck), 246 /* 30 E> */ B(StackCheck),
247 /* 42 S> */ B(LdaSmi), U8(1), 247 /* 42 S> */ B(LdaSmi), U8(1),
248 /* 42 E> */ B(StaContextSlot), R(context), U8(4), 248 /* 42 E> */ B(StaContextSlot), R(context), U8(4),
249 /* 53 S> */ B(CreateClosure), U8(0), U8(0), 249 /* 53 S> */ B(CreateClosure), U8(0), U8(0),
250 /* 53 E> */ B(Star), R(0), 250 B(Star), R(0),
251 /* 78 S> */ B(LdaContextSlot), R(context), U8(4), 251 /* 78 S> */ B(LdaContextSlot), R(context), U8(4),
252 B(ToNumber), 252 B(ToNumber),
253 B(Star), R(2), 253 B(Star), R(2),
254 B(Dec), 254 B(Dec),
255 /* 86 E> */ B(StaContextSlot), R(context), U8(4), 255 /* 86 E> */ B(StaContextSlot), R(context), U8(4),
256 B(Ldar), R(2), 256 B(Ldar), R(2),
257 /* 90 S> */ B(Return), 257 /* 90 S> */ B(Return),
258 ] 258 ]
259 constant pool: [ 259 constant pool: [
260 InstanceType::SHARED_FUNCTION_INFO_TYPE, 260 InstanceType::SHARED_FUNCTION_INFO_TYPE,
261 ] 261 ]
262 handlers: [ 262 handlers: [
263 ] 263 ]
264 264
265 --- 265 ---
266 snippet: " 266 snippet: "
267 var idx = 1; var a = [1, 2]; return a[idx++] = 2; 267 var idx = 1; var a = [1, 2]; return a[idx++] = 2;
268 " 268 "
269 frame size: 4 269 frame size: 4
270 parameter count: 1 270 parameter count: 1
271 bytecode array length: 28 271 bytecode array length: 28
272 bytecodes: [ 272 bytecodes: [
273 /* 30 E> */ B(StackCheck), 273 /* 30 E> */ B(StackCheck),
274 /* 44 S> */ B(LdaSmi), U8(1), 274 /* 44 S> */ B(LdaSmi), U8(1),
275 /* 44 E> */ B(Star), R(0), 275 B(Star), R(0),
276 /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3), 276 /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(0), U8(3),
277 /* 55 E> */ B(Star), R(1), 277 B(Star), R(1),
278 /* 63 S> */ B(Star), R(2), 278 /* 63 S> */ B(Star), R(2),
279 B(Ldar), R(0), 279 B(Ldar), R(0),
280 B(ToNumber), 280 B(ToNumber),
281 B(Star), R(3), 281 B(Star), R(3),
282 B(Inc), 282 B(Inc),
283 /* 75 E> */ B(Star), R(0), 283 /* 75 E> */ B(Star), R(0),
284 B(LdaSmi), U8(2), 284 B(LdaSmi), U8(2),
285 /* 79 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(1), 285 /* 79 E> */ B(KeyedStoreICSloppy), R(2), R(3), U8(1),
286 /* 84 S> */ B(Return), 286 /* 84 S> */ B(Return),
287 ] 287 ]
288 constant pool: [ 288 constant pool: [
289 InstanceType::FIXED_ARRAY_TYPE, 289 InstanceType::FIXED_ARRAY_TYPE,
290 ] 290 ]
291 handlers: [ 291 handlers: [
292 ] 292 ]
293 293
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698