6964498: JSR 292 invokedynamic sites need local bootstrap methods

Add JVM_CONSTANT_InvokeDynamic records to constant pool to determine per-instruction BSMs.

Reviewed-by: twisti
This commit is contained in:
John R Rose 2010-07-15 18:40:45 -07:00
parent ea25541820
commit a4e4149340
25 changed files with 340 additions and 46 deletions

View file

@ -2475,6 +2475,10 @@ JVM_END
JVM_ENTRY(void, MHI_registerBootstrap(JNIEnv *env, jobject igcls, jclass caller_jh, jobject bsm_jh)) {
instanceKlassHandle ik = MethodHandles::resolve_instance_klass(caller_jh, THREAD);
if (!AllowTransitionalJSR292) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(),
"registerBootstrapMethod is only supported in JSR 292 EDR");
}
ik->link_class(CHECK);
if (!java_dyn_MethodHandle::is_instance(JNIHandles::resolve(bsm_jh))) {
THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "method handle");