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

Unified Diff: src/ast/scopes.cc

Issue 2270743003: Get rid of PropagateScopeInfo, update asm_function in set_asm_module instead. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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
« src/ast/scopes.h ('K') | « src/ast/scopes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index a1d31c6005222910b545b46417ddd30b093ca196..fa8b8961c9a7516ba506c10bc87e7260b336ed26 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -315,7 +315,6 @@ Scope* Scope::DeserializeScopeChain(Isolate* isolate, Zone* zone,
}
script_scope->AddInnerScope(current_scope);
- script_scope->PropagateScopeInfo();
return (innermost_scope == NULL) ? script_scope : innermost_scope;
}
@@ -852,13 +851,9 @@ void Scope::CollectStackAndContextLocals(ZoneList<Variable*>* stack_locals,
void DeclarationScope::AllocateVariables(ParseInfo* info,
AstNodeFactory* factory) {
- // 1) Propagate scope information.
- PropagateScopeInfo();
-
- // 2) Resolve variables.
+ // Resolve variables.
ResolveVariablesRecursively(info, factory);
-
- // 3) Allocate variables.
+ // Allocate variables.
AllocateVariablesRecursively();
}
@@ -969,9 +964,6 @@ Handle<StringSet> DeclarationScope::CollectNonLocals(
void DeclarationScope::AnalyzePartially(DeclarationScope* migrate_to,
AstNodeFactory* ast_node_factory) {
- // Gather info from inner scopes.
- PropagateScopeInfo();
-
// Try to resolve unresolved variables for this Scope and migrate those which
// cannot be resolved inside. It doesn't make sense to try to resolve them in
// the outer Scopes here, because they are incomplete.
@@ -1455,16 +1447,6 @@ VariableProxy* Scope::FetchFreeVariables(DeclarationScope* max_outer_scope,
return stack;
}
-void Scope::PropagateScopeInfo() {
- for (Scope* inner = inner_scope_; inner != nullptr; inner = inner->sibling_) {
- inner->PropagateScopeInfo();
- if (IsAsmModule() && inner->is_function_scope()) {
- inner->AsDeclarationScope()->set_asm_function();
- }
- }
-}
-
-
bool Scope::MustAllocate(Variable* var) {
DCHECK(var->location() != VariableLocation::MODULE);
// Give var a read/write use if there is a chance it might be accessed
« src/ast/scopes.h ('K') | « src/ast/scopes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698