Correct bailout from TurboFan for unsupported targets.

R=titzer@chromium.org
TEST=mjsunit/asm/math-fround

Review URL: https://codereview.chromium.org/603923002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24232 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent d092ce2c
......@@ -241,6 +241,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.
......@@ -298,36 +301,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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment