< prev index next >

src/share/vm/ci/ciValueKlass.cpp

Print this page




 116     valueKlassHandle vklass_h(ValueKlass::cast(get_Klass()));
 117     return vklass_h->field_offset(_field_index_map->at(index));
 118   )
 119 }
 120 
 121 // Returns the field type of the field with the given index
 122 ciType* ciValueKlass::field_type_by_index(int index) {
 123   int offset = field_offset_by_index(index);
 124   VM_ENTRY_MARK;
 125   return get_field_type_by_offset(offset);
 126 }
 127 
 128 // Offset of the first field in the value type
 129 int ciValueKlass::first_field_offset() const {
 130   GUARDED_VM_ENTRY(
 131     valueKlassHandle vklass_h(ValueKlass::cast(get_Klass()));
 132     return vklass_h()->first_field_offset();
 133   )
 134 }
 135 







 136 // When passing a value type's fields as arguments, count the number
 137 // of argument slots that are needed
 138 int ciValueKlass::value_arg_slots() {
 139   int slots = nof_nonstatic_fields();
 140   for (int j = 0; j < nof_nonstatic_fields(); j++) {
 141     ciField* f = nonstatic_field_at(j);
 142     BasicType bt = f->type()->basic_type();
 143     assert(bt != T_VALUETYPE, "embedded");
 144     if (bt == T_LONG || bt == T_DOUBLE) {
 145       slots++;
 146     }
 147   }
 148   return slots;
 149 }


 116     valueKlassHandle vklass_h(ValueKlass::cast(get_Klass()));
 117     return vklass_h->field_offset(_field_index_map->at(index));
 118   )
 119 }
 120 
 121 // Returns the field type of the field with the given index
 122 ciType* ciValueKlass::field_type_by_index(int index) {
 123   int offset = field_offset_by_index(index);
 124   VM_ENTRY_MARK;
 125   return get_field_type_by_offset(offset);
 126 }
 127 
 128 // Offset of the first field in the value type
 129 int ciValueKlass::first_field_offset() const {
 130   GUARDED_VM_ENTRY(
 131     valueKlassHandle vklass_h(ValueKlass::cast(get_Klass()));
 132     return vklass_h()->first_field_offset();
 133   )
 134 }
 135 
 136 bool ciValueKlass::flatten_array() const {
 137   GUARDED_VM_ENTRY(
 138     valueKlassHandle vklass_h(ValueKlass::cast(get_Klass()));
 139     return vklass_h()->flatten_array();
 140   )
 141 }
 142 
 143 // When passing a value type's fields as arguments, count the number
 144 // of argument slots that are needed
 145 int ciValueKlass::value_arg_slots() {
 146   int slots = nof_nonstatic_fields();
 147   for (int j = 0; j < nof_nonstatic_fields(); j++) {
 148     ciField* f = nonstatic_field_at(j);
 149     BasicType bt = f->type()->basic_type();
 150     assert(bt != T_VALUETYPE, "embedded");
 151     if (bt == T_LONG || bt == T_DOUBLE) {
 152       slots++;
 153     }
 154   }
 155   return slots;
 156 }
< prev index next >