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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 2427043002: VM: Remove unnecesary load of isolate in some stubs. (Closed)
Patch Set: Created 4 years, 2 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/stub_code_arm.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 1e3c78c7e08a8939c3e4db778b8b2c993052b78c..7211745eb147e6b4492b478c7dd44f86ee561fbc 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -692,8 +692,7 @@ void StubCode::GenerateAllocateArrayStub(Assembler* assembler) {
NOT_IN_PRODUCT(__ MaybeTraceAllocation(kArrayCid, R4, &slow_case));
Heap::Space space = Heap::kNew;
- __ LoadIsolate(R8);
- __ ldr(R8, Address(R8, Isolate::heap_offset()));
+ __ ldr(R8, Address(THR, Thread::heap_offset()));
// Calculate and align allocation size.
// Load new object start and calculate next object start.
@@ -960,8 +959,7 @@ void StubCode::GenerateAllocateContextStub(Assembler* assembler) {
// R2: object size.
const intptr_t cid = kContextCid;
Heap::Space space = Heap::kNew;
- __ LoadIsolate(R5);
- __ ldr(R5, Address(R5, Isolate::heap_offset()));
+ __ ldr(R5, Address(THR, Thread::heap_offset()));
__ ldr(R0, Address(R5, Heap::TopOffset(space)));
__ add(R3, R2, Operand(R0));
// Check if the allocation fits into the remaining space.
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698