Lines Matching refs:Array
20 #include "array.h"
36 inline uint32_t Array::ClassSize(PointerSize pointer_size) {
42 inline size_t Array::SizeOf() {
43 // This is safe from overflow because the array was already allocated, so we know it's sane.
54 inline MemberOffset Array::DataOffset(size_t component_size) {
56 size_t data_offset = RoundUp(OFFSETOF_MEMBER(Array, first_element_), component_size);
58 << "Array data offset isn't aligned with component size";
63 inline bool Array::CheckIsValidIndex(int32_t index) {
76 size_t header_size = Array::DataOffset(component_size).SizeValue();
90 // The array length limit (exclusive).
99 // Used for setting the array length in the allocation code path to ensure it is guarded by a
109 ObjPtr<Array> array = ObjPtr<Array>::DownCast(obj);
110 // DCHECK(array->IsArrayInstance());
111 array->SetLength(length_);
120 // Similar to SetLengthVisitor, used for setting the array length to fill the usable size of an
121 // array.
133 ObjPtr<Array> array = ObjPtr<Array>::DownCast(obj);
134 // DCHECK(array->IsArrayInstance());
137 uint8_t* old_end = reinterpret_cast<uint8_t*>(array->GetRawData(1U << component_size_shift_,
139 uint8_t* new_end = reinterpret_cast<uint8_t*>(array->GetRawData(1U << component_size_shift_,
143 array->SetLength(length);
155 inline Array* Array::Alloc(Thread* self,
179 Array* result;
182 result = down_cast<Array*>(
189 result = down_cast<Array*>(
194 array_class = result->GetClass(); // In case the array class moved.
225 Array* raw_array = Array::Alloc<true>(self,
320 // Handle copies within the same array using the appropriate direction copy.