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

Unified Diff: runtime/vm/intrinsifier_x64.cc

Issue 2951333002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Removes the ZeroSizeScavenger test. Proper testing requires a second vm isolate. 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 3b97a1bf80b551b928e90e98d4abb018a306f006..7f5dadf16c67028762976b6d21d95483249fff40 100644
--- a/runtime/vm/intrinsifier_x64.cc
+++ b/runtime/vm/intrinsifier_x64.cc
@@ -174,9 +174,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. */ \
@@ -187,13 +186,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. */ \
@@ -2025,9 +2023,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);
@@ -2038,13 +2035,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