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" |