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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 678993004: Remove dead code from InvokeDartCode stub. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/stub_code_arm64.cc
===================================================================
--- runtime/vm/stub_code_arm64.cc (revision 41310)
+++ runtime/vm/stub_code_arm64.cc (working copy)
@@ -812,9 +812,6 @@
// R3 : new context containing the current isolate pointer.
void StubCode::GenerateInvokeDartCodeStub(Assembler* assembler) {
__ Comment("InvokeDartCodeStub");
- // The new context, saved vm tag, the top exit frame, and the old context.
- const intptr_t kNewContextOffsetFromFp =
- -(1 + kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount) * kWordSize;
// Copy the C stack pointer (R31) into the stack pointer we'll actually use
// to access the stack, and put the C stack pointer at the stack limit.
@@ -841,6 +838,9 @@
#if defined(DEBUG)
{
Label ok;
+ // The new context, saved vm tag, the top exit frame, and the old context.
+ const intptr_t kNewContextOffsetFromFp =
+ -(1 + kAbiPreservedCpuRegCount + kAbiPreservedFpuRegCount) * kWordSize;
__ AddImmediate(R4, FP, kNewContextOffsetFromFp, kNoPP);
__ CompareRegisters(R4, SP);
__ b(&ok, EQ);
@@ -866,9 +866,6 @@
// Load Isolate pointer into temporary register R5.
__ LoadIsolate(R5, PP);
- // Cache the new Context pointer into CTX while executing Dart code.
- __ LoadFromOffset(CTX, R3, VMHandles::kOffsetOfRawPtrInHandle, PP);
-
// Save the current VMTag on the stack.
ASSERT(kSavedVMTagSlotFromEntryFp == -20);
__ LoadFromOffset(R4, R5, Isolate::vm_tag_offset(), PP);
@@ -930,10 +927,6 @@
// Restore constant pool pointer after return.
__ LoadPoolPointer(PP);
- // Read the saved new Context pointer.
- __ LoadFromOffset(CTX, FP, kNewContextOffsetFromFp, PP);
- __ LoadFromOffset(CTX, CTX, VMHandles::kOffsetOfRawPtrInHandle, PP);
-
// Get rid of arguments pushed on the stack.
__ AddImmediate(SP, FP, kSavedContextSlotFromEntryFp * kWordSize, PP);

Powered by Google App Engine
This is Rietveld 408576698