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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 13671004: Support UseDartApi vm test on ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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/intermediate_language_x64.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
===================================================================
--- runtime/vm/stub_code_arm.cc (revision 20980)
+++ runtime/vm/stub_code_arm.cc (working copy)
@@ -937,8 +937,24 @@
}
+// Calls to the runtime to optimize the given function.
+// R6: function to be reoptimized.
+// R4: argument descriptor (preserved).
void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
- __ Unimplemented("OptimizeFunction stub");
+ __ EnterStubFrame();
+ __ Push(R4);
+ __ LoadImmediate(IP, reinterpret_cast<intptr_t>(Object::null()));
+ __ Push(IP); // Setup space on stack for return value.
+ __ Push(R6);
+ __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
+ __ Pop(R0); // Discard argument.
+ __ Pop(R0); // Get Code object
+ __ Pop(R4); // Restore argument descriptor.
+ __ ldr(R0, FieldAddress(R0, Code::instructions_offset()));
+ __ AddImmediate(R0, Instructions::HeaderSize() - kHeapObjectTag);
+ __ LeaveStubFrame();
+ __ bx(R0);
+ __ bkpt(0);
}
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698