Mercurial > hg > truffle
diff src/share/vm/classfile/systemDictionary.hpp @ 6266:1d7922586cf6
7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI
Summary: remove assembly code for JDK 7 chained method handles
Reviewed-by: jrose, twisti, kvn, mhaupt
Contributed-by: John Rose <john.r.rose@oracle.com>, Christian Thalinger <christian.thalinger@oracle.com>, Michael Haupt <michael.haupt@oracle.com>
author | twisti |
---|---|
date | Tue, 24 Jul 2012 10:51:00 -0700 |
parents | d2a62e0f25eb |
children | 957c266d8bc5 da91efe96a93 |
line wrap: on
line diff
--- a/src/share/vm/classfile/systemDictionary.hpp Mon Jul 23 13:04:59 2012 -0700 +++ b/src/share/vm/classfile/systemDictionary.hpp Tue Jul 24 10:51:00 2012 -0700 @@ -148,15 +148,10 @@ template(MethodHandle_klass, java_lang_invoke_MethodHandle, Pre_JSR292) \ template(MemberName_klass, java_lang_invoke_MemberName, Pre_JSR292) \ template(MethodHandleNatives_klass, java_lang_invoke_MethodHandleNatives, Pre_JSR292) \ - template(AdapterMethodHandle_klass, java_lang_invoke_AdapterMethodHandle, Pre_JSR292) \ - template(BoundMethodHandle_klass, java_lang_invoke_BoundMethodHandle, Pre_JSR292) \ - template(DirectMethodHandle_klass, java_lang_invoke_DirectMethodHandle, Pre_JSR292) \ + template(LambdaForm_klass, java_lang_invoke_LambdaForm, Opt) \ template(MethodType_klass, java_lang_invoke_MethodType, Pre_JSR292) \ - template(MethodTypeForm_klass, java_lang_invoke_MethodTypeForm, Pre_JSR292) \ template(BootstrapMethodError_klass, java_lang_BootstrapMethodError, Pre_JSR292) \ - template(WrongMethodTypeException_klass, java_lang_invoke_WrongMethodTypeException, Pre_JSR292) \ template(CallSite_klass, java_lang_invoke_CallSite, Pre_JSR292) \ - template(CountingMethodHandle_klass, java_lang_invoke_CountingMethodHandle, Opt) \ template(ConstantCallSite_klass, java_lang_invoke_ConstantCallSite, Pre_JSR292) \ template(MutableCallSite_klass, java_lang_invoke_MutableCallSite, Pre_JSR292) \ template(VolatileCallSite_klass, java_lang_invoke_VolatileCallSite, Pre_JSR292) \ @@ -485,17 +480,24 @@ Handle loader2, bool is_method, TRAPS); // JSR 292 - // find the java.lang.invoke.MethodHandles::invoke method for a given signature - static methodOop find_method_handle_invoke(Symbol* name, - Symbol* signature, - KlassHandle accessing_klass, - TRAPS); - // ask Java to compute a java.lang.invoke.MethodType object for a given signature + // find a java.lang.invoke.MethodHandle.invoke* method for a given signature + // (asks Java to compute it if necessary, except in a compiler thread) + static methodHandle find_method_handle_invoker(Symbol* name, + Symbol* signature, + KlassHandle accessing_klass, + Handle *appendix_result, + TRAPS); + // for a given signature, find the internal MethodHandle method (linkTo* or invokeBasic) + // (does not ask Java, since this is a low-level intrinsic defined by the JVM) + static methodHandle find_method_handle_intrinsic(vmIntrinsics::ID iid, + Symbol* signature, + TRAPS); + // find a java.lang.invoke.MethodType object for a given signature + // (asks Java to compute it if necessary, except in a compiler thread) static Handle find_method_handle_type(Symbol* signature, KlassHandle accessing_klass, - bool for_invokeGeneric, - bool& return_bcp_flag, TRAPS); + // ask Java to compute a java.lang.invoke.MethodHandle object for a given CP entry static Handle link_method_handle_constant(KlassHandle caller, int ref_kind, //e.g., JVM_REF_invokeVirtual @@ -503,23 +505,14 @@ Symbol* name, Symbol* signature, TRAPS); + // ask Java to create a dynamic call site, while linking an invokedynamic op - static Handle make_dynamic_call_site(Handle bootstrap_method, - // Callee information: - Symbol* name, - methodHandle signature_invoker, - Handle info, - // Caller information: - methodHandle caller_method, - int caller_bci, - TRAPS); - - // coordinate with Java about bootstrap methods - static Handle find_bootstrap_method(methodHandle caller_method, - int caller_bci, // N.B. must be an invokedynamic - int cache_index, // must be corresponding main_entry - Handle &argument_info_result, // static BSM arguments, if any - TRAPS); + static methodHandle find_dynamic_call_site_invoker(KlassHandle caller, + Handle bootstrap_method, + Symbol* name, + Symbol* type, + Handle *appendix_result, + TRAPS); // Utility for printing loader "name" as part of tracing constraints static const char* loader_name(oop loader) {