Reviewers: Søren Gjesse,
Description:
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.
Please review this at http://codereview.chromium.org/6034004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files:
M src/hydrogen.cc
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
86b10363dcab101c1fb86a7a7d4be746a5318a72..e34acd67d441f6f8295bf7efd1b3521b21b6865f
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -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;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev