< prev index next >

src/hotspot/share/ci/ciValueKlass.cpp

Print this page




  64       // flattened value type field that holds the field we are looking for.
  65       best_offset = field_offset;
  66       best_index = i;
  67     }
  68   }
  69   assert(best_index >= 0, "field not found");
  70   assert(best_offset == offset || _declared_nonstatic_fields->at(best_index)->type()->is_valuetype(), "offset should match for non-VTs");
  71   return best_index;
  72 }
  73 
  74 // Are arrays containing this value type flattened?
  75 bool ciValueKlass::flatten_array() const {
  76   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->flatten_array();)
  77 }
  78 
  79 // Can this value type be returned as multiple values?
  80 bool ciValueKlass::can_be_returned_as_fields() const {
  81   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->can_be_returned_as_fields();)
  82 }
  83 
  84 // Can this value type be returned as multiple values?
  85 bool ciValueKlass::is_bufferable() const {
  86   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->is_bufferable();)
  87 }
  88 
  89 // When passing a value type's fields as arguments, count the number
  90 // of argument slots that are needed
  91 int ciValueKlass::value_arg_slots() {
  92   int slots = nof_nonstatic_fields();
  93   for (int j = 0; j < nof_nonstatic_fields(); j++) {
  94     ciField* f = nonstatic_field_at(j);
  95     BasicType bt = f->type()->basic_type();
  96     if (bt == T_LONG || bt == T_DOUBLE) {
  97       slots++;
  98     }
  99   }
 100   return slots;
 101 }
 102 
 103 // Offset of the default oop in the mirror
 104 int ciValueKlass::default_value_offset() const {
 105   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->default_value_offset();)
 106 }
 107 
 108 ciInstance* ciValueKlass::default_value_instance() const {


  64       // flattened value type field that holds the field we are looking for.
  65       best_offset = field_offset;
  66       best_index = i;
  67     }
  68   }
  69   assert(best_index >= 0, "field not found");
  70   assert(best_offset == offset || _declared_nonstatic_fields->at(best_index)->type()->is_valuetype(), "offset should match for non-VTs");
  71   return best_index;
  72 }
  73 
  74 // Are arrays containing this value type flattened?
  75 bool ciValueKlass::flatten_array() const {
  76   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->flatten_array();)
  77 }
  78 
  79 // Can this value type be returned as multiple values?
  80 bool ciValueKlass::can_be_returned_as_fields() const {
  81   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->can_be_returned_as_fields();)
  82 }
  83 





  84 // When passing a value type's fields as arguments, count the number
  85 // of argument slots that are needed
  86 int ciValueKlass::value_arg_slots() {
  87   int slots = nof_nonstatic_fields();
  88   for (int j = 0; j < nof_nonstatic_fields(); j++) {
  89     ciField* f = nonstatic_field_at(j);
  90     BasicType bt = f->type()->basic_type();
  91     if (bt == T_LONG || bt == T_DOUBLE) {
  92       slots++;
  93     }
  94   }
  95   return slots;
  96 }
  97 
  98 // Offset of the default oop in the mirror
  99 int ciValueKlass::default_value_offset() const {
 100   GUARDED_VM_ENTRY(return ValueKlass::cast(get_Klass())->default_value_offset();)
 101 }
 102 
 103 ciInstance* ciValueKlass::default_value_instance() const {
< prev index next >