| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_NODE_AUX_DATA_H_ | 5 #ifndef V8_COMPILER_NODE_AUX_DATA_H_ |
| 6 #define V8_COMPILER_NODE_AUX_DATA_H_ | 6 #define V8_COMPILER_NODE_AUX_DATA_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include "src/zone-containers.h" |
| 9 | |
| 10 #include "src/zone-allocator.h" | |
| 11 | 9 |
| 12 namespace v8 { | 10 namespace v8 { |
| 13 namespace internal { | 11 namespace internal { |
| 14 namespace compiler { | 12 namespace compiler { |
| 15 | 13 |
| 16 // Forward declarations. | 14 // Forward declarations. |
| 17 class Graph; | 15 class Graph; |
| 18 class Node; | 16 class Node; |
| 19 | 17 |
| 20 template <class T> | 18 template <class T> |
| 21 class NodeAuxData { | 19 class NodeAuxData { |
| 22 public: | 20 public: |
| 23 inline explicit NodeAuxData(Zone* zone); | 21 inline explicit NodeAuxData(Zone* zone); |
| 24 | 22 |
| 25 inline void Set(Node* node, const T& data); | 23 inline void Set(Node* node, const T& data); |
| 26 inline T Get(Node* node); | 24 inline T Get(Node* node); |
| 27 | 25 |
| 28 private: | 26 private: |
| 29 typedef zone_allocator<T> ZoneAllocator; | 27 ZoneVector<T> aux_data_; |
| 30 typedef std::vector<T, ZoneAllocator> TZoneVector; | |
| 31 | |
| 32 TZoneVector aux_data_; | |
| 33 }; | 28 }; |
| 34 } | 29 } |
| 35 } | 30 } |
| 36 } // namespace v8::internal::compiler | 31 } // namespace v8::internal::compiler |
| 37 | 32 |
| 38 #endif | 33 #endif |
| OLD | NEW |