Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index d6de0f584fc38451586a0a2a1d54a70b8d1526c3..91ef35bba0915112b109acae8c6103131cb1d0c0 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -2835,6 +2835,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 ------------- |
+ // -- r0 : receiver |
+ // -- r2 : name |
+ // -- lr : return address |
+ // ----------------------------------- |
+ Label miss; |
+ |
+ // Check that the maps haven't changed. |
+ __ JumpIfSmi(r0, &miss); |
+ CheckPrototypes(receiver, r0, holder, r3, r4, r1, name, &miss); |
+ |
+ { |
+ FrameScope scope(masm(), StackFrame::INTERNAL); |
+ |
+ // Call the JavaScript getter with the receiver on the stack. |
+ __ push(r0); |
+ __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION, |
+ NullCallWrapper(), CALL_AS_METHOD); |
+ |
+ // Restore context register. |
+ __ ldr(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, |