< prev index next >

src/share/vm/opto/locknode.cpp

Print this page




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/locknode.hpp"
  27 #include "opto/parse.hpp"
  28 #include "opto/rootnode.hpp"
  29 #include "opto/runtime.hpp"
  30 
  31 //=============================================================================
  32 const RegMask &BoxLockNode::in_RegMask(uint i) const {
  33   return _inmask;
  34 }
  35 
  36 const RegMask &BoxLockNode::out_RegMask() const {
  37   return *Matcher::idealreg2regmask[Op_RegP];
  38 }
  39 
  40 uint BoxLockNode::size_of() const { return sizeof(*this); }
  41 
  42 BoxLockNode::BoxLockNode( int slot ) : Node( Compile::current()->root() ),
  43                                        _slot(slot), _is_eliminated(false) {
  44   init_class_id(Class_BoxLock);
  45   init_flags(Flag_rematerialize);
  46   OptoReg::Name reg = OptoReg::stack2reg(_slot);
  47   _inmask.Insert(reg);
  48 }
  49 
  50 //-----------------------------hash--------------------------------------------
  51 uint BoxLockNode::hash() const {
  52   if (EliminateNestedLocks)
  53     return NO_HASH; // Each locked region has own BoxLock node
  54   return Node::hash() + _slot + (_is_eliminated ? Compile::current()->fixed_slots() : 0);
  55 }
  56 
  57 //------------------------------cmp--------------------------------------------




  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "opto/locknode.hpp"
  27 #include "opto/parse.hpp"
  28 #include "opto/rootnode.hpp"
  29 #include "opto/runtime.hpp"
  30 
  31 //=============================================================================
  32 const RegMask &BoxLockNode::in_RegMask(uint i) const {
  33   return _inmask;
  34 }
  35 
  36 const RegMask &BoxLockNode::out_RegMask() const {
  37   return *Matcher::idealreg2regmask[static_cast<uint>(Opcodes::Op_RegP)];
  38 }
  39 
  40 uint BoxLockNode::size_of() const { return sizeof(*this); }
  41 
  42 BoxLockNode::BoxLockNode( int slot ) : Node( Compile::current()->root() ),
  43                                        _slot(slot), _is_eliminated(false) {
  44   init_class_id(Class_BoxLock);
  45   init_flags(Flag_rematerialize);
  46   OptoReg::Name reg = OptoReg::stack2reg(_slot);
  47   _inmask.Insert(reg);
  48 }
  49 
  50 //-----------------------------hash--------------------------------------------
  51 uint BoxLockNode::hash() const {
  52   if (EliminateNestedLocks)
  53     return NO_HASH; // Each locked region has own BoxLock node
  54   return Node::hash() + _slot + (_is_eliminated ? Compile::current()->fixed_slots() : 0);
  55 }
  56 
  57 //------------------------------cmp--------------------------------------------


< prev index next >