| Index: runtime/vm/intermediate_language_mips.cc
|
| ===================================================================
|
| --- runtime/vm/intermediate_language_mips.cc (revision 39726)
|
| +++ runtime/vm/intermediate_language_mips.cc (working copy)
|
| @@ -88,6 +88,14 @@
|
| __ TraceSimMsg("ReturnInstr");
|
| Register result = locs()->in(0).reg();
|
| ASSERT(result == V0);
|
| +
|
| + if (compiler->intrinsic_mode()) {
|
| + // Intrinsics don't have a frame.
|
| + __ Ret();
|
| + return;
|
| + }
|
| +
|
| +
|
| #if defined(DEBUG)
|
| Label stack_ok;
|
| __ Comment("Stack Check");
|
| @@ -1675,10 +1683,12 @@
|
| public:
|
| BoxAllocationSlowPath(Instruction* instruction,
|
| const Class& cls,
|
| - Register result)
|
| + Register result,
|
| + bool is_intrinsic)
|
| : instruction_(instruction),
|
| cls_(cls),
|
| - result_(result) { }
|
| + result_(result),
|
| + is_intrinsic_(is_intrinsic) { }
|
|
|
| virtual void EmitNativeCode(FlowGraphCompiler* compiler) {
|
| Isolate* isolate = compiler->isolate();
|
| @@ -1690,6 +1700,11 @@
|
| String::Handle(cls_.PrettyName()).ToCString());
|
| }
|
| __ Bind(entry_label());
|
| +
|
| + if (is_intrinsic_) {
|
| + __ EnterStubFrame(true);
|
| + }
|
| +
|
| const Code& stub =
|
| Code::Handle(isolate, stub_code->GetAllocationStubForClass(cls_));
|
| const ExternalLabel label(stub.EntryPoint());
|
| @@ -1707,6 +1722,9 @@
|
| }
|
| compiler->RestoreLiveRegisters(locs);
|
|
|
| + if (is_intrinsic_) {
|
| + __ LeaveStubFrame();
|
| + }
|
| __ b(exit_label());
|
| }
|
|
|
| @@ -1716,7 +1734,8 @@
|
| Register result,
|
| Register temp) {
|
| BoxAllocationSlowPath* slow_path =
|
| - new BoxAllocationSlowPath(instruction, cls, result);
|
| + new BoxAllocationSlowPath(instruction, cls, result,
|
| + compiler->intrinsic_mode());
|
| compiler->AddSlowPathCode(slow_path);
|
|
|
| __ TryAllocate(cls,
|
| @@ -1730,6 +1749,7 @@
|
| Instruction* instruction_;
|
| const Class& cls_;
|
| Register result_;
|
| + bool is_intrinsic_;
|
| };
|
|
|
|
|
|
|