Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index 7040ff78350bcfdc524114752ca33e559b0f1199..62d3b3ae52a447f40db77ea722bb9a7384648ed3 100644 |
| --- a/src/ast.h |
| +++ b/src/ast.h |
| @@ -570,13 +570,25 @@ class VariableDeclaration FINAL : public Declaration { |
| bool is_class_declaration() const { return is_class_declaration_; } |
| + // VariableDeclarations can be grouped into consecutive declaration |
| + // groups. Each VariableDeclaration is associated with the start position of |
| + // the group it belongs to. The positions are used for strong mode scope |
| + // checks for classes and functions. |
| + int consecutive_declaration_group_start() const { |
|
rossberg
2015/04/21 13:30:02
Nit: also drop the "consecutive" (here and elsewhe
marja
2015/04/23 09:52:37
Done.
|
| + return consecutive_declaration_group_start_; |
| + } |
| + |
| protected: |
| VariableDeclaration(Zone* zone, VariableProxy* proxy, VariableMode mode, |
| - Scope* scope, int pos, bool is_class_declaration = false) |
| + Scope* scope, int pos, bool is_class_declaration = false, |
| + int consecutive_declaration_group_start = -1) |
| : Declaration(zone, proxy, mode, scope, pos), |
| - is_class_declaration_(is_class_declaration) {} |
| + is_class_declaration_(is_class_declaration), |
| + consecutive_declaration_group_start_( |
| + consecutive_declaration_group_start) {} |
| bool is_class_declaration_; |
| + int consecutive_declaration_group_start_; |
| }; |
| @@ -3218,9 +3230,11 @@ class AstNodeFactory FINAL BASE_EMBEDDED { |
| VariableDeclaration* NewVariableDeclaration( |
| VariableProxy* proxy, VariableMode mode, Scope* scope, int pos, |
| - bool is_class_declaration = false) { |
| + bool is_class_declaration = false, |
| + int consecutive_declaration_group_start = -1) { |
| return new (zone_) VariableDeclaration(zone_, proxy, mode, scope, pos, |
| - is_class_declaration); |
| + is_class_declaration, |
| + consecutive_declaration_group_start); |
| } |
| FunctionDeclaration* NewFunctionDeclaration(VariableProxy* proxy, |