Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: src/ast/ast-function-literal-id-reindexer.h

Issue 2481163002: Assign unique IDs to FunctionLiterals (Closed)
Patch Set: updates Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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 #ifndef V8_AST_AST_FUNCTION_LITERAL_ID_REINDEXER
6 #define V8_AST_AST_FUNCTION_LITERAL_ID_REINDEXER
7
8 #include "src/ast/ast-traversal-visitor.h"
9 #include "src/base/macros.h"
10
11 namespace v8 {
12 namespace internal {
13
14 // Changes the ID of all FunctionLiterals in the given Expression by adding the
15 // given delta.
16 class AstFunctionLiteralIdReindexer final
17 : public AstTraversalVisitor<AstFunctionLiteralIdReindexer> {
18 public:
19 AstFunctionLiteralIdReindexer(size_t stack_limit, int delta);
20 ~AstFunctionLiteralIdReindexer();
21
22 void Reindex(Expression* pattern);
23
24 // AstTraversalVisitor implementation.
25 void VisitFunctionLiteral(FunctionLiteral* lit);
26
27 private:
28 int delta_;
29
30 DISALLOW_COPY_AND_ASSIGN(AstFunctionLiteralIdReindexer);
31 };
32
33 } // namespace internal
34 } // namespace v8
35
36 #endif // V8_AST_AST_FUNCTION_LITERAL_ID_REINDEXER
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698