chromium/v8/src/compiler/js-context-specialization.h

// Copyright 2014 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_COMPILER_JS_CONTEXT_SPECIALIZATION_H_
#define V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_

#include "src/compiler/graph-reducer.h"
#include "src/handles/maybe-handles.h"

namespace v8 {
namespace internal {
namespace compiler {

// Forward declarations.
class JSGraph;
class JSOperatorBuilder;

// Pair of a context and its distance from some point of reference.
struct OuterContext {};

// Specializes a given JSGraph to a given context, potentially constant folding
// some {LoadContext} nodes or strength reducing some {StoreContext} nodes.
// Additionally, constant-folds the function parameter if {closure} is given,
// and constant-folds import.meta loads if the corresponding object already
// exists.
//
// The context can be the incoming function context or any outer context
// thereof, as indicated by {outer}'s {distance}.
class V8_EXPORT_PRIVATE JSContextSpecialization final : public AdvancedReducer {};

}  // namespace compiler
}  // namespace internal
}  // namespace v8

#endif  // V8_COMPILER_JS_CONTEXT_SPECIALIZATION_H_