| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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_ |
| OLD | NEW |