mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
7023639: JSR 292 method handle invocation needs a fast path for compiled code
6984705: JSR 292 method handle creation should not go through JNI Remove assembly code for JDK 7 chained method handles Co-authored-by: John Rose <john.r.rose@oracle.com> Co-authored-by: Michael Haupt <michael.haupt@oracle.com> Reviewed-by: jrose, twisti, kvn, mhaupt
This commit is contained in:
parent
893817c28d
commit
12901d0e5b
181 changed files with 5760 additions and 14402 deletions
|
@ -99,7 +99,10 @@ class AbstractInterpreter: AllStatic {
|
|||
empty, // empty method (code: _return)
|
||||
accessor, // accessor method (code: _aload_0, _getfield, _(a|i)return)
|
||||
abstract, // abstract method (throws an AbstractMethodException)
|
||||
method_handle, // java.lang.invoke.MethodHandles::invoke
|
||||
method_handle_invoke_FIRST, // java.lang.invoke.MethodHandles::invokeExact, etc.
|
||||
method_handle_invoke_LAST = (method_handle_invoke_FIRST
|
||||
+ (vmIntrinsics::LAST_MH_SIG_POLY
|
||||
- vmIntrinsics::FIRST_MH_SIG_POLY)),
|
||||
java_lang_math_sin, // implementation of java.lang.Math.sin (x)
|
||||
java_lang_math_cos, // implementation of java.lang.Math.cos (x)
|
||||
java_lang_math_tan, // implementation of java.lang.Math.tan (x)
|
||||
|
@ -114,6 +117,14 @@ class AbstractInterpreter: AllStatic {
|
|||
invalid = -1
|
||||
};
|
||||
|
||||
// Conversion from the part of the above enum to vmIntrinsics::_invokeExact, etc.
|
||||
static vmIntrinsics::ID method_handle_intrinsic(MethodKind kind) {
|
||||
if (kind >= method_handle_invoke_FIRST && kind <= method_handle_invoke_LAST)
|
||||
return (vmIntrinsics::ID)( vmIntrinsics::FIRST_MH_SIG_POLY + (kind - method_handle_invoke_FIRST) );
|
||||
else
|
||||
return vmIntrinsics::_none;
|
||||
}
|
||||
|
||||
enum SomeConstants {
|
||||
number_of_result_handlers = 10 // number of result handlers for native calls
|
||||
};
|
||||
|
@ -148,6 +159,9 @@ class AbstractInterpreter: AllStatic {
|
|||
static address entry_for_kind(MethodKind k) { assert(0 <= k && k < number_of_method_entries, "illegal kind"); return _entry_table[k]; }
|
||||
static address entry_for_method(methodHandle m) { return entry_for_kind(method_kind(m)); }
|
||||
|
||||
// used for bootstrapping method handles:
|
||||
static void set_entry_for_kind(MethodKind k, address e);
|
||||
|
||||
static void print_method_kind(MethodKind kind) PRODUCT_RETURN;
|
||||
|
||||
static bool can_be_compiled(methodHandle m);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue