Index: src/compiler.cc |
=================================================================== |
--- src/compiler.cc (revision 4119) |
+++ src/compiler.cc (working copy) |
@@ -95,10 +95,12 @@ |
if (!builder.HasStackOverflow()) { |
int variable_count = |
function->num_parameters() + function->scope()->num_stack_slots(); |
- ReachingDefinitions rd(builder.postorder(), |
- builder.definitions(), |
- variable_count); |
- rd.Compute(); |
+ if (variable_count > 0 && builder.definitions()->length() > 0) { |
Kevin Millikin (Chromium)
2010/03/12 14:58:16
Hmm. I'd let the ReachingDefinitions class check
|
+ ReachingDefinitions rd(builder.postorder(), |
+ builder.definitions(), |
+ variable_count); |
+ rd.Compute(); |
+ } |
} |
#ifdef DEBUG |
@@ -497,10 +499,12 @@ |
if (!builder.HasStackOverflow()) { |
int variable_count = |
literal->num_parameters() + literal->scope()->num_stack_slots(); |
- ReachingDefinitions rd(builder.postorder(), |
- builder.definitions(), |
- variable_count); |
- rd.Compute(); |
+ if (variable_count > 0 && builder.definitions()->length() > 0) { |
+ ReachingDefinitions rd(builder.postorder(), |
+ builder.definitions(), |
+ variable_count); |
+ rd.Compute(); |
+ } |
} |
#ifdef DEBUG |