OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/compiler.h" | 7 #include "src/compiler.h" |
8 #include "src/interpreter/bytecode-array-iterator.h" | 8 #include "src/interpreter/bytecode-array-iterator.h" |
9 #include "src/interpreter/bytecode-generator.h" | 9 #include "src/interpreter/bytecode-generator.h" |
10 #include "src/interpreter/interpreter.h" | 10 #include "src/interpreter/interpreter.h" |
(...skipping 4354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4365 B(Star), R(2), // | 4365 B(Star), R(2), // |
4366 B(LdaZero), // | 4366 B(LdaZero), // |
4367 B(Star), R(1), // | 4367 B(Star), R(1), // |
4368 B(LdaSmi8), U8(3), // | 4368 B(LdaSmi8), U8(3), // |
4369 B(Star), R(0), // | 4369 B(Star), R(0), // |
4370 B(LdaZero), // | 4370 B(LdaZero), // |
4371 B(TestEqualStrict), R(1), // | 4371 B(TestEqualStrict), R(1), // |
4372 B(JumpIfTrue), U8(4), // | 4372 B(JumpIfTrue), U8(4), // |
4373 B(Jump), U8(5), // | 4373 B(Jump), U8(5), // |
4374 B(Ldar), R(2), // | 4374 B(Ldar), R(2), // |
4375 B(Throw), // | 4375 B(ReThrow), // |
4376 B(LdaUndefined), // | 4376 B(LdaUndefined), // |
4377 B(Return), // | 4377 B(Return), // |
4378 }, | 4378 }, |
4379 0, | 4379 0, |
4380 {}, | 4380 {}, |
4381 1, | 4381 1, |
4382 {{4, 8, 14}}}, | 4382 {{4, 8, 14}}}, |
4383 {"var a = 1; try { a = 2; } catch(e) { a = 20 } finally { a = 3; }", | 4383 {"var a = 1; try { a = 2; } catch(e) { a = 20 } finally { a = 3; }", |
4384 9 * kPointerSize, | 4384 9 * kPointerSize, |
4385 1, | 4385 1, |
(...skipping 20 matching lines...) Expand all Loading... |
4406 B(Star), R(3), // | 4406 B(Star), R(3), // |
4407 B(LdaZero), // | 4407 B(LdaZero), // |
4408 B(Star), R(2), // | 4408 B(Star), R(2), // |
4409 B(LdaSmi8), U8(3), // | 4409 B(LdaSmi8), U8(3), // |
4410 B(Star), R(0), // | 4410 B(Star), R(0), // |
4411 B(LdaZero), // | 4411 B(LdaZero), // |
4412 B(TestEqualStrict), R(2), // | 4412 B(TestEqualStrict), R(2), // |
4413 B(JumpIfTrue), U8(4), // | 4413 B(JumpIfTrue), U8(4), // |
4414 B(Jump), U8(5), // | 4414 B(Jump), U8(5), // |
4415 B(Ldar), R(3), // | 4415 B(Ldar), R(3), // |
4416 B(Throw), // | 4416 B(ReThrow), // |
4417 B(LdaUndefined), // | 4417 B(LdaUndefined), // |
4418 B(Return), // | 4418 B(Return), // |
4419 }, | 4419 }, |
4420 1, | 4420 1, |
4421 {"e"}, | 4421 {"e"}, |
4422 2, | 4422 2, |
4423 {{4, 33, 39}, {4, 8, 10}}}, | 4423 {{4, 33, 39}, {4, 8, 10}}}, |
4424 {"var a; try {" | 4424 {"var a; try {" |
4425 " try { a = 1 } catch(e) { a = 2 }" | 4425 " try { a = 1 } catch(e) { a = 2 }" |
4426 "} catch(e) { a = 20 } finally { a = 3; }", | 4426 "} catch(e) { a = 20 } finally { a = 3; }", |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4458 B(Star), R(3), // | 4458 B(Star), R(3), // |
4459 B(LdaZero), // | 4459 B(LdaZero), // |
4460 B(Star), R(2), // | 4460 B(Star), R(2), // |
4461 B(LdaSmi8), U8(3), // | 4461 B(LdaSmi8), U8(3), // |
4462 B(Star), R(0), // | 4462 B(Star), R(0), // |
4463 B(LdaZero), // | 4463 B(LdaZero), // |
4464 B(TestEqualStrict), R(2), // | 4464 B(TestEqualStrict), R(2), // |
4465 B(JumpIfTrue), U8(4), // | 4465 B(JumpIfTrue), U8(4), // |
4466 B(Jump), U8(5), // | 4466 B(Jump), U8(5), // |
4467 B(Ldar), R(3), // | 4467 B(Ldar), R(3), // |
4468 B(Throw), // | 4468 B(ReThrow), // |
4469 B(LdaUndefined), // | 4469 B(LdaUndefined), // |
4470 B(Return), // | 4470 B(Return), // |
4471 }, | 4471 }, |
4472 1, | 4472 1, |
4473 {"e"}, | 4473 {"e"}, |
4474 3, | 4474 3, |
4475 {{0, 54, 60}, {0, 29, 31}, {0, 4, 6}}}, | 4475 {{0, 54, 60}, {0, 29, 31}, {0, 4, 6}}}, |
4476 }; | 4476 }; |
4477 | 4477 |
4478 for (size_t i = 0; i < arraysize(snippets); i++) { | 4478 for (size_t i = 0; i < arraysize(snippets); i++) { |
(...skipping 2557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7036 std::string(function_epilogue); | 7036 std::string(function_epilogue); |
7037 Handle<BytecodeArray> bytecode_array = | 7037 Handle<BytecodeArray> bytecode_array = |
7038 helper.MakeBytecode(script.c_str(), "*", "f"); | 7038 helper.MakeBytecode(script.c_str(), "*", "f"); |
7039 CheckBytecodeArrayEqual(snippets[i], bytecode_array); | 7039 CheckBytecodeArrayEqual(snippets[i], bytecode_array); |
7040 } | 7040 } |
7041 } | 7041 } |
7042 | 7042 |
7043 } // namespace interpreter | 7043 } // namespace interpreter |
7044 } // namespace internal | 7044 } // namespace internal |
7045 } // namespace v8 | 7045 } // namespace v8 |
OLD | NEW |