summaryrefslogtreecommitdiff
path: root/deps/v8/src/data-flow.cc
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2010-06-08 18:19:00 -0700
committerRyan Dahl <ry@tinyclouds.org>2010-06-09 00:52:06 -0700
commit0bb47b6c975ea1c7eaedc5e80e75c9fd5063e6bc (patch)
tree943955dd13a8ac74d59019c046c5b8e1bc79e17d /deps/v8/src/data-flow.cc
parentde6d663a67dcec8b482e069d967ef4d1a3743c9b (diff)
downloadnode-new-0bb47b6c975ea1c7eaedc5e80e75c9fd5063e6bc.tar.gz
Upgrade V8 to 2.2.15
Diffstat (limited to 'deps/v8/src/data-flow.cc')
-rw-r--r--deps/v8/src/data-flow.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/deps/v8/src/data-flow.cc b/deps/v8/src/data-flow.cc
index 4e7620acf7..55d85825b2 100644
--- a/deps/v8/src/data-flow.cc
+++ b/deps/v8/src/data-flow.cc
@@ -318,6 +318,9 @@ Variable* AssignedVariablesAnalyzer::FindSmiLoopVariable(ForStatement* stmt) {
Variable* loop_var = init->target()->AsVariableProxy()->AsVariable();
if (loop_var == NULL || !loop_var->IsStackAllocated()) return NULL;
+ // Don't try to get clever with const or dynamic variables.
+ if (loop_var->mode() != Variable::VAR) return NULL;
+
// The initial value has to be a smi.
Literal* init_lit = init->value()->AsLiteral();
if (init_lit == NULL || !init_lit->handle()->IsSmi()) return NULL;