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

Unified Diff: runtime/vm/intrinsifier_ia32.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_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 24cb10f438064e9a9063a5d9686f5eab02cf50d2..78c1e66b42febb3f00ab6aaa0d3d65efc4ffd719 100644
--- a/runtime/vm/intrinsifier_ia32.cc
+++ b/runtime/vm/intrinsifier_ia32.cc
@@ -208,9 +208,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. */ \
@@ -221,13 +220,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)); \
\
@@ -1959,9 +1957,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.
@@ -1972,13 +1969,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