| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index c0976988ea3c077800842816c03981ee5cf7b248..8d88032eadbe4e5824f5af9b8e17b7111cb65805 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -747,6 +747,10 @@ FunctionLiteral* Parser::ParseLazy(Handle<SharedFunctionInfo> info,
|
| scope);
|
| TemporaryScope temp_scope(&this->temp_scope_);
|
|
|
| + if (info->strict_mode()) {
|
| + temp_scope.EnableStrictMode();
|
| + }
|
| +
|
| FunctionLiteralType type =
|
| info->is_expression() ? EXPRESSION : DECLARATION;
|
| bool ok = true;
|
| @@ -3540,7 +3544,7 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> var_name,
|
| end_pos = scanner().location().end_pos;
|
| }
|
|
|
| - // Validate strict mode.
|
| + // Strict mode.
|
| if (temp_scope_->StrictMode()) {
|
| if (IsEvalOrArguments(name)) {
|
| int position = function_token_position != RelocInfo::kNoPosition
|
| @@ -3564,6 +3568,9 @@ FunctionLiteral* Parser::ParseFunctionLiteral(Handle<String> var_name,
|
| return NULL;
|
| }
|
| CheckOctalLiteral(start_pos, end_pos, CHECK_OK);
|
| +
|
| + // In strict mode, arguments are const.
|
| + top_scope_->SetArgumentsConst();
|
| }
|
|
|
| FunctionLiteral* function_literal =
|
|
|