Index: src/arm/stub-cache-arm.cc |
diff --git a/src/arm/stub-cache-arm.cc b/src/arm/stub-cache-arm.cc |
index 058c29b019b6489dc6fdbea0a307a3b357577a32..66714f8e44689778b13a4ad72b42e7ab6f859103 100644 |
--- a/src/arm/stub-cache-arm.cc |
+++ b/src/arm/stub-cache-arm.cc |
@@ -2951,6 +2951,43 @@ Handle<Code> LoadStubCompiler::CompileLoadCallback( |
} |
+#undef __ |
+#define __ ACCESS_MASM(masm) |
+ |
+ |
+void LoadStubCompiler::GenerateLoadViaGetter(MacroAssembler* masm, |
+ Handle<JSFunction> getter) { |
+ // ----------- S t a t e ------------- |
+ // -- r0 : receiver |
+ // -- r2 : name |
+ // -- lr : return address |
+ // ----------------------------------- |
+ { |
+ FrameScope scope(masm, StackFrame::INTERNAL); |
+ |
+ if (!getter.is_null()) { |
+ // Call the JavaScript getter with the receiver on the stack. |
+ __ push(r0); |
+ 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. |
+ __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
+ } |
+ __ Ret(); |
+} |
+ |
+ |
+#undef __ |
+#define __ ACCESS_MASM(masm()) |
+ |
+ |
Handle<Code> LoadStubCompiler::CompileLoadViaGetter( |
Handle<String> name, |
Handle<JSObject> receiver, |
@@ -2967,19 +3004,7 @@ Handle<Code> LoadStubCompiler::CompileLoadViaGetter( |
__ 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); |
- ParameterCount actual(0); |
- __ InvokeFunction(getter, actual, CALL_FUNCTION, NullCallWrapper(), |
- CALL_AS_METHOD); |
- |
- // Restore context register. |
- __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
- } |
- __ Ret(); |
+ GenerateLoadViaGetter(masm(), getter); |
__ bind(&miss); |
GenerateLoadMiss(masm(), Code::LOAD_IC); |