OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1564 | 1564 |
1565 // Check that elements are FixedArray. | 1565 // Check that elements are FixedArray. |
1566 // We rely on StoreIC_ArrayLength below to deal with all types of | 1566 // We rely on StoreIC_ArrayLength below to deal with all types of |
1567 // fast elements (including COW). | 1567 // fast elements (including COW). |
1568 __ lw(scratch, FieldMemOperand(receiver, JSArray::kElementsOffset)); | 1568 __ lw(scratch, FieldMemOperand(receiver, JSArray::kElementsOffset)); |
1569 __ GetObjectType(scratch, scratch, scratch); | 1569 __ GetObjectType(scratch, scratch, scratch); |
1570 __ Branch(&miss, ne, scratch, Operand(FIXED_ARRAY_TYPE)); | 1570 __ Branch(&miss, ne, scratch, Operand(FIXED_ARRAY_TYPE)); |
1571 | 1571 |
1572 // Check that the array has fast properties, otherwise the length | 1572 // Check that the array has fast properties, otherwise the length |
1573 // property might have been redefined. | 1573 // property might have been redefined. |
1574 // TODO(mstarzinger): Port this check to MIPS. | 1574 __ lw(scratch, FieldMemOperand(receiver, JSArray::kPropertiesOffset)); |
| 1575 __ lw(scratch, FieldMemOperand(scratch, FixedArray::kMapOffset)); |
| 1576 __ LoadRoot(at, Heap::kHashTableMapRootIndex); |
| 1577 __ Branch(&miss, eq, scratch, Operand(at)); |
1575 | 1578 |
1576 // Check that value is a smi. | 1579 // Check that value is a smi. |
1577 __ JumpIfNotSmi(value, &miss); | 1580 __ JumpIfNotSmi(value, &miss); |
1578 | 1581 |
1579 // Prepare tail call to StoreIC_ArrayLength. | 1582 // Prepare tail call to StoreIC_ArrayLength. |
1580 __ Push(receiver, value); | 1583 __ Push(receiver, value); |
1581 | 1584 |
1582 ExternalReference ref = ExternalReference(IC_Utility(kStoreIC_ArrayLength), | 1585 ExternalReference ref = ExternalReference(IC_Utility(kStoreIC_ArrayLength), |
1583 masm->isolate()); | 1586 masm->isolate()); |
1584 __ TailCallExternalReference(ref, 2, 1); | 1587 __ TailCallExternalReference(ref, 2, 1); |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1749 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); | 1752 Register reg = Register::from_code(Assembler::GetRs(instr_at_patch)); |
1750 patcher.masm()->andi(at, reg, kSmiTagMask); | 1753 patcher.masm()->andi(at, reg, kSmiTagMask); |
1751 patcher.ChangeBranchCondition(eq); | 1754 patcher.ChangeBranchCondition(eq); |
1752 } | 1755 } |
1753 } | 1756 } |
1754 | 1757 |
1755 | 1758 |
1756 } } // namespace v8::internal | 1759 } } // namespace v8::internal |
1757 | 1760 |
1758 #endif // V8_TARGET_ARCH_MIPS | 1761 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |