Sha256: cd1853bf832117ba95133d1ed8392c94482c726c34bef801798842b99f3c87c6

Contents?: true

Size: 1007 Bytes

Versions: 5

Compression:

Stored size: 1007 Bytes

Contents

// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_AST_AST_FUNCTION_LITERAL_ID_REINDEXER
#define V8_AST_AST_FUNCTION_LITERAL_ID_REINDEXER

#include "src/ast/ast-traversal-visitor.h"
#include "src/base/macros.h"

namespace v8 {
namespace internal {

// Changes the ID of all FunctionLiterals in the given Expression by adding the
// given delta.
class AstFunctionLiteralIdReindexer final
    : public AstTraversalVisitor<AstFunctionLiteralIdReindexer> {
 public:
  AstFunctionLiteralIdReindexer(size_t stack_limit, int delta);
  ~AstFunctionLiteralIdReindexer();

  void Reindex(Expression* pattern);

  // AstTraversalVisitor implementation.
  void VisitFunctionLiteral(FunctionLiteral* lit);

 private:
  int delta_;

  DISALLOW_COPY_AND_ASSIGN(AstFunctionLiteralIdReindexer);
};

}  // namespace internal
}  // namespace v8

#endif  // V8_AST_AST_FUNCTION_LITERAL_ID_REINDEXER

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
libv8-6.0.286.54.1 vendor/v8/src/ast/ast-function-literal-id-reindexer.h
libv8-6.0.286.54.0 vendor/v8/src/ast/ast-function-literal-id-reindexer.h
libv8-6.0.286.54.0beta2 vendor/v8/src/ast/ast-function-literal-id-reindexer.h
libv8-6.0.286.54.0beta1 vendor/v8/src/ast/ast-function-literal-id-reindexer.h
libv8-6.0.286.44.0beta1 vendor/v8/src/ast/ast-function-literal-id-reindexer.h