chromium/v8/src/compiler/turboshaft/snapshot-table-opindex.h

// Copyright 2022 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_TURBOSHAFT_SNAPSHOT_TABLE_OPINDEX_H_
#define V8_COMPILER_TURBOSHAFT_SNAPSHOT_TABLE_OPINDEX_H_

#include <optional>

#include "src/compiler/turboshaft/index.h"
#include "src/compiler/turboshaft/snapshot-table.h"

namespace v8::internal::compiler::turboshaft {
// A Wrapper around a SnapshotTable, which takes care of mapping OpIndex to Key.
// It uses a ZoneAbslFlatHashMap to store this mapping, and is thus more
// appropriate for cases where not many OpIndex have a corresponding key.
template <class Value, class KeyData = NoKeyData>
class SparseOpIndexSnapshotTable : public SnapshotTable<Value, KeyData> {};

}  // namespace v8::internal::compiler::turboshaft

#endif  // V8_COMPILER_TURBOSHAFT_SNAPSHOT_TABLE_OPINDEX_H_