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

Side by Side Diff: src/compiler.cc

Issue 1751873002: When Crankshaft aborts compilation, use TurboFan next time (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« src/compiler.h ('K') | « src/compiler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/compiler.h" 5 #include "src/compiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "src/ast/ast-numbering.h" 9 #include "src/ast/ast-numbering.h"
10 #include "src/ast/prettyprinter.h" 10 #include "src/ast/prettyprinter.h"
(...skipping 886 matching lines...) Expand 10 before | Expand all | Expand 10 after
897 static bool Renumber(ParseInfo* parse_info) { 897 static bool Renumber(ParseInfo* parse_info) {
898 if (!AstNumbering::Renumber(parse_info->isolate(), parse_info->zone(), 898 if (!AstNumbering::Renumber(parse_info->isolate(), parse_info->zone(),
899 parse_info->literal())) { 899 parse_info->literal())) {
900 return false; 900 return false;
901 } 901 }
902 Handle<SharedFunctionInfo> shared_info = parse_info->shared_info(); 902 Handle<SharedFunctionInfo> shared_info = parse_info->shared_info();
903 if (!shared_info.is_null()) { 903 if (!shared_info.is_null()) {
904 FunctionLiteral* lit = parse_info->literal(); 904 FunctionLiteral* lit = parse_info->literal();
905 shared_info->set_ast_node_count(lit->ast_node_count()); 905 shared_info->set_ast_node_count(lit->ast_node_count());
906 MaybeDisableOptimization(shared_info, lit->dont_optimize_reason()); 906 MaybeDisableOptimization(shared_info, lit->dont_optimize_reason());
907 shared_info->set_dont_crankshaft(lit->flags() & 907 shared_info->set_dont_crankshaft(
908 AstProperties::kDontCrankshaft); 908 shared_info->dont_crankshaft() ||
909 (lit->flags() & AstProperties::kDontCrankshaft));
909 } 910 }
910 return true; 911 return true;
911 } 912 }
912 913
913 914
914 bool Compiler::Analyze(ParseInfo* info) { 915 bool Compiler::Analyze(ParseInfo* info) {
915 DCHECK_NOT_NULL(info->literal()); 916 DCHECK_NOT_NULL(info->literal());
916 if (!Rewriter::Rewrite(info)) return false; 917 if (!Rewriter::Rewrite(info)) return false;
917 if (!Scope::Analyze(info)) return false; 918 if (!Scope::Analyze(info)) return false;
918 if (!Renumber(info)) return false; 919 if (!Renumber(info)) return false;
(...skipping 968 matching lines...) Expand 10 before | Expand all | Expand 10 after
1887 } 1888 }
1888 1889
1889 #if DEBUG 1890 #if DEBUG
1890 void CompilationInfo::PrintAstForTesting() { 1891 void CompilationInfo::PrintAstForTesting() {
1891 PrintF("--- Source from AST ---\n%s\n", 1892 PrintF("--- Source from AST ---\n%s\n",
1892 PrettyPrinter(isolate()).PrintProgram(literal())); 1893 PrettyPrinter(isolate()).PrintProgram(literal()));
1893 } 1894 }
1894 #endif 1895 #endif
1895 } // namespace internal 1896 } // namespace internal
1896 } // namespace v8 1897 } // namespace v8
OLDNEW
« src/compiler.h ('K') | « src/compiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698