Mercurial > hg > graal-compiler
comparison src/share/vm/classfile/systemDictionary.hpp @ 1507:cd5dbf694d45
6939134: JSR 292 adjustments to method handle invocation
Summary: split MethodHandle.invoke into invokeExact and invokeGeneric; also clean up JVM-to-Java interfaces
Reviewed-by: twisti
author | jrose |
---|---|
date | Sat, 01 May 2010 02:42:18 -0700 |
parents | cd37471eaecc |
children | 2ffde6cfe049 |
comparison
equal
deleted
inserted
replaced
1506:2338d41fbd81 | 1507:cd5dbf694d45 |
---|---|
134 \ | 134 \ |
135 /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \ | 135 /* support for dynamic typing; it's OK if these are NULL in earlier JDKs */ \ |
136 template(MethodHandle_klass, java_dyn_MethodHandle, Opt) \ | 136 template(MethodHandle_klass, java_dyn_MethodHandle, Opt) \ |
137 template(MemberName_klass, sun_dyn_MemberName, Opt) \ | 137 template(MemberName_klass, sun_dyn_MemberName, Opt) \ |
138 template(MethodHandleImpl_klass, sun_dyn_MethodHandleImpl, Opt) \ | 138 template(MethodHandleImpl_klass, sun_dyn_MethodHandleImpl, Opt) \ |
139 template(MethodHandleNatives_klass, sun_dyn_MethodHandleNatives, Opt) \ | |
139 template(AdapterMethodHandle_klass, sun_dyn_AdapterMethodHandle, Opt) \ | 140 template(AdapterMethodHandle_klass, sun_dyn_AdapterMethodHandle, Opt) \ |
140 template(BoundMethodHandle_klass, sun_dyn_BoundMethodHandle, Opt) \ | 141 template(BoundMethodHandle_klass, sun_dyn_BoundMethodHandle, Opt) \ |
141 template(DirectMethodHandle_klass, sun_dyn_DirectMethodHandle, Opt) \ | 142 template(DirectMethodHandle_klass, sun_dyn_DirectMethodHandle, Opt) \ |
142 template(MethodType_klass, java_dyn_MethodType, Opt) \ | 143 template(MethodType_klass, java_dyn_MethodType, Opt) \ |
143 template(MethodTypeForm_klass, java_dyn_MethodTypeForm, Opt) \ | 144 template(MethodTypeForm_klass, java_dyn_MethodTypeForm, Opt) \ |
461 static char* check_signature_loaders(symbolHandle signature, Handle loader1, | 462 static char* check_signature_loaders(symbolHandle signature, Handle loader1, |
462 Handle loader2, bool is_method, TRAPS); | 463 Handle loader2, bool is_method, TRAPS); |
463 | 464 |
464 // JSR 292 | 465 // JSR 292 |
465 // find the java.dyn.MethodHandles::invoke method for a given signature | 466 // find the java.dyn.MethodHandles::invoke method for a given signature |
466 static methodOop find_method_handle_invoke(symbolHandle signature, | 467 static methodOop find_method_handle_invoke(symbolHandle name, |
468 symbolHandle signature, | |
467 Handle class_loader, | 469 Handle class_loader, |
468 Handle protection_domain, | 470 Handle protection_domain, |
469 TRAPS); | 471 TRAPS); |
470 // ask Java to compute the java.dyn.MethodType object for a given signature | 472 // ask Java to compute a java.dyn.MethodType object for a given signature |
471 static Handle compute_method_handle_type(symbolHandle signature, | 473 static Handle find_method_handle_type(symbolHandle signature, |
472 Handle class_loader, | 474 Handle class_loader, |
473 Handle protection_domain, | 475 Handle protection_domain, |
474 TRAPS); | 476 TRAPS); |
475 // ask Java to create a dynamic call site, while linking an invokedynamic op | 477 // ask Java to create a dynamic call site, while linking an invokedynamic op |
476 static Handle make_dynamic_call_site(KlassHandle caller, | 478 static Handle make_dynamic_call_site(Handle bootstrap_method, |
477 int caller_method_idnum, | 479 // Callee information: |
480 symbolHandle name, | |
481 methodHandle signature_invoker, | |
482 Handle info, | |
483 // Caller information: | |
484 methodHandle caller_method, | |
478 int caller_bci, | 485 int caller_bci, |
479 symbolHandle name, | |
480 methodHandle mh_invoke, | |
481 TRAPS); | 486 TRAPS); |
482 | 487 |
483 // coordinate with Java about bootstrap methods | 488 // coordinate with Java about bootstrap methods |
484 static Handle find_bootstrap_method(KlassHandle caller, | 489 static Handle find_bootstrap_method(KlassHandle caller, TRAPS); |
485 // This argument is non-null only when a | |
486 // classfile attribute has been found: | |
487 KlassHandle search_bootstrap_klass, | |
488 TRAPS); | |
489 | 490 |
490 // Utility for printing loader "name" as part of tracing constraints | 491 // Utility for printing loader "name" as part of tracing constraints |
491 static const char* loader_name(oop loader) { | 492 static const char* loader_name(oop loader) { |
492 return ((loader) == NULL ? "<bootloader>" : | 493 return ((loader) == NULL ? "<bootloader>" : |
493 instanceKlass::cast((loader)->klass())->name()->as_C_string() ); | 494 instanceKlass::cast((loader)->klass())->name()->as_C_string() ); |