< prev index next >
src/hotspot/share/ci/ciEnv.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 474,484 ****
}
if (found_klass == NULL && !cpool.is_null() && cpool->has_preresolution()) {
// Look inside the constant pool for pre-resolved class entries.
for (int i = cpool->length() - 1; i >= 1; i--) {
! if (cpool->tag_at(i).is_klass() || cpool->tag_at(i).is_value_type()) {
Klass* kls = cpool->resolved_klass_at(i);
if (kls->name() == sym) {
found_klass = kls;
break;
}
--- 474,484 ----
}
if (found_klass == NULL && !cpool.is_null() && cpool->has_preresolution()) {
// Look inside the constant pool for pre-resolved class entries.
for (int i = cpool->length() - 1; i >= 1; i--) {
! if (cpool->tag_at(i).is_klass()) {
Klass* kls = cpool->resolved_klass_at(i);
if (kls->name() == sym) {
found_klass = kls;
break;
}
*** 497,518 ****
// Make a CI representative for it.
int i = 0;
while (sym->byte_at(i) == '[') {
i++;
}
- if (i > 0 && sym->byte_at(i) == 'Q') {
- assert(EnableValhalla || EnableMVT, "only for value types");
- // An unloaded array class of value types is an ObjArrayKlass, an
- // unloaded value type class is an InstanceKlass. For consistency,
- // make the signature of the unloaded array of value type use L
- // rather than Q.
- char *new_name = CURRENT_THREAD_ENV->name_buffer(sym->utf8_length()+1);
- strncpy(new_name, (char*)sym->base(), sym->utf8_length());
- new_name[i] = 'L';
- new_name[sym->utf8_length()] = '\0';
- return get_unloaded_klass(accessing_klass, ciSymbol::make(new_name));
- }
return get_unloaded_klass(accessing_klass, name);
}
// ------------------------------------------------------------------
// ciEnv::get_klass_by_name
--- 497,506 ----
*** 669,680 ****
return ciConstant(T_ARRAY, constant);
} else {
assert (constant->is_instance(), "must be an instance, or not? ");
return ciConstant(T_OBJECT, constant);
}
! } else if (tag.is_klass() || tag.is_unresolved_klass() ||
! tag.is_value_type() || tag.is_unresolved_value_type()) {
// 4881222: allow ldc to take a class type
ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);
if (HAS_PENDING_EXCEPTION) {
CLEAR_PENDING_EXCEPTION;
record_out_of_memory_failure();
--- 657,667 ----
return ciConstant(T_ARRAY, constant);
} else {
assert (constant->is_instance(), "must be an instance, or not? ");
return ciConstant(T_OBJECT, constant);
}
! } else if (tag.is_klass() || tag.is_unresolved_klass()) {
// 4881222: allow ldc to take a class type
ciKlass* klass = get_klass_by_index_impl(cpool, index, ignore_will_link, accessor);
if (HAS_PENDING_EXCEPTION) {
CLEAR_PENDING_EXCEPTION;
record_out_of_memory_failure();
< prev index next >