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

Unified Diff: src/ast/scopes.h

Issue 2253913002: Move asm_module_ and asm_function_ down to DeclarationScope (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
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 8cfac5262a5a372db2433ba0472273e643daeb06..cd2990e2f3bc9c9e3b935cb29cbd8c19be972813 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -234,9 +234,6 @@ class Scope: public ZoneObject {
language_mode_ = language_mode;
}
- // Set the ASM module flag.
- void SetAsmModule() { asm_module_ = true; }
-
// Inform the scope that the scope may execute declarations nonlinearly.
// Currently, the only nonlinear scope is a switch statement. The name is
// more general in case something else comes up with similar control flow,
@@ -317,9 +314,8 @@ class Scope: public ZoneObject {
bool outer_scope_calls_sloppy_eval() const {
return outer_scope_calls_sloppy_eval_;
}
- bool asm_module() const { return asm_module_; }
- bool asm_function() const { return asm_function_; }
-
+ bool IsAsmModule() const;
+ bool IsAsmFunction() const;
// Does this scope access "super" property (super.foo).
bool uses_super_property() const { return scope_uses_super_property_; }
// Does this scope have the potential to execute declarations non-linearly?
@@ -503,10 +499,6 @@ class Scope: public ZoneObject {
bool scope_uses_super_property_ : 1;
// This scope has a parameter called "arguments".
bool has_arguments_parameter_ : 1;
- // This scope contains an "use asm" annotation.
- bool asm_module_ : 1;
- // This scope's outer context is an asm module.
- bool asm_function_ : 1;
// This scope's declarations might not be executed in order (e.g., switch).
bool scope_nonlinear_ : 1;
bool is_hidden_ : 1;
@@ -681,6 +673,11 @@ class DeclarationScope : public Scope {
return module_descriptor_;
}
+ bool asm_module() const { return asm_module_; }
+ void set_asm_module() { asm_module_ = true; }
+ bool asm_function() const { return asm_function_; }
+ void set_asm_function() { asm_module_ = true; }
+
void DeclareThis(AstValueFactory* ast_value_factory);
void DeclareDefaultFunctionVariables(AstValueFactory* ast_value_factory);
@@ -860,6 +857,10 @@ class DeclarationScope : public Scope {
const FunctionKind function_kind_;
bool has_simple_parameters_ : 1;
+ // This scope contains an "use asm" annotation.
+ bool asm_module_ : 1;
+ // This scope's outer context is an asm module.
+ bool asm_function_ : 1;
// Info about the parameter list of a function.
int arity_;
« no previous file with comments | « src/ast/scopeinfo.cc ('k') | src/ast/scopes.cc » ('j') | src/parsing/parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698