src/hotspot/share/oops/method.hpp
branchdatagramsocketimpl-branch
changeset 58678 9cf78a70fa4f
parent 55005 9b70ebd131b4
child 58679 9c3209ff7550
equal deleted inserted replaced
58677:13588c901957 58678:9cf78a70fa4f
   489   }
   489   }
   490 
   490 
   491   address get_i2c_entry();
   491   address get_i2c_entry();
   492   address get_c2i_entry();
   492   address get_c2i_entry();
   493   address get_c2i_unverified_entry();
   493   address get_c2i_unverified_entry();
       
   494   address get_c2i_no_clinit_check_entry();
   494   AdapterHandlerEntry* adapter() const {
   495   AdapterHandlerEntry* adapter() const {
   495     return constMethod()->adapter();
   496     return constMethod()->adapter();
   496   }
   497   }
   497   // setup entry points
   498   // setup entry points
   498   void link_method(const methodHandle& method, TRAPS);
   499   void link_method(const methodHandle& method, TRAPS);
   540   // native function (used for native methods only)
   541   // native function (used for native methods only)
   541   enum {
   542   enum {
   542     native_bind_event_is_interesting = true
   543     native_bind_event_is_interesting = true
   543   };
   544   };
   544   address native_function() const                { return *(native_function_addr()); }
   545   address native_function() const                { return *(native_function_addr()); }
   545   address critical_native_function();
       
   546 
   546 
   547   // Must specify a real function (not NULL).
   547   // Must specify a real function (not NULL).
   548   // Use clear_native_function() to unregister.
   548   // Use clear_native_function() to unregister.
   549   void set_native_function(address function, bool post_event_flag);
   549   void set_native_function(address function, bool post_event_flag);
   550   bool has_native_function() const;
   550   bool has_native_function() const;
   601   InstanceKlass* method_holder() const         { return constants()->pool_holder(); }
   601   InstanceKlass* method_holder() const         { return constants()->pool_holder(); }
   602 
   602 
   603   void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments)
   603   void compute_size_of_parameters(Thread *thread); // word size of parameters (receiver if any + arguments)
   604   Symbol* klass_name() const;                    // returns the name of the method holder
   604   Symbol* klass_name() const;                    // returns the name of the method holder
   605   BasicType result_type() const;                 // type of the method result
   605   BasicType result_type() const;                 // type of the method result
   606   bool is_returning_oop() const                  { BasicType r = result_type(); return (r == T_OBJECT || r == T_ARRAY); }
   606   bool is_returning_oop() const                  { BasicType r = result_type(); return is_reference_type(r); }
   607   bool is_returning_fp() const                   { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); }
   607   bool is_returning_fp() const                   { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); }
   608 
   608 
   609   // Checked exceptions thrown by this method (resolved to mirrors)
   609   // Checked exceptions thrown by this method (resolved to mirrors)
   610   objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
   610   objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
   611 
   611 
   697 
   697 
   698 #ifdef TIERED
   698 #ifdef TIERED
   699   bool has_aot_code() const                      { return aot_code() != NULL; }
   699   bool has_aot_code() const                      { return aot_code() != NULL; }
   700 #endif
   700 #endif
   701 
   701 
       
   702   bool needs_clinit_barrier() const;
       
   703 
   702   // sizing
   704   // sizing
   703   static int header_size()                       {
   705   static int header_size()                       {
   704     return align_up((int)sizeof(Method), wordSize) / wordSize;
   706     return align_up((int)sizeof(Method), wordSize) / wordSize;
   705   }
   707   }
   706   static int size(bool is_native);
   708   static int size(bool is_native);
   941 
   943 
   942   // Indicates whether compilation failed earlier for this method, or
   944   // Indicates whether compilation failed earlier for this method, or
   943   // whether it is not compilable for another reason like having a
   945   // whether it is not compilable for another reason like having a
   944   // breakpoint set in it.
   946   // breakpoint set in it.
   945   bool  is_not_compilable(int comp_level = CompLevel_any) const;
   947   bool  is_not_compilable(int comp_level = CompLevel_any) const;
   946   void set_not_compilable(int comp_level = CompLevel_all, bool report = true, const char* reason = NULL);
   948   void set_not_compilable(const char* reason, int comp_level = CompLevel_all, bool report = true);
   947   void set_not_compilable_quietly(int comp_level = CompLevel_all) {
   949   void set_not_compilable_quietly(const char* reason, int comp_level = CompLevel_all) {
   948     set_not_compilable(comp_level, false);
   950     set_not_compilable(reason, comp_level, false);
   949   }
   951   }
   950   bool  is_not_osr_compilable(int comp_level = CompLevel_any) const;
   952   bool  is_not_osr_compilable(int comp_level = CompLevel_any) const;
   951   void set_not_osr_compilable(int comp_level = CompLevel_all, bool report = true, const char* reason = NULL);
   953   void set_not_osr_compilable(const char* reason, int comp_level = CompLevel_all, bool report = true);
   952   void set_not_osr_compilable_quietly(int comp_level = CompLevel_all) {
   954   void set_not_osr_compilable_quietly(const char* reason, int comp_level = CompLevel_all) {
   953     set_not_osr_compilable(comp_level, false);
   955     set_not_osr_compilable(reason, comp_level, false);
   954   }
   956   }
   955   bool is_always_compilable() const;
   957   bool is_always_compilable() const;
   956 
   958 
   957  private:
   959  private:
   958   void print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason);
   960   void print_made_not_compilable(int comp_level, bool is_osr, bool report, const char* reason);
  1001   // Helper routine used for method sorting
  1003   // Helper routine used for method sorting
  1002   static void sort_methods(Array<Method*>* methods, bool set_idnums = true);
  1004   static void sort_methods(Array<Method*>* methods, bool set_idnums = true);
  1003 
  1005 
  1004   // Deallocation function for redefine classes or if an error occurs
  1006   // Deallocation function for redefine classes or if an error occurs
  1005   void deallocate_contents(ClassLoaderData* loader_data);
  1007   void deallocate_contents(ClassLoaderData* loader_data);
       
  1008 
       
  1009   void release_C_heap_structures();
  1006 
  1010 
  1007   Method* get_new_method() const {
  1011   Method* get_new_method() const {
  1008     InstanceKlass* holder = method_holder();
  1012     InstanceKlass* holder = method_holder();
  1009     Method* new_method = holder->method_with_idnum(orig_method_idnum());
  1013     Method* new_method = holder->method_with_idnum(orig_method_idnum());
  1010 
  1014