Index: src/ia32/stub-cache-ia32.cc |
diff --git a/src/ia32/stub-cache-ia32.cc b/src/ia32/stub-cache-ia32.cc |
index 2925ae176aedea77de8557f3f4e91e442aa48b5e..b556b1c6f28e753bbd16a1f1edf74a02fce869cd 100644 |
--- a/src/ia32/stub-cache-ia32.cc |
+++ b/src/ia32/stub-cache-ia32.cc |
@@ -2860,6 +2860,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 ------------- |
+ // -- ecx : name |
+ // -- edx : receiver |
+ // -- esp[0] : return address |
+ // ----------------------------------- |
+ Label miss; |
+ |
+ // Check that the maps haven't changed. |
+ __ JumpIfSmi(edx, &miss); |
+ CheckPrototypes(receiver, edx, holder, ebx, eax, edi, name, &miss); |
+ |
+ { |
+ FrameScope scope(masm(), StackFrame::INTERNAL); |
+ |
+ // Call the JavaScript getter with the receiver on the stack. |
+ __ push(edx); |
+ __ InvokeFunction(getter, ParameterCount(0), CALL_FUNCTION, |
+ NullCallWrapper(), CALL_AS_METHOD); |
+ |
+ // Restore context register. |
+ __ mov(esi, Operand(ebp, StandardFrameConstants::kContextOffset)); |
+ } |
+ __ ret(0); |
+ |
+ __ 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, |