< prev index next >

src/hotspot/share/classfile/systemDictionary.hpp

Print this page
rev 52749 : Bootstrap method consolidation
* clean up and simplify JDK support code for BSM invocation
* simplify JVM bootstrap handshake: use BootstrapCallInfo only
* remove unused JVM paths and data fields
* move bootstrap argument processing from MethodHandleNatives to ConstantPool
* remove ConstantGroup; merge argument access into BootstrapCallInfo
* adjust BSM argument access: remove copyArguments, add argumentRef API
* add metadata-free BSM modes, including symbolic arguments from CP

@@ -71,10 +71,11 @@
 // Note that placeholders are deleted at any time, as they are removed
 // when a class is completely loaded. Therefore, readers as well as writers
 // of placeholders must hold the SystemDictionary_lock.
 //
 
+class BootstrapInfo;
 class ClassFileStream;
 class Dictionary;
 class PlaceholderTable;
 class LoaderConstraintTable;
 template <MEMFLAGS F> class HashtableBucket;

@@ -505,11 +506,10 @@
   static methodHandle find_method_handle_invoker(Klass* klass,
                                                  Symbol* name,
                                                  Symbol* signature,
                                                  Klass* accessing_klass,
                                                  Handle *appendix_result,
-                                                 Handle *method_type_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,

@@ -520,18 +520,20 @@
   static Handle    find_java_mirror_for_type(Symbol* signature,
                                              Klass* accessing_klass,
                                              Handle class_loader,
                                              Handle protection_domain,
                                              SignatureStream::FailureMode failure_mode,
+                                             bool check_access,
                                              TRAPS);
   static Handle    find_java_mirror_for_type(Symbol* signature,
                                              Klass* accessing_klass,
                                              SignatureStream::FailureMode failure_mode,
+                                             bool check_access,
                                              TRAPS) {
     // callee will fill in CL/PD from AK, if they are needed
     return find_java_mirror_for_type(signature, accessing_klass, Handle(), Handle(),
-                                     failure_mode, THREAD);
+                                     failure_mode, check_access, THREAD);
   }
 
 
   // fast short-cut for the one-character case:
   static oop       find_java_mirror_for_type(char signature_char);

@@ -540,40 +542,22 @@
   // (asks Java to compute it if necessary, except in a compiler thread)
   static Handle    find_method_handle_type(Symbol* signature,
                                            Klass* accessing_klass,
                                            TRAPS);
 
-  // find a java.lang.Class object for a given signature
-  static Handle    find_field_handle_type(Symbol* signature,
-                                          Klass* accessing_klass,
-                                          TRAPS);
-
   // ask Java to compute a java.lang.invoke.MethodHandle object for a given CP entry
   static Handle    link_method_handle_constant(Klass* caller,
                                                int ref_kind, //e.g., JVM_REF_invokeVirtual
                                                Klass* callee,
                                                Symbol* name,
                                                Symbol* signature,
                                                TRAPS);
 
-  // ask Java to compute a constant by invoking a BSM given a Dynamic_info CP entry
-  static Handle    link_dynamic_constant(Klass* caller,
-                                         int condy_index,
-                                         Handle bootstrap_specifier,
-                                         Symbol* name,
-                                         Symbol* type,
-                                         TRAPS);
-
-  // ask Java to create a dynamic call site, while linking an invokedynamic op
-  static methodHandle find_dynamic_call_site_invoker(Klass* caller,
-                                                     int indy_index,
-                                                     Handle bootstrap_method,
-                                                     Symbol* name,
-                                                     Symbol* type,
-                                                     Handle *appendix_result,
-                                                     Handle *method_type_result,
-                                                     TRAPS);
+  // ask Java to run a bootstrap method, in order to create a dynamic call site
+  // while linking an invokedynamic op, or compute a constant for Dynamic_info CP entry
+  // with linkage results being stored back into the bootstrap specifier
+  static void      invoke_bootstrap_method(BootstrapInfo& bootstrap_specifier, TRAPS);
 
   // Record the error when the first attempt to resolve a reference from a constant
   // pool entry to a class fails.
   static void add_resolution_error(const constantPoolHandle& pool, int which, Symbol* error,
                                    Symbol* message);
< prev index next >