Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Unified Diff: runtime/vm/stub_code_ia32.cc

Issue 2112043002: Land Ivan's change of 'Remove support for verified memory handling' (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review comments. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index 238710e259f3196aef6c3bdf27f40e94a04eac27..af3a26bfa2fa6e25ec7184aa008cf5615f903393 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -323,8 +323,8 @@ static void PushArgumentsArray(Assembler* assembler) {
__ jmp(&loop_condition, Assembler::kNearJump);
__ Bind(&loop);
__ movl(EDI, Address(EBX, 0));
- // No generational barrier needed, since array is in new space.
- __ InitializeFieldNoBarrier(EAX, Address(ECX, 0), EDI);
+ // Generational barrier is needed, array is not necessarily in new space.
+ __ StoreIntoObject(EAX, Address(ECX, 0), EDI);
__ AddImmediate(ECX, Immediate(kWordSize));
__ AddImmediate(EBX, Immediate(-kWordSize));
__ Bind(&loop_condition);
@@ -624,12 +624,13 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
// ECX: array element type.
// EDX: Array length as Smi (preserved).
// Store the type argument field.
- __ InitializeFieldNoBarrier(EAX,
+ // No generetional barrier needed, since we store into a new object.
+ __ StoreIntoObjectNoBarrier(EAX,
FieldAddress(EAX, Array::type_arguments_offset()),
ECX);
// Set the length field.
- __ InitializeFieldNoBarrier(EAX,
+ __ StoreIntoObjectNoBarrier(EAX,
FieldAddress(EAX, Array::length_offset()),
EDX);
@@ -648,7 +649,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
__ cmpl(EDI, EBX);
__ j(ABOVE_EQUAL, &done, Assembler::kNearJump);
// No generational barrier needed, since we are storing null.
- __ InitializeFieldNoBarrier(EAX, Address(EDI, 0), Object::null_object());
+ __ StoreIntoObjectNoBarrier(EAX, Address(EDI, 0), Object::null_object());
__ addl(EDI, Immediate(kWordSize));
__ jmp(&init_loop, Assembler::kNearJump);
__ Bind(&done);
@@ -872,7 +873,7 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
// EAX: new object.
// EDX: number of context variables.
// No generational barrier needed, since we are storing null.
- __ InitializeFieldNoBarrier(EAX,
+ __ StoreIntoObjectNoBarrier(EAX,
FieldAddress(EAX, Context::parent_offset()),
Object::null_object());
@@ -887,7 +888,7 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
__ Bind(&loop);
__ decl(EDX);
// No generational barrier needed, since we are storing null.
- __ InitializeFieldNoBarrier(EAX,
+ __ StoreIntoObjectNoBarrier(EAX,
Address(EBX, EDX, TIMES_4, 0),
Object::null_object());
__ Bind(&entry);
@@ -1058,7 +1059,7 @@ void StubCode::GenerateAllocationStubForClass(
for (intptr_t current_offset = Instance::NextFieldOffset();
current_offset < instance_size;
current_offset += kWordSize) {
- __ InitializeFieldNoBarrier(EAX,
+ __ StoreIntoObjectNoBarrier(EAX,
FieldAddress(EAX, current_offset),
Object::null_object());
}
@@ -1074,7 +1075,7 @@ void StubCode::GenerateAllocationStubForClass(
__ Bind(&init_loop);
__ cmpl(ECX, EBX);
__ j(ABOVE_EQUAL, &done, Assembler::kNearJump);
- __ InitializeFieldNoBarrier(EAX,
+ __ StoreIntoObjectNoBarrier(EAX,
Address(ECX, 0),
Object::null_object());
__ addl(ECX, Immediate(kWordSize));
@@ -1082,11 +1083,11 @@ void StubCode::GenerateAllocationStubForClass(
__ Bind(&done);
}
if (is_cls_parameterized) {
+ // EAX: new object (tagged).
// EDX: new object type arguments.
// Set the type arguments in the new object.
intptr_t offset = cls.type_arguments_field_offset();
- // TODO(koda): Figure out why previous content is sometimes null here.
- __ InitializeFieldNoBarrier(EAX, FieldAddress(EAX, offset), EDX);
+ __ StoreIntoObjectNoBarrier(EAX, FieldAddress(EAX, offset), EDX);
}
// Done allocating and initializing the instance.
// EAX: new object (tagged).
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698