< prev index next >

src/hotspot/share/opto/parse1.cpp

Print this page




 596 
 597   if (depth() == 1 && !failing()) {
 598     // Add check to deoptimize the nmethod if RTM state was changed
 599     rtm_deopt();
 600   }
 601 
 602   // Check for bailouts during method entry or RTM state check setup.
 603   if (failing()) {
 604     if (log)  log->done("parse");
 605     C->set_default_node_notes(caller_nn);
 606     return;
 607   }
 608 
 609   // Handle value type arguments
 610   int arg_size_sig = tf()->domain_sig()->cnt();
 611   for (uint i = 0; i < (uint)arg_size_sig; i++) {
 612     Node* parm = map()->in(i);
 613     const Type* t = _gvn.type(parm);
 614     if (t->is_valuetypeptr()) {
 615       // Create ValueTypeNode from the oop and replace the parameter
 616       Node* null_ctl = top();
 617       Node* not_null_obj = null_check_common(parm, T_VALUETYPE, false, &null_ctl, false);
 618       if (null_ctl != top()) {
 619         // TODO For now, we just deoptimize if value type is NULL
 620         PreserveJVMState pjvms(this);
 621         set_control(null_ctl);
 622         replace_in_map(parm, null());
 623         uncommon_trap(Deoptimization::Reason_null_check, Deoptimization::Action_none);
 624       }
 625       // Value type oop may point to the TLVB
 626       Node* vt = ValueTypeNode::make_from_oop(this, not_null_obj, t->value_klass(), /* null_check */ false, /* buffer_check */ true);
 627       map()->replace_edge(parm, vt);
 628     }
 629   }
 630 
 631   entry_map = map();  // capture any changes performed by method setup code
 632   assert(jvms()->endoff() == map()->req(), "map matches JVMS layout");
 633 
 634   // We begin parsing as if we have just encountered a jump to the
 635   // method entry.
 636   Block* entry_block = start_block();
 637   assert(entry_block->start() == (is_osr_parse() ? osr_bci() : 0), "");
 638   set_map_clone(entry_map);
 639   merge_common(entry_block, entry_block->next_path_num());
 640 
 641 #ifndef PRODUCT
 642   BytecodeParseHistogram *parse_histogram_obj = new (C->env()->arena()) BytecodeParseHistogram(this, C);
 643   set_parse_histogram( parse_histogram_obj );
 644 #endif
 645 
 646   // Parse all the basic blocks.




 596 
 597   if (depth() == 1 && !failing()) {
 598     // Add check to deoptimize the nmethod if RTM state was changed
 599     rtm_deopt();
 600   }
 601 
 602   // Check for bailouts during method entry or RTM state check setup.
 603   if (failing()) {
 604     if (log)  log->done("parse");
 605     C->set_default_node_notes(caller_nn);
 606     return;
 607   }
 608 
 609   // Handle value type arguments
 610   int arg_size_sig = tf()->domain_sig()->cnt();
 611   for (uint i = 0; i < (uint)arg_size_sig; i++) {
 612     Node* parm = map()->in(i);
 613     const Type* t = _gvn.type(parm);
 614     if (t->is_valuetypeptr()) {
 615       // Create ValueTypeNode from the oop and replace the parameter
 616       Node* vt = ValueTypeNode::make_from_oop(this, parm, t->value_klass(), /* null_check */ false, /* buffer_check */ true);










 617       map()->replace_edge(parm, vt);
 618     }
 619   }
 620 
 621   entry_map = map();  // capture any changes performed by method setup code
 622   assert(jvms()->endoff() == map()->req(), "map matches JVMS layout");
 623 
 624   // We begin parsing as if we have just encountered a jump to the
 625   // method entry.
 626   Block* entry_block = start_block();
 627   assert(entry_block->start() == (is_osr_parse() ? osr_bci() : 0), "");
 628   set_map_clone(entry_map);
 629   merge_common(entry_block, entry_block->next_path_num());
 630 
 631 #ifndef PRODUCT
 632   BytecodeParseHistogram *parse_histogram_obj = new (C->env()->arena()) BytecodeParseHistogram(this, C);
 633   set_parse_histogram( parse_histogram_obj );
 634 #endif
 635 
 636   // Parse all the basic blocks.


< prev index next >