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

src/share/vm/code/relocInfo.hpp

Print this page




1027 
1028   void verify_metadata_relocation();
1029 
1030   address value()  { return (address) *metadata_addr(); }
1031 
1032   bool metadata_is_immediate()  { return metadata_index() == 0; }
1033 
1034   Metadata**   metadata_addr();                  // addr or &pool[jint_data]
1035   Metadata*    metadata_value();                 // *metadata_addr
1036   // Note:  metadata_value transparently converts Universe::non_metadata_word to NULL.
1037 };
1038 
1039 
1040 class virtual_call_Relocation : public CallRelocation {
1041   relocInfo::relocType type() { return relocInfo::virtual_call_type; }
1042 
1043  public:
1044   // "cached_value" points to the first associated set-oop.
1045   // The oop_limit helps find the last associated set-oop.
1046   // (See comments at the top of this file.)
1047   static RelocationHolder spec(address cached_value) {
1048     RelocationHolder rh = newHolder();
1049     new(rh) virtual_call_Relocation(cached_value);
1050     return rh;
1051   }
1052 
1053   virtual_call_Relocation(address cached_value) {




1054     _cached_value = cached_value;

1055     assert(cached_value != NULL, "first oop address must be specified");
1056   }
1057 
1058  private:
1059   address _cached_value;               // location of set-value instruction
1060 
1061   friend class RelocIterator;
1062   virtual_call_Relocation() { }
1063 
1064 
1065  public:
1066   address cached_value();
1067 



1068   // data is packed as scaled offsets in "2_ints" format:  [f l] or [Ff Ll]
1069   // oop_limit is set to 0 if the limit falls somewhere within the call.
1070   // When unpacking, a zero oop_limit is taken to refer to the end of the call.
1071   // (This has the effect of bringing in the call's delay slot on SPARC.)
1072   void pack_data_to(CodeSection* dest);
1073   void unpack_data();
1074 
1075   void clear_inline_cache();
1076 };
1077 
1078 
1079 class opt_virtual_call_Relocation : public CallRelocation {
1080   relocInfo::relocType type() { return relocInfo::opt_virtual_call_type; }
1081 
1082  public:
1083   static RelocationHolder spec() {
1084     RelocationHolder rh = newHolder();
1085     new(rh) opt_virtual_call_Relocation();
1086     return rh;
1087   }
1088 
1089  private:






1090   friend class RelocIterator;
1091   opt_virtual_call_Relocation() { }
1092 
1093  public:






1094   void clear_inline_cache();
1095 
1096   // find the matching static_stub
1097   address static_stub();
1098 };
1099 
1100 
1101 class static_call_Relocation : public CallRelocation {
1102   relocInfo::relocType type() { return relocInfo::static_call_type; }
1103 
1104  public:
1105   static RelocationHolder spec() {
1106     RelocationHolder rh = newHolder();
1107     new(rh) static_call_Relocation();
1108     return rh;
1109   }
1110 
1111  private:






1112   friend class RelocIterator;
1113   static_call_Relocation() { }
1114 
1115  public:






1116   void clear_inline_cache();
1117 
1118   // find the matching static_stub
1119   address static_stub();
1120 };
1121 
1122 class static_stub_Relocation : public Relocation {
1123   relocInfo::relocType type() { return relocInfo::static_stub_type; }
1124 
1125  public:
1126   static RelocationHolder spec(address static_call) {
1127     RelocationHolder rh = newHolder();
1128     new(rh) static_stub_Relocation(static_call);
1129     return rh;
1130   }
1131 
1132  private:
1133   address _static_call;  // location of corresponding static_call
1134 
1135   static_stub_Relocation(address static_call) {




1027 
1028   void verify_metadata_relocation();
1029 
1030   address value()  { return (address) *metadata_addr(); }
1031 
1032   bool metadata_is_immediate()  { return metadata_index() == 0; }
1033 
1034   Metadata**   metadata_addr();                  // addr or &pool[jint_data]
1035   Metadata*    metadata_value();                 // *metadata_addr
1036   // Note:  metadata_value transparently converts Universe::non_metadata_word to NULL.
1037 };
1038 
1039 
1040 class virtual_call_Relocation : public CallRelocation {
1041   relocInfo::relocType type() { return relocInfo::virtual_call_type; }
1042 
1043  public:
1044   // "cached_value" points to the first associated set-oop.
1045   // The oop_limit helps find the last associated set-oop.
1046   // (See comments at the top of this file.)
1047   static RelocationHolder spec(address cached_value, jint method_index = 0) {
1048     RelocationHolder rh = newHolder();
1049     new(rh) virtual_call_Relocation(cached_value, method_index);
1050     return rh;
1051   }
1052 
1053  private:
1054   address _cached_value; // location of set-value instruction
1055   jint    _method_index; // resolved method for a Java call
1056 
1057   virtual_call_Relocation(address cached_value, int method_index) {
1058     _cached_value = cached_value;
1059     _method_index = method_index;
1060     assert(cached_value != NULL, "first oop address must be specified");
1061   }
1062 



1063   friend class RelocIterator;
1064   virtual_call_Relocation() { }
1065 

1066  public:
1067   address cached_value();
1068 
1069   int     method_index() { return _method_index; }
1070   Method* method_value();
1071 
1072   // data is packed as scaled offsets in "2_ints" format:  [f l] or [Ff Ll]
1073   // oop_limit is set to 0 if the limit falls somewhere within the call.
1074   // When unpacking, a zero oop_limit is taken to refer to the end of the call.
1075   // (This has the effect of bringing in the call's delay slot on SPARC.)
1076   void pack_data_to(CodeSection* dest);
1077   void unpack_data();
1078 
1079   void clear_inline_cache();
1080 };
1081 
1082 
1083 class opt_virtual_call_Relocation : public CallRelocation {
1084   relocInfo::relocType type() { return relocInfo::opt_virtual_call_type; }
1085 
1086  public:
1087   static RelocationHolder spec(int method_index = 0) {
1088     RelocationHolder rh = newHolder();
1089     new(rh) opt_virtual_call_Relocation(method_index);
1090     return rh;
1091   }
1092 
1093  private:
1094   jint _method_index; // resolved method for a Java call
1095 
1096   opt_virtual_call_Relocation(int method_index) {
1097     _method_index = method_index;
1098   }
1099 
1100   friend class RelocIterator;
1101   opt_virtual_call_Relocation() {}
1102 
1103  public:
1104   int     method_index() { return _method_index; }
1105   Method* method_value();
1106 
1107   void pack_data_to(CodeSection* dest);
1108   void unpack_data();
1109 
1110   void clear_inline_cache();
1111 
1112   // find the matching static_stub
1113   address static_stub();
1114 };
1115 
1116 
1117 class static_call_Relocation : public CallRelocation {
1118   relocInfo::relocType type() { return relocInfo::static_call_type; }
1119 
1120  public:
1121   static RelocationHolder spec(int method_index = 0) {
1122     RelocationHolder rh = newHolder();
1123     new(rh) static_call_Relocation(method_index);
1124     return rh;
1125   }
1126 
1127  private:
1128   jint _method_index; // resolved method for a Java call
1129 
1130   static_call_Relocation(int method_index) {
1131     _method_index = method_index;
1132   }
1133 
1134   friend class RelocIterator;
1135   static_call_Relocation() {}
1136 
1137  public:
1138   int     method_index() { return _method_index; }
1139   Method* method_value();
1140 
1141   void pack_data_to(CodeSection* dest);
1142   void unpack_data();
1143 
1144   void clear_inline_cache();
1145 
1146   // find the matching static_stub
1147   address static_stub();
1148 };
1149 
1150 class static_stub_Relocation : public Relocation {
1151   relocInfo::relocType type() { return relocInfo::static_stub_type; }
1152 
1153  public:
1154   static RelocationHolder spec(address static_call) {
1155     RelocationHolder rh = newHolder();
1156     new(rh) static_stub_Relocation(static_call);
1157     return rh;
1158   }
1159 
1160  private:
1161   address _static_call;  // location of corresponding static_call
1162 
1163   static_stub_Relocation(address static_call) {


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