Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: test/cctest/interpreter/interpreter-tester.cc

Issue 1811553003: [Interpreter] Make ignition compiler eagerly. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test which was missed Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "test/cctest/interpreter/interpreter-tester.h" 5 #include "test/cctest/interpreter/interpreter-tester.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace interpreter { 9 namespace interpreter {
10 10
11 MaybeHandle<Object> CallInterpreter(Isolate* isolate, 11 MaybeHandle<Object> CallInterpreter(Isolate* isolate,
12 Handle<JSFunction> function) { 12 Handle<JSFunction> function) {
13 return Execution::Call(isolate, function, 13 return Execution::Call(isolate, function,
14 isolate->factory()->undefined_value(), 0, nullptr); 14 isolate->factory()->undefined_value(), 0, nullptr);
15 } 15 }
16 16
17 InterpreterTester::InterpreterTester( 17 InterpreterTester::InterpreterTester(
18 Isolate* isolate, const char* source, MaybeHandle<BytecodeArray> bytecode, 18 Isolate* isolate, const char* source, MaybeHandle<BytecodeArray> bytecode,
19 MaybeHandle<TypeFeedbackVector> feedback_vector, const char* filter) 19 MaybeHandle<TypeFeedbackVector> feedback_vector, const char* filter)
20 : isolate_(isolate), 20 : isolate_(isolate),
21 source_(source), 21 source_(source),
22 bytecode_(bytecode), 22 bytecode_(bytecode),
23 feedback_vector_(feedback_vector) { 23 feedback_vector_(feedback_vector) {
24 i::FLAG_ignition = true; 24 i::FLAG_ignition = true;
25 i::FLAG_always_opt = false; 25 i::FLAG_always_opt = false;
26 // Set ignition filter flag via SetFlagsFromString to avoid double-free
27 // (or potential leak with StrDup() based on ownership confusion).
28 ScopedVector<char> ignition_filter(64);
29 SNPrintF(ignition_filter, "--ignition-filter=%s", filter);
30 FlagList::SetFlagsFromString(ignition_filter.start(),
31 ignition_filter.length());
32 // Ensure handler table is generated. 26 // Ensure handler table is generated.
33 isolate->interpreter()->Initialize(); 27 isolate->interpreter()->Initialize();
34 } 28 }
35 29
36 InterpreterTester::InterpreterTester( 30 InterpreterTester::InterpreterTester(
37 Isolate* isolate, Handle<BytecodeArray> bytecode, 31 Isolate* isolate, Handle<BytecodeArray> bytecode,
38 MaybeHandle<TypeFeedbackVector> feedback_vector, const char* filter) 32 MaybeHandle<TypeFeedbackVector> feedback_vector, const char* filter)
39 : InterpreterTester(isolate, nullptr, bytecode, feedback_vector, filter) {} 33 : InterpreterTester(isolate, nullptr, bytecode, feedback_vector, filter) {}
40 34
41 InterpreterTester::InterpreterTester(Isolate* isolate, const char* source, 35 InterpreterTester::InterpreterTester(Isolate* isolate, const char* source,
(...skipping 28 matching lines...) Expand all
70 return "function " + function_name() + "() {\n" + std::string(body) + "\n}"; 64 return "function " + function_name() + "() {\n" + std::string(body) + "\n}";
71 } 65 }
72 66
73 std::string InterpreterTester::function_name() { 67 std::string InterpreterTester::function_name() {
74 return std::string(kFunctionName); 68 return std::string(kFunctionName);
75 } 69 }
76 70
77 } // namespace interpreter 71 } // namespace interpreter
78 } // namespace internal 72 } // namespace internal
79 } // namespace v8 73 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-run-bytecode-graph-builder.cc ('k') | test/cctest/test-api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698