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

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

Issue 2804813003: [turbofan] Collect and use type feedback on ToNumber. (Closed)
Patch Set: Address Michis feedback. Created 3 years, 8 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 wrap: yes 6 wrap: yes
7 7
8 --- 8 ---
9 snippet: " 9 snippet: "
10 var a = 1; return ++a; 10 var a = 1; return ++a;
(...skipping 13 matching lines...) Expand all
24 ] 24 ]
25 handlers: [ 25 handlers: [
26 ] 26 ]
27 27
28 --- 28 ---
29 snippet: " 29 snippet: "
30 var a = 1; return a++; 30 var a = 1; return a++;
31 " 31 "
32 frame size: 2 32 frame size: 2
33 parameter count: 1 33 parameter count: 1
34 bytecode array length: 16 34 bytecode array length: 17
35 bytecodes: [ 35 bytecodes: [
36 /* 30 E> */ B(StackCheck), 36 /* 30 E> */ B(StackCheck),
37 /* 42 S> */ B(LdaSmi), I8(1), 37 /* 42 S> */ B(LdaSmi), I8(1),
38 B(Star), R(0), 38 B(Star), R(0),
39 /* 45 S> */ B(ToNumber), R(1), 39 /* 45 S> */ B(ToNumber), R(1), U8(2),
40 B(Ldar), R(1), 40 B(Ldar), R(1),
41 B(Inc), U8(2), 41 B(Inc), U8(2),
42 B(Star), R(0), 42 B(Star), R(0),
43 B(Ldar), R(1), 43 B(Ldar), R(1),
44 /* 57 S> */ B(Return), 44 /* 57 S> */ B(Return),
45 ] 45 ]
46 constant pool: [ 46 constant pool: [
47 ] 47 ]
48 handlers: [ 48 handlers: [
49 ] 49 ]
(...skipping 17 matching lines...) Expand all
67 ] 67 ]
68 handlers: [ 68 handlers: [
69 ] 69 ]
70 70
71 --- 71 ---
72 snippet: " 72 snippet: "
73 var a = 1; return a--; 73 var a = 1; return a--;
74 " 74 "
75 frame size: 2 75 frame size: 2
76 parameter count: 1 76 parameter count: 1
77 bytecode array length: 16 77 bytecode array length: 17
78 bytecodes: [ 78 bytecodes: [
79 /* 30 E> */ B(StackCheck), 79 /* 30 E> */ B(StackCheck),
80 /* 42 S> */ B(LdaSmi), I8(1), 80 /* 42 S> */ B(LdaSmi), I8(1),
81 B(Star), R(0), 81 B(Star), R(0),
82 /* 45 S> */ B(ToNumber), R(1), 82 /* 45 S> */ B(ToNumber), R(1), U8(2),
83 B(Ldar), R(1), 83 B(Ldar), R(1),
84 B(Dec), U8(2), 84 B(Dec), U8(2),
85 B(Star), R(0), 85 B(Star), R(0),
86 B(Ldar), R(1), 86 B(Ldar), R(1),
87 /* 57 S> */ B(Return), 87 /* 57 S> */ B(Return),
88 ] 88 ]
89 constant pool: [ 89 constant pool: [
90 ] 90 ]
91 handlers: [ 91 handlers: [
92 ] 92 ]
93 93
94 --- 94 ---
95 snippet: " 95 snippet: "
96 var a = { val: 1 }; return a.val++; 96 var a = { val: 1 }; return a.val++;
97 " 97 "
98 frame size: 3 98 frame size: 3
99 parameter count: 1 99 parameter count: 1
100 bytecode array length: 26 100 bytecode array length: 27
101 bytecodes: [ 101 bytecodes: [
102 /* 30 E> */ B(StackCheck), 102 /* 30 E> */ B(StackCheck),
103 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1), 103 /* 42 S> */ B(CreateObjectLiteral), U8(0), U8(2), U8(1), R(1),
104 B(Mov), R(1), R(0), 104 B(Mov), R(1), R(0),
105 /* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(3), 105 /* 54 S> */ B(LdaNamedProperty), R(0), U8(1), U8(3),
106 B(ToNumber), R(2), 106 B(ToNumber), R(2), U8(7),
107 B(Ldar), R(2), 107 B(Ldar), R(2),
108 B(Inc), U8(7), 108 B(Inc), U8(7),
109 /* 66 E> */ B(StaNamedPropertySloppy), R(0), U8(1), U8(5), 109 /* 66 E> */ B(StaNamedPropertySloppy), R(0), U8(1), U8(5),
110 B(Ldar), R(2), 110 B(Ldar), R(2),
111 /* 70 S> */ B(Return), 111 /* 70 S> */ B(Return),
112 ] 112 ]
113 constant pool: [ 113 constant pool: [
114 FIXED_ARRAY_TYPE, 114 FIXED_ARRAY_TYPE,
115 ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"], 115 ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"],
116 ] 116 ]
(...skipping 22 matching lines...) Expand all
139 ] 139 ]
140 handlers: [ 140 handlers: [
141 ] 141 ]
142 142
143 --- 143 ---
144 snippet: " 144 snippet: "
145 var name = 'var'; var a = { val: 1 }; return a[name]--; 145 var name = 'var'; var a = { val: 1 }; return a[name]--;
146 " 146 "
147 frame size: 5 147 frame size: 5
148 parameter count: 1 148 parameter count: 1
149 bytecode array length: 31 149 bytecode array length: 32
150 bytecodes: [ 150 bytecodes: [
151 /* 30 E> */ B(StackCheck), 151 /* 30 E> */ B(StackCheck),
152 /* 45 S> */ B(LdaConstant), U8(0), 152 /* 45 S> */ B(LdaConstant), U8(0),
153 B(Star), R(0), 153 B(Star), R(0),
154 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(1), R(2), 154 /* 60 S> */ B(CreateObjectLiteral), U8(1), U8(2), U8(1), R(2),
155 B(Mov), R(2), R(1), 155 B(Mov), R(2), R(1),
156 /* 72 S> */ B(Ldar), R(0), 156 /* 72 S> */ B(Ldar), R(0),
157 /* 81 E> */ B(LdaKeyedProperty), R(1), U8(3), 157 /* 81 E> */ B(LdaKeyedProperty), R(1), U8(3),
158 B(ToNumber), R(4), 158 B(ToNumber), R(4), U8(7),
159 B(Ldar), R(4), 159 B(Ldar), R(4),
160 B(Dec), U8(7), 160 B(Dec), U8(7),
161 /* 86 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(5), 161 /* 86 E> */ B(StaKeyedPropertySloppy), R(1), R(0), U8(5),
162 B(Ldar), R(4), 162 B(Ldar), R(4),
163 /* 90 S> */ B(Return), 163 /* 90 S> */ B(Return),
164 ] 164 ]
165 constant pool: [ 165 constant pool: [
166 ONE_BYTE_INTERNALIZED_STRING_TYPE ["var"], 166 ONE_BYTE_INTERNALIZED_STRING_TYPE ["var"],
167 FIXED_ARRAY_TYPE, 167 FIXED_ARRAY_TYPE,
168 ] 168 ]
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 ] 220 ]
221 handlers: [ 221 handlers: [
222 ] 222 ]
223 223
224 --- 224 ---
225 snippet: " 225 snippet: "
226 var a = 1; var b = function() { return a }; return a--; 226 var a = 1; var b = function() { return a }; return a--;
227 " 227 "
228 frame size: 3 228 frame size: 3
229 parameter count: 1 229 parameter count: 1
230 bytecode array length: 28 230 bytecode array length: 29
231 bytecodes: [ 231 bytecodes: [
232 B(CreateFunctionContext), U8(1), 232 B(CreateFunctionContext), U8(1),
233 B(PushContext), R(1), 233 B(PushContext), R(1),
234 /* 30 E> */ B(StackCheck), 234 /* 30 E> */ B(StackCheck),
235 /* 42 S> */ B(LdaSmi), I8(1), 235 /* 42 S> */ B(LdaSmi), I8(1),
236 /* 42 E> */ B(StaCurrentContextSlot), U8(4), 236 /* 42 E> */ B(StaCurrentContextSlot), U8(4),
237 /* 53 S> */ B(CreateClosure), U8(0), U8(2), U8(2), 237 /* 53 S> */ B(CreateClosure), U8(0), U8(2), U8(2),
238 B(Star), R(0), 238 B(Star), R(0),
239 /* 78 S> */ B(LdaCurrentContextSlot), U8(4), 239 /* 78 S> */ B(LdaCurrentContextSlot), U8(4),
240 B(ToNumber), R(2), 240 B(ToNumber), R(2), U8(3),
241 B(Ldar), R(2), 241 B(Ldar), R(2),
242 B(Dec), U8(3), 242 B(Dec), U8(3),
243 /* 86 E> */ B(StaCurrentContextSlot), U8(4), 243 /* 86 E> */ B(StaCurrentContextSlot), U8(4),
244 B(Ldar), R(2), 244 B(Ldar), R(2),
245 /* 90 S> */ B(Return), 245 /* 90 S> */ B(Return),
246 ] 246 ]
247 constant pool: [ 247 constant pool: [
248 SHARED_FUNCTION_INFO_TYPE, 248 SHARED_FUNCTION_INFO_TYPE,
249 ] 249 ]
250 handlers: [ 250 handlers: [
251 ] 251 ]
252 252
253 --- 253 ---
254 snippet: " 254 snippet: "
255 var idx = 1; var a = [1, 2]; return a[idx++] = 2; 255 var idx = 1; var a = [1, 2]; return a[idx++] = 2;
256 " 256 "
257 frame size: 4 257 frame size: 4
258 parameter count: 1 258 parameter count: 1
259 bytecode array length: 28 259 bytecode array length: 29
260 bytecodes: [ 260 bytecodes: [
261 /* 30 E> */ B(StackCheck), 261 /* 30 E> */ B(StackCheck),
262 /* 44 S> */ B(LdaSmi), I8(1), 262 /* 44 S> */ B(LdaSmi), I8(1),
263 B(Star), R(0), 263 B(Star), R(0),
264 /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9), 264 /* 55 S> */ B(CreateArrayLiteral), U8(0), U8(2), U8(9),
265 B(Star), R(1), 265 B(Star), R(1),
266 /* 63 S> */ B(Ldar), R(0), 266 /* 63 S> */ B(Ldar), R(0),
267 B(ToNumber), R(3), 267 B(ToNumber), R(3), U8(3),
268 B(Ldar), R(3), 268 B(Ldar), R(3),
269 B(Inc), U8(3), 269 B(Inc), U8(3),
270 B(Star), R(0), 270 B(Star), R(0),
271 B(LdaSmi), I8(2), 271 B(LdaSmi), I8(2),
272 /* 79 E> */ B(StaKeyedPropertySloppy), R(1), R(3), U8(4), 272 /* 79 E> */ B(StaKeyedPropertySloppy), R(1), R(3), U8(4),
273 /* 84 S> */ B(Return), 273 /* 84 S> */ B(Return),
274 ] 274 ]
275 constant pool: [ 275 constant pool: [
276 CONSTANT_ELEMENTS_PAIR_TYPE, 276 CONSTANT_ELEMENTS_PAIR_TYPE,
277 ] 277 ]
278 handlers: [ 278 handlers: [
279 ] 279 ]
280 280
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698