src/share/vm/opto/parse3.cpp

Print this page




  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 "compiler/compileLog.hpp"
  27 #include "interpreter/linkResolver.hpp"
  28 #include "memory/universe.inline.hpp"
  29 #include "oops/objArrayKlass.hpp"
  30 #include "opto/addnode.hpp"

  31 #include "opto/memnode.hpp"
  32 #include "opto/parse.hpp"
  33 #include "opto/rootnode.hpp"
  34 #include "opto/runtime.hpp"
  35 #include "opto/subnode.hpp"
  36 #include "runtime/deoptimization.hpp"
  37 #include "runtime/handles.inline.hpp"
  38 
  39 //=============================================================================
  40 // Helper methods for _get* and _put* bytecodes
  41 //=============================================================================
  42 bool Parse::static_field_ok_in_clinit(ciField *field, ciMethod *method) {
  43   // Could be the field_holder's <clinit> method, or <clinit> for a subklass.
  44   // Better to check now than to Deoptimize as soon as we execute
  45   assert( field->is_static(), "Only check if field is static");
  46   // is_being_initialized() is too generous.  It allows access to statics
  47   // by threads that are not running the <clinit> before the <clinit> finishes.
  48   // return field->holder()->is_being_initialized();
  49 
  50   // The following restriction is correct but conservative.




  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 "compiler/compileLog.hpp"
  27 #include "interpreter/linkResolver.hpp"
  28 #include "memory/universe.inline.hpp"
  29 #include "oops/objArrayKlass.hpp"
  30 #include "opto/addnode.hpp"
  31 #include "opto/castnode.hpp"
  32 #include "opto/memnode.hpp"
  33 #include "opto/parse.hpp"
  34 #include "opto/rootnode.hpp"
  35 #include "opto/runtime.hpp"
  36 #include "opto/subnode.hpp"
  37 #include "runtime/deoptimization.hpp"
  38 #include "runtime/handles.inline.hpp"
  39 
  40 //=============================================================================
  41 // Helper methods for _get* and _put* bytecodes
  42 //=============================================================================
  43 bool Parse::static_field_ok_in_clinit(ciField *field, ciMethod *method) {
  44   // Could be the field_holder's <clinit> method, or <clinit> for a subklass.
  45   // Better to check now than to Deoptimize as soon as we execute
  46   assert( field->is_static(), "Only check if field is static");
  47   // is_being_initialized() is too generous.  It allows access to statics
  48   // by threads that are not running the <clinit> before the <clinit> finishes.
  49   // return field->holder()->is_being_initialized();
  50 
  51   // The following restriction is correct but conservative.