diff options
Diffstat (limited to 'deps/v8/src/data-flow.cc')
-rw-r--r-- | deps/v8/src/data-flow.cc | 3 |
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; |