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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 2951333002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Created 3 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
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index f0ca5913f9164fb4d092aecb7eee663df629afac..0473f2780802d18fa1f877cdd8aec848e33f41f0 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -175,8 +175,7 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
__ leaq(RDI, Address(RDI, scale_factor, fixed_size_plus_alignment_padding)); \
__ andq(RDI, Immediate(-kObjectAlignment)); \
Heap::Space space = Heap::kNew; \
- __ movq(R13, Address(THR, Thread::heap_offset())); \
- __ movq(RAX, Address(R13, Heap::TopOffset(space))); \
+ __ movq(RAX, Address(THR, Thread::top_offset())); \
__ movq(RCX, RAX); \
\
/* RDI: allocation size. */ \
@@ -188,12 +187,12 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
/* RCX: potential next object start. */ \
/* RDI: allocation size. */ \
/* R13: heap. */ \
- __ cmpq(RCX, Address(R13, Heap::EndOffset(space))); \
+ __ cmpq(RCX, Address(THR, Thread::end_offset())); \
__ j(ABOVE_EQUAL, &fall_through); \
\
/* Successfully allocated the object(s), now update top to point to */ \
/* next object start and initialize the object. */ \
- __ movq(Address(R13, Heap::TopOffset(space)), RCX); \
+ __ movq(Address(THR, Thread::top_offset()), RCX); \
__ addq(RAX, Immediate(kHeapObjectTag)); \
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, RDI, space)); \
/* Initialize the tags. */ \
@@ -2009,8 +2008,7 @@ static void TryAllocateOnebyteString(Assembler* assembler,
const intptr_t cid = kOneByteStringCid;
Heap::Space space = Heap::kNew;
- __ movq(R13, Address(THR, Thread::heap_offset()));
- __ movq(RAX, Address(R13, Heap::TopOffset(space)));
+ __ movq(RAX, Address(THR, Thread::top_offset()));
// RDI: allocation size.
__ movq(RCX, RAX);
@@ -2021,13 +2019,12 @@ static void TryAllocateOnebyteString(Assembler* assembler,
// RAX: potential new object start.
// RCX: potential next object start.
// RDI: allocation size.
- // R13: heap.
- __ cmpq(RCX, Address(R13, Heap::EndOffset(space)));
+ __ cmpq(RCX, Address(THR, Thread::end_offset()));
__ j(ABOVE_EQUAL, &pop_and_fail);
// Successfully allocated the object(s), now update top to point to
// next object start and initialize the object.
- __ movq(Address(R13, Heap::TopOffset(space)), RCX);
+ __ movq(Address(THR, Thread::top_offset()), RCX);
__ addq(RAX, Immediate(kHeapObjectTag));
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, RDI, space));

Powered by Google App Engine
This is Rietveld 408576698