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

Side by Side Diff: test/cctest/compiler/function-tester.h

Issue 1891663004: [compiler] Prevent unnecessary parsing with interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 8 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 | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 5 #ifndef V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 6 #define V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
7 7
8 #include "src/ast/ast-numbering.h" 8 #include "src/ast/ast-numbering.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 info.MarkAsDeoptimizationEnabled(); 181 info.MarkAsDeoptimizationEnabled();
182 182
183 CHECK(Parser::ParseStatic(info.parse_info())); 183 CHECK(Parser::ParseStatic(info.parse_info()));
184 info.SetOptimizing(); 184 info.SetOptimizing();
185 if (flags_ & CompilationInfo::kFunctionContextSpecializing) { 185 if (flags_ & CompilationInfo::kFunctionContextSpecializing) {
186 info.MarkAsFunctionContextSpecializing(); 186 info.MarkAsFunctionContextSpecializing();
187 } 187 }
188 if (flags_ & CompilationInfo::kInliningEnabled) { 188 if (flags_ & CompilationInfo::kInliningEnabled) {
189 info.MarkAsInliningEnabled(); 189 info.MarkAsInliningEnabled();
190 } 190 }
191 if (function->shared()->HasBytecodeArray()) {
192 info.MarkAsOptimizeFromBytecode();
193 }
191 CHECK(Compiler::Analyze(info.parse_info())); 194 CHECK(Compiler::Analyze(info.parse_info()));
192 CHECK(Compiler::EnsureDeoptimizationSupport(&info)); 195 CHECK(Compiler::EnsureDeoptimizationSupport(&info));
193 196
194 Pipeline pipeline(&info); 197 Pipeline pipeline(&info);
195 Handle<Code> code = pipeline.GenerateCode(); 198 Handle<Code> code = pipeline.GenerateCode();
196 CHECK(!code.is_null()); 199 CHECK(!code.is_null());
197 info.dependencies()->Commit(code); 200 info.dependencies()->Commit(code);
198 info.context()->native_context()->AddOptimizedCode(*code); 201 info.context()->native_context()->AddOptimizedCode(*code);
199 function->ReplaceCode(*code); 202 function->ReplaceCode(*code);
200 return function; 203 return function;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 CHECK(!code.is_null()); 237 CHECK(!code.is_null());
235 function->ReplaceCode(*code); 238 function->ReplaceCode(*code);
236 return function; 239 return function;
237 } 240 }
238 }; 241 };
239 } // namespace compiler 242 } // namespace compiler
240 } // namespace internal 243 } // namespace internal
241 } // namespace v8 244 } // namespace v8
242 245
243 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_ 246 #endif // V8_CCTEST_COMPILER_FUNCTION_TESTER_H_
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/cctest/compiler/test-run-bytecode-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698