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; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 --- | 94 --- |
95 snippet: " | 95 snippet: " |
96 outer: { | 96 outer: { |
97 let y = 10; | 97 let y = 10; |
98 function f() { return y; } | 98 function f() { return y; } |
99 break outer; | 99 break outer; |
100 } | 100 } |
101 " | 101 " |
102 frame size: 3 | 102 frame size: 3 |
103 parameter count: 1 | 103 parameter count: 1 |
104 bytecode array length: 34 | 104 bytecode array length: 30 |
105 bytecodes: [ | 105 bytecodes: [ |
106 /* 30 E> */ B(StackCheck), | 106 /* 30 E> */ B(StackCheck), |
107 B(Ldar), R(closure), | 107 B(Ldar), R(closure), |
108 B(CreateBlockContext), U8(0), | 108 B(CreateBlockContext), U8(0), |
109 B(PushContext), R(2), | 109 B(PushContext), R(2), |
110 B(LdaTheHole), | 110 B(LdaTheHole), |
111 B(StaContextSlot), R(context), U8(4), U8(0), | 111 B(StaCurrentContextSlot), U8(4), |
112 B(CreateClosure), U8(1), U8(2), | 112 B(CreateClosure), U8(1), U8(2), |
113 B(Star), R(0), | 113 B(Star), R(0), |
114 /* 53 S> */ B(LdaSmi), U8(10), | 114 /* 53 S> */ B(LdaSmi), U8(10), |
115 /* 53 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 115 /* 53 E> */ B(StaCurrentContextSlot), U8(4), |
116 B(Mov), R(0), R(1), | 116 B(Mov), R(0), R(1), |
117 B(Ldar), R(0), | 117 B(Ldar), R(0), |
118 /* 88 S> */ B(Jump), U8(2), | 118 /* 88 S> */ B(Jump), U8(2), |
119 B(PopContext), R(2), | 119 B(PopContext), R(2), |
120 B(LdaUndefined), | 120 B(LdaUndefined), |
121 /* 103 S> */ B(Return), | 121 /* 103 S> */ B(Return), |
122 ] | 122 ] |
123 constant pool: [ | 123 constant pool: [ |
124 FIXED_ARRAY_TYPE, | 124 FIXED_ARRAY_TYPE, |
125 SHARED_FUNCTION_INFO_TYPE, | 125 SHARED_FUNCTION_INFO_TYPE, |
126 ] | 126 ] |
127 handlers: [ | 127 handlers: [ |
128 ] | 128 ] |
129 | 129 |
130 --- | 130 --- |
131 snippet: " | 131 snippet: " |
132 let x = 1; | 132 let x = 1; |
133 outer: { | 133 outer: { |
134 inner: { | 134 inner: { |
135 let y = 2; | 135 let y = 2; |
136 function f() { return x + y; } | 136 function f() { return x + y; } |
137 if (y) break outer; | 137 if (y) break outer; |
138 y = 3; | 138 y = 3; |
139 } | 139 } |
140 } | 140 } |
141 x = 4; | 141 x = 4; |
142 " | 142 " |
143 frame size: 4 | 143 frame size: 4 |
144 parameter count: 1 | 144 parameter count: 1 |
145 bytecode array length: 67 | 145 bytecode array length: 53 |
146 bytecodes: [ | 146 bytecodes: [ |
147 B(CreateFunctionContext), U8(1), | 147 B(CreateFunctionContext), U8(1), |
148 B(PushContext), R(2), | 148 B(PushContext), R(2), |
149 B(LdaTheHole), | 149 B(LdaTheHole), |
150 B(StaContextSlot), R(context), U8(4), U8(0), | 150 B(StaCurrentContextSlot), U8(4), |
151 /* 30 E> */ B(StackCheck), | 151 /* 30 E> */ B(StackCheck), |
152 /* 42 S> */ B(LdaSmi), U8(1), | 152 /* 42 S> */ B(LdaSmi), U8(1), |
153 /* 42 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 153 /* 42 E> */ B(StaCurrentContextSlot), U8(4), |
154 B(Ldar), R(closure), | 154 B(Ldar), R(closure), |
155 B(CreateBlockContext), U8(0), | 155 B(CreateBlockContext), U8(0), |
156 B(PushContext), R(3), | 156 B(PushContext), R(3), |
157 B(LdaTheHole), | 157 B(LdaTheHole), |
158 B(StaContextSlot), R(context), U8(4), U8(0), | 158 B(StaCurrentContextSlot), U8(4), |
159 B(CreateClosure), U8(1), U8(2), | 159 B(CreateClosure), U8(1), U8(2), |
160 B(Star), R(0), | 160 B(Star), R(0), |
161 /* 76 S> */ B(LdaSmi), U8(2), | 161 /* 76 S> */ B(LdaSmi), U8(2), |
162 /* 76 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 162 /* 76 E> */ B(StaCurrentContextSlot), U8(4), |
163 B(Mov), R(0), R(1), | 163 B(Mov), R(0), R(1), |
164 /* 118 S> */ B(LdaContextSlot), R(context), U8(4), U8(0), | 164 /* 118 S> */ B(LdaCurrentContextSlot), U8(4), |
165 B(JumpIfToBooleanFalse), U8(6), | 165 B(JumpIfToBooleanFalse), U8(6), |
166 /* 125 S> */ B(PopContext), R(3), | 166 /* 125 S> */ B(PopContext), R(3), |
167 B(Jump), U8(10), | 167 B(Jump), U8(8), |
168 /* 142 S> */ B(LdaSmi), U8(3), | 168 /* 142 S> */ B(LdaSmi), U8(3), |
169 /* 144 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 169 /* 144 E> */ B(StaCurrentContextSlot), U8(4), |
170 B(PopContext), R(3), | 170 B(PopContext), R(3), |
171 /* 155 S> */ B(LdaSmi), U8(4), | 171 /* 155 S> */ B(LdaSmi), U8(4), |
172 /* 157 E> */ B(StaContextSlot), R(context), U8(4), U8(0), | 172 /* 157 E> */ B(StaCurrentContextSlot), U8(4), |
173 B(LdaUndefined), | 173 B(LdaUndefined), |
174 /* 162 S> */ B(Return), | 174 /* 162 S> */ B(Return), |
175 ] | 175 ] |
176 constant pool: [ | 176 constant pool: [ |
177 FIXED_ARRAY_TYPE, | 177 FIXED_ARRAY_TYPE, |
178 SHARED_FUNCTION_INFO_TYPE, | 178 SHARED_FUNCTION_INFO_TYPE, |
179 ] | 179 ] |
180 handlers: [ | 180 handlers: [ |
181 ] | 181 ] |
182 | 182 |
OLD | NEW |