Home | History | Annotate | Download | only in mirror

Lines Matching refs:Array

20 #include "array.h"
33 inline uint32_t Array::ClassSize(size_t pointer_size) {
39 inline size_t Array::SizeOf() {
40 // This is safe from overflow because the array was already allocated, so we know it's sane.
51 inline MemberOffset Array::DataOffset(size_t component_size) {
53 size_t data_offset = RoundUp(OFFSETOF_MEMBER(Array, first_element_), component_size);
55 << "Array data offset isn't aligned with component size";
60 inline bool Array::CheckIsValidIndex(int32_t index) {
73 size_t header_size = Array::DataOffset(component_size).SizeValue();
87 // The array length limit (exclusive).
96 // Used for setting the array length in the allocation code path to ensure it is guarded by a
106 Array* array = down_cast<Array*>(obj);
107 // DCHECK(array->IsArrayInstance());
108 array->SetLength(length_);
117 // Similar to SetLengthVisitor, used for setting the array length to fill the usable size of an
118 // array.
130 Array* array = down_cast<Array*>(obj);
131 // DCHECK(array->IsArrayInstance());
134 uint8_t* old_end = reinterpret_cast<uint8_t*>(array->GetRawData(1U << component_size_shift_,
136 uint8_t* new_end = reinterpret_cast<uint8_t*>(array->GetRawData(1U << component_size_shift_,
140 array->SetLength(length);
152 inline Array* Array::Alloc(Thread* self, Class* array_class, int32_t component_count,
173 Array* result;
176 result = down_cast<Array*>(
183 result = down_cast<Array*>(
188 array_class = result->GetClass(); // In case the array class moved.
206 Array* raw_array = Array::Alloc<true>(self, GetArrayClass(), length,
297 // Handle copies within the same array using the appropriate direction copy.