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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 case RelocInfo::CODE_AGE_SEQUENCE: | 787 case RelocInfo::CODE_AGE_SEQUENCE: |
788 return "code_age_sequence"; | 788 return "code_age_sequence"; |
789 case RelocInfo::NUMBER_OF_MODES: | 789 case RelocInfo::NUMBER_OF_MODES: |
790 UNREACHABLE(); | 790 UNREACHABLE(); |
791 return "number_of_modes"; | 791 return "number_of_modes"; |
792 } | 792 } |
793 return "unknown relocation type"; | 793 return "unknown relocation type"; |
794 } | 794 } |
795 | 795 |
796 | 796 |
797 void RelocInfo::Print(Isolate* isolate, OStream& os) { // NOLINT | 797 void RelocInfo::Print(Isolate* isolate, std::ostream& os) { // NOLINT |
798 os << pc_ << " " << RelocModeName(rmode_); | 798 os << static_cast<const void*>(pc_) << " " << RelocModeName(rmode_); |
799 if (IsComment(rmode_)) { | 799 if (IsComment(rmode_)) { |
800 os << " (" << reinterpret_cast<char*>(data_) << ")"; | 800 os << " (" << reinterpret_cast<char*>(data_) << ")"; |
801 } else if (rmode_ == EMBEDDED_OBJECT) { | 801 } else if (rmode_ == EMBEDDED_OBJECT) { |
802 os << " (" << Brief(target_object()) << ")"; | 802 os << " (" << Brief(target_object()) << ")"; |
803 } else if (rmode_ == EXTERNAL_REFERENCE) { | 803 } else if (rmode_ == EXTERNAL_REFERENCE) { |
804 ExternalReferenceEncoder ref_encoder(isolate); | 804 ExternalReferenceEncoder ref_encoder(isolate); |
805 os << " (" << ref_encoder.NameOfAddress(target_reference()) << ") (" | 805 os << " (" << ref_encoder.NameOfAddress(target_reference()) << ") (" |
806 << target_reference() << ")"; | 806 << target_reference() << ")"; |
807 } else if (IsCodeTarget(rmode_)) { | 807 } else if (IsCodeTarget(rmode_)) { |
808 Code* code = Code::GetCodeFromTargetAddress(target_address()); | 808 Code* code = Code::GetCodeFromTargetAddress(target_address()); |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1565 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1565 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
1566 state_.written_position = state_.current_position; | 1566 state_.written_position = state_.current_position; |
1567 written = true; | 1567 written = true; |
1568 } | 1568 } |
1569 | 1569 |
1570 // Return whether something was written. | 1570 // Return whether something was written. |
1571 return written; | 1571 return written; |
1572 } | 1572 } |
1573 | 1573 |
1574 } } // namespace v8::internal | 1574 } } // namespace v8::internal |
OLD | NEW |