mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 23:28:09 +00:00
[vm, compiler] Fix use of StoreIntoObjectNoBarrier before header initialization.
TEST=ci Bug: https://github.com/dart-lang/sdk/issues/55754 Change-Id: Ie516be52a8edf620019f60b2ea0fd4f3eeeba533 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/367203 Commit-Queue: Ryan Macnak <rmacnak@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
parent
cf65fa73dd
commit
1447193053
|
@ -1381,16 +1381,6 @@ void StubCodeCompiler::GenerateAllocateArrayStub() {
|
|||
// R3: array size.
|
||||
// R7: new object end address.
|
||||
|
||||
// Store the type argument field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(
|
||||
AllocateArrayABI::kResultReg, target::Array::type_arguments_offset(),
|
||||
AllocateArrayABI::kTypeArgumentsReg);
|
||||
|
||||
// Set the length field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(AllocateArrayABI::kResultReg,
|
||||
target::Array::length_offset(),
|
||||
AllocateArrayABI::kLengthReg);
|
||||
|
||||
// Calculate the size tag.
|
||||
// AllocateArrayABI::kResultReg: new object start as a tagged pointer.
|
||||
// AllocateArrayABI::kLengthReg: array length as Smi.
|
||||
|
@ -1413,6 +1403,16 @@ void StubCodeCompiler::GenerateAllocateArrayStub() {
|
|||
__ StoreFieldToOffset(R3, AllocateArrayABI::kResultReg,
|
||||
target::Array::tags_offset());
|
||||
|
||||
// Store the type argument field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(
|
||||
AllocateArrayABI::kResultReg, target::Array::type_arguments_offset(),
|
||||
AllocateArrayABI::kTypeArgumentsReg);
|
||||
|
||||
// Set the length field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(AllocateArrayABI::kResultReg,
|
||||
target::Array::length_offset(),
|
||||
AllocateArrayABI::kLengthReg);
|
||||
|
||||
// Initialize all array elements to raw_null.
|
||||
// AllocateArrayABI::kResultReg: new object start as a tagged pointer.
|
||||
// R7: new object end address.
|
||||
|
|
|
@ -1212,16 +1212,6 @@ void StubCodeCompiler::GenerateAllocateArrayStub() {
|
|||
// R3: array size.
|
||||
// R7: new object end address.
|
||||
|
||||
// Store the type argument field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(
|
||||
AllocateArrayABI::kResultReg, target::Array::type_arguments_offset(),
|
||||
AllocateArrayABI::kTypeArgumentsReg);
|
||||
|
||||
// Set the length field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(AllocateArrayABI::kResultReg,
|
||||
target::Array::length_offset(),
|
||||
AllocateArrayABI::kLengthReg);
|
||||
|
||||
// Calculate the size tag.
|
||||
// AllocateArrayABI::kResultReg: new object start as a tagged pointer.
|
||||
// AllocateArrayABI::kLengthReg: array length as Smi.
|
||||
|
@ -1244,6 +1234,16 @@ void StubCodeCompiler::GenerateAllocateArrayStub() {
|
|||
__ StoreFieldToOffset(T5, AllocateArrayABI::kResultReg,
|
||||
target::Array::tags_offset());
|
||||
|
||||
// Store the type argument field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(
|
||||
AllocateArrayABI::kResultReg, target::Array::type_arguments_offset(),
|
||||
AllocateArrayABI::kTypeArgumentsReg);
|
||||
|
||||
// Set the length field.
|
||||
__ StoreCompressedIntoObjectOffsetNoBarrier(AllocateArrayABI::kResultReg,
|
||||
target::Array::length_offset(),
|
||||
AllocateArrayABI::kLengthReg);
|
||||
|
||||
// Initialize all array elements to raw_null.
|
||||
// AllocateArrayABI::kResultReg: new object start as a tagged pointer.
|
||||
// R7: new object end address.
|
||||
|
|
Loading…
Reference in a new issue