OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
788 // Check the key against the length in the array, compute the | 788 // Check the key against the length in the array, compute the |
789 // address to store into and fall through to fast case. | 789 // address to store into and fall through to fast case. |
790 __ SmiCompareInteger32(FieldOperand(rdx, JSArray::kLengthOffset), rcx); | 790 __ SmiCompareInteger32(FieldOperand(rdx, JSArray::kLengthOffset), rcx); |
791 __ j(below_equal, &extra); | 791 __ j(below_equal, &extra); |
792 | 792 |
793 // Fast case: Do the store. | 793 // Fast case: Do the store. |
794 __ bind(&fast); | 794 __ bind(&fast); |
795 // rax: value | 795 // rax: value |
796 // rbx: receiver's elements array (a FixedArray) | 796 // rbx: receiver's elements array (a FixedArray) |
797 // rcx: index | 797 // rcx: index |
798 NearLabel non_smi_value; | 798 Label non_smi_value; |
799 __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize), | 799 __ movq(FieldOperand(rbx, rcx, times_pointer_size, FixedArray::kHeaderSize), |
800 rax); | 800 rax); |
801 __ JumpIfNotSmi(rax, &non_smi_value); | 801 __ JumpIfNotSmi(rax, &non_smi_value, Label::kNear); |
802 __ ret(0); | 802 __ ret(0); |
803 __ bind(&non_smi_value); | 803 __ bind(&non_smi_value); |
804 // Slow case that needs to retain rcx for use by RecordWrite. | 804 // Slow case that needs to retain rcx for use by RecordWrite. |
805 // Update write barrier for the elements array address. | 805 // Update write barrier for the elements array address. |
806 __ movq(rdx, rax); | 806 __ movq(rdx, rax); |
807 __ RecordWriteNonSmi(rbx, 0, rdx, rcx); | 807 __ RecordWriteNonSmi(rbx, 0, rdx, rcx); |
808 __ ret(0); | 808 __ ret(0); |
809 } | 809 } |
810 | 810 |
811 | 811 |
(...skipping 745 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1557 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1557 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1558 ? not_zero | 1558 ? not_zero |
1559 : zero; | 1559 : zero; |
1560 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1560 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1561 } | 1561 } |
1562 | 1562 |
1563 | 1563 |
1564 } } // namespace v8::internal | 1564 } } // namespace v8::internal |
1565 | 1565 |
1566 #endif // V8_TARGET_ARCH_X64 | 1566 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |