Revision: 6094
Author: [email protected]
Date: Tue Dec 21 03:21:04 2010
Log: 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
http://code.google.com/p/v8/source/detail?r=6094

Modified:
 /branches/bleeding_edge/src/hydrogen.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Mon Dec 20 05:52:14 2010
+++ /branches/bleeding_edge/src/hydrogen.cc     Tue Dec 21 03:21:04 2010
@@ -4175,7 +4175,7 @@
   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;

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to