OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 pool type: string | 6 pool type: string |
7 execute: yes | 7 execute: yes |
8 wrap: no | 8 wrap: no |
9 test function name: f | 9 test function name: f |
10 | 10 |
11 --- | 11 --- |
12 snippet: " | 12 snippet: " |
13 var global = 1; | 13 var global = 1; |
14 function f() { return ++global; } | 14 function f() { return ++global; } |
15 f(); | 15 f(); |
16 " | 16 " |
17 frame size: 0 | 17 frame size: 0 |
18 parameter count: 1 | 18 parameter count: 1 |
19 bytecode array length: 9 | 19 bytecode array length: 8 |
20 bytecodes: [ | 20 bytecodes: [ |
21 /* 26 E> */ B(StackCheck), | 21 /* 26 E> */ B(StackCheck), |
22 /* 31 S> */ B(LdaGlobal), U8(0), U8(1), | 22 /* 31 S> */ B(LdaGlobal), U8(1), |
23 B(Inc), | 23 B(Inc), |
24 /* 40 E> */ B(StaGlobalSloppy), U8(0), U8(3), | 24 /* 40 E> */ B(StaGlobalSloppy), U8(0), U8(3), |
25 /* 48 S> */ B(Return), | 25 /* 48 S> */ B(Return), |
26 ] | 26 ] |
27 constant pool: [ | 27 constant pool: [ |
28 "global", | 28 "global", |
29 ] | 29 ] |
30 handlers: [ | 30 handlers: [ |
31 ] | 31 ] |
32 | 32 |
33 --- | 33 --- |
34 snippet: " | 34 snippet: " |
35 var global = 1; | 35 var global = 1; |
36 function f() { return global--; } | 36 function f() { return global--; } |
37 f(); | 37 f(); |
38 " | 38 " |
39 frame size: 1 | 39 frame size: 1 |
40 parameter count: 1 | 40 parameter count: 1 |
41 bytecode array length: 14 | 41 bytecode array length: 13 |
42 bytecodes: [ | 42 bytecodes: [ |
43 /* 26 E> */ B(StackCheck), | 43 /* 26 E> */ B(StackCheck), |
44 /* 31 S> */ B(LdaGlobal), U8(0), U8(1), | 44 /* 31 S> */ B(LdaGlobal), U8(1), |
45 B(ToNumber), | 45 B(ToNumber), |
46 B(Star), R(0), | 46 B(Star), R(0), |
47 B(Dec), | 47 B(Dec), |
48 /* 44 E> */ B(StaGlobalSloppy), U8(0), U8(3), | 48 /* 44 E> */ B(StaGlobalSloppy), U8(0), U8(3), |
49 B(Ldar), R(0), | 49 B(Ldar), R(0), |
50 /* 48 S> */ B(Return), | 50 /* 48 S> */ B(Return), |
51 ] | 51 ] |
52 constant pool: [ | 52 constant pool: [ |
53 "global", | 53 "global", |
54 ] | 54 ] |
55 handlers: [ | 55 handlers: [ |
56 ] | 56 ] |
57 | 57 |
58 --- | 58 --- |
59 snippet: " | 59 snippet: " |
60 unallocated = 1; | 60 unallocated = 1; |
61 function f() { 'use strict'; return --unallocated; } | 61 function f() { 'use strict'; return --unallocated; } |
62 f(); | 62 f(); |
63 " | 63 " |
64 frame size: 0 | 64 frame size: 0 |
65 parameter count: 1 | 65 parameter count: 1 |
66 bytecode array length: 9 | 66 bytecode array length: 8 |
67 bytecodes: [ | 67 bytecodes: [ |
68 /* 27 E> */ B(StackCheck), | 68 /* 27 E> */ B(StackCheck), |
69 /* 46 S> */ B(LdaGlobal), U8(0), U8(1), | 69 /* 46 S> */ B(LdaGlobal), U8(1), |
70 B(Dec), | 70 B(Dec), |
71 /* 55 E> */ B(StaGlobalStrict), U8(0), U8(3), | 71 /* 55 E> */ B(StaGlobalStrict), U8(0), U8(3), |
72 /* 68 S> */ B(Return), | 72 /* 68 S> */ B(Return), |
73 ] | 73 ] |
74 constant pool: [ | 74 constant pool: [ |
75 "unallocated", | 75 "unallocated", |
76 ] | 76 ] |
77 handlers: [ | 77 handlers: [ |
78 ] | 78 ] |
79 | 79 |
80 --- | 80 --- |
81 snippet: " | 81 snippet: " |
82 unallocated = 1; | 82 unallocated = 1; |
83 function f() { return unallocated++; } | 83 function f() { return unallocated++; } |
84 f(); | 84 f(); |
85 " | 85 " |
86 frame size: 1 | 86 frame size: 1 |
87 parameter count: 1 | 87 parameter count: 1 |
88 bytecode array length: 14 | 88 bytecode array length: 13 |
89 bytecodes: [ | 89 bytecodes: [ |
90 /* 27 E> */ B(StackCheck), | 90 /* 27 E> */ B(StackCheck), |
91 /* 32 S> */ B(LdaGlobal), U8(0), U8(1), | 91 /* 32 S> */ B(LdaGlobal), U8(1), |
92 B(ToNumber), | 92 B(ToNumber), |
93 B(Star), R(0), | 93 B(Star), R(0), |
94 B(Inc), | 94 B(Inc), |
95 /* 50 E> */ B(StaGlobalSloppy), U8(0), U8(3), | 95 /* 50 E> */ B(StaGlobalSloppy), U8(0), U8(3), |
96 B(Ldar), R(0), | 96 B(Ldar), R(0), |
97 /* 54 S> */ B(Return), | 97 /* 54 S> */ B(Return), |
98 ] | 98 ] |
99 constant pool: [ | 99 constant pool: [ |
100 "unallocated", | 100 "unallocated", |
101 ] | 101 ] |
102 handlers: [ | 102 handlers: [ |
103 ] | 103 ] |
104 | 104 |
OLD | NEW |