Index: src/rewriter.cc |
diff --git a/src/rewriter.cc b/src/rewriter.cc |
index 15f1ca52cbadd6b0aec769f8c6d8f419d1754613..8a3221280cf673a5489dec1bfcd2adc352e5941c 100644 |
--- a/src/rewriter.cc |
+++ b/src/rewriter.cc |
@@ -246,11 +246,8 @@ void AstOptimizer::VisitVariableProxy(VariableProxy* node) { |
} |
if (FLAG_safe_int32_compiler) { |
- Slot* slot = var->slot(); |
- if (slot != NULL) { |
- node->set_side_effect_free( |
- (slot->type() == Slot::LOCAL && !slot->is_arguments()) || |
- slot->type() == Slot::PARAMETER); |
+ if (var->IsStackAllocated() && !var->is_arguments()) { |
+ node->set_side_effect_free(true); |
} |
} |
} |