Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index ebb48250594b1f0bc7d557de789aff414939d866..a7d38cd03873453543c528f265c6071c64ce56c8 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -834,6 +834,37 @@ void ArgumentsAccessStub::GenerateNewSloppySlow(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 = rax; |
+ DCHECK(!scratch.is(receiver) && !scratch.is(key)); |
+ |
+ // Check that the key is an array index, that is Uint32. |
+ STATIC_ASSERT(kSmiValueSize <= 32); |
+ __ JumpUnlessNonNegativeSmi(key, &slow); |
+ |
+ // Everything is fine, call runtime. |
+ __ PopReturnAddressTo(scratch); |
+ __ Push(receiver); // receiver |
+ __ Push(key); // key |
+ __ PushReturnAddressFrom(scratch); |
+ |
+ // Perform tail call to the entry. |
+ __ TailCallExternalReference( |
+ ExternalReference(IC_Utility(IC::kLoadElementWithInterceptor), |
+ masm->isolate()), |
+ 2, 1); |
+ |
+ __ bind(&slow); |
+ PropertyAccessCompiler::TailCallBuiltin( |
+ masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); |
+} |
+ |
+ |
void ArgumentsAccessStub::GenerateNewStrict(MacroAssembler* masm) { |
// rsp[0] : return address |
// rsp[8] : number of parameters |