OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/api.h" | 7 #include "src/api.h" |
8 #include "src/factory.h" | 8 #include "src/factory.h" |
9 #include "src/interpreter/bytecode-array-writer.h" | 9 #include "src/interpreter/bytecode-array-writer.h" |
10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 /* 20 */ B(JumpIfFalse), U8(24), | 161 /* 20 */ B(JumpIfFalse), U8(24), |
162 /* 22 */ B(ForInNext), R8(3), R8(7), R8(4), U8(1), | 162 /* 22 */ B(ForInNext), R8(3), R8(7), R8(4), U8(1), |
163 /* 27 */ B(JumpIfUndefined), U8(10), | 163 /* 27 */ B(JumpIfUndefined), U8(10), |
164 /* 29 */ B(Star), R8(0), | 164 /* 29 */ B(Star), R8(0), |
165 /* 31 54 E> */ B(StackCheck), | 165 /* 31 54 E> */ B(StackCheck), |
166 /* 32 */ B(Ldar), R8(0), | 166 /* 32 */ B(Ldar), R8(0), |
167 /* 34 */ B(Star), R8(2), | 167 /* 34 */ B(Star), R8(2), |
168 /* 36 85 S> */ B(Return), | 168 /* 36 85 S> */ B(Return), |
169 /* 37 */ B(ForInStep), R8(7), | 169 /* 37 */ B(ForInStep), R8(7), |
170 /* 39 */ B(Star), R8(7), | 170 /* 39 */ B(Star), R8(7), |
171 /* 41 */ B(JumpLoop), U8(-24), U8(0), | 171 /* 41 */ B(JumpLoop), U8(24), U8(0), |
172 /* 44 */ B(LdaUndefined), | 172 /* 44 */ B(LdaUndefined), |
173 /* 45 85 S> */ B(Return), | 173 /* 45 85 S> */ B(Return), |
174 // clang-format on | 174 // clang-format on |
175 }; | 175 }; |
176 | 176 |
177 static const PositionTableEntry expected_positions[] = { | 177 static const PositionTableEntry expected_positions[] = { |
178 {0, 30, false}, {1, 42, true}, {3, 42, false}, {6, 68, true}, | 178 {0, 30, false}, {1, 42, true}, {3, 42, false}, {6, 68, true}, |
179 {18, 63, true}, {32, 54, false}, {37, 85, true}, {46, 85, true}}; | 179 {18, 63, true}, {32, 54, false}, {37, 85, true}, {46, 85, true}}; |
180 | 180 |
181 BytecodeLabel back_jump, jump_for_in, jump_end_1, jump_end_2, jump_end_3; | 181 BytecodeLabel back_jump, jump_for_in, jump_end_1, jump_end_2, jump_end_3; |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 expected.source_position); | 228 expected.source_position); |
229 CHECK_EQ(source_iterator.is_statement(), expected.is_statement); | 229 CHECK_EQ(source_iterator.is_statement(), expected.is_statement); |
230 source_iterator.Advance(); | 230 source_iterator.Advance(); |
231 } | 231 } |
232 CHECK(source_iterator.done()); | 232 CHECK(source_iterator.done()); |
233 } | 233 } |
234 | 234 |
235 } // namespace interpreter | 235 } // namespace interpreter |
236 } // namespace internal | 236 } // namespace internal |
237 } // namespace v8 | 237 } // namespace v8 |
OLD | NEW |