Mercurial > hg > truffle
comparison 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 |
comparison
equal
deleted
inserted
replaced
1649:a528509c992b | 1660:083fde3b838e |
---|---|
2473 } | 2473 } |
2474 JVM_END | 2474 JVM_END |
2475 | 2475 |
2476 JVM_ENTRY(void, MHI_registerBootstrap(JNIEnv *env, jobject igcls, jclass caller_jh, jobject bsm_jh)) { | 2476 JVM_ENTRY(void, MHI_registerBootstrap(JNIEnv *env, jobject igcls, jclass caller_jh, jobject bsm_jh)) { |
2477 instanceKlassHandle ik = MethodHandles::resolve_instance_klass(caller_jh, THREAD); | 2477 instanceKlassHandle ik = MethodHandles::resolve_instance_klass(caller_jh, THREAD); |
2478 if (!AllowTransitionalJSR292) { | |
2479 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), | |
2480 "registerBootstrapMethod is only supported in JSR 292 EDR"); | |
2481 } | |
2478 ik->link_class(CHECK); | 2482 ik->link_class(CHECK); |
2479 if (!java_dyn_MethodHandle::is_instance(JNIHandles::resolve(bsm_jh))) { | 2483 if (!java_dyn_MethodHandle::is_instance(JNIHandles::resolve(bsm_jh))) { |
2480 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "method handle"); | 2484 THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), "method handle"); |
2481 } | 2485 } |
2482 const char* err = NULL; | 2486 const char* err = NULL; |