Mercurial > hg > truffle
diff src/share/vm/prims/methodHandles.cpp @ 1660:083fde3b838e
6964498: JSR 292 invokedynamic sites need local bootstrap methods
Summary: Add JVM_CONSTANT_InvokeDynamic records to constant pool to determine per-instruction BSMs.
Reviewed-by: twisti
author | jrose |
---|---|
date | Thu, 15 Jul 2010 18:40:45 -0700 |
parents | c18cbe5936b8 |
children | 3e8fbc61cee8 |
line wrap: on
line diff
--- a/src/share/vm/prims/methodHandles.cpp Thu Jul 15 08:54:48 2010 -0700 +++ b/src/share/vm/prims/methodHandles.cpp Thu Jul 15 18:40:45 2010 -0700 @@ -2475,6 +2475,10 @@ 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");