v8/src/compiler/graph-zone-traits.h
Igor Sheludko ee23306c7c [zone-compr] Add CompressedZonePtr class and compress TurboFan graphs
This CL doesn't try to compress containers of Node* yet.

Bug: v8:9923
Change-Id: Ica16b09b6f26321952b440d49a70f9a991d4275f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2324258
Commit-Queue: Igor Sheludko (OOO Aug 3-17) <ishell@chromium.org>
Reviewed-by: Tobias Tebbi <tebbi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69168}
2020-07-31 12:11:49 +00:00

30 lines
839 B
C++

// Copyright 2020 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_GRAPH_ZONE_TRAITS_H_
#define V8_COMPILER_GRAPH_ZONE_TRAITS_H_
#include "src/zone/zone-type-traits.h"
namespace v8 {
namespace internal {
namespace compiler {
// Forward declarations.
class Node;
// GraphZoneTraits provides typedefs for zone pointer types that are either
// compressed or not depending on the kCompressGraphZone flag.
using GraphZoneTraits = ZoneTypeTraits<kCompressGraphZone>;
// ZoneNodePtr is a possibly compressed pointer to a Node allocated in a zone
// memory.
using ZoneNodePtr = GraphZoneTraits::Ptr<Node>;
} // namespace compiler
} // namespace internal
} // namespace v8
#endif // V8_COMPILER_GRAPH_ZONE_TRAITS_H_