src/share/vm/opto/callnode.hpp

changeset 498
eac007780a58
parent 474
76256d272075
child 500
99269dbf4ba8
     1.1 --- a/src/share/vm/opto/callnode.hpp	Thu Mar 13 05:40:44 2008 -0700
     1.2 +++ b/src/share/vm/opto/callnode.hpp	Thu Mar 13 16:06:34 2008 -0700
     1.3 @@ -184,6 +184,7 @@
     1.4    uint              _locoff;    // Offset to locals in input edge mapping
     1.5    uint              _stkoff;    // Offset to stack in input edge mapping
     1.6    uint              _monoff;    // Offset to monitors in input edge mapping
     1.7 +  uint              _scloff;    // Offset to fields of scalar objs in input edge mapping
     1.8    uint              _endoff;    // Offset to end of input edge mapping
     1.9    uint              _sp;        // Jave Expression Stack Pointer for this state
    1.10    int               _bci;       // Byte Code Index of this JVM point
    1.11 @@ -207,16 +208,19 @@
    1.12    uint              stkoff() const { return _stkoff; }
    1.13    uint              argoff() const { return _stkoff + _sp; }
    1.14    uint              monoff() const { return _monoff; }
    1.15 +  uint              scloff() const { return _scloff; }
    1.16    uint              endoff() const { return _endoff; }
    1.17    uint              oopoff() const { return debug_end(); }
    1.18  
    1.19    int            loc_size() const { return _stkoff - _locoff; }
    1.20    int            stk_size() const { return _monoff - _stkoff; }
    1.21 -  int            mon_size() const { return _endoff - _monoff; }
    1.22 +  int            mon_size() const { return _scloff - _monoff; }
    1.23 +  int            scl_size() const { return _endoff - _scloff; }
    1.24  
    1.25    bool        is_loc(uint i) const { return i >= _locoff && i < _stkoff; }
    1.26    bool        is_stk(uint i) const { return i >= _stkoff && i < _monoff; }
    1.27 -  bool        is_mon(uint i) const { return i >= _monoff && i < _endoff; }
    1.28 +  bool        is_mon(uint i) const { return i >= _monoff && i < _scloff; }
    1.29 +  bool        is_scl(uint i) const { return i >= _scloff && i < _endoff; }
    1.30  
    1.31    uint              sp()     const { return _sp; }
    1.32    int               bci()    const { return _bci; }
    1.33 @@ -227,7 +231,9 @@
    1.34    uint              depth()  const { return _depth; }
    1.35    uint        debug_start()  const; // returns locoff of root caller
    1.36    uint        debug_end()    const; // returns endoff of self
    1.37 -  uint        debug_size()   const { return loc_size() + sp() + mon_size(); }
    1.38 +  uint        debug_size()   const {
    1.39 +    return loc_size() + sp() + mon_size() + scl_size();
    1.40 +  }
    1.41    uint        debug_depth()  const; // returns sum of debug_size values at all depths
    1.42  
    1.43    // Returns the JVM state at the desired depth (1 == root).
    1.44 @@ -254,8 +260,11 @@
    1.45    void              set_locoff(uint off) { _locoff = off; }
    1.46    void              set_stkoff(uint off) { _stkoff = off; }
    1.47    void              set_monoff(uint off) { _monoff = off; }
    1.48 +  void              set_scloff(uint off) { _scloff = off; }
    1.49    void              set_endoff(uint off) { _endoff = off; }
    1.50 -  void              set_offsets(uint off) { _locoff = _stkoff = _monoff = _endoff = off; }
    1.51 +  void              set_offsets(uint off) {
    1.52 +    _locoff = _stkoff = _monoff = _scloff = _endoff = off;
    1.53 +  }
    1.54    void              set_map(SafePointNode *map) { _map = map; }
    1.55    void              set_sp(uint sp) { _sp = sp; }
    1.56    void              set_bci(int bci) { _bci = bci; }
    1.57 @@ -399,6 +408,47 @@
    1.58  #endif
    1.59  };
    1.60  
    1.61 +//------------------------------SafePointScalarObjectNode----------------------
    1.62 +// A SafePointScalarObjectNode represents the state of a scalarized object
    1.63 +// at a safepoint.
    1.64 +
    1.65 +class SafePointScalarObjectNode: public TypeNode {
    1.66 +  uint _first_index; // First input edge index of a SafePoint node where
    1.67 +                     // states of the scalarized object fields are collected.
    1.68 +  uint _n_fields;    // Number of non-static fields of the scalarized object.
    1.69 +  DEBUG_ONLY(AllocateNode* _alloc);
    1.70 +public:
    1.71 +  SafePointScalarObjectNode(const TypeOopPtr* tp,
    1.72 +#ifdef ASSERT
    1.73 +                            AllocateNode* alloc,
    1.74 +#endif
    1.75 +                            uint first_index, uint n_fields);
    1.76 +  virtual int Opcode() const;
    1.77 +  virtual uint           ideal_reg() const;
    1.78 +  virtual const RegMask &in_RegMask(uint) const;
    1.79 +  virtual const RegMask &out_RegMask() const;
    1.80 +  virtual uint           match_edge(uint idx) const;
    1.81 +
    1.82 +  uint first_index() const { return _first_index; }
    1.83 +  uint n_fields()    const { return _n_fields; }
    1.84 +  DEBUG_ONLY(AllocateNode* alloc() const { return _alloc; })
    1.85 +
    1.86 +  virtual uint size_of() const { return sizeof(*this); }
    1.87 +
    1.88 +  // Assumes that "this" is an argument to a safepoint node "s", and that
    1.89 +  // "new_call" is being created to correspond to "s".  But the difference
    1.90 +  // between the start index of the jvmstates of "new_call" and "s" is
    1.91 +  // "jvms_adj".  Produce and return a SafePointScalarObjectNode that
    1.92 +  // corresponds appropriately to "this" in "new_call".  Assumes that
    1.93 +  // "sosn_map" is a map, specific to the translation of "s" to "new_call",
    1.94 +  // mapping old SafePointScalarObjectNodes to new, to avoid multiple copies.
    1.95 +  SafePointScalarObjectNode* clone(int jvms_adj, Dict* sosn_map) const;
    1.96 +
    1.97 +#ifndef PRODUCT
    1.98 +  virtual void              dump_spec(outputStream *st) const;
    1.99 +#endif
   1.100 +};
   1.101 +
   1.102  //------------------------------CallNode---------------------------------------
   1.103  // Call nodes now subsume the function of debug nodes at callsites, so they
   1.104  // contain the functionality of a full scope chain of debug nodes.

mercurial