Index: src/compiler.cc |
diff --git a/src/compiler.cc b/src/compiler.cc |
index 2a0d80d00274da0c68ab9ed84c0b2662ddb0ab59..ed4c5b99bdd2a9d564325bab9e44d9db791c1de8 100755 |
--- a/src/compiler.cc |
+++ b/src/compiler.cc |
@@ -92,6 +92,15 @@ static Handle<Code> MakeCode(Handle<Context> context, CompilationInfo* info) { |
FlowGraphBuilder builder; |
builder.Build(function); |
+ if (!builder.HasStackOverflow()) { |
+ int variable_count = |
+ function->num_parameters() + function->scope()->num_stack_slots(); |
+ ReachingDefinitions rd(builder.postorder(), |
+ builder.definitions(), |
+ variable_count); |
+ rd.Compute(); |
+ } |
+ |
#ifdef DEBUG |
if (FLAG_print_graph_text && !builder.HasStackOverflow()) { |
builder.graph()->PrintText(builder.postorder()); |
@@ -485,6 +494,15 @@ Handle<JSFunction> Compiler::BuildBoilerplate(FunctionLiteral* literal, |
FlowGraphBuilder builder; |
builder.Build(literal); |
+ if (!builder.HasStackOverflow()) { |
+ int variable_count = |
+ literal->num_parameters() + literal->scope()->num_stack_slots(); |
+ ReachingDefinitions rd(builder.postorder(), |
+ builder.definitions(), |
+ variable_count); |
+ rd.Compute(); |
+ } |
+ |
#ifdef DEBUG |
if (FLAG_print_graph_text && !builder.HasStackOverflow()) { |
builder.graph()->PrintText(builder.postorder()); |