130 do_get_xxx(obj, field, is_field); 131 } else { 132 do_put_xxx(obj, field, is_field); 133 --_sp; // pop receiver after putting 134 } 135 } else { 136 const TypeInstPtr* tip = TypeInstPtr::make(field_holder->java_mirror()); 137 obj = _gvn.makecon(tip); 138 if (is_get) { 139 do_get_xxx(obj, field, is_field); 140 } else { 141 do_put_xxx(obj, field, is_field); 142 } 143 } 144 } 145 146 147 void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) { 148 // Does this field have a constant value? If so, just push the value. 149 if (field->is_constant()) { 150 if (field->is_static()) { 151 // final static field 152 if (push_constant(field->constant_value())) 153 return; 154 } 155 else { 156 // final non-static field of a trusted class (classes in 157 // java.lang.invoke and sun.invoke packages and subpackages). 158 if (obj->is_Con()) { 159 const TypeOopPtr* oop_ptr = obj->bottom_type()->isa_oopptr(); 160 ciObject* constant_oop = oop_ptr->const_oop(); 161 ciConstant constant = field->constant_value_of(constant_oop); 162 163 if (push_constant(constant, true)) 164 return; 165 } 166 } 167 } 168 169 ciType* field_klass = field->type(); 170 bool is_vol = field->is_volatile(); 171 172 // Compute address and memory type. 173 int offset = field->offset_in_bytes(); 174 const TypePtr* adr_type = C->alias_type(field)->adr_type(); 175 Node *adr = basic_plus_adr(obj, obj, offset); 176 BasicType bt = field->layout_type(); 177 178 // Build the resultant type of the load 179 const Type *type; 180 181 bool must_assert_null = false; 182 | 130 do_get_xxx(obj, field, is_field); 131 } else { 132 do_put_xxx(obj, field, is_field); 133 --_sp; // pop receiver after putting 134 } 135 } else { 136 const TypeInstPtr* tip = TypeInstPtr::make(field_holder->java_mirror()); 137 obj = _gvn.makecon(tip); 138 if (is_get) { 139 do_get_xxx(obj, field, is_field); 140 } else { 141 do_put_xxx(obj, field, is_field); 142 } 143 } 144 } 145 146 147 void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) { 148 // Does this field have a constant value? If so, just push the value. 149 if (field->is_constant()) { 150 // final field 151 if (field->is_static()) { 152 // final static field 153 if (push_constant(field->constant_value())) 154 return; 155 } 156 else { 157 // final non-static field 158 // Treat final non-static fields of trusted classes (classes in 159 // java.lang.invoke and sun.invoke packages and subpackages) as 160 // compile time constants. 161 if (obj->is_Con()) { 162 const TypeOopPtr* oop_ptr = obj->bottom_type()->isa_oopptr(); 163 ciObject* constant_oop = oop_ptr->const_oop(); 164 ciConstant constant = field->constant_value_of(constant_oop); 165 if (push_constant(constant, true)) 166 return; 167 } 168 } 169 } 170 171 ciType* field_klass = field->type(); 172 bool is_vol = field->is_volatile(); 173 174 // Compute address and memory type. 175 int offset = field->offset_in_bytes(); 176 const TypePtr* adr_type = C->alias_type(field)->adr_type(); 177 Node *adr = basic_plus_adr(obj, obj, offset); 178 BasicType bt = field->layout_type(); 179 180 // Build the resultant type of the load 181 const Type *type; 182 183 bool must_assert_null = false; 184 |