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

Side by Side Diff: test/cctest/compiler/test-run-bytecode-graph-builder.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/cctest.status ('k') | test/cctest/interpreter/interpreter-tester.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 <utility> 5 #include <utility>
6 6
7 #include "src/compiler/pipeline.h" 7 #include "src/compiler/pipeline.h"
8 #include "src/execution.h" 8 #include "src/execution.h"
9 #include "src/handles.h" 9 #include "src/handles.h"
10 #include "src/interpreter/bytecode-array-builder.h" 10 #include "src/interpreter/bytecode-array-builder.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 class BytecodeGraphTester { 73 class BytecodeGraphTester {
74 public: 74 public:
75 BytecodeGraphTester(Isolate* isolate, Zone* zone, const char* script, 75 BytecodeGraphTester(Isolate* isolate, Zone* zone, const char* script,
76 const char* filter = kFunctionName) 76 const char* filter = kFunctionName)
77 : isolate_(isolate), zone_(zone), script_(script) { 77 : isolate_(isolate), zone_(zone), script_(script) {
78 i::FLAG_ignition = true; 78 i::FLAG_ignition = true;
79 i::FLAG_always_opt = false; 79 i::FLAG_always_opt = false;
80 i::FLAG_allow_natives_syntax = true; 80 i::FLAG_allow_natives_syntax = true;
81 i::FLAG_loop_assignment_analysis = false; 81 i::FLAG_loop_assignment_analysis = false;
82 // Set ignition filter flag via SetFlagsFromString to avoid double-free
83 // (or potential leak with StrDup() based on ownership confusion).
84 ScopedVector<char> ignition_filter(64);
85 SNPrintF(ignition_filter, "--ignition-filter=%s", filter);
86 FlagList::SetFlagsFromString(ignition_filter.start(),
87 ignition_filter.length());
88 // Ensure handler table is generated. 82 // Ensure handler table is generated.
89 isolate->interpreter()->Initialize(); 83 isolate->interpreter()->Initialize();
90 } 84 }
91 virtual ~BytecodeGraphTester() {} 85 virtual ~BytecodeGraphTester() {}
92 86
93 template <class... A> 87 template <class... A>
94 BytecodeGraphCallable<A...> GetCallable( 88 BytecodeGraphCallable<A...> GetCallable(
95 const char* functionName = kFunctionName) { 89 const char* functionName = kFunctionName) {
96 return BytecodeGraphCallable<A...>(isolate_, GetFunction(functionName)); 90 return BytecodeGraphCallable<A...>(isolate_, GetFunction(functionName));
97 } 91 }
(...skipping 2839 matching lines...) Expand 10 before | Expand all | Expand 10 after
2937 2931
2938 BytecodeGraphTester tester(isolate, zone, script.start()); 2932 BytecodeGraphTester tester(isolate, zone, script.start());
2939 auto callable = tester.GetCallable<>(); 2933 auto callable = tester.GetCallable<>();
2940 Handle<Object> return_value = callable().ToHandleChecked(); 2934 Handle<Object> return_value = callable().ToHandleChecked();
2941 CHECK(return_value->SameValue(*snippet.return_value())); 2935 CHECK(return_value->SameValue(*snippet.return_value()));
2942 } 2936 }
2943 2937
2944 } // namespace compiler 2938 } // namespace compiler
2945 } // namespace internal 2939 } // namespace internal
2946 } // namespace v8 2940 } // namespace v8
OLDNEW
« no previous file with comments | « test/cctest/cctest.status ('k') | test/cctest/interpreter/interpreter-tester.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698