< prev index next >

src/hotspot/share/oops/method.hpp

Print this page
@@ -88,11 +88,14 @@
      _dont_inline           = 1 << 2,
      _hidden                = 1 << 3,
      _has_injected_profile  = 1 << 4,
      _intrinsic_candidate   = 1 << 5,
      _reserved_stack_access = 1 << 6,
-     _scoped                = 1 << 7
+     _scalarized_args       = 1 << 7,
+     _c1_needs_stack_repair = 1 << 8,
+     _c2_needs_stack_repair = 1 << 9,
+     _scoped                = 1 << 10
    };
    mutable u2 _flags;
  
    JFR_ONLY(DEFINE_TRACE_FLAG;)
  

@@ -101,11 +104,13 @@
  #endif
    // Entry point for calling both from and to the interpreter.
    address _i2i_entry;           // All-args-on-stack calling convention
    // Entry point for calling from compiled code, to compiled code if it exists
    // or else the interpreter.
-   volatile address _from_compiled_entry;        // Cache of: _code ? _code->entry_point() : _adapter->c2i_entry()
+   volatile address _from_compiled_entry;           // Cache of: _code ? _code->verified_entry_point()           : _adapter->c2i_entry()
+   volatile address _from_compiled_inline_ro_entry; // Cache of: _code ? _code->verified_inline_ro_entry_point() : _adapter->c2i_inline_ro_entry()
+   volatile address _from_compiled_inline_entry;    // Cache of: _code ? _code->verified_inline_entry_point()    : _adapter->c2i_inline_entry()
    // The entry point for calling both from and to compiled code is
    // "_code->entry_point()".  Because of tiered compilation and de-opt, this
    // field can come and go.  It can transition from NULL to not-null at any
    // time (whenever a compile completes).  It can transition from not-null to
    // NULL only at safepoints (because of a de-opt).

@@ -136,11 +141,13 @@
    void set_constMethod(ConstMethod* xconst)    { _constMethod = xconst; }
  
  
    static address make_adapters(const methodHandle& mh, TRAPS);
    address from_compiled_entry() const;
-   address from_compiled_entry_no_trampoline() const;
+   address from_compiled_inline_ro_entry() const;
+   address from_compiled_inline_entry() const;
+   address from_compiled_entry_no_trampoline(bool caller_is_c1) const;
    address from_interpreted_entry() const;
  
    // access flag
    AccessFlags access_flags() const               { return _access_flags;  }
    void set_access_flags(AccessFlags flags)       { _access_flags = flags; }

@@ -430,10 +437,12 @@
    // if this (shared) method were mapped into another JVM.
    void remove_unshareable_info();
  
    // nmethod/verified compiler entry
    address verified_code_entry();
+   address verified_inline_code_entry();
+   address verified_inline_ro_code_entry();
    bool check_code() const;      // Not inline to avoid circular ref
    CompiledMethod* volatile code() const;
  
    // Locks CompiledMethod_lock if not held.
    void unlink_code(CompiledMethod *compare);

@@ -448,16 +457,24 @@
    static void set_code(const methodHandle& mh, CompiledMethod* code);
    void set_adapter_entry(AdapterHandlerEntry* adapter) {
      _adapter = adapter;
    }
    void set_from_compiled_entry(address entry) {
-     _from_compiled_entry =  entry;
+     _from_compiled_entry = entry;
+   }
+   void set_from_compiled_inline_ro_entry(address entry) {
+     _from_compiled_inline_ro_entry = entry;
+   }
+   void set_from_compiled_inline_entry(address entry) {
+     _from_compiled_inline_entry = entry;
    }
  
    address get_i2c_entry();
    address get_c2i_entry();
+   address get_c2i_inline_entry();
    address get_c2i_unverified_entry();
+   address get_c2i_unverified_inline_entry();
    address get_c2i_no_clinit_check_entry();
    AdapterHandlerEntry* adapter() const {
      return _adapter;
    }
    // setup entry points

@@ -564,11 +581,11 @@
    InstanceKlass* method_holder() const         { return constants()->pool_holder(); }
  
    Symbol* klass_name() const;                    // returns the name of the method holder
    BasicType result_type() const                  { return constMethod()->result_type(); }
    bool is_returning_oop() const                  { BasicType r = result_type(); return is_reference_type(r); }
-   bool is_returning_fp() const                   { BasicType r = result_type(); return (r == T_FLOAT || r == T_DOUBLE); }
+   InlineKlass* returned_inline_type(Thread* thread) const;
  
    // Checked exceptions thrown by this method (resolved to mirrors)
    objArrayHandle resolved_checked_exceptions(TRAPS) { return resolved_checked_exceptions_impl(this, THREAD); }
  
    // Access flags

@@ -636,22 +653,23 @@
    bool is_setter() const;
  
    // returns true if the method does nothing but return a constant of primitive type
    bool is_constant_getter() const;
  
-   // returns true if the method is an initializer (<init> or <clinit>).
-   bool is_initializer() const;
- 
-   // returns true if the method is static OR if the classfile version < 51
-   bool has_valid_initializer_flags() const;
- 
    // returns true if the method name is <clinit> and the method has
    // valid static initializer flags.
-   bool is_static_initializer() const;
+   bool is_class_initializer() const;
+ 
+   // returns true if the method name is <init> and the method is not a static factory
+   bool is_object_constructor() const;
  
-   // returns true if the method name is <init>
-   bool is_object_initializer() const;
+   // returns true if the method is an object constructor or class initializer
+   // (non-static <init> or <clinit>), but false for factories (static <init>).
+   bool is_object_constructor_or_class_initializer() const;
+ 
+   // returns true if the method name is <init> and the method is static
+   bool is_static_init_factory() const;
  
    // compiled code support
    // NOTE: code() is inherently racy as deopt can be clearing code
    // simultaneously. Use with caution.
    bool has_compiled_code() const;

@@ -669,11 +687,14 @@
  
    // interpreter support
    static ByteSize const_offset()                 { return byte_offset_of(Method, _constMethod       ); }
    static ByteSize access_flags_offset()          { return byte_offset_of(Method, _access_flags      ); }
    static ByteSize from_compiled_offset()         { return byte_offset_of(Method, _from_compiled_entry); }
+   static ByteSize from_compiled_inline_offset()  { return byte_offset_of(Method, _from_compiled_inline_entry); }
+   static ByteSize from_compiled_inline_ro_offset(){ return byte_offset_of(Method, _from_compiled_inline_ro_entry); }
    static ByteSize code_offset()                  { return byte_offset_of(Method, _code); }
+   static ByteSize flags_offset()                 { return byte_offset_of(Method, _flags); }
    static ByteSize method_data_offset()           {
      return byte_offset_of(Method, _method_data);
    }
    static ByteSize method_counters_offset()       {
      return byte_offset_of(Method, _method_counters);

@@ -864,10 +885,34 @@
  
    void set_has_reserved_stack_access(bool x) {
      _flags = x ? (_flags | _reserved_stack_access) : (_flags & ~_reserved_stack_access);
    }
  
+   bool has_scalarized_args() {
+     return (_flags & _scalarized_args) != 0;
+   }
+ 
+   void set_has_scalarized_args(bool x) {
+     _flags = x ? (_flags | _scalarized_args) : (_flags & ~_scalarized_args);
+   }
+ 
+   bool c1_needs_stack_repair() {
+     return (_flags & _c1_needs_stack_repair) != 0;
+   }
+ 
+   bool c2_needs_stack_repair() {
+     return (_flags & _c2_needs_stack_repair) != 0;
+   }
+ 
+   void set_c1_needs_stack_repair(bool x) {
+     _flags = x ? (_flags | _c1_needs_stack_repair) : (_flags & ~_c1_needs_stack_repair);
+   }
+ 
+   void set_c2_needs_stack_repair(bool x) {
+     _flags = x ? (_flags | _c2_needs_stack_repair) : (_flags & ~_c2_needs_stack_repair);
+   }
+ 
    JFR_ONLY(DEFINE_TRACE_FLAG_ACCESSOR;)
  
    ConstMethod::MethodType method_type() const {
        return _constMethod->method_type();
    }
< prev index next >