< prev index next >

src/hotspot/share/ci/ciValueKlass.cpp

Print this page




  70   return best_index;
  71 }
  72 
  73 // Are arrays containing this value type flattened?
  74 bool ciValueKlass::flatten_array() const {
  75   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->flatten_array();)
  76 }
  77 
  78 // Can this value type be returned as multiple values?
  79 bool ciValueKlass::can_be_returned_as_fields() const {
  80   GUARDED_VM_ENTRY(return !is__Value() && ValueKlass::cast(get_Klass())->return_regs() != NULL;)
  81 }
  82 
  83 // When passing a value type's fields as arguments, count the number
  84 // of argument slots that are needed
  85 int ciValueKlass::value_arg_slots() {
  86   int slots = nof_nonstatic_fields();
  87   for (int j = 0; j < nof_nonstatic_fields(); j++) {
  88     ciField* f = nonstatic_field_at(j);
  89     BasicType bt = f->type()->basic_type();
  90     // TODO re-enable when using T_VALUETYPEPTR
  91     //assert(bt != T_VALUETYPE, "embedded");
  92     if (bt == T_LONG || bt == T_DOUBLE) {
  93       slots++;
  94     }
  95   }
  96   return slots;
  97 }


  70   return best_index;
  71 }
  72 
  73 // Are arrays containing this value type flattened?
  74 bool ciValueKlass::flatten_array() const {
  75   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->flatten_array();)
  76 }
  77 
  78 // Can this value type be returned as multiple values?
  79 bool ciValueKlass::can_be_returned_as_fields() const {
  80   GUARDED_VM_ENTRY(return !is__Value() && ValueKlass::cast(get_Klass())->return_regs() != NULL;)
  81 }
  82 
  83 // When passing a value type's fields as arguments, count the number
  84 // of argument slots that are needed
  85 int ciValueKlass::value_arg_slots() {
  86   int slots = nof_nonstatic_fields();
  87   for (int j = 0; j < nof_nonstatic_fields(); j++) {
  88     ciField* f = nonstatic_field_at(j);
  89     BasicType bt = f->type()->basic_type();


  90     if (bt == T_LONG || bt == T_DOUBLE) {
  91       slots++;
  92     }
  93   }
  94   return slots;
  95 }
< prev index next >