OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_AST_LITERAL_REINDEXER | 5 #ifndef V8_AST_LITERAL_REINDEXER |
6 #define V8_AST_LITERAL_REINDEXER | 6 #define V8_AST_LITERAL_REINDEXER |
7 | 7 |
8 #include "src/v8.h" | |
9 | |
10 #include "src/ast.h" | 8 #include "src/ast.h" |
11 #include "src/scopes.h" | 9 #include "src/scopes.h" |
12 | 10 |
13 namespace v8 { | 11 namespace v8 { |
14 namespace internal { | 12 namespace internal { |
15 | 13 |
16 class AstLiteralReindexer final : public AstVisitor { | 14 class AstLiteralReindexer final : public AstVisitor { |
17 public: | 15 public: |
18 AstLiteralReindexer() : AstVisitor(), next_index_(0) {} | 16 AstLiteralReindexer() : AstVisitor(), next_index_(0) {} |
19 | 17 |
(...skipping 17 matching lines...) Expand all Loading... |
37 void Visit(AstNode* node) override { node->Accept(this); } | 35 void Visit(AstNode* node) override { node->Accept(this); } |
38 | 36 |
39 int next_index_; | 37 int next_index_; |
40 | 38 |
41 DISALLOW_COPY_AND_ASSIGN(AstLiteralReindexer); | 39 DISALLOW_COPY_AND_ASSIGN(AstLiteralReindexer); |
42 }; | 40 }; |
43 } | 41 } |
44 } // namespace v8::internal | 42 } // namespace v8::internal |
45 | 43 |
46 #endif // V8_AST_LITERAL_REINDEXER | 44 #endif // V8_AST_LITERAL_REINDEXER |
OLD | NEW |