src/share/vm/opto/locknode.cpp

Print this page


   1 /*
   2  * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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 "incls/_precompiled.incl"
  26 #include "incls/_locknode.cpp.incl"



  27 
  28 //=============================================================================
  29 const RegMask &BoxLockNode::in_RegMask(uint i) const {
  30   return _inmask;
  31 }
  32 
  33 const RegMask &BoxLockNode::out_RegMask() const {
  34   return *Matcher::idealreg2regmask[Op_RegP];
  35 }
  36 
  37 uint BoxLockNode::size_of() const { return sizeof(*this); }
  38 
  39 BoxLockNode::BoxLockNode( int slot ) : Node( Compile::current()->root() ),
  40                                        _slot(slot), _is_eliminated(false) {
  41   init_class_id(Class_BoxLock);
  42   init_flags(Flag_rematerialize);
  43   OptoReg::Name reg = OptoReg::stack2reg(_slot);
  44   _inmask.Insert(reg);
  45 }
  46 


   1 /*
   2  * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  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