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

Unified Diff: runtime/vm/intrinsifier_arm.cc

Issue 2951333002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Full removal of heap's top/end offsets. Changed allocs in other archs. 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_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 365be150f9ea9dd9d3039c17db3caaf229ac0dd8..30f2ce7d429cdd6dabc5669a2465db2debd291c0 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -181,8 +181,7 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
__ AddImmediate(R2, fixed_size_plus_alignment_padding); \
__ bic(R2, R2, Operand(kObjectAlignment - 1)); \
Heap::Space space = Heap::kNew; \
- __ ldr(R3, Address(THR, Thread::heap_offset())); \
- __ ldr(R0, Address(R3, Heap::TopOffset(space))); \
+ __ ldr(R0, Address(THR, Thread::top_offset())); \
\
/* R2: allocation size. */ \
__ adds(R1, R0, Operand(R2)); \
@@ -193,14 +192,14 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
/* R1: potential next object start. */ \
/* R2: allocation size. */ \
/* R3: heap. */ \
- __ ldr(IP, Address(R3, Heap::EndOffset(space))); \
+ __ ldr(IP, Address(THR, Thread::end_offset())); \
__ cmp(R1, Operand(IP)); \
__ b(&fall_through, CS); \
\
/* Successfully allocated the object(s), now update top to point to */ \
/* next object start and initialize the object. */ \
NOT_IN_PRODUCT(__ LoadAllocationStatsAddress(R4, cid)); \
- __ str(R1, Address(R3, Heap::TopOffset(space))); \
+ __ str(R1, Address(THR, Thread::top_offset())); \
__ AddImmediate(R0, kHeapObjectTag); \
/* Initialize the tags. */ \
/* R0: new object start as a tagged pointer. */ \
@@ -2005,8 +2004,7 @@ static void TryAllocateOnebyteString(Assembler* assembler,
const intptr_t cid = kOneByteStringCid;
Heap::Space space = Heap::kNew;
- __ ldr(R3, Address(THR, Thread::heap_offset()));
- __ ldr(R0, Address(R3, Heap::TopOffset(space)));
+ __ ldr(R0, Address(THR, Thread::top_offset()));
// length_reg: allocation size.
__ adds(R1, R0, Operand(length_reg));
@@ -2017,14 +2015,14 @@ static void TryAllocateOnebyteString(Assembler* assembler,
// R1: potential next object start.
// R2: allocation size.
// R3: heap.
- __ ldr(NOTFP, Address(R3, Heap::EndOffset(space)));
+ __ ldr(NOTFP, Address(THR, Thread::end_offset()));
__ cmp(R1, Operand(NOTFP));
__ b(&fail, CS);
// Successfully allocated the object(s), now update top to point to
// next object start and initialize the object.
NOT_IN_PRODUCT(__ LoadAllocationStatsAddress(R4, cid));
- __ str(R1, Address(R3, Heap::TopOffset(space)));
+ __ str(R1, Address(THR, Thread::top_offset()));
__ AddImmediate(R0, kHeapObjectTag);
// Initialize the tags.

Powered by Google App Engine
This is Rietveld 408576698