Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index 2594f491abcd35b44cf1d446bb9ff36786871701..391f8e072bac7bebb3018cac107dfca96011ef1b 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -2956,6 +2956,43 @@ Handle<Code> LoadStubCompiler::CompileLoadCallback( |
} |
+#undef __ |
+#define __ ACCESS_MASM(masm) |
+ |
+ |
+void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, |
+ Handle<JSFunction> getter) { |
+ // ----------- S t a t e ------------- |
+ // -- a0 : receiver |
+ // -- a2 : name |
+ // -- ra : return address |
+ // ----------------------------------- |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ |
+ if (!getter.is_null()) { |
+ // Call the JavaScript getter with the receiver on the stack. |
+ __ push(a0); |
+ ParameterCount actual(0); |
+ __ InvokeFunction(getter, actual, CALL_FUNCTION, NullCallWrapper(), |
+ CALL_AS_METHOD); |
+ } else { |
+ // If we generate a global code snippet for deoptimization only, remember |
+ // the place to continue after deoptimization. |
+ masm->isolate()->heap()->SetGetterStubDeoptPCOffset(masm->pc_offset()); |
+ } |
+ |
+ // Restore context register. |
+ __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ } |
+ __ Ret(); |
+} |
+ |
+ |
+#undef __ |
+#define __ ACCESS_MASM(masm()) |
+ |
+ |
Handle<Code> LoadStubCompiler::CompileLoadViaGetter( |
Handle<String> name, |
Handle<JSObject> receiver, |
@@ -2972,19 +3009,7 @@ Handle<Code> LoadStubCompiler::CompileLoadViaGetter( |
__ JumpIfSmi(a0, &miss); |
CheckPrototypes(receiver, a0, holder, a3, t0, a1, name, &miss); |
- { |
- FrameScope scope(masm(), StackFrame::INTERNAL); |
- |
- // Call the JavaScript getter with the receiver on the stack. |
- __ push(a0); |
- ParameterCount actual(0); |
- __ InvokeFunction(getter, actual, CALL_FUNCTION, NullCallWrapper(), |
- CALL_AS_METHOD); |
- |
- // Restore context register. |
- __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
- } |
- __ Ret(); |
+ GenerateLoadViaGetter(masm(), getter); |
__ bind(&miss); |
GenerateLoadMiss(masm(), Code::LOAD_IC); |