Chromium Code Reviews| Index: src/scopes.h |
| diff --git a/src/scopes.h b/src/scopes.h |
| index 56a7ee97657148e430de38d8344f37cb5d2ec4cf..2b9ece2ad0bfabc6b0272242852d48b256ef4ea5 100644 |
| --- a/src/scopes.h |
| +++ b/src/scopes.h |
| @@ -467,6 +467,14 @@ class Scope: public ZoneObject { |
| return variables_.Lookup(name) != NULL; |
| } |
| + bool IsDeclaredParameter(const AstRawString* name) { |
| + // If IsSimpleParameterList is false, duplicate parameters are not allowed, |
| + // however `arguments` may be allowed if function is not strict code. Thus, |
| + // the assumptions explained above do not hold. |
| + Variable* var = variables_.Lookup(name); |
| + return var != NULL && params_.Contains(var); |
|
marja
2015/02/16 09:12:02
Why is it not enough to check if params_.Contains(
caitp (gmail)
2015/02/16 16:42:53
So just `return params_.Contains(variables_.Lookup
marja
2015/02/16 16:47:34
Assuming it does the right thing :) (As far as I u
|
| + } |
| + |
| // --------------------------------------------------------------------------- |
| // Debugging. |