| Index: src/scopes.cc
|
| diff --git a/src/scopes.cc b/src/scopes.cc
|
| index d3f54ad3f2d9ad8b47fefae2d89fd692bd3e2eda..e23e1cbe2292eb3d35f65517c36c6b8eb7bf651f 100644
|
| --- a/src/scopes.cc
|
| +++ b/src/scopes.cc
|
| @@ -490,6 +490,13 @@ int Scope::ContextChainLength(Scope* scope) {
|
| return n;
|
| }
|
|
|
| +// In strict mode, arguments are const.
|
| +void Scope::SetAttributesConst() {
|
| + Variable* arguments = LocalLookup(Factory::arguments_symbol());
|
| + ASSERT(arguments != NULL); // functions have 'arguments' declared implicitly
|
| + ASSERT(arguments->mode() == Variable::VAR);
|
| + arguments->set_mode(Variable::CONST);
|
| +}
|
|
|
| #ifdef DEBUG
|
| static const char* Header(Scope::Type type) {
|
|
|