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 820 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
831 // address to store into and fall through to fast case. | 831 // address to store into and fall through to fast case. |
832 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // Compare smis. | 832 __ cmp(ecx, FieldOperand(edx, JSArray::kLengthOffset)); // Compare smis. |
833 __ j(above_equal, &extra, not_taken); | 833 __ j(above_equal, &extra, not_taken); |
834 | 834 |
835 // Fast case: Do the store. | 835 // Fast case: Do the store. |
836 __ bind(&fast); | 836 __ bind(&fast); |
837 // eax: value | 837 // eax: value |
838 // ecx: key (a smi) | 838 // ecx: key (a smi) |
839 // edx: receiver | 839 // edx: receiver |
840 // edi: FixedArray receiver->elements | 840 // edi: FixedArray receiver->elements |
841 __ mov(CodeGenerator::FixedArrayElementOperand(edi, ecx), eax); | 841 __ mov(FixedArrayElementOperand(edi, ecx), eax); |
842 // Update write barrier for the elements array address. | 842 // Update write barrier for the elements array address. |
843 __ mov(edx, Operand(eax)); | 843 __ mov(edx, Operand(eax)); |
844 __ RecordWrite(edi, 0, edx, ecx); | 844 __ RecordWrite(edi, 0, edx, ecx); |
845 __ ret(0); | 845 __ ret(0); |
846 } | 846 } |
847 | 847 |
848 | 848 |
849 // The generated code does not accept smi keys. | 849 // The generated code does not accept smi keys. |
850 // The generated code falls through if both probes miss. | 850 // The generated code falls through if both probes miss. |
851 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm, | 851 static void GenerateMonomorphicCacheProbe(MacroAssembler* masm, |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1770 Condition cc = *jmp_address == Assembler::kJncShortOpcode | 1770 Condition cc = *jmp_address == Assembler::kJncShortOpcode |
1771 ? not_zero | 1771 ? not_zero |
1772 : zero; | 1772 : zero; |
1773 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); | 1773 *jmp_address = static_cast<byte>(Assembler::kJccShortPrefix | cc); |
1774 } | 1774 } |
1775 | 1775 |
1776 | 1776 |
1777 } } // namespace v8::internal | 1777 } } // namespace v8::internal |
1778 | 1778 |
1779 #endif // V8_TARGET_ARCH_IA32 | 1779 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |