Index: src/compiler.cc |
=================================================================== |
--- src/compiler.cc (revision 5322) |
+++ src/compiler.cc (working copy) |
@@ -33,7 +33,6 @@ |
#include "compiler.h" |
#include "data-flow.h" |
#include "debug.h" |
-#include "flow-graph.h" |
#include "full-codegen.h" |
#include "liveedit.h" |
#include "oprofile-agent.h" |
@@ -92,27 +91,6 @@ |
return Handle<Code>::null(); |
} |
- if (function->scope()->num_parameters() > 0 || |
- function->scope()->num_stack_slots()) { |
- AssignedVariablesAnalyzer ava(function); |
- ava.Analyze(); |
- if (ava.HasStackOverflow()) { |
- return Handle<Code>::null(); |
- } |
- } |
- |
- if (FLAG_use_flow_graph) { |
- FlowGraphBuilder builder; |
- FlowGraph* graph = builder.Build(function); |
- USE(graph); |
- |
-#ifdef DEBUG |
- if (FLAG_print_graph_text && !builder.HasStackOverflow()) { |
- graph->PrintAsText(function->name()); |
- } |
-#endif |
- } |
- |
// Generate code and return it. Code generator selection is governed by |
// which backends are enabled and whether the function is considered |
// run-once code or not: |
@@ -137,6 +115,8 @@ |
} |
} |
+ AssignedVariablesAnalyzer ava(function); |
+ if (!ava.Analyze()) return Handle<Code>::null(); |
return CodeGenerator::MakeCode(info); |
} |
@@ -490,27 +470,6 @@ |
return Handle<SharedFunctionInfo>::null(); |
} |
- if (literal->scope()->num_parameters() > 0 || |
- literal->scope()->num_stack_slots()) { |
- AssignedVariablesAnalyzer ava(literal); |
- ava.Analyze(); |
- if (ava.HasStackOverflow()) { |
- return Handle<SharedFunctionInfo>::null(); |
- } |
- } |
- |
- if (FLAG_use_flow_graph) { |
- FlowGraphBuilder builder; |
- FlowGraph* graph = builder.Build(literal); |
- USE(graph); |
- |
-#ifdef DEBUG |
- if (FLAG_print_graph_text && !builder.HasStackOverflow()) { |
- graph->PrintAsText(literal->name()); |
- } |
-#endif |
- } |
- |
// Generate code and return it. The way that the compilation mode |
// is controlled by the command-line flags is described in |
// the static helper function MakeCode. |
@@ -533,6 +492,8 @@ |
if (!is_compiled) { |
// We fall back to the classic V8 code generator. |
+ AssignedVariablesAnalyzer ava(literal); |
+ if (!ava.Analyze()) return Handle<SharedFunctionInfo>::null(); |
code = CodeGenerator::MakeCode(&info); |
} |