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 945 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
956 | 956 |
957 | 957 |
958 bool Serializer::IsVisited(HeapObject* obj) { | 958 bool Serializer::IsVisited(HeapObject* obj) { |
959 HashMap::Entry* entry = | 959 HashMap::Entry* entry = |
960 saved_addresses_.Lookup(obj, HeapObjectHash(obj), false); | 960 saved_addresses_.Lookup(obj, HeapObjectHash(obj), false); |
961 return entry != NULL; | 961 return entry != NULL; |
962 } | 962 } |
963 | 963 |
964 | 964 |
965 Address Serializer::GetSavedAddress(HeapObject* obj) { | 965 Address Serializer::GetSavedAddress(HeapObject* obj) { |
966 HashMap::Entry* entry | 966 HashMap::Entry* entry = |
967 = saved_addresses_.Lookup(obj, HeapObjectHash(obj), false); | 967 saved_addresses_.Lookup(obj, HeapObjectHash(obj), false); |
968 ASSERT(entry != NULL); | 968 ASSERT(entry != NULL); |
969 return reinterpret_cast<Address>(entry->value); | 969 return reinterpret_cast<Address>(entry->value); |
970 } | 970 } |
971 | 971 |
972 | 972 |
973 void Serializer::SaveAddress(HeapObject* obj, Address addr) { | 973 void Serializer::SaveAddress(HeapObject* obj, Address addr) { |
974 HashMap::Entry* entry = | 974 HashMap::Entry* entry = |
975 saved_addresses_.Lookup(obj, HeapObjectHash(obj), true); | 975 saved_addresses_.Lookup(obj, HeapObjectHash(obj), true); |
976 entry->value = addr; | 976 entry->value = addr; |
977 } | 977 } |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1587 ASSERT(index < large_objects_.length()); | 1587 ASSERT(index < large_objects_.length()); |
1588 } | 1588 } |
1589 return large_objects_[index]; // s.page_offset() is ignored. | 1589 return large_objects_[index]; // s.page_offset() is ignored. |
1590 } | 1590 } |
1591 UNREACHABLE(); | 1591 UNREACHABLE(); |
1592 return NULL; | 1592 return NULL; |
1593 } | 1593 } |
1594 | 1594 |
1595 | 1595 |
1596 } } // namespace v8::internal | 1596 } } // namespace v8::internal |
OLD | NEW |