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

Unified Diff: runtime/vm/intrinsifier_arm.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/heap.cc ('k') | runtime/vm/intrinsifier_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/intrinsifier_arm.cc
diff --git a/runtime/vm/intrinsifier_arm.cc b/runtime/vm/intrinsifier_arm.cc
index 905dfcacb5c2088883eaa1c839c8bb60e992b0a6..cb403921e7ad5c0ad1f974ede4ba2631f3baaf0e 100644
--- a/runtime/vm/intrinsifier_arm.cc
+++ b/runtime/vm/intrinsifier_arm.cc
@@ -180,9 +180,8 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
sizeof(Raw##type_name) + kObjectAlignment - 1; \
__ 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))); \
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew); \
+ __ ldr(R0, Address(THR, Thread::top_offset())); \
\
/* R2: allocation size. */ \
__ adds(R1, R0, Operand(R2)); \
@@ -192,15 +191,14 @@ void Intrinsifier::GrowableArray_add(Assembler* assembler) {
/* R0: potential new object start. */ \
/* 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. */ \
@@ -2014,9 +2012,8 @@ static void TryAllocateOnebyteString(Assembler* assembler,
__ bic(length_reg, length_reg, Operand(kObjectAlignment - 1));
const intptr_t cid = kOneByteStringCid;
- Heap::Space space = Heap::kNew;
- __ ldr(R3, Address(THR, Thread::heap_offset()));
- __ ldr(R0, Address(R3, Heap::TopOffset(space)));
+ NOT_IN_PRODUCT(Heap::Space space = Heap::kNew);
+ __ ldr(R0, Address(THR, Thread::top_offset()));
// length_reg: allocation size.
__ adds(R1, R0, Operand(length_reg));
@@ -2026,15 +2023,14 @@ static void TryAllocateOnebyteString(Assembler* assembler,
// R0: potential new object start.
// 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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698