Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index ecd27c08104119fe3a75fcd297b732dd209114dd..e9633a14f3d74dd4ab393d73eb6d3fd097c46aaf 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -659,6 +659,36 @@ void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
} |
+void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) { |
+ // Return address is on the stack. |
+ Label slow; |
+ |
+ Register receiver = LoadDescriptor::ReceiverRegister(); |
+ Register key = LoadDescriptor::NameRegister(); |
+ Register scratch = eax; |
+ DCHECK(!scratch.is(receiver) && !scratch.is(key)); |
+ |
+ // Check that the key is an array index, that is Uint32. |
+ __ test(key, Immediate(kSmiTagMask | kSmiSignMask)); |
+ __ j(not_zero, &slow); |
+ |
+ // Everything is fine, call runtime. |
+ __ pop(scratch); |
+ __ push(receiver); // receiver |
+ __ push(key); // key |
+ __ push(scratch); // return address |
+ |
+ // Perform tail call to the entry. |
+ ExternalReference ref = ExternalReference( |
+ IC_Utility(IC::kLoadElementWithInterceptor), masm->isolate()); |
+ __ TailCallExternalReference(ref, 2, 1); |
+ |
+ __ bind(&slow); |
+ PropertyAccessCompiler::TailCallBuiltin( |
+ masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
+} |
+ |
+ |
void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { |
// The key is in edx and the parameter count is in eax. |
DCHECK(edx.is(ArgumentsAccessReadDescriptor::index())); |