< prev index next >

src/hotspot/share/opto/valuetypenode.hpp

Print this page




  89   bool is_allocated(PhaseGVN* phase) const;
  90 
  91   void replace_call_results(GraphKit* kit, Node* call, Compile* C);
  92 };
  93 
  94 //------------------------------ValueTypeNode-------------------------------------
  95 // Node representing a value type in C2 IR
  96 class ValueTypeNode : public ValueTypeBaseNode {
  97   friend class ValueTypeBaseNode;
  98   friend class ValueTypePtrNode;
  99 private:
 100   ValueTypeNode(const TypeValueType* t, Node* oop)
 101     : ValueTypeBaseNode(t, Values + t->value_klass()->nof_declared_nonstatic_fields()) {
 102     init_class_id(Class_ValueType);
 103     init_req(Oop, oop);
 104   }
 105 
 106   // Checks if the value type is loaded from memory and if so returns the oop
 107   Node* is_loaded(PhaseGVN* phase, ciValueKlass* vk = NULL, Node* base = NULL, int holder_offset = 0);
 108 



 109   const TypeValueTypePtr* value_type_ptr() const { return TypeValueTypePtr::make(TypePtr::BotPTR, value_klass()); }
 110   ciValueKlass* value_klass() const { return type()->is_valuetype()->value_klass(); }
 111 
 112 public:
 113   // Create uninitialized
 114   static ValueTypeNode* make_uninitialized(PhaseGVN& gvn, ciValueKlass* klass);
 115   // Create with default field values
 116   static ValueTypeNode* make_default(PhaseGVN& gvn, ciValueKlass* vk);
 117   // Create and initialize by loading the field values from an oop
 118   static ValueTypeNode* make_from_oop(GraphKit* kit, Node* oop, ciValueKlass* vk, bool null_check = false, bool buffer_check = false);
 119   static ValueTypeNode* make_from_oop(PhaseGVN& gvn, Node*& ctl, Node* mem, Node* oop, ciValueKlass* vk, bool null_check = false, bool buffer_check = false);
 120   // Create and initialize by loading the field values from a flattened field or array
 121   static ValueTypeNode* make_from_flattened(GraphKit* kit, ciValueKlass* vk, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0);
 122   static ValueTypeNode* make_from_flattened(PhaseGVN& gvn, ciValueKlass* vk, Node*& ctl, Node* mem, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0);
 123   // Create and initialize with the inputs or outputs of a MultiNode (method entry or call)
 124   static ValueTypeNode* make_from_multi(PhaseGVN& gvn, Node*& ctl, Node* mem, MultiNode* multi, ciValueKlass* vk, int base_input, bool in);
 125 
 126   // Load the default oop from the java mirror of the given ValueKlass
 127   static Node* load_default_oop(PhaseGVN& gvn, ciValueKlass* vk);
 128 




  89   bool is_allocated(PhaseGVN* phase) const;
  90 
  91   void replace_call_results(GraphKit* kit, Node* call, Compile* C);
  92 };
  93 
  94 //------------------------------ValueTypeNode-------------------------------------
  95 // Node representing a value type in C2 IR
  96 class ValueTypeNode : public ValueTypeBaseNode {
  97   friend class ValueTypeBaseNode;
  98   friend class ValueTypePtrNode;
  99 private:
 100   ValueTypeNode(const TypeValueType* t, Node* oop)
 101     : ValueTypeBaseNode(t, Values + t->value_klass()->nof_declared_nonstatic_fields()) {
 102     init_class_id(Class_ValueType);
 103     init_req(Oop, oop);
 104   }
 105 
 106   // Checks if the value type is loaded from memory and if so returns the oop
 107   Node* is_loaded(PhaseGVN* phase, ciValueKlass* vk = NULL, Node* base = NULL, int holder_offset = 0);
 108 
 109   // Checks if the value type fields are all set to default values
 110   bool is_default(PhaseGVN& gvn) const;
 111 
 112   const TypeValueTypePtr* value_type_ptr() const { return TypeValueTypePtr::make(TypePtr::BotPTR, value_klass()); }
 113   ciValueKlass* value_klass() const { return type()->is_valuetype()->value_klass(); }
 114 
 115 public:
 116   // Create uninitialized
 117   static ValueTypeNode* make_uninitialized(PhaseGVN& gvn, ciValueKlass* klass);
 118   // Create with default field values
 119   static ValueTypeNode* make_default(PhaseGVN& gvn, ciValueKlass* vk);
 120   // Create and initialize by loading the field values from an oop
 121   static ValueTypeNode* make_from_oop(GraphKit* kit, Node* oop, ciValueKlass* vk, bool null_check = false, bool buffer_check = false);
 122   static ValueTypeNode* make_from_oop(PhaseGVN& gvn, Node*& ctl, Node* mem, Node* oop, ciValueKlass* vk, bool null_check = false, bool buffer_check = false);
 123   // Create and initialize by loading the field values from a flattened field or array
 124   static ValueTypeNode* make_from_flattened(GraphKit* kit, ciValueKlass* vk, Node* obj, Node* ptr, ciInstanceKlass* holder = NULL, int holder_offset = 0);
 125   static ValueTypeNode* make_from_flattened(PhaseGVN& gvn, ciValueKlass* vk, Node*& ctl, Node* mem, 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(PhaseGVN& gvn, Node*& ctl, Node* mem, MultiNode* multi, ciValueKlass* vk, int base_input, bool in);
 128 
 129   // Load the default oop from the java mirror of the given ValueKlass
 130   static Node* load_default_oop(PhaseGVN& gvn, ciValueKlass* vk);
 131 


< prev index next >