< prev index next >

src/hotspot/share/opto/valuetypenode.hpp

Print this page




 141 
 142   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
 143   virtual int Opcode() const;
 144 };
 145 
 146 //------------------------------ValueTypePtrNode-------------------------------------
 147 // Node representing a value type as a pointer in C2 IR
 148 class ValueTypePtrNode : public ValueTypeBaseNode {
 149 private:
 150   const TypeInstPtr* value_ptr() const { return type()->isa_instptr(); }
 151   ciValueKlass* value_klass() const { return value_ptr()->value_klass(); }
 152 
 153   ValueTypePtrNode(ciValueKlass* vk, Node* oop)
 154     : ValueTypeBaseNode(TypeInstPtr::make(TypePtr::NotNull, vk), Values + vk->nof_declared_nonstatic_fields()) {
 155     init_class_id(Class_ValueTypePtr);
 156     init_req(Oop, oop);
 157   }
 158 
 159 public:
 160   // Create and initialize with the values of a ValueTypeNode
 161   static ValueTypePtrNode* make_from_value_type(PhaseGVN& gvn, ValueTypeNode* vt);
 162   // Create and initialize with the result values of a call
 163   static ValueTypePtrNode* make_from_call(GraphKit* kit, ciValueKlass* vk, CallNode* call);
 164   // Create and initialize by loading the field values from an oop
 165   static ValueTypePtrNode* make_from_oop(GraphKit* kit, Node* oop);
 166 
 167   virtual int Opcode() const;
 168 };
 169 
 170 #endif // SHARE_VM_OPTO_VALUETYPENODE_HPP


 141 
 142   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
 143   virtual int Opcode() const;
 144 };
 145 
 146 //------------------------------ValueTypePtrNode-------------------------------------
 147 // Node representing a value type as a pointer in C2 IR
 148 class ValueTypePtrNode : public ValueTypeBaseNode {
 149 private:
 150   const TypeInstPtr* value_ptr() const { return type()->isa_instptr(); }
 151   ciValueKlass* value_klass() const { return value_ptr()->value_klass(); }
 152 
 153   ValueTypePtrNode(ciValueKlass* vk, Node* oop)
 154     : ValueTypeBaseNode(TypeInstPtr::make(TypePtr::NotNull, vk), Values + vk->nof_declared_nonstatic_fields()) {
 155     init_class_id(Class_ValueTypePtr);
 156     init_req(Oop, oop);
 157   }
 158 
 159 public:
 160   // Create and initialize with the values of a ValueTypeNode
 161   static ValueTypePtrNode* make_from_value_type(GraphKit* kit, ValueTypeNode* vt, bool deoptimize_on_exception = false);
 162   // Create and initialize with the result values of a call
 163   static ValueTypePtrNode* make_from_call(GraphKit* kit, ciValueKlass* vk, CallNode* call);
 164   // Create and initialize by loading the field values from an oop
 165   static ValueTypePtrNode* make_from_oop(GraphKit* kit, Node* oop);
 166 
 167   virtual int Opcode() const;
 168 };
 169 
 170 #endif // SHARE_VM_OPTO_VALUETYPENODE_HPP
< prev index next >