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 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
782 case RelocInfo::CODE_AGE_SEQUENCE: | 782 case RelocInfo::CODE_AGE_SEQUENCE: |
783 return "code_age_sequence"; | 783 return "code_age_sequence"; |
784 case RelocInfo::NUMBER_OF_MODES: | 784 case RelocInfo::NUMBER_OF_MODES: |
785 UNREACHABLE(); | 785 UNREACHABLE(); |
786 return "number_of_modes"; | 786 return "number_of_modes"; |
787 } | 787 } |
788 return "unknown relocation type"; | 788 return "unknown relocation type"; |
789 } | 789 } |
790 | 790 |
791 | 791 |
792 void RelocInfo::Print(FILE* out) { | 792 void RelocInfo::Print(Isolate* isolate, FILE* out) { |
793 PrintF(out, "%p %s", pc_, RelocModeName(rmode_)); | 793 PrintF(out, "%p %s", pc_, RelocModeName(rmode_)); |
794 if (IsComment(rmode_)) { | 794 if (IsComment(rmode_)) { |
795 PrintF(out, " (%s)", reinterpret_cast<char*>(data_)); | 795 PrintF(out, " (%s)", reinterpret_cast<char*>(data_)); |
796 } else if (rmode_ == EMBEDDED_OBJECT) { | 796 } else if (rmode_ == EMBEDDED_OBJECT) { |
797 PrintF(out, " ("); | 797 PrintF(out, " ("); |
798 target_object()->ShortPrint(out); | 798 target_object()->ShortPrint(out); |
799 PrintF(out, ")"); | 799 PrintF(out, ")"); |
800 } else if (rmode_ == EXTERNAL_REFERENCE) { | 800 } else if (rmode_ == EXTERNAL_REFERENCE) { |
801 ExternalReferenceEncoder ref_encoder; | 801 ExternalReferenceEncoder ref_encoder; |
802 PrintF(out, " (%s) (%p)", | 802 PrintF(out, " (%s) (%p)", |
803 ref_encoder.NameOfAddress(*target_reference_address()), | 803 ref_encoder.NameOfAddress(*target_reference_address()), |
804 *target_reference_address()); | 804 *target_reference_address()); |
805 } else if (IsCodeTarget(rmode_)) { | 805 } else if (IsCodeTarget(rmode_)) { |
806 Code* code = Code::GetCodeFromTargetAddress(target_address()); | 806 Code* code = Code::GetCodeFromTargetAddress(target_address()); |
807 PrintF(out, " (%s) (%p)", Code::Kind2String(code->kind()), | 807 PrintF(out, " (%s) (%p)", Code::Kind2String(code->kind()), |
808 target_address()); | 808 target_address()); |
809 if (rmode_ == CODE_TARGET_WITH_ID) { | 809 if (rmode_ == CODE_TARGET_WITH_ID) { |
810 PrintF(" (id=%d)", static_cast<int>(data_)); | 810 PrintF(" (id=%d)", static_cast<int>(data_)); |
811 } | 811 } |
812 } else if (IsPosition(rmode_)) { | 812 } else if (IsPosition(rmode_)) { |
813 PrintF(out, " (%" V8_PTR_PREFIX "d)", data()); | 813 PrintF(out, " (%" V8_PTR_PREFIX "d)", data()); |
814 } else if (IsRuntimeEntry(rmode_) && | 814 } else if (IsRuntimeEntry(rmode_) && |
815 Isolate::Current()->deoptimizer_data() != NULL) { | 815 isolate->deoptimizer_data() != NULL) { |
816 // Depotimization bailouts are stored as runtime entries. | 816 // Depotimization bailouts are stored as runtime entries. |
817 int id = Deoptimizer::GetDeoptimizationId( | 817 int id = Deoptimizer::GetDeoptimizationId( |
818 target_address(), Deoptimizer::EAGER); | 818 isolate, target_address(), Deoptimizer::EAGER); |
819 if (id != Deoptimizer::kNotDeoptimizationEntry) { | 819 if (id != Deoptimizer::kNotDeoptimizationEntry) { |
820 PrintF(out, " (deoptimization bailout %d)", id); | 820 PrintF(out, " (deoptimization bailout %d)", id); |
821 } | 821 } |
822 } | 822 } |
823 | 823 |
824 PrintF(out, "\n"); | 824 PrintF(out, "\n"); |
825 } | 825 } |
826 #endif // ENABLE_DISASSEMBLER | 826 #endif // ENABLE_DISASSEMBLER |
827 | 827 |
828 | 828 |
(...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1651 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); | 1651 assembler_->RecordRelocInfo(RelocInfo::POSITION, state_.current_position); |
1652 state_.written_position = state_.current_position; | 1652 state_.written_position = state_.current_position; |
1653 written = true; | 1653 written = true; |
1654 } | 1654 } |
1655 | 1655 |
1656 // Return whether something was written. | 1656 // Return whether something was written. |
1657 return written; | 1657 return written; |
1658 } | 1658 } |
1659 | 1659 |
1660 } } // namespace v8::internal | 1660 } } // namespace v8::internal |
OLD | NEW |