Index: src/scopes.h |
diff --git a/src/scopes.h b/src/scopes.h |
index 7b372d9643fe4c1c07892139c6ecf1937ed1257e..03ff6a81f057c33b91efd65a4944531d07d1c9b8 100644 |
--- a/src/scopes.h |
+++ b/src/scopes.h |
@@ -23,7 +23,8 @@ class VariableMap: public ZoneHashMap { |
Variable* Declare(Scope* scope, const AstRawString* name, VariableMode mode, |
Variable::Kind kind, InitializationFlag initialization_flag, |
- MaybeAssignedFlag maybe_assigned_flag = kNotAssigned); |
+ MaybeAssignedFlag maybe_assigned_flag = kNotAssigned, |
+ int consecutive_declaration_group_start = -1); |
Variable* Lookup(const AstRawString* name); |
@@ -131,7 +132,8 @@ class Scope: public ZoneObject { |
// declared before, the previously declared variable is returned. |
Variable* DeclareLocal(const AstRawString* name, VariableMode mode, |
InitializationFlag init_flag, Variable::Kind kind, |
- MaybeAssignedFlag maybe_assigned_flag = kNotAssigned); |
+ MaybeAssignedFlag maybe_assigned_flag = kNotAssigned, |
+ int consecutive_declaration_group_start = -1); |
// Declare an implicit global variable in this scope which must be a |
// script scope. The variable was introduced (possibly from an inner |
@@ -411,6 +413,15 @@ class Scope: public ZoneObject { |
// The ModuleDescriptor for this scope; only for module scopes. |
ModuleDescriptor* module() const { return module_descriptor_; } |
+ |
+ void set_consecutive_class_declaration_group_start(int position) { |
+ consecutive_class_declaration_group_start_ = position; |
+ } |
+ |
+ int consecutive_class_declaration_group_start() const { |
+ return consecutive_class_declaration_group_start_; |
+ } |
+ |
// --------------------------------------------------------------------------- |
// Variable allocation. |
@@ -732,6 +743,10 @@ class Scope: public ZoneObject { |
Zone* zone_; |
PendingCompilationErrorHandler pending_error_handler_; |
+ |
+ // For tracking which classes are declared consecutively. Needed for strong |
+ // mode. |
+ int consecutive_class_declaration_group_start_; |
}; |
} } // namespace v8::internal |