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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 2980033002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Created 3 years, 5 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/intrinsifier_ia32.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_x64.cc
diff --git a/runtime/vm/intrinsifier_x64.cc b/runtime/vm/intrinsifier_x64.cc
index 1fb4a004edf39e48d9fb1d271c879d300d364822..0eb7d64db820bac0bb14a78b0758f1c56a86746b 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -166,9 +166,8 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
sizeof(Raw##type_name) + kObjectAlignment - 1; \
__ 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))); \
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew); \
+ __ movq(RAX, Address(THR, Thread::top_offset())); \
__ movq(RCX, RAX); \
\
/* RDI: allocation size. */ \
@@ -179,13 +178,12 @@ void Intrinsifier::GrowableArray_add(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, &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. */ \
@@ -1941,9 +1939,8 @@ static void TryAllocateOnebyteString(Assembler* assembler,
__ andq(RDI, Immediate(-kObjectAlignment));
const intptr_t cid = kOneByteStringCid;
- Heap::Space space = Heap::kNew;
- __ movq(R13, Address(THR, Thread::heap_offset()));
- __ movq(RAX, Address(R13, Heap::TopOffset(space)));
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
+ __ movq(RAX, Address(THR, Thread::top_offset()));
// RDI: allocation size.
__ movq(RCX, RAX);
@@ -1954,13 +1951,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));
« no previous file with comments | « runtime/vm/intrinsifier_ia32.cc ('k') | runtime/vm/isolate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698