mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
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:
parent
ea25541820
commit
a4e4149340
25 changed files with 340 additions and 46 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue