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

Side by Side Diff: src/crankshaft/hydrogen.cc

Issue 2505933008: [compiler] Ensure code unsupported by Crankshaft goes to Ignition. (Closed)
Patch Set: Fix GetBaselineCode Created 4 years 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.cc ('k') | src/full-codegen/full-codegen.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/crankshaft/hydrogen.h" 5 #include "src/crankshaft/hydrogen.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 #define DEF_VISIT(type) \ 111 #define DEF_VISIT(type) \
112 void Visit##type(type* node) override { \ 112 void Visit##type(type* node) override { \
113 HOptimizedGraphBuilder::Visit##type(node); \ 113 HOptimizedGraphBuilder::Visit##type(node); \
114 } 114 }
115 DECLARATION_NODE_LIST(DEF_VISIT) 115 DECLARATION_NODE_LIST(DEF_VISIT)
116 #undef DEF_VISIT 116 #undef DEF_VISIT
117 }; 117 };
118 118
119 HCompilationJob::Status HCompilationJob::PrepareJobImpl() { 119 HCompilationJob::Status HCompilationJob::PrepareJobImpl() {
120 if (!isolate()->use_crankshaft() || 120 if (!isolate()->use_crankshaft() ||
121 info()->shared_info()->dont_crankshaft()) { 121 info()->shared_info()->must_use_ignition_turbo()) {
122 // Crankshaft is entirely disabled. 122 // Crankshaft is entirely disabled.
123 return FAILED; 123 return FAILED;
124 } 124 }
125 125
126 // Optimization requires a version of fullcode with deoptimization support. 126 // Optimization requires a version of fullcode with deoptimization support.
127 // Recompile the unoptimized version of the code if the current version 127 // Recompile the unoptimized version of the code if the current version
128 // doesn't have deoptimization support already. 128 // doesn't have deoptimization support already.
129 // Otherwise, if we are gathering compilation time and space statistics 129 // Otherwise, if we are gathering compilation time and space statistics
130 // for hydrogen, gather baseline statistics for a fullcode compilation. 130 // for hydrogen, gather baseline statistics for a fullcode compilation.
131 bool should_recompile = !info()->shared_info()->has_deoptimization_support(); 131 bool should_recompile = !info()->shared_info()->has_deoptimization_support();
(...skipping 7940 matching lines...) Expand 10 before | Expand all | Expand 10 after
8072 } 8072 }
8073 if (!Compiler::ParseAndAnalyze(target_info.parse_info())) { 8073 if (!Compiler::ParseAndAnalyze(target_info.parse_info())) {
8074 if (target_info.isolate()->has_pending_exception()) { 8074 if (target_info.isolate()->has_pending_exception()) {
8075 // Parse or scope error, never optimize this function. 8075 // Parse or scope error, never optimize this function.
8076 SetStackOverflow(); 8076 SetStackOverflow();
8077 target_shared->DisableOptimization(kParseScopeError); 8077 target_shared->DisableOptimization(kParseScopeError);
8078 } 8078 }
8079 TraceInline(target, caller, "parse failure"); 8079 TraceInline(target, caller, "parse failure");
8080 return false; 8080 return false;
8081 } 8081 }
8082 if (target_shared->dont_crankshaft()) { 8082 if (target_shared->must_use_ignition_turbo()) {
8083 TraceInline(target, caller, "ParseAndAnalyze found incompatibility"); 8083 TraceInline(target, caller, "ParseAndAnalyze found incompatibility");
8084 return false; 8084 return false;
8085 } 8085 }
8086 8086
8087 if (target_info.scope()->NeedsContext()) { 8087 if (target_info.scope()->NeedsContext()) {
8088 TraceInline(target, caller, "target has context-allocated variables"); 8088 TraceInline(target, caller, "target has context-allocated variables");
8089 return false; 8089 return false;
8090 } 8090 }
8091 8091
8092 if (target_info.scope()->rest_parameter() != nullptr) { 8092 if (target_info.scope()->rest_parameter() != nullptr) {
(...skipping 4933 matching lines...) Expand 10 before | Expand all | Expand 10 after
13026 isolate()->GetHTracer()->TraceHydrogen(name(), graph_); 13026 isolate()->GetHTracer()->TraceHydrogen(name(), graph_);
13027 } 13027 }
13028 13028
13029 #ifdef DEBUG 13029 #ifdef DEBUG
13030 graph_->Verify(false); // No full verify. 13030 graph_->Verify(false); // No full verify.
13031 #endif 13031 #endif
13032 } 13032 }
13033 13033
13034 } // namespace internal 13034 } // namespace internal
13035 } // namespace v8 13035 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler.cc ('k') | src/full-codegen/full-codegen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698