Index: src/mips/stub-cache-mips.cc |
diff --git a/src/mips/stub-cache-mips.cc b/src/mips/stub-cache-mips.cc |
index 1ae59a24d8ab7eb226df76c2efc437d67fa11f20..64be4c15d0c768b3129de978d41dde06bb209aec 100644 |
--- a/src/mips/stub-cache-mips.cc |
+++ b/src/mips/stub-cache-mips.cc |
@@ -2839,6 +2839,43 @@ Handle<Code> LoadStubCompiler::CompileLoadCallback( |
} |
+Handle<Code> LoadStubCompiler::CompileLoadViaGetter( |
+ Handle<String> name, |
+ Handle<JSObject> receiver, |
+ Handle<JSObject> holder, |
+ Handle<JSFunction> getter) { |
+ // ----------- S t a t e ------------- |
+ // -- a0 : receiver |
+ // -- a2 : name |
+ // -- ra : return address |
+ // ----------------------------------- |
+ Label miss; |
+ |
+ // Check that the maps haven't changed. |
+ __ 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); |
+ __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION, |
+ NullCallWrapper(), CALL_AS_METHOD); |
+ |
+ // Restore context register. |
+ __ lw(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ } |
+ __ Ret(); |
+ |
+ __ bind(&miss); |
+ GenerateLoadMiss(masm(), Code::LOAD_IC); |
+ |
+ // Return the generated code. |
+ return GetCode(CALLBACKS, name); |
+} |
+ |
+ |
Handle<Code> LoadStubCompiler::CompileLoadConstant(Handle<JSObject> object, |
Handle<JSObject> holder, |
Handle<JSFunction> value, |