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

Unified Diff: runtime/vm/intrinsifier_ia32.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_arm64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_ia32.cc
diff --git a/runtime/vm/intrinsifier_ia32.cc b/runtime/vm/intrinsifier_ia32.cc
index d739d35adc0a427721892f144b4377d582dbc446..53d704cc885b5d025836e5f9e987cc2bd4b11384 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -216,9 +216,8 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
sizeof(Raw##type_name) + kObjectAlignment - 1; \
__ leal(EDI, Address(EDI, scale_factor, fixed_size_plus_alignment_padding)); \
__ andl(EDI, Immediate(-kObjectAlignment)); \
- Heap::Space space = Heap::kNew; \
- __ movl(ECX, Address(THR, Thread::heap_offset())); \
- __ movl(EAX, Address(ECX, Heap::TopOffset(space))); \
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew); \
+ __ movl(EAX, Address(THR, Thread::top_offset())); \
__ movl(EBX, EAX); \
\
/* EDI: allocation size. */ \
@@ -229,13 +228,12 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
/* EAX: potential new object start. */ \
/* EBX: potential next object start. */ \
/* EDI: allocation size. */ \
- /* ECX: heap. */ \
- __ cmpl(EBX, Address(ECX, Heap::EndOffset(space))); \
+ __ cmpl(EBX, 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. */ \
- __ movl(Address(ECX, Heap::TopOffset(space)), EBX); \
+ __ movl(Address(THR, Thread::top_offset()), EBX); \
__ addl(EAX, Immediate(kHeapObjectTag)); \
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, EDI, ECX, space)); \
\
@@ -2045,9 +2043,8 @@ static void TryAllocateOnebyteString(Assembler* assembler,
__ andl(EDI, Immediate(-kObjectAlignment));
const intptr_t cid = kOneByteStringCid;
- Heap::Space space = Heap::kNew;
- __ movl(ECX, Address(THR, Thread::heap_offset()));
- __ movl(EAX, Address(ECX, Heap::TopOffset(space)));
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
+ __ movl(EAX, Address(THR, Thread::top_offset()));
__ movl(EBX, EAX);
// EDI: allocation size.
@@ -2058,13 +2055,12 @@ static void TryAllocateOnebyteString(Assembler* assembler,
// EAX: potential new object start.
// EBX: potential next object start.
// EDI: allocation size.
- // ECX: heap.
- __ cmpl(EBX, Address(ECX, Heap::EndOffset(space)));
+ __ cmpl(EBX, 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.
- __ movl(Address(ECX, Heap::TopOffset(space)), EBX);
+ __ movl(Address(THR, Thread::top_offset()), EBX);
__ addl(EAX, Immediate(kHeapObjectTag));
NOT_IN_PRODUCT(__ UpdateAllocationStatsWithSize(cid, EDI, ECX, space));
« no previous file with comments | « runtime/vm/intrinsifier_arm64.cc ('k') | runtime/vm/intrinsifier_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698