Fix for issue 1007.

The Hydrogen environment only tracks values for stack-allocated variables.
It is a precondition of HEnvironment::Lookup(variable) that variable is
stack-allocated.  The check was missing at one call site.

Review URL: http://codereview.chromium.org/6034004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6094 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 16837c1f
......@@ -4175,7 +4175,7 @@ bool HGraphBuilder::TryCallApply(Call* expr) {
if (args->length() != 2) return false;
VariableProxy* arg_two = args->at(1)->AsVariableProxy();
if (arg_two == NULL) return false;
if (arg_two == NULL || !arg_two->var()->IsStackAllocated()) return false;
HValue* arg_two_value = environment()->Lookup(arg_two->var());
if (!arg_two_value->CheckFlag(HValue::kIsArguments)) return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment