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 #include "src/compiler/node-cache.h" | 5 #include "src/compiler/node-cache.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace compiler { | 9 namespace compiler { |
10 | 10 |
(...skipping 13 matching lines...) Expand all Loading... |
24 | 24 |
25 | 25 |
26 template <> | 26 template <> |
27 inline int32_t NodeCacheHash(int64_t key) { | 27 inline int32_t NodeCacheHash(int64_t key) { |
28 return ComputeLongHash(key); | 28 return ComputeLongHash(key); |
29 } | 29 } |
30 | 30 |
31 | 31 |
32 template <> | 32 template <> |
33 inline int32_t NodeCacheHash(double key) { | 33 inline int32_t NodeCacheHash(double key) { |
34 return ComputeLongHash(BitCast<int64_t>(key)); | 34 return ComputeLongHash(bit_cast<int64_t>(key)); |
35 } | 35 } |
36 | 36 |
37 | 37 |
38 template <> | 38 template <> |
39 inline int32_t NodeCacheHash(void* key) { | 39 inline int32_t NodeCacheHash(void* key) { |
40 return ComputePointerHash(key); | 40 return ComputePointerHash(key); |
41 } | 41 } |
42 | 42 |
43 | 43 |
44 template <typename Key> | 44 template <typename Key> |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 return &entry->value_; | 111 return &entry->value_; |
112 } | 112 } |
113 | 113 |
114 | 114 |
115 template class NodeCache<int64_t>; | 115 template class NodeCache<int64_t>; |
116 template class NodeCache<int32_t>; | 116 template class NodeCache<int32_t>; |
117 template class NodeCache<void*>; | 117 template class NodeCache<void*>; |
118 } | 118 } |
119 } | 119 } |
120 } // namespace v8::internal::compiler | 120 } // namespace v8::internal::compiler |
OLD | NEW |