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

Unified Diff: runtime/vm/code_patcher_mips.cc

Issue 1294113004: VM: Link native calls lazily. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: addressed comments Created 5 years, 4 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/code_patcher_ia32.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_mips.cc
diff --git a/runtime/vm/code_patcher_mips.cc b/runtime/vm/code_patcher_mips.cc
index 1794ab857d6b2d71b74e1b3871080cebb000a941..1014aed299cf07341f58e4e1392548f621027fbb 100644
--- a/runtime/vm/code_patcher_mips.cc
+++ b/runtime/vm/code_patcher_mips.cc
@@ -77,6 +77,27 @@ RawFunction* CodePatcher::GetUnoptimizedStaticCallAt(
}
+void CodePatcher::PatchNativeCallAt(uword return_address,
+ const Code& code,
+ NativeFunction target,
+ const Code& trampoline) {
+ ASSERT(code.ContainsInstructionAt(return_address));
+ NativeCallPattern call(return_address, code);
+ call.set_target(trampoline.EntryPoint());
+ call.set_native_function(target);
+}
+
+
+uword CodePatcher::GetNativeCallAt(uword return_address,
+ const Code& code,
+ NativeFunction* target) {
+ ASSERT(code.ContainsInstructionAt(return_address));
+ NativeCallPattern call(return_address, code);
+ *target = call.native_function();
+ return call.target();
+}
+
+
// This class pattern matches on a load from the object pool. Loading on
// MIPS is complicated because it can take four possible different forms.
// We match backwards from the end of the sequence so we can reuse the code
« no previous file with comments | « runtime/vm/code_patcher_ia32.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698