OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "src/ast/ast-function-literal-id-reindexer.h" |
| 6 |
| 7 #include "src/ast/ast.h" |
| 8 |
| 9 namespace v8 { |
| 10 namespace internal { |
| 11 |
| 12 AstFunctionLiteralIdReindexer::AstFunctionLiteralIdReindexer(size_t stack_limit, |
| 13 int delta) |
| 14 : AstTraversalVisitor(stack_limit), delta_(delta) {} |
| 15 |
| 16 AstFunctionLiteralIdReindexer::~AstFunctionLiteralIdReindexer() {} |
| 17 |
| 18 void AstFunctionLiteralIdReindexer::Reindex(Expression* pattern) { |
| 19 Visit(pattern); |
| 20 } |
| 21 |
| 22 void AstFunctionLiteralIdReindexer::VisitFunctionLiteral(FunctionLiteral* lit) { |
| 23 AstTraversalVisitor::VisitFunctionLiteral(lit); |
| 24 lit->set_function_literal_id(lit->function_literal_id() + delta_); |
| 25 } |
| 26 |
| 27 } // namespace internal |
| 28 } // namespace v8 |
OLD | NEW |