< prev index next >

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   // CallSite support
  72   static InstanceKlass* get_call_site_context(oop call_site);



  73 
  74   // Generate MethodHandles adapters.
  75   static bool generate_adapters();
  76 
  77   // Called from MethodHandlesAdapterGenerator.
  78   static address generate_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid);
  79   static void generate_method_handle_dispatch(MacroAssembler* _masm,
  80                                               vmIntrinsics::ID iid,
  81                                               Register receiver_reg,
  82                                               Register member_reg,
  83                                               bool for_compiler_entry);
  84 
  85   // Queries
  86   static bool is_signature_polymorphic(vmIntrinsics::ID iid) {
  87     return (iid >= vmIntrinsics::FIRST_MH_SIG_POLY &&
  88             iid <= vmIntrinsics::LAST_MH_SIG_POLY);
  89   }
  90 
  91   static bool is_signature_polymorphic_intrinsic(vmIntrinsics::ID iid) {
  92     assert(is_signature_polymorphic(iid), "");




  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   // CallSite support
  72   static void add_dependent_nmethod(oop call_site, nmethod* nm);
  73   static void remove_dependent_nmethod(oop call_site, nmethod* nm);
  74 
  75   static void flush_dependent_nmethods(Handle call_site, Handle target);
  76 
  77   // Generate MethodHandles adapters.
  78   static bool generate_adapters();
  79 
  80   // Called from MethodHandlesAdapterGenerator.
  81   static address generate_method_handle_interpreter_entry(MacroAssembler* _masm, vmIntrinsics::ID iid);
  82   static void generate_method_handle_dispatch(MacroAssembler* _masm,
  83                                               vmIntrinsics::ID iid,
  84                                               Register receiver_reg,
  85                                               Register member_reg,
  86                                               bool for_compiler_entry);
  87 
  88   // Queries
  89   static bool is_signature_polymorphic(vmIntrinsics::ID iid) {
  90     return (iid >= vmIntrinsics::FIRST_MH_SIG_POLY &&
  91             iid <= vmIntrinsics::LAST_MH_SIG_POLY);
  92   }
  93 
  94   static bool is_signature_polymorphic_intrinsic(vmIntrinsics::ID iid) {
  95     assert(is_signature_polymorphic(iid), "");


< prev index next >