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) {
+ ReachingDefinitions rd(builder.postorder(),
+ builder.definitions(),
+ variable_count);
+ rd.Compute();
+ }
}
#ifdef DEBUG
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
void ReachingDefinitions::Compute() {
- if (definitions_->is_empty()) return;
+ ASSERT(!definitions_->is_empty());
int variable_count = variables_.length();
int definition_count = definitions_->length();