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

Unified Diff: src/ast/scopes.h

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
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »
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 1ea06bccc44bc0c9951f07412fa68ec6a4ab5d6b..6494c81e90701deadc6fd55c930dd669ee115f0d 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -602,9 +602,6 @@ class Scope: public ZoneObject {
ParseInfo* info = nullptr,
VariableProxy* stack = nullptr);
- // Scope analysis.
- void PropagateScopeInfo();
-
// Predicates.
bool MustAllocate(Variable* var);
bool MustAllocateInContext(Variable* var);
@@ -684,7 +681,16 @@ class DeclarationScope : public Scope {
}
bool asm_module() const { return asm_module_; }
- void set_asm_module() { asm_module_ = true; }
+ void set_asm_module() {
titzer 2016/08/23 13:08:59 Move to cc file? Not performance sensitive, I gues
+ asm_module_ = true;
+ // Mark any existing inner function scopes as asm function scopes.
+ for (Scope* inner = inner_scope_; inner != nullptr;
titzer 2016/08/23 13:08:59 You could, e.g. recurse through block scopes as we
Toon Verwaest 2016/08/23 13:17:51 The block scopes I'm talking about aren't in this
+ inner = inner->sibling_) {
+ if (inner->is_function_scope()) {
+ inner->AsDeclarationScope()->set_asm_function();
+ }
+ }
+ }
bool asm_function() const { return asm_function_; }
void set_asm_function() { asm_module_ = true; }
« no previous file with comments | « no previous file | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698