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

Unified Diff: src/ast/scopes.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
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/parser-base.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index f9d3fdefd0ff50581cbb47b03f92ee3e311cf6fc..b752d68abf82b40a10dfd56d4584936f3a03d8f1 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -806,6 +806,16 @@ class DeclarationScope : public Scope {
void AllocateParameterLocals();
void AllocateReceiver();
+ void ResetAfterPreparsing() {
marja 2016/09/26 12:38:27 Why do we need this? Just by reading the code, it'
+ decls_.Clear();
+ has_rest_ = false;
+ inner_scope_ = nullptr;
+ locals_.Clear();
+ params_.Clear();
+ sloppy_block_function_map_.Clear();
+ variables_.Clear();
+ }
+
private:
void AllocateParameter(Variable* var, int index);
« no previous file with comments | « no previous file | src/parsing/parser.cc » ('j') | src/parsing/parser-base.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698