src/share/vm/prims/methodHandles.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/prims

src/share/vm/prims/methodHandles.hpp

Print this page




  52   // utility functions for reifying names and types
  53   static oop field_name_or_null(Symbol* s);
  54   static oop field_signature_type_or_null(Symbol* s);
  55 
  56  public:
  57   // working with member names
  58   static Handle resolve_MemberName(Handle mname, KlassHandle caller, TRAPS); // compute vmtarget/vmindex from name/type
  59   static void expand_MemberName(Handle mname, int suppress, TRAPS);  // expand defc/name/type if missing
  60   static Handle new_MemberName(TRAPS);  // must be followed by init_MemberName
  61   static oop init_MemberName(Handle mname_h, Handle target_h); // compute vmtarget/vmindex from target
  62   static oop init_field_MemberName(Handle mname_h, fieldDescriptor& fd, bool is_setter = false);
  63   static oop init_method_MemberName(Handle mname_h, CallInfo& info);
  64   static int method_ref_kind(Method* m, bool do_dispatch_if_possible = true);
  65   static int find_MemberNames(KlassHandle k, Symbol* name, Symbol* sig,
  66                               int mflags, KlassHandle caller,
  67                               int skip, objArrayHandle results);
  68   // bit values for suppress argument to expand_MemberName:
  69   enum { _suppress_defc = 1, _suppress_name = 2, _suppress_type = 4 };
  70 
  71   // Generate MethodHandles adapters.
  72                               static void generate_adapters();
  73 
  74   // Called from MethodHandlesAdapterGenerator.
  75   static address generate_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid);
  76   static void generate_method_handle_dispatch(MacroAssembler* _masm,
  77                                               vmIntrinsics::ID iid,
  78                                               Register receiver_reg,
  79                                               Register member_reg,
  80                                               bool for_compiler_entry);
  81 
  82   // Queries
  83   static bool is_signature_polymorphic(vmIntrinsics::ID iid) {
  84     return (iid >= vmIntrinsics::FIRST_MH_SIG_POLY &&
  85             iid <= vmIntrinsics::LAST_MH_SIG_POLY);
  86   }
  87 
  88   static bool is_signature_polymorphic_intrinsic(vmIntrinsics::ID iid) {
  89     assert(is_signature_polymorphic(iid), "");
  90     // Most sig-poly methods are intrinsics which do not require an
  91     // appeal to Java for adapter code.
  92     return (iid != vmIntrinsics::_invokeGeneric);




  52   // utility functions for reifying names and types
  53   static oop field_name_or_null(Symbol* s);
  54   static oop field_signature_type_or_null(Symbol* s);
  55 
  56  public:
  57   // working with member names
  58   static Handle resolve_MemberName(Handle mname, KlassHandle caller, TRAPS); // compute vmtarget/vmindex from name/type
  59   static void expand_MemberName(Handle mname, int suppress, TRAPS);  // expand defc/name/type if missing
  60   static Handle new_MemberName(TRAPS);  // must be followed by init_MemberName
  61   static oop init_MemberName(Handle mname_h, Handle target_h); // compute vmtarget/vmindex from target
  62   static oop init_field_MemberName(Handle mname_h, fieldDescriptor& fd, bool is_setter = false);
  63   static oop init_method_MemberName(Handle mname_h, CallInfo& info);
  64   static int method_ref_kind(Method* m, bool do_dispatch_if_possible = true);
  65   static int find_MemberNames(KlassHandle k, Symbol* name, Symbol* sig,
  66                               int mflags, KlassHandle caller,
  67                               int skip, objArrayHandle results);
  68   // bit values for suppress argument to expand_MemberName:
  69   enum { _suppress_defc = 1, _suppress_name = 2, _suppress_type = 4 };
  70 
  71   // Generate MethodHandles adapters.
  72   static bool generate_adapters();
  73 
  74   // Called from MethodHandlesAdapterGenerator.
  75   static address generate_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid);
  76   static void generate_method_handle_dispatch(MacroAssembler* _masm,
  77                                               vmIntrinsics::ID iid,
  78                                               Register receiver_reg,
  79                                               Register member_reg,
  80                                               bool for_compiler_entry);
  81 
  82   // Queries
  83   static bool is_signature_polymorphic(vmIntrinsics::ID iid) {
  84     return (iid >= vmIntrinsics::FIRST_MH_SIG_POLY &&
  85             iid <= vmIntrinsics::LAST_MH_SIG_POLY);
  86   }
  87 
  88   static bool is_signature_polymorphic_intrinsic(vmIntrinsics::ID iid) {
  89     assert(is_signature_polymorphic(iid), "");
  90     // Most sig-poly methods are intrinsics which do not require an
  91     // appeal to Java for adapter code.
  92     return (iid != vmIntrinsics::_invokeGeneric);


src/share/vm/prims/methodHandles.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File