Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1343)

Unified Diff: src/rewriter.cc

Issue 722001: Add IsStackAllocated helper for variables. (Closed)
Patch Set: Created 10 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/data-flow.cc ('k') | src/variables.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
}
}
}
« no previous file with comments | « src/data-flow.cc ('k') | src/variables.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698