Chromium Code Reviews| Index: src/scopes.h |
| diff --git a/src/scopes.h b/src/scopes.h |
| index 97606a745bf563dc9e152071edb69e2f4a2dd85d..4037ff1e98305ece5920a9be617e37abb0539139 100644 |
| --- a/src/scopes.h |
| +++ b/src/scopes.h |
| @@ -224,6 +224,9 @@ class Scope: public ZoneObject { |
| // Set the ASM module flag. |
| void SetAsmModule() { asm_module_ = true; } |
| + // Inform the scope that the may execute declarations nonlinearly. |
|
adamk
2015/08/24 22:15:01
Comment unclear...I think the "the" is either misp
Dan Ehrenberg
2015/08/25 01:48:14
Explained in the code.
|
| + void SetNonlinear() { scope_nonlinear_ = true; } |
| + |
| // Position in the source where this scope begins and ends. |
| // |
| // * For the scope of a with statement |
| @@ -308,6 +311,8 @@ class Scope: public ZoneObject { |
| bool inner_uses_arguments() const { return inner_scope_uses_arguments_; } |
| // 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? |
| + bool is_nonlinear() const { return scope_nonlinear_; } |
| // Whether this needs to be represented by a runtime context. |
| bool NeedsContext() const { return num_heap_slots() > 0; } |
| @@ -601,6 +606,8 @@ class Scope: public ZoneObject { |
| bool asm_module_; |
| // This scope's outer context is an asm module. |
| bool asm_function_; |
| + // This scope's declarations might not be executed in order (e.g., switch). |
| + bool scope_nonlinear_; |
| // The language mode of this scope. |
| LanguageMode language_mode_; |
| // Source positions. |