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

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

Issue 2370713003: 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
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),

Powered by Google App Engine
This is Rietveld 408576698