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

Unified Diff: runtime/vm/stub_code_mips.cc

Issue 13884017: Adds support for UseDartApi vm test on MIPS. (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
« runtime/vm/intermediate_language_mips.cc ('K') | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_mips.cc
===================================================================
--- runtime/vm/stub_code_mips.cc (revision 21386)
+++ runtime/vm/stub_code_mips.cc (working copy)
@@ -984,8 +984,24 @@
}
+// Calls to the runtime to optimize the given function.
+// T0: function to be reoptimized.
+// S4: argument descriptor (preserved).
void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
- __ Unimplemented("OptimizeFunction Stub");
+ __ EnterStubFrame();
+ __ Push(S4);
+ __ LoadImmediate(TMP, reinterpret_cast<intptr_t>(Object::null()));
+ __ Push(TMP); // Setup space on stack for return value.
+ __ Push(T0);
+ __ CallRuntime(kOptimizeInvokedFunctionRuntimeEntry);
+ __ Pop(T0); // Discard argument.
+ __ Pop(T0); // Get Code object
+ __ Pop(S4); // Restore argument descriptor.
+ __ lw(T0, FieldAddress(T0, Code::instructions_offset()));
+ __ AddImmediate(T0, Instructions::HeaderSize() - kHeapObjectTag);
+ __ LeaveStubFrame();
+ __ jr(T0);
+ __ break_(0);
}
« runtime/vm/intermediate_language_mips.cc ('K') | « runtime/vm/simulator_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698