| 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 917 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 928 virtual void VisitPointers(Object** start, Object** end) { | 928 virtual void VisitPointers(Object** start, Object** end) { |
| 929 for (Object** p = start; p < end; ++p) { | 929 for (Object** p = start; p < end; ++p) { |
| 930 if ((*p)->IsHeapObject()) { | 930 if ((*p)->IsHeapObject()) { |
| 931 offsets_.Add(reinterpret_cast<Address>(p) - obj_address_); | 931 offsets_.Add(reinterpret_cast<Address>(p) - obj_address_); |
| 932 Address a = serializer_->GetSavedAddress(HeapObject::cast(*p)); | 932 Address a = serializer_->GetSavedAddress(HeapObject::cast(*p)); |
| 933 addresses_.Add(a); | 933 addresses_.Add(a); |
| 934 } | 934 } |
| 935 } | 935 } |
| 936 } | 936 } |
| 937 | 937 |
| 938 // Do not assert that code targets have been converted to object pointers. | |
| 939 virtual void BeginCodeIteration(Code* code) { | |
| 940 } | |
| 941 | |
| 942 virtual void VisitCodeTarget(RelocInfo* rinfo) { | 938 virtual void VisitCodeTarget(RelocInfo* rinfo) { |
| 943 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); | 939 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); |
| 944 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 940 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
| 945 Address encoded_target = serializer_->GetSavedAddress(target); | 941 Address encoded_target = serializer_->GetSavedAddress(target); |
| 946 offsets_.Add(rinfo->target_address_address() - obj_address_); | 942 offsets_.Add(rinfo->target_address_address() - obj_address_); |
| 947 addresses_.Add(encoded_target); | 943 addresses_.Add(encoded_target); |
| 948 } | 944 } |
| 949 | 945 |
| 950 | 946 |
| 951 virtual void VisitExternalReferences(Address* start, Address* end) { | 947 virtual void VisitExternalReferences(Address* start, Address* end) { |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1712 ASSERT(index < large_objects_.length()); | 1708 ASSERT(index < large_objects_.length()); |
| 1713 } | 1709 } |
| 1714 return large_objects_[index]; // s.page_offset() is ignored. | 1710 return large_objects_[index]; // s.page_offset() is ignored. |
| 1715 } | 1711 } |
| 1716 UNREACHABLE(); | 1712 UNREACHABLE(); |
| 1717 return NULL; | 1713 return NULL; |
| 1718 } | 1714 } |
| 1719 | 1715 |
| 1720 | 1716 |
| 1721 } } // namespace v8::internal | 1717 } } // namespace v8::internal |
| OLD | NEW |