Chromium Code Reviews| Index: src/parsing/parser-base.h |
| diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h |
| index 47d96d2ddbd1af14486c3cfee884e016f244c06d..4379dc211009fe2dbf407ca288a0276e28dbdf18 100644 |
| --- a/src/parsing/parser-base.h |
| +++ b/src/parsing/parser-base.h |
| @@ -381,9 +381,14 @@ class ParserBase { |
| class FunctionState final : public ScopeState { |
| public: |
| FunctionState(FunctionState** function_state_stack, |
| - ScopeState** scope_stack, Scope* scope, FunctionKind kind); |
| + ScopeState** scope_stack, DeclarationScope* scope, |
| + FunctionKind kind); |
| ~FunctionState(); |
| + DeclarationScope* scope() { |
|
marja
2016/09/26 12:38:27
Should this be const?
And even better, can it ret
|
| + return ScopeState::scope()->AsDeclarationScope(); |
| + } |
| + |
| int NextMaterializedLiteralIndex() { |
| return next_materialized_literal_index_++; |
| } |
| @@ -1449,7 +1454,7 @@ class ParserBase { |
| template <typename Impl> |
| ParserBase<Impl>::FunctionState::FunctionState( |
| FunctionState** function_state_stack, ScopeState** scope_stack, |
| - Scope* scope, FunctionKind kind) |
| + DeclarationScope* scope, FunctionKind kind) |
| : ScopeState(scope_stack, scope), |
| next_materialized_literal_index_(0), |
| expected_property_count_(0), |