< prev index next >

src/hotspot/share/opto/valuetypenode.hpp

Print this page




 103     : ValueTypeBaseNode(t, Values + t->value_klass()->nof_declared_nonstatic_fields()) {
 104     init_class_id(Class_ValueType);
 105     init_req(Oop, oop);
 106   }
 107 
 108   // Checks if the value type is loaded from memory and if so returns the oop
 109   Node* is_loaded(PhaseGVN* phase, ciValueKlass* vk = NULL, Node* base = NULL, int holder_offset = 0);
 110 
 111   // Checks if the value type fields are all set to default values
 112   bool is_default(PhaseGVN& gvn) const;
 113 
 114   const TypeInstPtr* value_ptr() const { return TypeInstPtr::make(TypePtr::BotPTR, value_klass()); }
 115   ciValueKlass* value_klass() const { return type()->is_valuetype()->value_klass(); }
 116 
 117 public:
 118   // Create uninitialized
 119   static ValueTypeNode* make_uninitialized(PhaseGVN& gvn, ciValueKlass* klass);
 120   // Create with default field values
 121   static ValueTypeNode* make_default(PhaseGVN& gvn, ciValueKlass* vk);
 122   // Create and initialize by loading the field values from an oop
 123   static ValueTypeNode* make_from_oop(GraphKit* kit, Node* oop, ciValueKlass* vk, bool buffer_check = false, bool null2default = true, int trap_bci = -1);
 124   // Create and initialize by loading the field values from a flattened field or array
 125   static ValueTypeNode* make_from_flattened(GraphKit* kit, ciValueKlass* vk, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0);
 126   // Create and initialize with the inputs or outputs of a MultiNode (method entry or call)
 127   static ValueTypeNode* make_from_multi(GraphKit* kit, MultiNode* multi, ciValueKlass* vk, int base_input, bool in);
 128 
 129   // Returns the constant oop of the default value type allocation
 130   static Node* default_oop(PhaseGVN& gvn, ciValueKlass* vk);
 131 
 132   // Allocate all non-flattened value type fields
 133   Node* allocate_fields(GraphKit* kit);
 134 
 135   Node* tagged_klass(PhaseGVN& gvn);
 136   void pass_klass(Node* n, uint pos, const GraphKit& kit);
 137   uint pass_fields(Node* call, int base_input, GraphKit& kit, bool assert_allocated = false, ciValueKlass* base_vk = NULL, int base_offset = 0);
 138 
 139   // Allocation optimizations
 140   void remove_redundant_allocations(PhaseIterGVN* igvn, PhaseIdealLoop* phase);
 141 
 142   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
 143   virtual int Opcode() const;




 103     : ValueTypeBaseNode(t, Values + t->value_klass()->nof_declared_nonstatic_fields()) {
 104     init_class_id(Class_ValueType);
 105     init_req(Oop, oop);
 106   }
 107 
 108   // Checks if the value type is loaded from memory and if so returns the oop
 109   Node* is_loaded(PhaseGVN* phase, ciValueKlass* vk = NULL, Node* base = NULL, int holder_offset = 0);
 110 
 111   // Checks if the value type fields are all set to default values
 112   bool is_default(PhaseGVN& gvn) const;
 113 
 114   const TypeInstPtr* value_ptr() const { return TypeInstPtr::make(TypePtr::BotPTR, value_klass()); }
 115   ciValueKlass* value_klass() const { return type()->is_valuetype()->value_klass(); }
 116 
 117 public:
 118   // Create uninitialized
 119   static ValueTypeNode* make_uninitialized(PhaseGVN& gvn, ciValueKlass* klass);
 120   // Create with default field values
 121   static ValueTypeNode* make_default(PhaseGVN& gvn, ciValueKlass* vk);
 122   // Create and initialize by loading the field values from an oop
 123   static ValueTypeNode* make_from_oop(GraphKit* kit, Node* oop, ciValueKlass* vk, bool null2default = true, int trap_bci = -1);
 124   // Create and initialize by loading the field values from a flattened field or array
 125   static ValueTypeNode* make_from_flattened(GraphKit* kit, ciValueKlass* vk, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0);
 126   // Create and initialize with the inputs or outputs of a MultiNode (method entry or call)
 127   static ValueTypeNode* make_from_multi(GraphKit* kit, MultiNode* multi, ciValueKlass* vk, int base_input, bool in);
 128 
 129   // Returns the constant oop of the default value type allocation
 130   static Node* default_oop(PhaseGVN& gvn, ciValueKlass* vk);
 131 
 132   // Allocate all non-flattened value type fields
 133   Node* allocate_fields(GraphKit* kit);
 134 
 135   Node* tagged_klass(PhaseGVN& gvn);
 136   void pass_klass(Node* n, uint pos, const GraphKit& kit);
 137   uint pass_fields(Node* call, int base_input, GraphKit& kit, bool assert_allocated = false, ciValueKlass* base_vk = NULL, int base_offset = 0);
 138 
 139   // Allocation optimizations
 140   void remove_redundant_allocations(PhaseIterGVN* igvn, PhaseIdealLoop* phase);
 141 
 142   virtual Node* Ideal(PhaseGVN* phase, bool can_reshape);
 143   virtual int Opcode() const;


< prev index next >