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

Side by Side Diff: src/serialize.h

Issue 113023: X64: Made hash computation in serializer accept 64-bit pointers. (Closed)
Patch Set: Created 11 years, 7 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
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. 1 // Copyright 2006-2008 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 public: 63 public:
64 ExternalReferenceEncoder(); 64 ExternalReferenceEncoder();
65 65
66 uint32_t Encode(Address key) const; 66 uint32_t Encode(Address key) const;
67 67
68 const char* NameOfAddress(Address key) const; 68 const char* NameOfAddress(Address key) const;
69 69
70 private: 70 private:
71 HashMap encodings_; 71 HashMap encodings_;
72 static uint32_t Hash(Address key) { 72 static uint32_t Hash(Address key) {
73 return reinterpret_cast<uint32_t>(key) >> 2; 73 return static_cast<uint32_t>(reinterpret_cast<uintptr_t>(key) >> 2);
74 } 74 }
75 75
76 int IndexOf(Address key) const; 76 int IndexOf(Address key) const;
77 77
78 static bool Match(void* key1, void* key2) { return key1 == key2; } 78 static bool Match(void* key1, void* key2) { return key1 == key2; }
79 79
80 void Put(Address key, int index); 80 void Put(Address key, int index);
81 }; 81 };
82 82
83 83
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 #ifdef DEBUG 326 #ifdef DEBUG
327 bool expect_debug_information_; 327 bool expect_debug_information_;
328 #endif 328 #endif
329 329
330 DISALLOW_COPY_AND_ASSIGN(Deserializer); 330 DISALLOW_COPY_AND_ASSIGN(Deserializer);
331 }; 331 };
332 332
333 } } // namespace v8::internal 333 } } // namespace v8::internal
334 334
335 #endif // V8_SERIALIZE_H_ 335 #endif // V8_SERIALIZE_H_
OLDNEW
« src/objects-inl.h ('K') | « src/objects-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698