OLD | NEW |
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 x = 0; | 10 var x = 0; |
11 label: { | 11 label: { |
12 x = x + 1; | 12 x = x + 1; |
13 break label; | 13 break label; |
14 x = x + 1; | 14 x = x + 1; |
15 } | 15 } |
16 return x; | 16 return x; |
17 " | 17 " |
18 frame size: 1 | 18 frame size: 1 |
19 parameter count: 1 | 19 parameter count: 1 |
20 bytecode array length: 16 | 20 bytecode array length: 16 |
21 bytecodes: [ | 21 bytecodes: [ |
22 /* 30 E> */ B(StackCheck), | 22 /* 30 E> */ B(StackCheck), |
23 /* 42 S> */ B(LdaZero), | 23 /* 42 S> */ B(LdaZero), |
24 B(Star), R(0), | 24 B(Star), R(0), |
25 /* 56 S> */ B(LdaSmi), U8(1), | 25 /* 56 S> */ B(LdaSmi), I8(1), |
26 /* 62 E> */ B(Add), R(0), U8(2), | 26 /* 62 E> */ B(Add), R(0), U8(2), |
27 B(Star), R(0), | 27 B(Star), R(0), |
28 /* 69 S> */ B(Jump), U8(2), | 28 /* 69 S> */ B(Jump), U8(2), |
29 /* 97 S> */ B(Ldar), R(0), | 29 /* 97 S> */ B(Ldar), R(0), |
30 /* 107 S> */ B(Return), | 30 /* 107 S> */ B(Return), |
31 ] | 31 ] |
32 constant pool: [ | 32 constant pool: [ |
33 ] | 33 ] |
34 handlers: [ | 34 handlers: [ |
35 ] | 35 ] |
(...skipping 13 matching lines...) Expand all Loading... |
49 " | 49 " |
50 frame size: 4 | 50 frame size: 4 |
51 parameter count: 1 | 51 parameter count: 1 |
52 bytecode array length: 69 | 52 bytecode array length: 69 |
53 bytecodes: [ | 53 bytecodes: [ |
54 /* 30 E> */ B(StackCheck), | 54 /* 30 E> */ B(StackCheck), |
55 /* 44 S> */ B(LdaZero), | 55 /* 44 S> */ B(LdaZero), |
56 B(Star), R(0), | 56 B(Star), R(0), |
57 /* 71 S> */ B(LdaZero), | 57 /* 71 S> */ B(LdaZero), |
58 B(Star), R(1), | 58 B(Star), R(1), |
59 /* 76 S> */ B(LdaSmi), U8(10), | 59 /* 76 S> */ B(LdaSmi), I8(10), |
60 /* 76 E> */ B(TestLessThan), R(1), U8(2), | 60 /* 76 E> */ B(TestLessThan), R(1), U8(2), |
61 B(JumpIfFalse), U8(54), | 61 B(JumpIfFalse), U8(54), |
62 /* 58 E> */ B(StackCheck), | 62 /* 58 E> */ B(StackCheck), |
63 /* 106 S> */ B(LdaZero), | 63 /* 106 S> */ B(LdaZero), |
64 B(Star), R(2), | 64 B(Star), R(2), |
65 /* 111 S> */ B(LdaSmi), U8(3), | 65 /* 111 S> */ B(LdaSmi), I8(3), |
66 /* 111 E> */ B(TestLessThan), R(2), U8(4), | 66 /* 111 E> */ B(TestLessThan), R(2), U8(4), |
67 B(JumpIfFalse), U8(34), | 67 B(JumpIfFalse), U8(34), |
68 /* 93 E> */ B(StackCheck), | 68 /* 93 E> */ B(StackCheck), |
69 /* 129 S> */ B(Ldar), R(0), | 69 /* 129 S> */ B(Ldar), R(0), |
70 B(Inc), U8(6), | 70 B(Inc), U8(6), |
71 B(Star), R(0), | 71 B(Star), R(0), |
72 /* 142 S> */ B(Ldar), R(2), | 72 /* 142 S> */ B(Ldar), R(2), |
73 /* 148 E> */ B(Add), R(1), U8(7), | 73 /* 148 E> */ B(Add), R(1), U8(7), |
74 B(Star), R(3), | 74 B(Star), R(3), |
75 B(LdaSmi), U8(12), | 75 B(LdaSmi), I8(12), |
76 /* 152 E> */ B(TestEqual), R(3), U8(8), | 76 /* 152 E> */ B(TestEqual), R(3), U8(8), |
77 B(JumpIfFalse), U8(4), | 77 B(JumpIfFalse), U8(4), |
78 /* 161 S> */ B(Jump), U8(20), | 78 /* 161 S> */ B(Jump), U8(20), |
79 /* 118 S> */ B(Ldar), R(2), | 79 /* 118 S> */ B(Ldar), R(2), |
80 B(Inc), U8(5), | 80 B(Inc), U8(5), |
81 B(Star), R(2), | 81 B(Star), R(2), |
82 B(JumpLoop), U8(36), U8(1), | 82 B(JumpLoop), U8(36), I8(1), |
83 /* 84 S> */ B(Ldar), R(1), | 83 /* 84 S> */ B(Ldar), R(1), |
84 B(Inc), U8(3), | 84 B(Inc), U8(3), |
85 B(Star), R(1), | 85 B(Star), R(1), |
86 B(JumpLoop), U8(56), U8(0), | 86 B(JumpLoop), U8(56), I8(0), |
87 /* 188 S> */ B(Ldar), R(0), | 87 /* 188 S> */ B(Ldar), R(0), |
88 /* 200 S> */ B(Return), | 88 /* 200 S> */ B(Return), |
89 ] | 89 ] |
90 constant pool: [ | 90 constant pool: [ |
91 ] | 91 ] |
92 handlers: [ | 92 handlers: [ |
93 ] | 93 ] |
94 | 94 |
95 --- | 95 --- |
96 snippet: " | 96 snippet: " |
97 outer: { | 97 outer: { |
98 let y = 10; | 98 let y = 10; |
99 function f() { return y; } | 99 function f() { return y; } |
100 break outer; | 100 break outer; |
101 } | 101 } |
102 " | 102 " |
103 frame size: 3 | 103 frame size: 3 |
104 parameter count: 1 | 104 parameter count: 1 |
105 bytecode array length: 31 | 105 bytecode array length: 31 |
106 bytecodes: [ | 106 bytecodes: [ |
107 /* 30 E> */ B(StackCheck), | 107 /* 30 E> */ B(StackCheck), |
108 B(Ldar), R(closure), | 108 B(Ldar), R(closure), |
109 B(CreateBlockContext), U8(0), | 109 B(CreateBlockContext), U8(0), |
110 B(PushContext), R(2), | 110 B(PushContext), R(2), |
111 B(LdaTheHole), | 111 B(LdaTheHole), |
112 B(StaCurrentContextSlot), U8(4), | 112 B(StaCurrentContextSlot), U8(4), |
113 B(CreateClosure), U8(1), U8(2), U8(2), | 113 B(CreateClosure), U8(1), U8(2), U8(2), |
114 B(Star), R(0), | 114 B(Star), R(0), |
115 /* 53 S> */ B(LdaSmi), U8(10), | 115 /* 53 S> */ B(LdaSmi), I8(10), |
116 /* 53 E> */ B(StaCurrentContextSlot), U8(4), | 116 /* 53 E> */ B(StaCurrentContextSlot), U8(4), |
117 B(Mov), R(0), R(1), | 117 B(Mov), R(0), R(1), |
118 B(Ldar), R(0), | 118 B(Ldar), R(0), |
119 /* 88 S> */ B(Jump), U8(2), | 119 /* 88 S> */ B(Jump), U8(2), |
120 B(PopContext), R(2), | 120 B(PopContext), R(2), |
121 B(LdaUndefined), | 121 B(LdaUndefined), |
122 /* 103 S> */ B(Return), | 122 /* 103 S> */ B(Return), |
123 ] | 123 ] |
124 constant pool: [ | 124 constant pool: [ |
125 FIXED_ARRAY_TYPE, | 125 FIXED_ARRAY_TYPE, |
(...skipping 17 matching lines...) Expand all Loading... |
143 " | 143 " |
144 frame size: 4 | 144 frame size: 4 |
145 parameter count: 1 | 145 parameter count: 1 |
146 bytecode array length: 54 | 146 bytecode array length: 54 |
147 bytecodes: [ | 147 bytecodes: [ |
148 B(CreateFunctionContext), U8(1), | 148 B(CreateFunctionContext), U8(1), |
149 B(PushContext), R(2), | 149 B(PushContext), R(2), |
150 B(LdaTheHole), | 150 B(LdaTheHole), |
151 B(StaCurrentContextSlot), U8(4), | 151 B(StaCurrentContextSlot), U8(4), |
152 /* 30 E> */ B(StackCheck), | 152 /* 30 E> */ B(StackCheck), |
153 /* 42 S> */ B(LdaSmi), U8(1), | 153 /* 42 S> */ B(LdaSmi), I8(1), |
154 /* 42 E> */ B(StaCurrentContextSlot), U8(4), | 154 /* 42 E> */ B(StaCurrentContextSlot), U8(4), |
155 B(Ldar), R(closure), | 155 B(Ldar), R(closure), |
156 B(CreateBlockContext), U8(0), | 156 B(CreateBlockContext), U8(0), |
157 B(PushContext), R(3), | 157 B(PushContext), R(3), |
158 B(LdaTheHole), | 158 B(LdaTheHole), |
159 B(StaCurrentContextSlot), U8(4), | 159 B(StaCurrentContextSlot), U8(4), |
160 B(CreateClosure), U8(1), U8(2), U8(2), | 160 B(CreateClosure), U8(1), U8(2), U8(2), |
161 B(Star), R(0), | 161 B(Star), R(0), |
162 /* 76 S> */ B(LdaSmi), U8(2), | 162 /* 76 S> */ B(LdaSmi), I8(2), |
163 /* 76 E> */ B(StaCurrentContextSlot), U8(4), | 163 /* 76 E> */ B(StaCurrentContextSlot), U8(4), |
164 B(Mov), R(0), R(1), | 164 B(Mov), R(0), R(1), |
165 /* 118 S> */ B(LdaCurrentContextSlot), U8(4), | 165 /* 118 S> */ B(LdaCurrentContextSlot), U8(4), |
166 B(JumpIfToBooleanFalse), U8(6), | 166 B(JumpIfToBooleanFalse), U8(6), |
167 /* 125 S> */ B(PopContext), R(3), | 167 /* 125 S> */ B(PopContext), R(3), |
168 B(Jump), U8(8), | 168 B(Jump), U8(8), |
169 /* 142 S> */ B(LdaSmi), U8(3), | 169 /* 142 S> */ B(LdaSmi), I8(3), |
170 /* 144 E> */ B(StaCurrentContextSlot), U8(4), | 170 /* 144 E> */ B(StaCurrentContextSlot), U8(4), |
171 B(PopContext), R(3), | 171 B(PopContext), R(3), |
172 /* 155 S> */ B(LdaSmi), U8(4), | 172 /* 155 S> */ B(LdaSmi), I8(4), |
173 /* 157 E> */ B(StaCurrentContextSlot), U8(4), | 173 /* 157 E> */ B(StaCurrentContextSlot), U8(4), |
174 B(LdaUndefined), | 174 B(LdaUndefined), |
175 /* 162 S> */ B(Return), | 175 /* 162 S> */ B(Return), |
176 ] | 176 ] |
177 constant pool: [ | 177 constant pool: [ |
178 FIXED_ARRAY_TYPE, | 178 FIXED_ARRAY_TYPE, |
179 SHARED_FUNCTION_INFO_TYPE, | 179 SHARED_FUNCTION_INFO_TYPE, |
180 ] | 180 ] |
181 handlers: [ | 181 handlers: [ |
182 ] | 182 ] |
183 | 183 |
OLD | NEW |