| Index: src/scopes.h
|
| diff --git a/src/scopes.h b/src/scopes.h
|
| index 09901ade615237a771a34653a9922d08206ce788..a9220eb827566e94e7a126f1085bdc90d6c3a67c 100644
|
| --- a/src/scopes.h
|
| +++ b/src/scopes.h
|
| @@ -289,6 +289,17 @@ class Scope: public ZoneObject {
|
| int ContextChainLength(Scope* scope);
|
|
|
| // ---------------------------------------------------------------------------
|
| + // Strict mode support.
|
| + bool IsDeclared(Handle<String> name) {
|
| + // During formal parameter list parsing the scope only contains
|
| + // two variables inserted at initialization: "this" and "arguments".
|
| + // "this" is an invalid parameter name and "arguments" is invalid parameter
|
| + // name in strict mode. Therefore looking up with the map which includes
|
| + // "this" and "arguments" in addition to all formal parameters is safe.
|
| + return variables_.Lookup(name) != NULL;
|
| + }
|
| +
|
| + // ---------------------------------------------------------------------------
|
| // Debugging.
|
|
|
| #ifdef DEBUG
|
|
|