< prev index next >
src/hotspot/share/ci/ciObjectFactory.cpp
Print this page
*** 44,54 ****
#include "classfile/systemDictionary.hpp"
#include "gc/shared/collectedHeap.inline.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/universe.hpp"
#include "oops/oop.inline.hpp"
- #include "runtime/fieldType.hpp"
#include "runtime/handles.inline.hpp"
#include "utilities/macros.hpp"
// ciObjectFactory
//
--- 44,53 ----
*** 416,425 ****
--- 415,425 ----
// unloaded method. This may need to change.
ciMethod* ciObjectFactory::get_unloaded_method(ciInstanceKlass* holder,
ciSymbol* name,
ciSymbol* signature,
ciInstanceKlass* accessor) {
+ assert(accessor != NULL, "need origin of access");
ciSignature* that = NULL;
for (int i = 0; i < _unloaded_methods->length(); i++) {
ciMethod* entry = _unloaded_methods->at(i);
if (entry->holder()->equals(holder) &&
entry->name()->equals(name) &&
*** 486,509 ****
// Two cases: this is an unloaded ObjArrayKlass or an
// unloaded InstanceKlass. Deal with both.
if (name->char_at(0) == JVM_SIGNATURE_ARRAY) {
// Decompose the name.'
! FieldArrayInfo fd;
! BasicType element_type = FieldType::get_array_info(name->get_symbol(),
! fd, THREAD);
! if (HAS_PENDING_EXCEPTION) {
! CLEAR_PENDING_EXCEPTION;
! CURRENT_THREAD_ENV->record_out_of_memory_failure();
! return ciEnv::_unloaded_ciobjarrayklass;
! }
! int dimension = fd.dimension();
assert(element_type != T_ARRAY, "unsuccessful decomposition");
ciKlass* element_klass = NULL;
if (element_type == T_OBJECT) {
ciEnv *env = CURRENT_THREAD_ENV;
! ciSymbol* ci_name = env->get_symbol(fd.object_key());
element_klass =
env->get_klass_by_name(accessing_klass, ci_name, false)->as_instance_klass();
} else {
assert(dimension > 1, "one dimensional type arrays are always loaded.");
--- 486,503 ----
// Two cases: this is an unloaded ObjArrayKlass or an
// unloaded InstanceKlass. Deal with both.
if (name->char_at(0) == JVM_SIGNATURE_ARRAY) {
// Decompose the name.'
! SignatureStream ss(name->get_symbol(), false);
! int dimension = ss.skip_array_prefix(); // skip all '['s
! BasicType element_type = ss.type();
assert(element_type != T_ARRAY, "unsuccessful decomposition");
ciKlass* element_klass = NULL;
if (element_type == T_OBJECT) {
ciEnv *env = CURRENT_THREAD_ENV;
! ciSymbol* ci_name = env->get_symbol(ss.as_symbol());
element_klass =
env->get_klass_by_name(accessing_klass, ci_name, false)->as_instance_klass();
} else {
assert(dimension > 1, "one dimensional type arrays are always loaded.");
< prev index next >