blob: fab69016256287ec83e08456df65dee93286883d [file] [log] [blame]
Ben Murdochda12d292016-06-02 14:46:10 +01001#
2# Autogenerated by generate-bytecode-expectations.
3#
4
5---
6pool type: mixed
7execute: yes
8wrap: yes
9
10---
11snippet: "
12 var x = 0;
13 label: {
14 x = x + 1;
15 break label;
16 x = x + 1;
17 }
18 return x;
19"
Ben Murdoch61f157c2016-09-16 13:49:30 +010020frame size: 1
Ben Murdochda12d292016-06-02 14:46:10 +010021parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +010022bytecode array length: 15
Ben Murdochda12d292016-06-02 14:46:10 +010023bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010024 /* 30 E> */ B(StackCheck),
25 /* 42 S> */ B(LdaZero),
Ben Murdoch61f157c2016-09-16 13:49:30 +010026 B(Star), R(0),
27 /* 56 S> */ B(LdaSmi), U8(1),
28 B(Add), R(0),
29 B(Star), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +010030 /* 69 S> */ B(Jump), U8(2),
31 /* 97 S> */ B(Ldar), R(0),
32 /* 107 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010033]
34constant pool: [
35]
36handlers: [
37]
38
39---
40snippet: "
41 var sum = 0;
42 outer: {
43 for (var x = 0; x < 10; ++x) {
44 for (var y = 0; y < 3; ++y) {
45 ++sum;
46 if (x + y == 12) { break outer; }
47 }
48 }
49 }
50 return sum;
51"
52frame size: 5
53parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +010054bytecode array length: 60
Ben Murdochda12d292016-06-02 14:46:10 +010055bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +010056 /* 30 E> */ B(StackCheck),
57 /* 44 S> */ B(LdaZero),
Ben Murdoch61f157c2016-09-16 13:49:30 +010058 B(Star), R(0),
Ben Murdochc5610432016-08-08 18:44:38 +010059 /* 71 S> */ B(LdaZero),
Ben Murdoch61f157c2016-09-16 13:49:30 +010060 B(Star), R(1),
61 /* 76 S> */ B(LdaSmi), U8(10),
62 /* 76 E> */ B(TestLessThan), R(1),
63 B(JumpIfFalse), U8(46),
Ben Murdochc5610432016-08-08 18:44:38 +010064 /* 58 E> */ B(StackCheck),
65 /* 106 S> */ B(LdaZero),
Ben Murdoch61f157c2016-09-16 13:49:30 +010066 B(Star), R(2),
67 /* 111 S> */ B(LdaSmi), U8(3),
68 /* 111 E> */ B(TestLessThan), R(2),
69 B(JumpIfFalse), U8(29),
Ben Murdochc5610432016-08-08 18:44:38 +010070 /* 93 E> */ B(StackCheck),
71 /* 129 S> */ B(Ldar), R(0),
72 B(Inc),
Ben Murdoch61f157c2016-09-16 13:49:30 +010073 B(Star), R(0),
74 /* 142 S> */ B(Ldar), R(2),
75 /* 150 E> */ B(Add), R(1),
Ben Murdochc5610432016-08-08 18:44:38 +010076 B(Star), R(4),
77 B(LdaSmi), U8(12),
78 /* 152 E> */ B(TestEqual), R(4),
79 B(JumpIfFalse), U8(4),
80 /* 161 S> */ B(Jump), U8(16),
81 /* 118 S> */ B(Ldar), R(2),
82 B(Inc),
Ben Murdoch61f157c2016-09-16 13:49:30 +010083 B(Star), R(2),
84 B(Jump), U8(-31),
Ben Murdochc5610432016-08-08 18:44:38 +010085 /* 84 S> */ B(Ldar), R(1),
86 B(Inc),
Ben Murdoch61f157c2016-09-16 13:49:30 +010087 B(Star), R(1),
88 B(Jump), U8(-48),
Ben Murdochc5610432016-08-08 18:44:38 +010089 /* 188 S> */ B(Ldar), R(0),
90 /* 200 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +010091]
92constant pool: [
93]
94handlers: [
95]
96
97---
98snippet: "
99 outer: {
100 let y = 10;
101 function f() { return y; }
102 break outer;
103 }
104"
105frame size: 5
106parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +0100107bytecode array length: 50
Ben Murdochda12d292016-06-02 14:46:10 +0100108bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +0100109 /* 30 E> */ B(StackCheck),
110 B(LdaConstant), U8(0),
111 B(Star), R(3),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100112 B(Mov), R(closure), R(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100113 B(CallRuntime), U16(Runtime::kPushBlockContext), R(3), U8(2),
114 B(PushContext), R(2),
115 B(LdaTheHole),
116 B(StaContextSlot), R(context), U8(4),
117 B(CreateClosure), U8(1), U8(0),
118 B(Star), R(0),
119 /* 53 S> */ B(LdaSmi), U8(10),
120 /* 53 E> */ B(StaContextSlot), R(context), U8(4),
121 B(Ldar), R(0),
122 B(JumpIfNotHole), U8(11),
123 B(LdaConstant), U8(2),
124 B(Star), R(3),
125 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(3), U8(1),
126 B(Star), R(1),
127 /* 88 S> */ B(Jump), U8(2),
128 B(PopContext), R(2),
129 B(LdaUndefined),
130 /* 103 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100131]
132constant pool: [
133 InstanceType::FIXED_ARRAY_TYPE,
134 InstanceType::SHARED_FUNCTION_INFO_TYPE,
135 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
136]
137handlers: [
138]
139
140---
141snippet: "
142 let x = 1;
143 outer: {
144 inner: {
145 let y = 2;
146 function f() { return x + y; }
147 if (y) break outer;
148 y = 3;
149 }
150 }
151 x = 4;
152"
153frame size: 6
154parameter count: 1
Ben Murdoch61f157c2016-09-16 13:49:30 +0100155bytecode array length: 130
Ben Murdochda12d292016-06-02 14:46:10 +0100156bytecodes: [
Ben Murdochc5610432016-08-08 18:44:38 +0100157 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U8(1),
158 B(PushContext), R(2),
159 B(LdaTheHole),
160 B(StaContextSlot), R(context), U8(4),
161 /* 30 E> */ B(StackCheck),
162 /* 42 S> */ B(LdaSmi), U8(1),
163 /* 42 E> */ B(StaContextSlot), R(context), U8(4),
164 B(LdaConstant), U8(0),
165 B(Star), R(4),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100166 B(Mov), R(closure), R(5),
Ben Murdochc5610432016-08-08 18:44:38 +0100167 B(CallRuntime), U16(Runtime::kPushBlockContext), R(4), U8(2),
168 B(PushContext), R(3),
169 B(LdaTheHole),
170 B(StaContextSlot), R(context), U8(4),
171 B(CreateClosure), U8(1), U8(0),
172 B(Star), R(0),
173 /* 76 S> */ B(LdaSmi), U8(2),
174 /* 76 E> */ B(StaContextSlot), R(context), U8(4),
175 B(Ldar), R(0),
176 B(JumpIfNotHole), U8(11),
177 B(LdaConstant), U8(2),
178 B(Star), R(4),
179 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
180 B(Star), R(1),
181 /* 118 S> */ B(LdaContextSlot), R(context), U8(4),
182 B(JumpIfNotHole), U8(11),
183 B(LdaConstant), U8(3),
184 B(Star), R(4),
185 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
186 B(JumpIfToBooleanFalse), U8(6),
187 /* 125 S> */ B(PopContext), R(3),
188 B(Jump), U8(27),
189 /* 142 S> */ B(LdaSmi), U8(3),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100190 B(Star), R(4),
191 /* 144 E> */ B(LdaContextSlot), R(context), U8(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100192 B(JumpIfNotHole), U8(11),
193 B(LdaConstant), U8(3),
194 B(Star), R(5),
195 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
196 B(Ldar), R(4),
197 B(StaContextSlot), R(context), U8(4),
198 B(PopContext), R(3),
199 /* 155 S> */ B(LdaSmi), U8(4),
Ben Murdoch61f157c2016-09-16 13:49:30 +0100200 B(Star), R(4),
201 /* 157 E> */ B(LdaContextSlot), R(context), U8(4),
Ben Murdochc5610432016-08-08 18:44:38 +0100202 B(JumpIfNotHole), U8(11),
203 B(LdaConstant), U8(4),
204 B(Star), R(5),
205 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1),
206 B(Ldar), R(4),
207 B(StaContextSlot), R(context), U8(4),
208 B(LdaUndefined),
209 /* 162 S> */ B(Return),
Ben Murdochda12d292016-06-02 14:46:10 +0100210]
211constant pool: [
212 InstanceType::FIXED_ARRAY_TYPE,
213 InstanceType::SHARED_FUNCTION_INFO_TYPE,
214 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
215 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
216 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE,
217]
218handlers: [
219]
220