Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 760 | 760 |
| 761 // Perform tail call to the entry. | 761 // Perform tail call to the entry. |
| 762 __ TailCallExternalReference(ExternalReference( | 762 __ TailCallExternalReference(ExternalReference( |
| 763 IC_Utility(kKeyedLoadPropertyWithInterceptor)), 2, 1); | 763 IC_Utility(kKeyedLoadPropertyWithInterceptor)), 2, 1); |
| 764 | 764 |
| 765 __ bind(&slow); | 765 __ bind(&slow); |
| 766 GenerateMiss(masm); | 766 GenerateMiss(masm); |
| 767 } | 767 } |
| 768 | 768 |
| 769 | 769 |
| 770 void KeyedLoadIC::GeneratePixelArray(MacroAssembler* masm) { | |
| 771 // ----------- S t a t e ------------- | |
| 772 // -- rax : key | |
| 773 // -- rdx : receiver | |
| 774 // -- rsp[0] : return address | |
| 775 // ----------------------------------- | |
| 776 Label slow; | |
| 777 | |
| 778 // Verify that the receiver's elements are a pixel array. | |
| 779 __ JumpIfSmi(rdx, &slow); | |
| 780 __ movq(rcx, FieldOperand(rdx, JSObject::kElementsOffset)); | |
|
Mads Ager (chromium)
2011/01/25 14:49:17
JSObject check needed.
danno
2011/01/25 20:56:29
Done.
| |
| 781 __ CompareRoot(FieldOperand(rcx, HeapObject::kMapOffset), | |
| 782 Heap::kPixelArrayMapRootIndex); | |
| 783 __ j(not_equal, &slow); | |
| 784 | |
| 785 // Check that the key is a smi and in range. | |
| 786 __ JumpIfNotSmi(rax, &slow); | |
| 787 __ SmiToInteger32(rbx, rax); | |
| 788 __ cmpl(rbx, FieldOperand(rcx, PixelArray::kLengthOffset)); | |
| 789 __ j(above_equal, &slow); | |
| 790 | |
| 791 // Load and tag the element as a smi. | |
| 792 __ movq(rax, FieldOperand(rcx, PixelArray::kExternalPointerOffset)); | |
| 793 __ movzxbq(rax, Operand(rax, rbx, times_1, 0)); | |
| 794 __ Integer32ToSmi(rax, rax); | |
| 795 __ ret(0); | |
| 796 | |
| 797 __ bind(&slow); | |
| 798 GenerateMiss(masm); | |
| 799 } | |
| 800 | |
| 801 | |
| 770 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { | 802 void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
| 771 // ----------- S t a t e ------------- | 803 // ----------- S t a t e ------------- |
| 772 // -- rax : value | 804 // -- rax : value |
| 773 // -- rcx : key | 805 // -- rcx : key |
| 774 // -- rdx : receiver | 806 // -- rdx : receiver |
| 775 // -- rsp[0] : return address | 807 // -- rsp[0] : return address |
| 776 // ----------------------------------- | 808 // ----------------------------------- |
| 777 Label slow, slow_with_tagged_index, fast, array, extra, check_pixel_array; | 809 Label slow, slow_with_tagged_index, fast, array, extra, check_pixel_array; |
| 778 | 810 |
| 779 // Check that the object isn't a smi. | 811 // Check that the object isn't a smi. |
| (...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1702 } | 1734 } |
| 1703 | 1735 |
| 1704 void PatchInlinedSmiCode(Address address) { | 1736 void PatchInlinedSmiCode(Address address) { |
| 1705 UNIMPLEMENTED(); | 1737 UNIMPLEMENTED(); |
| 1706 } | 1738 } |
| 1707 | 1739 |
| 1708 | 1740 |
| 1709 } } // namespace v8::internal | 1741 } } // namespace v8::internal |
| 1710 | 1742 |
| 1711 #endif // V8_TARGET_ARCH_X64 | 1743 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |