mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
6653858: dynamic languages need to be able to load anonymous classes
Low-level privileged sun.misc.Unsafe.defineAnonymousClass Reviewed-by: kvn
This commit is contained in:
parent
015a08b3e8
commit
849e0ffb04
19 changed files with 607 additions and 37 deletions
|
@ -484,11 +484,16 @@ ciConstant ciEnv::get_constant_by_index_impl(ciInstanceKlass* accessor,
|
|||
} else if (tag.is_double()) {
|
||||
return ciConstant((jdouble)cpool->double_at(index));
|
||||
} else if (tag.is_string() || tag.is_unresolved_string()) {
|
||||
oop string = cpool->string_at(index, THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
CLEAR_PENDING_EXCEPTION;
|
||||
record_out_of_memory_failure();
|
||||
return ciConstant();
|
||||
oop string = NULL;
|
||||
if (cpool->is_pseudo_string_at(index)) {
|
||||
string = cpool->pseudo_string_at(index);
|
||||
} else {
|
||||
string = cpool->string_at(index, THREAD);
|
||||
if (HAS_PENDING_EXCEPTION) {
|
||||
CLEAR_PENDING_EXCEPTION;
|
||||
record_out_of_memory_failure();
|
||||
return ciConstant();
|
||||
}
|
||||
}
|
||||
ciObject* constant = get_object(string);
|
||||
assert (constant->is_instance(), "must be an instance, or not? ");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue