Chromium Code Reviews| Index: src/ast.h |
| diff --git a/src/ast.h b/src/ast.h |
| index 7040ff78350bcfdc524114752ca33e559b0f1199..9614fbe5aeedcb907aba8b191bfe0bbec6696924 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 |
| + // batches. Each VariableDeclaration is associated with the start position of |
| + // the batch it belongs to. The positions are used for strong mode scope |
| + // checks for classes and functions. |
| + int consecutive_declaration_batch_start() const { |
|
rossberg
2015/04/20 11:15:25
Nit: Let's call this class_declaration_group_start
marja
2015/04/20 15:58:22
batch -> group done
But I don't need a separate o
|
| + return consecutive_declaration_batch_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_batch_start = -1) |
| : Declaration(zone, proxy, mode, scope, pos), |
| - is_class_declaration_(is_class_declaration) {} |
| + is_class_declaration_(is_class_declaration), |
| + consecutive_declaration_batch_start_( |
| + consecutive_declaration_batch_start) {} |
| bool is_class_declaration_; |
| + int consecutive_declaration_batch_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_batch_start = -1) { |
| return new (zone_) VariableDeclaration(zone_, proxy, mode, scope, pos, |
| - is_class_declaration); |
| + is_class_declaration, |
| + consecutive_declaration_batch_start); |
| } |
| FunctionDeclaration* NewFunctionDeclaration(VariableProxy* proxy, |