Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(452)

Side by Side Diff: src/compiler/node-cache.cc

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/machine-operator-reducer-unittest.cc ('k') | src/compiler/operator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/compiler/machine-operator-reducer-unittest.cc ('k') | src/compiler/operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698