| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 861 // address to store into and fall through to fast case. | 861 // address to store into and fall through to fast case. |
| 862 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // Compare smis. | 862 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // Compare smis. |
| 863 __ j(above_equal, &extra, not_taken); | 863 __ j(above_equal, &extra, not_taken); |
| 864 | 864 |
| 865 // Fast case: Do the store. | 865 // Fast case: Do the store. |
| 866 __ bind(&fast); | 866 __ bind(&fast); |
| 867 // eax: value | 867 // eax: value |
| 868 // ecx: key (a smi) | 868 // ecx: key (a smi) |
| 869 // edx: receiver | 869 // edx: receiver |
| 870 // edi: FixedArray receiver->elements | 870 // edi: FixedArray receiver->elements |
| 871 __ mov(FieldOperand(edi, ecx, times_2, FixedArray::kHeaderSize), eax); | 871 __ mov(CodeGenerator::FixedArrayElementOperand(edi, ecx), eax); |
| 872 // Update write barrier for the elements array address. | 872 // Update write barrier for the elements array address. |
| 873 __ mov(edx, Operand(eax)); | 873 __ mov(edx, Operand(eax)); |
| 874 __ RecordWrite(edi, 0, edx, ecx); | 874 __ RecordWrite(edi, 0, edx, ecx); |
| 875 __ ret(0); | 875 __ ret(0); |
| 876 } | 876 } |
| 877 | 877 |
| 878 | 878 |
| 879 void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm, | 879 void KeyedStoreIC::GenerateExternalArray(MacroAssembler* masm, |
| 880 ExternalArrayType array_type) { | 880 ExternalArrayType array_type) { |
| 881 // ----------- S t a t e ------------- | 881 // ----------- S t a t e ------------- |
| (...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1636 | 1636 |
| 1637 // Do tail-call to runtime routine. | 1637 // Do tail-call to runtime routine. |
| 1638 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss)); | 1638 ExternalReference ref = ExternalReference(IC_Utility(kKeyedStoreIC_Miss)); |
| 1639 __ TailCallExternalReference(ref, 3, 1); | 1639 __ TailCallExternalReference(ref, 3, 1); |
| 1640 } | 1640 } |
| 1641 | 1641 |
| 1642 #undef __ | 1642 #undef __ |
| 1643 | 1643 |
| 1644 | 1644 |
| 1645 } } // namespace v8::internal | 1645 } } // namespace v8::internal |
| OLD | NEW |