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

Unified Diff: runtime/vm/intrinsifier_arm.cc

Issue 2951333002: Moves the top_ and end_ words of the Scavenger into mutator thread. (Closed)
Patch Set: Address comments from CL 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
Index: runtime/vm/intrinsifier_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 905dfcacb5c2088883eaa1c839c8bb60e992b0a6..20d9fa18a82938fe877c5d6375c52b2133c4820a 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. */ \
@@ -2015,8 +2014,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));
@@ -2027,14 +2025,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.
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | runtime/vm/scavenger.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698