Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Unified Diff: src/parsing/parser-base.h

Issue 2377593002: Reland of Preparse functions in the scope that was created when parsing of the function was started (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/parsing/parser-base.h
diff --git a/src/parsing/parser-base.h b/src/parsing/parser-base.h
index 5b21c539f2470b049c91106fb4ba9ec4b50d20e4..2da0a0167c3474d42d181ff6fe3a2363230ff5d2 100644
--- a/src/parsing/parser-base.h
+++ b/src/parsing/parser-base.h
@@ -381,8 +381,13 @@
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() const {
+ return ScopeState::scope()->AsDeclarationScope();
+ }
int NextMaterializedLiteralIndex() {
return next_materialized_literal_index_++;
@@ -1449,7 +1454,7 @@
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),
« no previous file with comments | « src/parsing/parser.cc ('k') | src/parsing/preparser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698