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

Unified Diff: src/compiler/pipeline.cc

Issue 603923002: Correct bailout from TurboFan for unsupported targets. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index 9889b6a030263faa6f63b393f5fed994319ad269..744b38374b2e0cc3ae082d3a3a8084731cf369de 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -229,6 +229,9 @@ Handle<Code> Pipeline::GenerateCode() {
GraphReplayPrinter::PrintReplay(&graph);
}
+ // Bailout here in case target architecture is not supported.
+ if (!SupportedTarget()) return Handle<Code>::null();
+
if (info()->is_typing_enabled()) {
{
// Type the graph.
@@ -286,36 +289,34 @@ Handle<Code> Pipeline::GenerateCode() {
}
}
- Handle<Code> code = Handle<Code>::null();
- if (SupportedTarget()) {
- {
- // Lower any remaining generic JSOperators.
- PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
- "generic lowering");
- SourcePositionTable::Scope pos(&source_positions,
- SourcePosition::Unknown());
- JSGenericLowering lowering(info(), &jsgraph);
- GraphReducer graph_reducer(&graph);
- graph_reducer.AddReducer(&lowering);
- graph_reducer.ReduceGraph();
-
- VerifyAndPrintGraph(&graph, "Lowered generic");
- }
+ {
+ // Lower any remaining generic JSOperators.
+ PhaseStats lowering_stats(info(), PhaseStats::CREATE_GRAPH,
+ "generic lowering");
+ SourcePositionTable::Scope pos(&source_positions,
+ SourcePosition::Unknown());
+ JSGenericLowering lowering(info(), &jsgraph);
+ GraphReducer graph_reducer(&graph);
+ graph_reducer.AddReducer(&lowering);
+ graph_reducer.ReduceGraph();
- {
- // Compute a schedule.
- Schedule* schedule = ComputeSchedule(&graph);
- // Generate optimized code.
- PhaseStats codegen_stats(info(), PhaseStats::CODEGEN, "codegen");
- Linkage linkage(info());
- code = GenerateCode(&linkage, &graph, schedule, &source_positions);
- info()->SetCode(code);
- }
+ VerifyAndPrintGraph(&graph, "Lowered generic");
+ }
- // Print optimized code.
- v8::internal::CodeGenerator::PrintCode(code, info());
+ Handle<Code> code = Handle<Code>::null();
+ {
+ // Compute a schedule.
+ Schedule* schedule = ComputeSchedule(&graph);
+ // Generate optimized code.
+ PhaseStats codegen_stats(info(), PhaseStats::CODEGEN, "codegen");
+ Linkage linkage(info());
+ code = GenerateCode(&linkage, &graph, schedule, &source_positions);
+ info()->SetCode(code);
}
+ // Print optimized code.
+ v8::internal::CodeGenerator::PrintCode(code, info());
+
if (FLAG_trace_turbo) {
OFStream os(stdout);
os << "--------------------------------------------------\n"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698