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 #include "src/ast/ast-literal-reindexer.h" | 5 #include "src/ast/ast-literal-reindexer.h" |
6 | 6 |
7 #include "src/ast/ast.h" | 7 #include "src/ast/ast.h" |
8 #include "src/ast/scopes.h" | 8 #include "src/ast/scopes.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 26 matching lines...) Expand all Loading... | |
37 | 37 |
38 | 38 |
39 void AstLiteralReindexer::VisitDebuggerStatement(DebuggerStatement* node) {} | 39 void AstLiteralReindexer::VisitDebuggerStatement(DebuggerStatement* node) {} |
40 | 40 |
41 | 41 |
42 void AstLiteralReindexer::VisitNativeFunctionLiteral( | 42 void AstLiteralReindexer::VisitNativeFunctionLiteral( |
43 NativeFunctionLiteral* node) {} | 43 NativeFunctionLiteral* node) {} |
44 | 44 |
45 | 45 |
46 void AstLiteralReindexer::VisitDoExpression(DoExpression* node) { | 46 void AstLiteralReindexer::VisitDoExpression(DoExpression* node) { |
47 // TODO(caitp): literals in do expressions need re-indexing too. | 47 Visit(node->block()); |
caitp (gmail)
2016/01/15 17:48:00
The thing that worries me is, which function the r
nickie
2016/01/15 20:18:29
Initializers in arrow function parameters is exact
caitp (gmail)
2016/01/15 20:25:30
In a RewritableExpression, any ObjectLiteral or Ar
| |
48 Visit(node->result()); | |
caitp (gmail)
2016/01/15 17:48:00
`result` is always a VariableProxy, so it probably
nickie
2016/01/15 20:18:29
I was of the impression that the result can be a t
| |
48 } | 49 } |
49 | 50 |
50 | 51 |
51 void AstLiteralReindexer::VisitLiteral(Literal* node) {} | 52 void AstLiteralReindexer::VisitLiteral(Literal* node) {} |
52 | 53 |
53 | 54 |
54 void AstLiteralReindexer::VisitRegExpLiteral(RegExpLiteral* node) { | 55 void AstLiteralReindexer::VisitRegExpLiteral(RegExpLiteral* node) { |
55 UpdateIndex(node); | 56 UpdateIndex(node); |
56 } | 57 } |
57 | 58 |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
322 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { | 323 void AstLiteralReindexer::VisitFunctionLiteral(FunctionLiteral* node) { |
323 // We don't recurse into the declarations or body of the function literal: | 324 // We don't recurse into the declarations or body of the function literal: |
324 } | 325 } |
325 | 326 |
326 | 327 |
327 void AstLiteralReindexer::Reindex(Expression* pattern) { | 328 void AstLiteralReindexer::Reindex(Expression* pattern) { |
328 pattern->Accept(this); | 329 pattern->Accept(this); |
329 } | 330 } |
330 } // namespace internal | 331 } // namespace internal |
331 } // namespace v8 | 332 } // namespace v8 |
OLD | NEW |