< prev index next >

src/hotspot/share/c1/c1_IR.hpp

Print this page
*** 143,11 ***
  
    // graph
    XHandlers*    _xhandlers;                      // the exception handlers
    int           _number_of_locks;                // the number of monitor lock slots needed
    bool          _monitor_pairing_ok;             // the monitor pairing info
!   bool          _wrote_final;                    // has written final field
    bool          _wrote_fields;                   // has written fields
    bool          _wrote_volatile;                 // has written volatile field
    bool          _wrote_stable;                   // has written @Stable field
    BlockBegin*   _start;                          // the start block, successsors are method entries
  
--- 143,11 ---
  
    // graph
    XHandlers*    _xhandlers;                      // the exception handlers
    int           _number_of_locks;                // the number of monitor lock slots needed
    bool          _monitor_pairing_ok;             // the monitor pairing info
!   bool          _wrote_non_strict_final;         // has written non-strict final field
    bool          _wrote_fields;                   // has written fields
    bool          _wrote_volatile;                 // has written volatile field
    bool          _wrote_stable;                   // has written @Stable field
    BlockBegin*   _start;                          // the start block, successsors are method entries
  

*** 179,12 ***
    XHandlers*    xhandlers() const                { return _xhandlers; }
    int           number_of_locks() const          { return _number_of_locks; }
    void          set_min_number_of_locks(int n)   { if (n > _number_of_locks) _number_of_locks = n; }
    bool          monitor_pairing_ok() const       { return _monitor_pairing_ok; }
    BlockBegin*   start() const                    { return _start; }
!   void          set_wrote_final()                { _wrote_final = true; }
!   bool          wrote_final    () const          { return _wrote_final; }
    void          set_wrote_fields()               { _wrote_fields = true; }
    bool          wrote_fields    () const         { return _wrote_fields; }
    void          set_wrote_volatile()             { _wrote_volatile = true; }
    bool          wrote_volatile    () const       { return _wrote_volatile; }
    void          set_wrote_stable()               { _wrote_stable = true; }
--- 179,12 ---
    XHandlers*    xhandlers() const                { return _xhandlers; }
    int           number_of_locks() const          { return _number_of_locks; }
    void          set_min_number_of_locks(int n)   { if (n > _number_of_locks) _number_of_locks = n; }
    bool          monitor_pairing_ok() const       { return _monitor_pairing_ok; }
    BlockBegin*   start() const                    { return _start; }
!   void          set_wrote_non_strict_final()     { _wrote_non_strict_final = true; }
!   bool          wrote_non_strict_final() const   { return _wrote_non_strict_final; }
    void          set_wrote_fields()               { _wrote_fields = true; }
    bool          wrote_fields    () const         { return _wrote_fields; }
    void          set_wrote_volatile()             { _wrote_volatile = true; }
    bool          wrote_volatile    () const       { return _wrote_volatile; }
    void          set_wrote_stable()               { _wrote_stable = true; }

*** 206,24 ***
    int                           _bci;
    GrowableArray<ScopeValue*>*   _locals;
    GrowableArray<ScopeValue*>*   _expressions;
    GrowableArray<MonitorValue*>* _monitors;
    IRScopeDebugInfo*             _caller;
  
   public:
    IRScopeDebugInfo(IRScope*                      scope,
                     int                           bci,
                     GrowableArray<ScopeValue*>*   locals,
                     GrowableArray<ScopeValue*>*   expressions,
                     GrowableArray<MonitorValue*>* monitors,
!                    IRScopeDebugInfo*             caller):
        _scope(scope)
      , _bci(bci)
      , _locals(locals)
      , _expressions(expressions)
      , _monitors(monitors)
!     , _caller(caller) {}
  
  
    IRScope*                      scope()       { return _scope;       }
    int                           bci()         { return _bci;         }
    GrowableArray<ScopeValue*>*   locals()      { return _locals;      }
--- 206,27 ---
    int                           _bci;
    GrowableArray<ScopeValue*>*   _locals;
    GrowableArray<ScopeValue*>*   _expressions;
    GrowableArray<MonitorValue*>* _monitors;
    IRScopeDebugInfo*             _caller;
+   bool                          _should_reexecute;
  
   public:
    IRScopeDebugInfo(IRScope*                      scope,
                     int                           bci,
                     GrowableArray<ScopeValue*>*   locals,
                     GrowableArray<ScopeValue*>*   expressions,
                     GrowableArray<MonitorValue*>* monitors,
!                    IRScopeDebugInfo*             caller,
+                    bool                          should_reexecute):
        _scope(scope)
      , _bci(bci)
      , _locals(locals)
      , _expressions(expressions)
      , _monitors(monitors)
!     , _caller(caller)
+     , _should_reexecute(should_reexecute) {}
  
  
    IRScope*                      scope()       { return _scope;       }
    int                           bci()         { return _bci;         }
    GrowableArray<ScopeValue*>*   locals()      { return _locals;      }

*** 232,25 ***
    IRScopeDebugInfo*             caller()      { return _caller;      }
  
    //Whether we should reexecute this bytecode for deopt
    bool should_reexecute();
  
!   void record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool reexecute) {
      if (caller() != nullptr) {
        // Order is significant:  Must record caller first.
        caller()->record_debug_info(recorder, pc_offset, false/*reexecute*/);
      }
      DebugToken* locvals = recorder->create_scope_values(locals());
      DebugToken* expvals = recorder->create_scope_values(expressions());
      DebugToken* monvals = recorder->create_monitor_values(monitors());
      // reexecute allowed only for the topmost frame
!     bool return_oop = false; // This flag will be ignored since it used only for C2 with escape analysis.
      bool rethrow_exception = false;
      bool has_ea_local_in_scope = false;
      bool arg_escape = false;
      recorder->describe_scope(pc_offset, methodHandle(), scope()->method(), bci(),
!                              reexecute, rethrow_exception, return_oop,
                               has_ea_local_in_scope, arg_escape, locvals, expvals, monvals);
    }
  };
  
  
--- 235,30 ---
    IRScopeDebugInfo*             caller()      { return _caller;      }
  
    //Whether we should reexecute this bytecode for deopt
    bool should_reexecute();
  
!   void record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool reexecute, bool maybe_return_as_fields = false) {
      if (caller() != nullptr) {
        // Order is significant:  Must record caller first.
        caller()->record_debug_info(recorder, pc_offset, false/*reexecute*/);
      }
      DebugToken* locvals = recorder->create_scope_values(locals());
      DebugToken* expvals = recorder->create_scope_values(expressions());
      DebugToken* monvals = recorder->create_monitor_values(monitors());
      // reexecute allowed only for the topmost frame
!     bool return_oop = false;
+     bool return_scalarized = false;
+     if (maybe_return_as_fields) {
+       return_oop = true;
+       return_scalarized = true;
+     }
      bool rethrow_exception = false;
      bool has_ea_local_in_scope = false;
      bool arg_escape = false;
      recorder->describe_scope(pc_offset, methodHandle(), scope()->method(), bci(),
!                              reexecute, rethrow_exception, return_oop, return_scalarized,
                               has_ea_local_in_scope, arg_escape, locvals, expvals, monvals);
    }
  };
  
  

*** 283,11 ***
    XHandlers* exception_handlers() const          { return _exception_handlers; }
    ValueStack* stack() const                      { return _stack; }
    bool deoptimize_on_exception() const           { return _deoptimize_on_exception; }
  
    void add_register_oop(LIR_Opr opr);
!   void record_debug_info(DebugInformationRecorder* recorder, int pc_offset);
  
    bool     force_reexecute() const         { return _force_reexecute;             }
    void     set_force_reexecute()           { _force_reexecute = true;             }
  
    int interpreter_frame_size() const;
--- 291,11 ---
    XHandlers* exception_handlers() const          { return _exception_handlers; }
    ValueStack* stack() const                      { return _stack; }
    bool deoptimize_on_exception() const           { return _deoptimize_on_exception; }
  
    void add_register_oop(LIR_Opr opr);
!   void record_debug_info(DebugInformationRecorder* recorder, int pc_offset, bool maybe_return_as_fields = false);
  
    bool     force_reexecute() const         { return _force_reexecute;             }
    void     set_force_reexecute()           { _force_reexecute = true;             }
  
    int interpreter_frame_size() const;
< prev index next >