| OLD | NEW |
| 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
| 2 // All Rights Reserved. | 2 // All Rights Reserved. |
| 3 // | 3 // |
| 4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
| 5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
| 6 // met: | 6 // met: |
| 7 // | 7 // |
| 8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
| 9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
| 10 // | 10 // |
| (...skipping 1071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1082 void* address_; | 1082 void* address_; |
| 1083 }; | 1083 }; |
| 1084 | 1084 |
| 1085 V8_EXPORT_PRIVATE bool operator==(ExternalReference, ExternalReference); | 1085 V8_EXPORT_PRIVATE bool operator==(ExternalReference, ExternalReference); |
| 1086 bool operator!=(ExternalReference, ExternalReference); | 1086 bool operator!=(ExternalReference, ExternalReference); |
| 1087 | 1087 |
| 1088 size_t hash_value(ExternalReference); | 1088 size_t hash_value(ExternalReference); |
| 1089 | 1089 |
| 1090 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, ExternalReference); | 1090 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, ExternalReference); |
| 1091 | 1091 |
| 1092 inline int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
| 1093 ptrdiff_t offset = ref0.address() - ref1.address(); |
| 1094 // Check that fits into int. |
| 1095 DCHECK_EQ(offset, static_cast<int>(offset)); |
| 1096 return static_cast<int>(offset); |
| 1097 } |
| 1098 |
| 1092 // ----------------------------------------------------------------------------- | 1099 // ----------------------------------------------------------------------------- |
| 1093 // Utility functions | 1100 // Utility functions |
| 1094 | 1101 |
| 1095 inline int NumberOfBitsSet(uint32_t x) { | 1102 inline int NumberOfBitsSet(uint32_t x) { |
| 1096 unsigned int num_bits_set; | 1103 unsigned int num_bits_set; |
| 1097 for (num_bits_set = 0; x; x >>= 1) { | 1104 for (num_bits_set = 0; x; x >>= 1) { |
| 1098 num_bits_set += x & 1; | 1105 num_bits_set += x & 1; |
| 1099 } | 1106 } |
| 1100 return num_bits_set; | 1107 return num_bits_set; |
| 1101 } | 1108 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 std::vector<ConstantPoolEntry> shared_entries; | 1263 std::vector<ConstantPoolEntry> shared_entries; |
| 1257 }; | 1264 }; |
| 1258 | 1265 |
| 1259 Label emitted_label_; // Records pc_offset of emitted pool | 1266 Label emitted_label_; // Records pc_offset of emitted pool |
| 1260 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; | 1267 PerTypeEntryInfo info_[ConstantPoolEntry::NUMBER_OF_TYPES]; |
| 1261 }; | 1268 }; |
| 1262 | 1269 |
| 1263 } // namespace internal | 1270 } // namespace internal |
| 1264 } // namespace v8 | 1271 } // namespace v8 |
| 1265 #endif // V8_ASSEMBLER_H_ | 1272 #endif // V8_ASSEMBLER_H_ |
| OLD | NEW |