| OLD | NEW |
| 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 #if V8_TARGET_ARCH_IA32 | 5 #if V8_TARGET_ARCH_IA32 |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 __ j(equal, &miss); | 660 __ j(equal, &miss); |
| 661 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); | 661 __ TryGetFunctionPrototype(receiver, eax, ebx, &miss); |
| 662 __ ret(0); | 662 __ ret(0); |
| 663 | 663 |
| 664 __ bind(&miss); | 664 __ bind(&miss); |
| 665 PropertyAccessCompiler::TailCallBuiltin( | 665 PropertyAccessCompiler::TailCallBuiltin( |
| 666 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); | 666 masm, PropertyAccessCompiler::MissBuiltin(Code::LOAD_IC)); |
| 667 } | 667 } |
| 668 | 668 |
| 669 | 669 |
| 670 void LoadIndexedInterceptorStub::Generate(MacroAssembler* masm) { | |
| 671 // Return address is on the stack. | |
| 672 Label slow; | |
| 673 | |
| 674 Register receiver = LoadDescriptor::ReceiverRegister(); | |
| 675 Register key = LoadDescriptor::NameRegister(); | |
| 676 Register scratch = eax; | |
| 677 DCHECK(!scratch.is(receiver) && !scratch.is(key)); | |
| 678 | |
| 679 // Check that the key is an array index, that is Uint32. | |
| 680 __ test(key, Immediate(kSmiTagMask | kSmiSignMask)); | |
| 681 __ j(not_zero, &slow); | |
| 682 | |
| 683 // Everything is fine, call runtime. | |
| 684 __ pop(scratch); | |
| 685 __ push(receiver); // receiver | |
| 686 __ push(key); // key | |
| 687 __ push(scratch); // return address | |
| 688 | |
| 689 // Perform tail call to the entry. | |
| 690 __ TailCallRuntime(Runtime::kLoadElementWithInterceptor); | |
| 691 | |
| 692 __ bind(&slow); | |
| 693 PropertyAccessCompiler::TailCallBuiltin( | |
| 694 masm, PropertyAccessCompiler::MissBuiltin(Code::KEYED_LOAD_IC)); | |
| 695 } | |
| 696 | |
| 697 | |
| 698 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { | 670 void LoadIndexedStringStub::Generate(MacroAssembler* masm) { |
| 699 // Return address is on the stack. | 671 // Return address is on the stack. |
| 700 Label miss; | 672 Label miss; |
| 701 | 673 |
| 702 Register receiver = LoadDescriptor::ReceiverRegister(); | 674 Register receiver = LoadDescriptor::ReceiverRegister(); |
| 703 Register index = LoadDescriptor::NameRegister(); | 675 Register index = LoadDescriptor::NameRegister(); |
| 704 Register scratch = edi; | 676 Register scratch = edi; |
| 705 DCHECK(!scratch.is(receiver) && !scratch.is(index)); | 677 DCHECK(!scratch.is(receiver) && !scratch.is(index)); |
| 706 Register result = eax; | 678 Register result = eax; |
| 707 DCHECK(!result.is(scratch)); | 679 DCHECK(!result.is(scratch)); |
| (...skipping 5173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5881 return_value_operand, NULL); | 5853 return_value_operand, NULL); |
| 5882 } | 5854 } |
| 5883 | 5855 |
| 5884 | 5856 |
| 5885 #undef __ | 5857 #undef __ |
| 5886 | 5858 |
| 5887 } // namespace internal | 5859 } // namespace internal |
| 5888 } // namespace v8 | 5860 } // namespace v8 |
| 5889 | 5861 |
| 5890 #endif // V8_TARGET_ARCH_IA32 | 5862 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |