< prev index next >

src/hotspot/share/opto/parseHelper.cpp

Print this page


  51   // Get method
  52   const TypePtr* method_type = TypeMetadataPtr::make(method);
  53   Node *method_node = _gvn.transform(ConNode::make(method_type));
  54 
  55   kill_dead_locals();
  56 
  57   // For some reason, this call reads only raw memory.
  58   const TypePtr* raw_adr_type = TypeRawPtr::BOTTOM;
  59   make_runtime_call(RC_LEAF | RC_NARROW_MEM,
  60                     call_type, call_address,
  61                     call_name, raw_adr_type,
  62                     thread, method_node);
  63 }
  64 
  65 
  66 //=============================================================================
  67 //------------------------------do_checkcast-----------------------------------
  68 void Parse::do_checkcast() {
  69   bool will_link;
  70   ciKlass* klass = iter().get_klass(will_link);
  71   bool never_null = iter().get_never_null();
  72 
  73   Node *obj = peek();
  74 
  75   // Throw uncommon trap if class is not loaded or the value we are casting
  76   // _from_ is not loaded, and value is not null.  If the value _is_ NULL,
  77   // then the checkcast does nothing.
  78   const TypeOopPtr *tp = _gvn.type(obj)->isa_oopptr();
  79   if (!will_link || (tp && tp->klass() && !tp->klass()->is_loaded())) {
  80     if (C->log() != NULL) {
  81       if (!will_link) {
  82         C->log()->elem("assert_null reason='checkcast' klass='%d'",
  83                        C->log()->identify(klass));
  84       }
  85       if (tp && tp->klass() && !tp->klass()->is_loaded()) {
  86         // %%% Cannot happen?
  87         C->log()->elem("assert_null reason='checkcast source' klass='%d'",
  88                        C->log()->identify(tp->klass()));
  89       }
  90     }
  91     null_assert(obj);




  51   // Get method
  52   const TypePtr* method_type = TypeMetadataPtr::make(method);
  53   Node *method_node = _gvn.transform(ConNode::make(method_type));
  54 
  55   kill_dead_locals();
  56 
  57   // For some reason, this call reads only raw memory.
  58   const TypePtr* raw_adr_type = TypeRawPtr::BOTTOM;
  59   make_runtime_call(RC_LEAF | RC_NARROW_MEM,
  60                     call_type, call_address,
  61                     call_name, raw_adr_type,
  62                     thread, method_node);
  63 }
  64 
  65 
  66 //=============================================================================
  67 //------------------------------do_checkcast-----------------------------------
  68 void Parse::do_checkcast() {
  69   bool will_link;
  70   ciKlass* klass = iter().get_klass(will_link);
  71   bool never_null = iter().is_klass_never_null();
  72 
  73   Node *obj = peek();
  74 
  75   // Throw uncommon trap if class is not loaded or the value we are casting
  76   // _from_ is not loaded, and value is not null.  If the value _is_ NULL,
  77   // then the checkcast does nothing.
  78   const TypeOopPtr *tp = _gvn.type(obj)->isa_oopptr();
  79   if (!will_link || (tp && tp->klass() && !tp->klass()->is_loaded())) {
  80     if (C->log() != NULL) {
  81       if (!will_link) {
  82         C->log()->elem("assert_null reason='checkcast' klass='%d'",
  83                        C->log()->identify(klass));
  84       }
  85       if (tp && tp->klass() && !tp->klass()->is_loaded()) {
  86         // %%% Cannot happen?
  87         C->log()->elem("assert_null reason='checkcast source' klass='%d'",
  88                        C->log()->identify(tp->klass()));
  89       }
  90     }
  91     null_assert(obj);


< prev index next >