Commit b2159111 authored by sigurds@chromium.org's avatar sigurds@chromium.org

Only tag parameters as maybe assigned if in sloppy mode.

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22964 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 159cc8dd
...@@ -3467,10 +3467,12 @@ FunctionLiteral* Parser::ParseFunctionLiteral( ...@@ -3467,10 +3467,12 @@ FunctionLiteral* Parser::ParseFunctionLiteral(
} }
Variable* var = scope_->DeclareParameter(param_name, VAR); Variable* var = scope_->DeclareParameter(param_name, VAR);
if (scope->strict_mode() == SLOPPY) {
// TODO(sigurds) Mark every parameter as maybe assigned. This is a // TODO(sigurds) Mark every parameter as maybe assigned. This is a
// conservative approximation necessary to account for parameters // conservative approximation necessary to account for parameters
// that are assigned via the arguments array. // that are assigned via the arguments array.
var->set_maybe_assigned(); var->set_maybe_assigned();
}
num_parameters++; num_parameters++;
if (num_parameters > Code::kMaxArguments) { if (num_parameters > Code::kMaxArguments) {
......
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