Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 575373004: Convert KeyedLoad indexed interceptor case to a Handler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and ports. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/code-stubs.h ('k') | src/ic/arm/ic-arm.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_IA32 7 #if V8_TARGET_ARCH_IA32
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 641 matching lines...) Expand 10 before | Expand all | Expand 10 after
652 Register receiver = LoadDescriptor::ReceiverRegister(); 652 Register receiver = LoadDescriptor::ReceiverRegister();
653 653
654 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax, 654 NamedLoadHandlerCompiler::GenerateLoadFunctionPrototype(masm, receiver, eax,
655 ebx, &miss); 655 ebx, &miss);
656 __ bind(&miss); 656 __ bind(&miss);
657 PropertyAccessCompiler::TailCallBuiltin( 657 PropertyAccessCompiler::TailCallBuiltin(
658 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); 658 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC));
659 } 659 }
660 660
661 661
662 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) {
663 // Return address is on the stack.
664 Label slow;
665
666 Register receiver = LoadDescriptor::ReceiverRegister();
667 Register key = LoadDescriptor::NameRegister();
668 Register scratch = eax;
669 DCHECK(!scratch.is(receiver) && !scratch.is(key));
670
671 // Check that the key is an array index, that is Uint32.
672 __ test(key, Immediate(kSmiTagMask | kSmiSignMask));
673 __ j(not_zero, &slow);
674
675 // Everything is fine, call runtime.
676 __ pop(scratch);
677 __ push(receiver); // receiver
678 __ push(key); // key
679 __ push(scratch); // return address
680
681 // Perform tail call to the entry.
682 ExternalReference ref = ExternalReference(
683 IC_Utility(IC::kLoadElementWithInterceptor), masm->isolate());
684 __ TailCallExternalReference(ref, 2, 1);
685
686 __ bind(&slow);
687 PropertyAccessCompiler::TailCallBuiltin(
688 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC));
689 }
690
691
662 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) { 692 void ArgumentsAccessStub::GenerateReadElement(MacroAssembler* masm) {
663 // The key is in edx and the parameter count is in eax. 693 // The key is in edx and the parameter count is in eax.
664 DCHECK(edx.is(ArgumentsAccessReadDescriptor::index())); 694 DCHECK(edx.is(ArgumentsAccessReadDescriptor::index()));
665 DCHECK(eax.is(ArgumentsAccessReadDescriptor::parameter_count())); 695 DCHECK(eax.is(ArgumentsAccessReadDescriptor::parameter_count()));
666 696
667 // The displacement is used for skipping the frame pointer on the 697 // The displacement is used for skipping the frame pointer on the
668 // stack. It is the offset of the last parameter (if any) relative 698 // stack. It is the offset of the last parameter (if any) relative
669 // to the frame pointer. 699 // to the frame pointer.
670 static const int kDisplacement = 1 * kPointerSize; 700 static const int kDisplacement = 1 * kPointerSize;
671 701
(...skipping 3997 matching lines...) Expand 10 before | Expand all | Expand 10 after
4669 Operand(ebp, 7 * kPointerSize), 4699 Operand(ebp, 7 * kPointerSize),
4670 NULL); 4700 NULL);
4671 } 4701 }
4672 4702
4673 4703
4674 #undef __ 4704 #undef __
4675 4705
4676 } } // namespace v8::internal 4706 } } // namespace v8::internal
4677 4707
4678 #endif // V8_TARGET_ARCH_IA32 4708 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/code-stubs.h ('k') | src/ic/arm/ic-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698