136 ciInstanceKlass* loading_klass); 137 138 // Implementation methods for loading and constant pool access. 139 ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass, 140 constantPoolHandle cpool, 141 ciSymbol* klass_name, 142 bool require_local); 143 ciKlass* get_klass_by_index_impl(constantPoolHandle cpool, 144 int klass_index, 145 bool& is_accessible, 146 ciInstanceKlass* loading_klass); 147 ciConstant get_constant_by_index_impl(constantPoolHandle cpool, 148 int pool_index, int cache_index, 149 ciInstanceKlass* loading_klass); 150 ciField* get_field_by_index_impl(ciInstanceKlass* loading_klass, 151 int field_index); 152 ciMethod* get_method_by_index_impl(constantPoolHandle cpool, 153 int method_index, Bytecodes::Code bc, 154 ciInstanceKlass* loading_klass); 155 ciMethod* get_fake_invokedynamic_method_impl(constantPoolHandle cpool, 156 int index, Bytecodes::Code bc); 157 158 // Helper methods 159 bool check_klass_accessibility(ciKlass* accessing_klass, 160 klassOop resolved_klassOop); 161 methodOop lookup_method(instanceKlass* accessor, 162 instanceKlass* holder, 163 Symbol* name, 164 Symbol* sig, 165 Bytecodes::Code bc); 166 167 // Get a ciObject from the object factory. Ensures uniqueness 168 // of ciObjects. 169 ciObject* get_object(oop o) { 170 if (o == NULL) { 171 return _null_object_instance; 172 } else { 173 return _factory->get(o); 174 } 175 } 176 177 ciSymbol* get_symbol(Symbol* o) { 178 if (o == NULL) { 179 ShouldNotReachHere(); 180 return NULL; 181 } else { 182 return _factory->get_symbol(o); 183 } 184 } 185 186 ciMethod* get_method_from_handle(jobject method); 187 188 ciInstance* get_or_create_exception(jobject& handle, Symbol* name); 189 190 // Get a ciMethod representing either an unfound method or 191 // a method with an unloaded holder. Ensures uniqueness of 192 // the result. 193 ciMethod* get_unloaded_method(ciInstanceKlass* holder, 194 ciSymbol* name, 195 ciSymbol* signature) { 196 return _factory->get_unloaded_method(holder, name, signature); 197 } 198 199 // Get a ciKlass representing an unloaded klass. 200 // Ensures uniqueness of the result. 201 ciKlass* get_unloaded_klass(ciKlass* accessing_klass, 202 ciSymbol* name) { 203 return _factory->get_unloaded_klass(accessing_klass, name, true); 204 } 205 206 // Get a ciKlass representing an unloaded klass mirror. 207 // Result is not necessarily unique, but will be unloaded. 208 ciInstance* get_unloaded_klass_mirror(ciKlass* type) { 209 return _factory->get_unloaded_klass_mirror(type); 210 } 211 212 // Get a ciInstance representing an unresolved method handle constant. 213 ciInstance* get_unloaded_method_handle_constant(ciKlass* holder, 214 ciSymbol* name, 215 ciSymbol* signature, 216 int ref_kind) { | 136 ciInstanceKlass* loading_klass); 137 138 // Implementation methods for loading and constant pool access. 139 ciKlass* get_klass_by_name_impl(ciKlass* accessing_klass, 140 constantPoolHandle cpool, 141 ciSymbol* klass_name, 142 bool require_local); 143 ciKlass* get_klass_by_index_impl(constantPoolHandle cpool, 144 int klass_index, 145 bool& is_accessible, 146 ciInstanceKlass* loading_klass); 147 ciConstant get_constant_by_index_impl(constantPoolHandle cpool, 148 int pool_index, int cache_index, 149 ciInstanceKlass* loading_klass); 150 ciField* get_field_by_index_impl(ciInstanceKlass* loading_klass, 151 int field_index); 152 ciMethod* get_method_by_index_impl(constantPoolHandle cpool, 153 int method_index, Bytecodes::Code bc, 154 ciInstanceKlass* loading_klass); 155 ciMethod* get_fake_invokedynamic_method_impl(constantPoolHandle cpool, 156 int index, Bytecodes::Code bc, 157 ciInstanceKlass* accessor); 158 159 // Helper methods 160 bool check_klass_accessibility(ciKlass* accessing_klass, 161 klassOop resolved_klassOop); 162 methodOop lookup_method(instanceKlass* accessor, 163 instanceKlass* holder, 164 Symbol* name, 165 Symbol* sig, 166 Bytecodes::Code bc); 167 168 // Get a ciObject from the object factory. Ensures uniqueness 169 // of ciObjects. 170 ciObject* get_object(oop o) { 171 if (o == NULL) { 172 return _null_object_instance; 173 } else { 174 return _factory->get(o); 175 } 176 } 177 178 ciSymbol* get_symbol(Symbol* o) { 179 if (o == NULL) { 180 ShouldNotReachHere(); 181 return NULL; 182 } else { 183 return _factory->get_symbol(o); 184 } 185 } 186 187 ciMethod* get_method_from_handle(jobject method); 188 189 ciInstance* get_or_create_exception(jobject& handle, Symbol* name); 190 191 // Get a ciMethod representing either an unfound method or 192 // a method with an unloaded holder. Ensures uniqueness of 193 // the result. 194 ciMethod* get_unloaded_method(ciInstanceKlass* holder, 195 ciSymbol* name, 196 ciSymbol* signature, 197 ciInstanceKlass* accessor) { 198 return _factory->get_unloaded_method(holder, name, signature, accessor); 199 } 200 201 // Get a ciKlass representing an unloaded klass. 202 // Ensures uniqueness of the result. 203 ciKlass* get_unloaded_klass(ciKlass* accessing_klass, 204 ciSymbol* name) { 205 return _factory->get_unloaded_klass(accessing_klass, name, true); 206 } 207 208 // Get a ciKlass representing an unloaded klass mirror. 209 // Result is not necessarily unique, but will be unloaded. 210 ciInstance* get_unloaded_klass_mirror(ciKlass* type) { 211 return _factory->get_unloaded_klass_mirror(type); 212 } 213 214 // Get a ciInstance representing an unresolved method handle constant. 215 ciInstance* get_unloaded_method_handle_constant(ciKlass* holder, 216 ciSymbol* name, 217 ciSymbol* signature, 218 int ref_kind) { |