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:
John R Rose 2008-11-12 22:33:26 -08:00
parent 015a08b3e8
commit 849e0ffb04
19 changed files with 607 additions and 37 deletions

View file

@ -1600,7 +1600,11 @@ void ClassVerifier::verify_ldc(
types = (1 << JVM_CONSTANT_Double) | (1 << JVM_CONSTANT_Long);
verify_cp_type(index, cp, types, CHECK_VERIFY(this));
}
if (tag.is_string() || tag.is_unresolved_string()) {
if (tag.is_string() && cp->is_pseudo_string_at(index)) {
current_frame->push_stack(
VerificationType::reference_type(
vmSymbols::java_lang_Object()), CHECK_VERIFY(this));
} else if (tag.is_string() || tag.is_unresolved_string()) {
current_frame->push_stack(
VerificationType::reference_type(
vmSymbols::java_lang_String()), CHECK_VERIFY(this));