< prev index next >

src/hotspot/share/opto/callnode.cpp

Print this page
*** 276,10 ***
--- 276,11 ---
    _monoff = _stkoff + _method->max_stack();
    _scloff = _monoff;
    _endoff = _monoff;
    _sp = 0;
  }
+ 
  JVMState::JVMState(int stack_size) :
    _method(nullptr) {
    _bci = InvocationEntryBci;
    _reexecute = Reexecute_Undefined;
    debug_only(_map = (SafePointNode*)-1);

*** 612,10 ***
--- 613,11 ---
    n->set_monoff(_monoff);
    n->set_scloff(_scloff);
    n->set_endoff(_endoff);
    n->set_sp(_sp);
    n->set_map(_map);
+   n->_alloc_state = _alloc_state;
    return n;
  }
  
  //---------------------------clone_deep----------------------------------------
  JVMState* JVMState::clone_deep(Compile* C) const {

*** 1574,11 ***
  uint AllocateNode::size_of() const { return sizeof(*this); }
  
  AllocateNode::AllocateNode(Compile* C, const TypeFunc *atype,
                             Node *ctrl, Node *mem, Node *abio,
                             Node *size, Node *klass_node, Node *initial_test)
!   : CallNode(atype, nullptr, TypeRawPtr::BOTTOM)
  {
    init_class_id(Class_Allocate);
    init_flags(Flag_is_macro);
    _is_scalar_replaceable = false;
    _is_non_escaping = false;
--- 1576,11 ---
  uint AllocateNode::size_of() const { return sizeof(*this); }
  
  AllocateNode::AllocateNode(Compile* C, const TypeFunc *atype,
                             Node *ctrl, Node *mem, Node *abio,
                             Node *size, Node *klass_node, Node *initial_test)
!   : CallNode(atype, nullptr, TypeRawPtr::BOTTOM), _materialized(0)
  {
    init_class_id(Class_Allocate);
    init_flags(Flag_is_macro);
    _is_scalar_replaceable = false;
    _is_non_escaping = false;

*** 1619,10 ***
--- 1621,20 ---
    // For now only enable fast locking for non-array types
    mark_node = phase->MakeConX(markWord::prototype().value());
    return mark_node;
  }
  
+ // This is a precise notnull oop of the klass.
+ // (Actually, it need not be precise if this is a reflective allocation.)
+ // It's what we cast the result to.
+ const TypeOopPtr* AllocateNode::oop_type(const PhaseValues& phase) const {
+   Node* klass_node = in(KlassNode);
+   const TypeKlassPtr* tklass = phase.type(klass_node)->isa_klassptr();
+   if (!tklass) tklass = TypeInstKlassPtr::OBJECT;
+   return tklass->as_instance_type();
+ }
+ 
  // Retrieve the length from the AllocateArrayNode. Narrow the type with a
  // CastII, if appropriate.  If we are not allowed to create new nodes, and
  // a CastII is appropriate, return null.
  Node *AllocateArrayNode::make_ideal_length(const TypeOopPtr* oop_type, PhaseValues* phase, bool allow_new_nodes) {
    Node *length = in(AllocateNode::ALength);
< prev index next >