| 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
|
|
|