< prev index next >
src/share/vm/ci/ciValueKlass.cpp
Print this page
rev 10513 : reviews
*** 90,94 ****
--- 90,110 ----
// Offset of the first field in the value type
int ciValueKlass::get_first_field_offset() const {
valueKlassHandle vklass_h(ValueKlass::cast(get_Klass()));
return vklass_h()->first_field_offset();
}
+
+ // When passing field's fields as arguments, count the number of extra
+ // argument slots that are needed
+ int ciValueKlass::extra_value_args() {
+ // -1 because we count the number of extra args
+ int vt_extra = nof_nonstatic_fields() - 1;
+ for (int j = 0; j < nof_nonstatic_fields(); j++) {
+ ciField* f = nonstatic_field_at(j);
+ BasicType bt = f->type()->basic_type();
+ assert(bt != T_VALUETYPE, "embedded");
+ if (bt == T_LONG || bt == T_DOUBLE) {
+ vt_extra++;
+ }
+ }
+ return vt_extra;
+ }
< prev index next >