src/share/vm/code/relocInfo.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 8044538 Sdiff src/share/vm/code

src/share/vm/code/relocInfo.cpp

Print this page




 860   }
 861   // Probably this reference is absolute, not relative, so the
 862   // following is probably a no-op.
 863   assert(src->section_index_of(target) == CodeBuffer::SECT_NONE, "sanity");
 864   set_value(target);
 865 }
 866 
 867 
 868 address external_word_Relocation::target() {
 869   address target = _target;
 870   if (target == NULL) {
 871     target = pd_get_address_from_code();
 872   }
 873   return target;
 874 }
 875 
 876 
 877 void internal_word_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) {
 878   address target = _target;
 879   if (target == NULL) {
 880     if (addr_in_const()) {
 881       target = new_addr_for(*(address*)addr(), src, dest);
 882     } else {
 883       target = new_addr_for(pd_get_address_from_code(), src, dest);
 884     }
 885   }
 886   set_value(target);
 887 }
 888 
 889 
 890 address internal_word_Relocation::target() {
 891   address target = _target;
 892   if (target == NULL) {



 893     target = pd_get_address_from_code();

 894   }
 895   return target;
 896 }
 897 
 898 //---------------------------------------------------------------------------------
 899 // Non-product code
 900 
 901 #ifndef PRODUCT
 902 
 903 static const char* reloc_type_string(relocInfo::relocType t) {
 904   switch (t) {
 905   #define EACH_CASE(name) \
 906   case relocInfo::name##_type: \
 907     return #name;
 908 
 909   APPLY_TO_RELOCATIONS(EACH_CASE);
 910   #undef EACH_CASE
 911 
 912   case relocInfo::none:
 913     return "none";




 860   }
 861   // Probably this reference is absolute, not relative, so the
 862   // following is probably a no-op.
 863   assert(src->section_index_of(target) == CodeBuffer::SECT_NONE, "sanity");
 864   set_value(target);
 865 }
 866 
 867 
 868 address external_word_Relocation::target() {
 869   address target = _target;
 870   if (target == NULL) {
 871     target = pd_get_address_from_code();
 872   }
 873   return target;
 874 }
 875 
 876 
 877 void internal_word_Relocation::fix_relocation_after_move(const CodeBuffer* src, CodeBuffer* dest) {
 878   address target = _target;
 879   if (target == NULL) {
 880     target = new_addr_for(this->target(), src, dest);




 881   }
 882   set_value(target);
 883 }
 884 
 885 
 886 address internal_word_Relocation::target() {
 887   address target = _target;
 888   if (target == NULL) {
 889     if (addr_in_const()) {
 890       target = *(address*)addr();
 891     } else {
 892       target = pd_get_address_from_code();
 893     }
 894   }
 895   return target;
 896 }
 897 
 898 //---------------------------------------------------------------------------------
 899 // Non-product code
 900 
 901 #ifndef PRODUCT
 902 
 903 static const char* reloc_type_string(relocInfo::relocType t) {
 904   switch (t) {
 905   #define EACH_CASE(name) \
 906   case relocInfo::name##_type: \
 907     return #name;
 908 
 909   APPLY_TO_RELOCATIONS(EACH_CASE);
 910   #undef EACH_CASE
 911 
 912   case relocInfo::none:
 913     return "none";


src/share/vm/code/relocInfo.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File