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

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: fix test 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 | « src/ast/scopeinfo.cc ('k') | 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 3ea09fb38bc090021730a12e083cf966552551a6..41ccb92ffec17d1d67041daedaaedc9a29251209 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -233,9 +233,6 @@ class Scope: public ZoneObject {
set_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,
@@ -316,9 +313,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?
@@ -514,10 +510,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;
@@ -684,6 +676,11 @@ class DeclarationScope : public Scope {
IsClassConstructor(function_kind())));
}
+ 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698