< prev index next >

src/share/vm/ci/ciValueKlass.cpp

Print this page
rev 10512 : value type calling convention

@@ -130,5 +130,21 @@
   GUARDED_VM_ENTRY(
     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 >