blob: a08dc580ff6c000ba70c51fb9a71e3610c8248e8 [file] [log] [blame]
Ben Murdochb8a8cc12014-11-26 15:28:44 +00001// Copyright 2014 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_COMPILER_NODE_AUX_DATA_H_
6#define V8_COMPILER_NODE_AUX_DATA_H_
7
8#include "src/zone-containers.h"
9
10namespace v8 {
11namespace internal {
12namespace compiler {
13
14// Forward declarations.
15class Graph;
16class Node;
17
18template <class T>
19class NodeAuxData {
20 public:
21 inline explicit NodeAuxData(Zone* zone);
22
23 inline void Set(Node* node, const T& data);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040024 inline T Get(Node* node) const;
Ben Murdochb8a8cc12014-11-26 15:28:44 +000025
26 private:
27 ZoneVector<T> aux_data_;
28};
29}
30}
31} // namespace v8::internal::compiler
32
33#endif