Index: src/ic/arm/handler-compiler-arm.cc |
diff --git a/src/ic/arm/handler-compiler-arm.cc b/src/ic/arm/handler-compiler-arm.cc |
index 3f2d0e42deb12380a67e49376a95b38a19490f96..fb27e5c15938b1a419e3665a68861045995f0a3a 100644 |
--- a/src/ic/arm/handler-compiler-arm.cc |
+++ b/src/ic/arm/handler-compiler-arm.cc |
@@ -208,10 +208,12 @@ void PropertyHandlerCompiler::GenerateCheckPropertyCell( |
__ b(ne, miss); |
} |
+static void CompileCallLoadPropertyWithInterceptor( |
+ MacroAssembler* masm, Register receiver, Register holder, Register name, |
+ Handle<JSObject> holder_obj, Runtime::FunctionId id) { |
+ DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength == |
+ Runtime::FunctionForId(id)->nargs); |
-static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
- Register holder, Register name, |
- Handle<JSObject> holder_obj) { |
STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1); |
STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2); |
@@ -219,15 +221,7 @@ static void PushInterceptorArguments(MacroAssembler* masm, Register receiver, |
__ push(name); |
__ push(receiver); |
__ push(holder); |
-} |
- |
-static void CompileCallLoadPropertyWithInterceptor( |
- MacroAssembler* masm, Register receiver, Register holder, Register name, |
- Handle<JSObject> holder_obj, Runtime::FunctionId id) { |
- DCHECK(NamedLoadHandlerCompiler::kInterceptorArgsLength == |
- Runtime::FunctionForId(id)->nargs); |
- PushInterceptorArguments(masm, receiver, holder, name, holder_obj); |
__ CallRuntime(id); |
} |
@@ -530,8 +524,18 @@ void NamedLoadHandlerCompiler::GenerateLoadInterceptor(Register holder_reg) { |
// Call the runtime system to load the interceptor. |
DCHECK(holder()->HasNamedInterceptor()); |
DCHECK(!holder()->GetNamedInterceptor()->getter()->IsUndefined(isolate())); |
- PushInterceptorArguments(masm(), receiver(), holder_reg, this->name(), |
- holder()); |
+ |
+ STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsNameIndex == 0); |
+ STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsThisIndex == 1); |
+ STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsHolderIndex == 2); |
+ STATIC_ASSERT(NamedLoadHandlerCompiler::kInterceptorArgsLength == 3); |
+ __ Push(name(), receiver(), holder_reg); |
+ // See NamedLoadHandlerCompiler::InterceptorVectorSlotPop() for details. |
+ if (holder_reg.is(receiver())) { |
+ __ Push(slot(), vector()); |
+ } else { |
+ __ Push(scratch3(), scratch2()); // slot, vector |
+ } |
__ TailCallRuntime(Runtime::kLoadPropertyWithInterceptor); |
} |