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/execution.h" | 7 #include "src/execution.h" |
8 #include "src/handles.h" | 8 #include "src/handles.h" |
9 #include "src/interpreter/bytecode-array-builder.h" | 9 #include "src/interpreter/bytecode-array-builder.h" |
10 #include "src/interpreter/interpreter.h" | 10 #include "src/interpreter/interpreter.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 public: | 58 public: |
59 InterpreterTester(Isolate* isolate, const char* source, | 59 InterpreterTester(Isolate* isolate, const char* source, |
60 MaybeHandle<BytecodeArray> bytecode, | 60 MaybeHandle<BytecodeArray> bytecode, |
61 MaybeHandle<TypeFeedbackVector> feedback_vector, | 61 MaybeHandle<TypeFeedbackVector> feedback_vector, |
62 const char* filter) | 62 const char* filter) |
63 : isolate_(isolate), | 63 : isolate_(isolate), |
64 source_(source), | 64 source_(source), |
65 bytecode_(bytecode), | 65 bytecode_(bytecode), |
66 feedback_vector_(feedback_vector) { | 66 feedback_vector_(feedback_vector) { |
67 i::FLAG_ignition = true; | 67 i::FLAG_ignition = true; |
68 i::FLAG_ignition_fake_try_catch = true; | |
69 i::FLAG_ignition_fallback_on_catch = false; | 68 i::FLAG_ignition_fallback_on_catch = false; |
70 i::FLAG_always_opt = false; | 69 i::FLAG_always_opt = false; |
71 // Set ignition filter flag via SetFlagsFromString to avoid double-free | 70 // Set ignition filter flag via SetFlagsFromString to avoid double-free |
72 // (or potential leak with StrDup() based on ownership confusion). | 71 // (or potential leak with StrDup() based on ownership confusion). |
73 ScopedVector<char> ignition_filter(64); | 72 ScopedVector<char> ignition_filter(64); |
74 SNPrintF(ignition_filter, "--ignition-filter=%s", filter); | 73 SNPrintF(ignition_filter, "--ignition-filter=%s", filter); |
75 FlagList::SetFlagsFromString(ignition_filter.start(), | 74 FlagList::SetFlagsFromString(ignition_filter.start(), |
76 ignition_filter.length()); | 75 ignition_filter.length()); |
77 // Ensure handler table is generated. | 76 // Ensure handler table is generated. |
78 isolate->interpreter()->Initialize(); | 77 isolate->interpreter()->Initialize(); |
(...skipping 3443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3522 auto callable = tester.GetCallable<>(); | 3521 auto callable = tester.GetCallable<>(); |
3523 | 3522 |
3524 Handle<i::Object> return_value = callable().ToHandleChecked(); | 3523 Handle<i::Object> return_value = callable().ToHandleChecked(); |
3525 CHECK(return_value->SameValue(*eval_func_decl[i].second)); | 3524 CHECK(return_value->SameValue(*eval_func_decl[i].second)); |
3526 } | 3525 } |
3527 } | 3526 } |
3528 | 3527 |
3529 } // namespace interpreter | 3528 } // namespace interpreter |
3530 } // namespace internal | 3529 } // namespace internal |
3531 } // namespace v8 | 3530 } // namespace v8 |
OLD | NEW |