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 3704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3715 // Check that the key is within bounds. | 3715 // Check that the key is within bounds. |
3716 if (is_js_array) { | 3716 if (is_js_array) { |
3717 __ SmiCompare(rcx, FieldOperand(rdx, JSArray::kLengthOffset)); | 3717 __ SmiCompare(rcx, FieldOperand(rdx, JSArray::kLengthOffset)); |
3718 __ j(above_equal, &miss_force_generic); | 3718 __ j(above_equal, &miss_force_generic); |
3719 } else { | 3719 } else { |
3720 __ SmiCompare(rcx, FieldOperand(rdi, FixedArray::kLengthOffset)); | 3720 __ SmiCompare(rcx, FieldOperand(rdi, FixedArray::kLengthOffset)); |
3721 __ j(above_equal, &miss_force_generic); | 3721 __ j(above_equal, &miss_force_generic); |
3722 } | 3722 } |
3723 | 3723 |
3724 // Do the store and update the write barrier. | 3724 // Do the store and update the write barrier. |
3725 __ SmiToInteger32(rcx, rcx); | |
3726 if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { | 3725 if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { |
3727 __ JumpIfNotSmi(rax, &miss_force_generic); | 3726 __ JumpIfNotSmi(rax, &miss_force_generic); |
| 3727 __ SmiToInteger32(rcx, rcx); |
3728 __ movq(FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize), | 3728 __ movq(FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize), |
3729 rax); | 3729 rax); |
3730 } else { | 3730 } else { |
3731 ASSERT(elements_kind == FAST_ELEMENTS); | 3731 ASSERT(elements_kind == FAST_ELEMENTS); |
| 3732 __ SmiToInteger32(rcx, rcx); |
3732 __ lea(rcx, | 3733 __ lea(rcx, |
3733 FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize)); | 3734 FieldOperand(rdi, rcx, times_pointer_size, FixedArray::kHeaderSize)); |
3734 __ movq(Operand(rcx, 0), rax); | 3735 __ movq(Operand(rcx, 0), rax); |
3735 // Make sure to preserve the value in register rax. | 3736 // Make sure to preserve the value in register rax. |
3736 __ movq(rdx, rax); | 3737 __ movq(rdx, rax); |
3737 __ RecordWrite(rdi, rcx, rdx, kDontSaveFPRegs); | 3738 __ RecordWrite(rdi, rcx, rdx, kDontSaveFPRegs); |
3738 } | 3739 } |
3739 | 3740 |
3740 // Done. | 3741 // Done. |
3741 __ ret(0); | 3742 __ ret(0); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3831 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); | 3832 masm->isolate()->builtins()->KeyedStoreIC_MissForceGeneric(); |
3832 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); | 3833 __ jmp(ic_force_generic, RelocInfo::CODE_TARGET); |
3833 } | 3834 } |
3834 | 3835 |
3835 | 3836 |
3836 #undef __ | 3837 #undef __ |
3837 | 3838 |
3838 } } // namespace v8::internal | 3839 } } // namespace v8::internal |
3839 | 3840 |
3840 #endif // V8_TARGET_ARCH_X64 | 3841 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |