< prev index next >

src/share/vm/ci/ciValueKlass.cpp

Print this page
rev 10513 : fix incremental inlining with value types


 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 field's fields as arguments, count the number of extra
 137 // argument slots that are needed
 138 int ciValueKlass::extra_value_args() {
 139   // -1 because we count the number of extra args
 140   int vt_extra = nof_nonstatic_fields() - 1;
 141   for (int j = 0; j < nof_nonstatic_fields(); j++) {
 142     ciField* f = nonstatic_field_at(j);
 143     BasicType bt = f->type()->basic_type();
 144     assert(bt != T_VALUETYPE, "embedded");
 145     if (bt == T_LONG || bt == T_DOUBLE) {
 146       vt_extra++;
 147     }
 148   }
 149   return vt_extra;
 150 }


 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 }
< prev index next >