src/share/vm/opto/parse2.cpp

Print this page




   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/_parse2.cpp.incl"















  27 
  28 extern int explicit_null_checks_inserted,
  29            explicit_null_checks_elided;
  30 
  31 //---------------------------------array_load----------------------------------
  32 void Parse::array_load(BasicType elem_type) {
  33   const Type* elem = Type::TOP;
  34   Node* adr = array_addressing(elem_type, 0, &elem);
  35   if (stopped())  return;     // guaranteed null or range check
  36   _sp -= 2;                   // Pop array and index
  37   const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
  38   Node* ld = make_load(control(), adr, elem, elem_type, adr_type);
  39   push(ld);
  40 }
  41 
  42 
  43 //--------------------------------array_store----------------------------------
  44 void Parse::array_store(BasicType elem_type) {
  45   Node* adr = array_addressing(elem_type, 1);
  46   if (stopped())  return;     // guaranteed null or range check




   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 "ci/ciMethodData.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "classfile/vmSymbols.hpp"
  29 #include "compiler/compileLog.hpp"
  30 #include "interpreter/linkResolver.hpp"
  31 #include "memory/universe.inline.hpp"
  32 #include "opto/addnode.hpp"
  33 #include "opto/divnode.hpp"
  34 #include "opto/idealGraphPrinter.hpp"
  35 #include "opto/matcher.hpp"
  36 #include "opto/memnode.hpp"
  37 #include "opto/mulnode.hpp"
  38 #include "opto/parse.hpp"
  39 #include "opto/runtime.hpp"
  40 #include "runtime/deoptimization.hpp"
  41 #include "runtime/sharedRuntime.hpp"
  42 
  43 extern int explicit_null_checks_inserted,
  44            explicit_null_checks_elided;
  45 
  46 //---------------------------------array_load----------------------------------
  47 void Parse::array_load(BasicType elem_type) {
  48   const Type* elem = Type::TOP;
  49   Node* adr = array_addressing(elem_type, 0, &elem);
  50   if (stopped())  return;     // guaranteed null or range check
  51   _sp -= 2;                   // Pop array and index
  52   const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
  53   Node* ld = make_load(control(), adr, elem, elem_type, adr_type);
  54   push(ld);
  55 }
  56 
  57 
  58 //--------------------------------array_store----------------------------------
  59 void Parse::array_store(BasicType elem_type) {
  60   Node* adr = array_addressing(elem_type, 1);
  61   if (stopped())  return;     // guaranteed null or range check