PropertyLoadStoreOneShot.golden 11 KB
Newer Older
1 2 3 4 5 6 7
#
# Autogenerated by generate-bytecode-expectations.
#

---
wrap: no
top level: yes
8
oneshot opt: yes
9 10 11 12 13 14 15 16 17 18 19 20

---
snippet: "
  
        l = {
          'a': 1,
          'b': 2
        };
  
        v = l['a'] + l['b'];
        l['b'] = 7;
        l['a'] = l['b'];
21
       
22
"
23
frame size: 4
24
parameter count: 1
25
bytecode array length: 77
26 27
bytecodes: [
  /*    0 E> */ B(StackCheck),
28 29 30 31 32 33 34
  /*    7 S> */ B(LdaConstant), U8(0),
                B(Star), R(2),
                B(LdaSmi), I8(41),
                B(Star), R(3),
                B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
  /*    9 E> */ B(StaGlobal), U8(1), U8(0),
  /*   60 S> */ B(LdaGlobal), U8(1), U8(3),
35
                B(Star), R(1),
36
  /*   65 E> */ B(LdaNamedPropertyNoFeedback), R(1), U8(2),
37
                B(Star), R(1),
38
  /*   73 E> */ B(LdaGlobal), U8(1), U8(3),
39
                B(Star), R(2),
40
  /*   74 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(3),
41 42 43
  /*   71 E> */ B(Add), R(1), U8(2),
  /*   62 E> */ B(StaGlobal), U8(4), U8(5),
  /*   87 S> */ B(LdaGlobal), U8(1), U8(3),
44 45
                B(Star), R(1),
                B(LdaSmi), I8(7),
46
  /*   94 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(3), U8(0),
47
  /*  105 S> */ B(LdaGlobal), U8(1), U8(3),
48
                B(Star), R(1),
49
  /*  114 E> */ B(LdaGlobal), U8(1), U8(3),
50
                B(Star), R(2),
51
  /*  115 E> */ B(LdaNamedPropertyNoFeedback), R(2), U8(3),
52
                B(Star), R(2),
53 54
  /*  112 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
                B(Mov), R(2), R(0),
55
                B(Ldar), R(0),
56
  /*  128 S> */ B(Return),
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
]
constant pool: [
  OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["v"],
]
handlers: [
]

---
snippet: "
  
        l = {
          'a': 1.1,
          'b': 2.2
        };
        for (i = 0; i < 5; ++i) {
          l['a'] = l['a'] + l['b'];
          l['b'] = l['a'] + l['b'];
        }
79
       
80 81 82
"
frame size: 4
parameter count: 1
83
bytecode array length: 120
84 85
bytecodes: [
  /*    0 E> */ B(StackCheck),
86 87 88 89 90 91
  /*    7 S> */ B(LdaConstant), U8(0),
                B(Star), R(2),
                B(LdaSmi), I8(41),
                B(Star), R(3),
                B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
  /*    9 E> */ B(StaGlobal), U8(1), U8(0),
92 93 94
                B(LdaUndefined),
                B(Star), R(0),
  /*   68 S> */ B(LdaZero),
95 96
  /*   70 E> */ B(StaGlobal), U8(2), U8(2),
  /*   77 S> */ B(LdaGlobal), U8(2), U8(4),
97 98
                B(Star), R(1),
                B(LdaSmi), I8(5),
99
  /*   77 E> */ B(TestLessThan), R(1), U8(6),
100 101
                B(JumpIfFalse), U8(83),
  /*   63 E> */ B(StackCheck),
102
  /*   97 S> */ B(LdaGlobal), U8(1), U8(7),
103
                B(Star), R(1),
104
  /*  106 E> */ B(LdaGlobal), U8(1), U8(7),
105
                B(Star), R(2),
106
  /*  107 E> */ B(LdaNamedProperty), R(2), U8(3), U8(10),
107
                B(Star), R(2),
108
  /*  115 E> */ B(LdaGlobal), U8(1), U8(7),
109
                B(Star), R(3),
110 111 112 113
  /*  116 E> */ B(LdaNamedProperty), R(3), U8(4), U8(12),
  /*  113 E> */ B(Add), R(2), U8(9),
  /*  104 E> */ B(StaNamedProperty), R(1), U8(3), U8(14),
  /*  131 S> */ B(LdaGlobal), U8(1), U8(7),
114
                B(Star), R(1),
115
  /*  140 E> */ B(LdaGlobal), U8(1), U8(7),
116
                B(Star), R(2),
117
  /*  141 E> */ B(LdaNamedProperty), R(2), U8(3), U8(10),
118
                B(Star), R(2),
119
  /*  149 E> */ B(LdaGlobal), U8(1), U8(7),
120
                B(Star), R(3),
121 122
  /*  150 E> */ B(LdaNamedProperty), R(3), U8(4), U8(12),
  /*  147 E> */ B(Add), R(2), U8(16),
123
                B(Star), R(2),
124
  /*  138 E> */ B(StaNamedProperty), R(1), U8(4), U8(17),
125
                B(Mov), R(2), R(0),
126 127 128
  /*   84 S> */ B(LdaGlobal), U8(2), U8(4),
                B(Inc), U8(19),
  /*   84 E> */ B(StaGlobal), U8(2), U8(2),
129 130
                B(JumpLoop), U8(90), I8(0),
                B(Ldar), R(0),
131
  /*  171 S> */ B(Return),
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
]
constant pool: [
  OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["i"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
]
handlers: [
]

---
snippet: "
  
        l = {
          'a': 1.1,
          'b': 2.2
        };
        while (s > 0) {
          l['a']  = l['a'] - l['b'];
          l['b']  = l['b'] - l['a'];
        }
154
       
155 156 157
"
frame size: 4
parameter count: 1
158
bytecode array length: 109
159 160
bytecodes: [
  /*    0 E> */ B(StackCheck),
161 162 163 164 165 166
  /*    7 S> */ B(LdaConstant), U8(0),
                B(Star), R(2),
                B(LdaSmi), I8(41),
                B(Star), R(3),
                B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
  /*    9 E> */ B(StaGlobal), U8(1), U8(0),
167 168
                B(LdaUndefined),
                B(Star), R(0),
169
  /*   72 S> */ B(LdaGlobal), U8(2), U8(2),
170 171
                B(Star), R(1),
                B(LdaZero),
172
  /*   72 E> */ B(TestGreaterThan), R(1), U8(4),
173 174
                B(JumpIfFalse), U8(77),
  /*   63 E> */ B(StackCheck),
175
  /*   87 S> */ B(LdaGlobal), U8(1), U8(5),
176
                B(Star), R(1),
177
  /*   97 E> */ B(LdaGlobal), U8(1), U8(5),
178
                B(Star), R(2),
179
  /*   98 E> */ B(LdaNamedProperty), R(2), U8(3), U8(8),
180
                B(Star), R(2),
181
  /*  106 E> */ B(LdaGlobal), U8(1), U8(5),
182
                B(Star), R(3),
183 184 185 186
  /*  107 E> */ B(LdaNamedProperty), R(3), U8(4), U8(10),
  /*  104 E> */ B(Sub), R(2), U8(7),
  /*   95 E> */ B(StaNamedProperty), R(1), U8(3), U8(12),
  /*  122 S> */ B(LdaGlobal), U8(1), U8(5),
187
                B(Star), R(1),
188
  /*  132 E> */ B(LdaGlobal), U8(1), U8(5),
189
                B(Star), R(2),
190
  /*  133 E> */ B(LdaNamedProperty), R(2), U8(4), U8(10),
191
                B(Star), R(2),
192
  /*  141 E> */ B(LdaGlobal), U8(1), U8(5),
193
                B(Star), R(3),
194 195
  /*  142 E> */ B(LdaNamedProperty), R(3), U8(3), U8(8),
  /*  139 E> */ B(Sub), R(2), U8(14),
196
                B(Star), R(2),
197
  /*  130 E> */ B(StaNamedProperty), R(1), U8(4), U8(15),
198 199 200 201
                B(Mov), R(2), R(0),
                B(Ldar), R(2),
                B(JumpLoop), U8(83), I8(0),
                B(Ldar), R(0),
202
  /*  163 S> */ B(Return),
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
]
constant pool: [
  OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["s"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
]
handlers: [
]

---
snippet: "
  
        l = {
          'a': 1.1,
          'b': 2.2
        };
        s = 10;
        do {
          l['a'] = l['b'] - l['a'];
        } while (s < 10);
225
       
226 227 228
"
frame size: 4
parameter count: 1
229
bytecode array length: 81
230 231
bytecodes: [
  /*    0 E> */ B(StackCheck),
232 233 234 235 236 237
  /*    7 S> */ B(LdaConstant), U8(0),
                B(Star), R(2),
                B(LdaSmi), I8(41),
                B(Star), R(3),
                B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
  /*    9 E> */ B(StaGlobal), U8(1), U8(0),
238
  /*   63 S> */ B(LdaSmi), I8(10),
239
  /*   65 E> */ B(StaGlobal), U8(2), U8(2),
240 241 242
                B(LdaUndefined),
                B(Star), R(0),
  /*   77 E> */ B(StackCheck),
243
  /*   90 S> */ B(LdaGlobal), U8(1), U8(4),
244
                B(Star), R(1),
245
  /*   99 E> */ B(LdaGlobal), U8(1), U8(4),
246
                B(Star), R(2),
247
  /*  100 E> */ B(LdaNamedProperty), R(2), U8(3), U8(7),
248
                B(Star), R(2),
249
  /*  108 E> */ B(LdaGlobal), U8(1), U8(4),
250
                B(Star), R(3),
251 252
  /*  109 E> */ B(LdaNamedProperty), R(3), U8(4), U8(9),
  /*  106 E> */ B(Sub), R(2), U8(6),
253
                B(Star), R(2),
254
  /*   97 E> */ B(StaNamedProperty), R(1), U8(4), U8(11),
255
                B(Mov), R(2), R(0),
256
  /*  133 S> */ B(LdaGlobal), U8(2), U8(13),
257 258
                B(Star), R(1),
                B(LdaSmi), I8(10),
259
  /*  133 E> */ B(TestLessThan), R(1), U8(15),
260 261 262
                B(JumpIfFalse), U8(5),
                B(JumpLoop), U8(50), I8(0),
                B(Ldar), R(0),
263
  /*  146 S> */ B(Return),
264 265 266 267 268 269 270 271 272 273 274 275 276 277 278
]
constant pool: [
  OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["s"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
]
handlers: [
]

---
snippet: "
  
        l = {
279 280
          'c': 1.1,
          'd': 2.2
281
        };
282 283
        if (l['c'] < 3) {
          l['c'] = 3;
284
        } else {
285
          l['d'] = 3;
286
        }
287
       
288
"
289
frame size: 4
290
parameter count: 1
291
bytecode array length: 75
292 293
bytecodes: [
  /*    0 E> */ B(StackCheck),
294 295 296 297 298 299 300
  /*    7 S> */ B(LdaConstant), U8(0),
                B(Star), R(2),
                B(LdaSmi), I8(41),
                B(Star), R(3),
                B(CallRuntime), U16(Runtime::kCreateObjectLiteralWithoutAllocationSite), R(2), U8(2),
  /*    9 E> */ B(StaGlobal), U8(1), U8(0),
  /*   63 S> */ B(LdaGlobal), U8(1), U8(2),
301
                B(Star), R(1),
302
  /*   68 E> */ B(LdaNamedPropertyNoFeedback), R(1), U8(2),
303 304
                B(Star), R(1),
                B(LdaSmi), I8(3),
305
  /*   74 E> */ B(TestLessThan), R(1), U8(4),
306
                B(JumpIfFalse), U8(22),
307
  /*   89 S> */ B(LdaGlobal), U8(1), U8(2),
308 309 310
                B(Star), R(1),
                B(LdaSmi), I8(3),
                B(Star), R(2),
311 312
  /*   96 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(2), U8(0),
                B(Mov), R(2), R(0),
313
                B(Ldar), R(2),
314
                B(Jump), U8(20),
315
  /*  124 S> */ B(LdaGlobal), U8(1), U8(2),
316 317 318
                B(Star), R(1),
                B(LdaSmi), I8(3),
                B(Star), R(2),
319 320
  /*  131 E> */ B(StaNamedPropertyNoFeedback), R(1), U8(3), U8(0),
                B(Mov), R(2), R(0),
321 322
                B(Ldar), R(2),
                B(Ldar), R(0),
323
  /*  150 S> */ B(Return),
324 325 326 327
]
constant pool: [
  OBJECT_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["l"],
328 329
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["c"],
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["d"],
330 331 332 333
]
handlers: [
]

334 335 336 337 338 339
---
snippet: "
  
        a = [1.1, [2.2, 4.5]];
       
"
340
frame size: 5
341 342 343 344 345
parameter count: 1
bytecode array length: 20
bytecodes: [
  /*    0 E> */ B(StackCheck),
  /*    7 S> */ B(LdaConstant), U8(0),
346
                B(Star), R(3),
347
                B(LdaSmi), I8(4),
348 349
                B(Star), R(4),
                B(CallRuntime), U16(Runtime::kCreateArrayLiteralWithoutAllocationSite), R(3), U8(2),
350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366
  /*    9 E> */ B(StaGlobal), U8(1), U8(0),
                B(Star), R(0),
  /*   36 S> */ B(Return),
]
constant pool: [
  ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
]
handlers: [
]

---
snippet: "
  
        b = [];
       
"
367
frame size: 5
368 369 370 371 372
parameter count: 1
bytecode array length: 20
bytecodes: [
  /*    0 E> */ B(StackCheck),
  /*    7 S> */ B(LdaConstant), U8(0),
373
                B(Star), R(3),
374
                B(LdaSmi), I8(37),
375 376
                B(Star), R(4),
                B(CallRuntime), U16(Runtime::kCreateArrayLiteralWithoutAllocationSite), R(3), U8(2),
377 378 379 380 381 382 383 384 385 386 387
  /*    9 E> */ B(StaGlobal), U8(1), U8(0),
                B(Star), R(0),
  /*   21 S> */ B(Return),
]
constant pool: [
  ARRAY_BOILERPLATE_DESCRIPTION_TYPE,
  ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
]
handlers: [
]