< prev index next >

src/share/vm/opto/parse2.cpp

Print this page




  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   dec_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, MemNode::unordered);





  54   push(ld);
  55 }
  56 
  57 
  58 //--------------------------------array_store----------------------------------
  59 void Parse::array_store(BasicType elem_type) {
  60   const Type* elem = Type::TOP;
  61   Node* adr = array_addressing(elem_type, 1, &elem);
  62   if (stopped())  return;     // guaranteed null or range check
  63   Node* val = pop();
  64   dec_sp(2);                  // Pop array and index
  65   const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
  66   if (elem == TypeInt::BOOL) {
  67     elem_type = T_BOOLEAN;
  68   }
  69   store_to_memory(control(), adr, val, elem_type, adr_type, StoreNode::release_if_reference(elem_type));
  70 }
  71 
  72 
  73 //------------------------------array_addressing-------------------------------




  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 #if INCLUDE_ALL_GCS
  44 #include "gc_implementation/shenandoah/c2/shenandoahBarrierSetC2.hpp"
  45 #endif
  46 
  47 extern int explicit_null_checks_inserted,
  48            explicit_null_checks_elided;
  49 
  50 //---------------------------------array_load----------------------------------
  51 void Parse::array_load(BasicType elem_type) {
  52   const Type* elem = Type::TOP;
  53   Node* adr = array_addressing(elem_type, 0, &elem);
  54   if (stopped())  return;     // guaranteed null or range check
  55   dec_sp(2);                  // Pop array and index
  56   const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
  57   Node* ld = make_load(control(), adr, elem, elem_type, adr_type, MemNode::unordered);
  58 #if INCLUDE_ALL_GCS
  59   if (UseShenandoahGC && (elem_type == T_OBJECT || elem_type == T_ARRAY)) {
  60     ld = ShenandoahBarrierSetC2::bsc2()->load_reference_barrier(this, ld);
  61   }
  62 #endif
  63   push(ld);
  64 }
  65 
  66 
  67 //--------------------------------array_store----------------------------------
  68 void Parse::array_store(BasicType elem_type) {
  69   const Type* elem = Type::TOP;
  70   Node* adr = array_addressing(elem_type, 1, &elem);
  71   if (stopped())  return;     // guaranteed null or range check
  72   Node* val = pop();
  73   dec_sp(2);                  // Pop array and index
  74   const TypeAryPtr* adr_type = TypeAryPtr::get_array_body_type(elem_type);
  75   if (elem == TypeInt::BOOL) {
  76     elem_type = T_BOOLEAN;
  77   }
  78   store_to_memory(control(), adr, val, elem_type, adr_type, StoreNode::release_if_reference(elem_type));
  79 }
  80 
  81 
  82 //------------------------------array_addressing-------------------------------


< prev index next >