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_fallback_on_catch = false; | |
69 i::FLAG_always_opt = false; | 68 i::FLAG_always_opt = false; |
70 // Set ignition filter flag via SetFlagsFromString to avoid double-free | 69 // Set ignition filter flag via SetFlagsFromString to avoid double-free |
71 // (or potential leak with StrDup() based on ownership confusion). | 70 // (or potential leak with StrDup() based on ownership confusion). |
72 ScopedVector<char> ignition_filter(64); | 71 ScopedVector<char> ignition_filter(64); |
73 SNPrintF(ignition_filter, "--ignition-filter=%s", filter); | 72 SNPrintF(ignition_filter, "--ignition-filter=%s", filter); |
74 FlagList::SetFlagsFromString(ignition_filter.start(), | 73 FlagList::SetFlagsFromString(ignition_filter.start(), |
75 ignition_filter.length()); | 74 ignition_filter.length()); |
76 // Ensure handler table is generated. | 75 // Ensure handler table is generated. |
77 isolate->interpreter()->Initialize(); | 76 isolate->interpreter()->Initialize(); |
78 } | 77 } |
(...skipping 3598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3677 auto callable = tester.GetCallable<>(); | 3676 auto callable = tester.GetCallable<>(); |
3678 | 3677 |
3679 Handle<i::Object> return_value = callable().ToHandleChecked(); | 3678 Handle<i::Object> return_value = callable().ToHandleChecked(); |
3680 CHECK(return_value->SameValue(*eval_func_decl[i].second)); | 3679 CHECK(return_value->SameValue(*eval_func_decl[i].second)); |
3681 } | 3680 } |
3682 } | 3681 } |
3683 | 3682 |
3684 } // namespace interpreter | 3683 } // namespace interpreter |
3685 } // namespace internal | 3684 } // namespace internal |
3686 } // namespace v8 | 3685 } // namespace v8 |
OLD | NEW |