| 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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 940 virtual void VisitCodeTarget(RelocInfo* rinfo) { | 940 virtual void VisitCodeTarget(RelocInfo* rinfo) { |
| 941 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); | 941 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); |
| 942 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 942 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
| 943 Address encoded_target = serializer_->GetSavedAddress(target); | 943 Address encoded_target = serializer_->GetSavedAddress(target); |
| 944 // All calls and jumps are to code objects that encode into 32 bits. | 944 // All calls and jumps are to code objects that encode into 32 bits. |
| 945 offsets_32_bit_.Add(rinfo->target_address_address() - obj_address_); | 945 offsets_32_bit_.Add(rinfo->target_address_address() - obj_address_); |
| 946 uint32_t small_target = | 946 uint32_t small_target = |
| 947 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(encoded_target)); | 947 static_cast<uint32_t>(reinterpret_cast<uintptr_t>(encoded_target)); |
| 948 ASSERT(reinterpret_cast<uintptr_t>(encoded_target) == small_target); | 948 ASSERT(reinterpret_cast<uintptr_t>(encoded_target) == small_target); |
| 949 data_32_bit_.Add(small_target); | 949 data_32_bit_.Add(small_target); |
| 950 } | 950 } |
| 951 | 951 |
| 952 | 952 |
| 953 virtual void VisitExternalReferences(Address* start, Address* end) { | 953 virtual void VisitExternalReferences(Address* start, Address* end) { |
| 954 for (Address* p = start; p < end; ++p) { | 954 for (Address* p = start; p < end; ++p) { |
| 955 uint32_t code = reference_encoder_->Encode(*p); | 955 uint32_t code = reference_encoder_->Encode(*p); |
| 956 CHECK(*p == NULL ? code == 0 : code != 0); | 956 CHECK(*p == NULL ? code == 0 : code != 0); |
| 957 offsets_.Add(reinterpret_cast<Address>(p) - obj_address_); | 957 offsets_.Add(reinterpret_cast<Address>(p) - obj_address_); |
| 958 addresses_.Add(reinterpret_cast<Address>(code)); | 958 addresses_.Add(reinterpret_cast<Address>(code)); |
| 959 } | 959 } |
| 960 } | 960 } |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1722 ASSERT(index < large_objects_.length()); | 1722 ASSERT(index < large_objects_.length()); |
| 1723 } | 1723 } |
| 1724 return large_objects_[index]; // s.page_offset() is ignored. | 1724 return large_objects_[index]; // s.page_offset() is ignored. |
| 1725 } | 1725 } |
| 1726 UNREACHABLE(); | 1726 UNREACHABLE(); |
| 1727 return NULL; | 1727 return NULL; |
| 1728 } | 1728 } |
| 1729 | 1729 |
| 1730 | 1730 |
| 1731 } } // namespace v8::internal | 1731 } } // namespace v8::internal |
| OLD | NEW |