| Index: runtime/vm/stub_code_mips.cc
|
| ===================================================================
|
| --- runtime/vm/stub_code_mips.cc (revision 28803)
|
| +++ runtime/vm/stub_code_mips.cc (working copy)
|
| @@ -1812,8 +1812,26 @@
|
|
|
| __ Bind(&call_target_function);
|
| // T3: Target function.
|
| - __ lw(T3, FieldAddress(T3, Function::code_offset()));
|
| - __ lw(T3, FieldAddress(T3, Code::instructions_offset()));
|
| + Label is_compiled;
|
| + __ lw(T4, FieldAddress(T3, Function::code_offset()));
|
| + if (FLAG_collect_code) {
|
| + __ BranchNotEqual(T4, reinterpret_cast<int32_t>(Object::null()),
|
| + &is_compiled);
|
| + __ EnterStubFrame();
|
| + __ addiu(SP, SP, Immediate(-3 * kWordSize));
|
| + __ sw(S5, Address(SP, 2 * kWordSize)); // Preserve IC data.
|
| + __ sw(S4, Address(SP, 1 * kWordSize)); // Preserve arg desc.
|
| + __ sw(T3, Address(SP, 0 * kWordSize)); // Function argument.
|
| + __ CallRuntime(kCompileFunctionRuntimeEntry, 1);
|
| + __ lw(T3, Address(SP, 0 * kWordSize)); // Restore Function.
|
| + __ lw(S4, Address(SP, 1 * kWordSize)); // Restore arg desc.
|
| + __ lw(S5, Address(SP, 2 * kWordSize)); // Restore IC data.
|
| + __ addiu(SP, SP, Immediate(3 * kWordSize));
|
| + __ LeaveStubFrame();
|
| + __ lw(T4, FieldAddress(T3, Function::code_offset()));
|
| + __ Bind(&is_compiled);
|
| + }
|
| + __ lw(T3, FieldAddress(T4, Code::instructions_offset()));
|
| __ AddImmediate(T3, Instructions::HeaderSize() - kHeapObjectTag);
|
| __ jr(T3);
|
|
|
|
|