| 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_CACHE_H_ | 5 #ifndef V8_COMPILER_NODE_CACHE_H_ |
| 6 #define V8_COMPILER_NODE_CACHE_H_ | 6 #define V8_COMPILER_NODE_CACHE_H_ |
| 7 | 7 |
| 8 #include "src/base/functional.h" | 8 #include "src/base/functional.h" |
| 9 #include "src/base/macros.h" | 9 #include "src/base/macros.h" |
| 10 | 10 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 Pred pred_; | 56 Pred pred_; |
| 57 | 57 |
| 58 bool Resize(Zone* zone); | 58 bool Resize(Zone* zone); |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(NodeCache); | 60 DISALLOW_COPY_AND_ASSIGN(NodeCache); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 // Various default cache types. | 63 // Various default cache types. |
| 64 typedef NodeCache<int32_t> Int32NodeCache; | 64 typedef NodeCache<int32_t> Int32NodeCache; |
| 65 typedef NodeCache<int64_t> Int64NodeCache; | 65 typedef NodeCache<int64_t> Int64NodeCache; |
| 66 |
| 67 // All we want is the numeric value of the RelocInfo::Mode enum. We typedef |
| 68 // below to avoid pulling in assembler.h |
| 69 typedef char RelocInfoMode; |
| 70 typedef std::pair<int32_t, RelocInfoMode> RelocInt32Key; |
| 71 typedef std::pair<int64_t, RelocInfoMode> RelocInt64Key; |
| 72 typedef NodeCache<RelocInt32Key> RelocInt32NodeCache; |
| 73 typedef NodeCache<RelocInt64Key> RelocInt64NodeCache; |
| 66 #if V8_HOST_ARCH_32_BIT | 74 #if V8_HOST_ARCH_32_BIT |
| 67 typedef Int32NodeCache IntPtrNodeCache; | 75 typedef Int32NodeCache IntPtrNodeCache; |
| 68 #else | 76 #else |
| 69 typedef Int64NodeCache IntPtrNodeCache; | 77 typedef Int64NodeCache IntPtrNodeCache; |
| 70 #endif | 78 #endif |
| 71 | 79 |
| 72 } // namespace compiler | 80 } // namespace compiler |
| 73 } // namespace internal | 81 } // namespace internal |
| 74 } // namespace v8 | 82 } // namespace v8 |
| 75 | 83 |
| 76 #endif // V8_COMPILER_NODE_CACHE_H_ | 84 #endif // V8_COMPILER_NODE_CACHE_H_ |
| OLD | NEW |