| 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 1565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1576 __ bind(¬_fast_object); | 1576 __ bind(¬_fast_object); |
| 1577 __ CheckFastSmiOnlyElements(r3, r7, &call_builtin); | 1577 __ CheckFastSmiOnlyElements(r3, r7, &call_builtin); |
| 1578 // edx: receiver | 1578 // edx: receiver |
| 1579 // r3: map | 1579 // r3: map |
| 1580 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, | 1580 __ LoadTransitionedArrayMapConditional(FAST_SMI_ONLY_ELEMENTS, |
| 1581 FAST_ELEMENTS, | 1581 FAST_ELEMENTS, |
| 1582 r3, | 1582 r3, |
| 1583 r7, | 1583 r7, |
| 1584 &call_builtin); | 1584 &call_builtin); |
| 1585 __ mov(r2, receiver); | 1585 __ mov(r2, receiver); |
| 1586 ElementsTransitionGenerator::GenerateSmiOnlyToObject(masm()); | 1586 ElementsTransitionGenerator::GenerateMapChangeElementTransition(masm()); |
| 1587 __ bind(&fast_object); | 1587 __ bind(&fast_object); |
| 1588 } else { | 1588 } else { |
| 1589 __ CheckFastObjectElements(r3, r3, &call_builtin); | 1589 __ CheckFastObjectElements(r3, r3, &call_builtin); |
| 1590 } | 1590 } |
| 1591 | 1591 |
| 1592 // Save new length. | 1592 // Save new length. |
| 1593 __ str(r0, FieldMemOperand(receiver, JSArray::kLengthOffset)); | 1593 __ str(r0, FieldMemOperand(receiver, JSArray::kLengthOffset)); |
| 1594 | 1594 |
| 1595 // Store the value. | 1595 // Store the value. |
| 1596 // We may need a register containing the address end_elements below, | 1596 // We may need a register containing the address end_elements below, |
| (...skipping 2642 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4239 } | 4239 } |
| 4240 | 4240 |
| 4241 // Make sure elements is a fast element array, not 'cow'. | 4241 // Make sure elements is a fast element array, not 'cow'. |
| 4242 __ CheckMap(elements_reg, | 4242 __ CheckMap(elements_reg, |
| 4243 scratch, | 4243 scratch, |
| 4244 Heap::kFixedArrayMapRootIndex, | 4244 Heap::kFixedArrayMapRootIndex, |
| 4245 &miss_force_generic, | 4245 &miss_force_generic, |
| 4246 DONT_DO_SMI_CHECK); | 4246 DONT_DO_SMI_CHECK); |
| 4247 | 4247 |
| 4248 __ bind(&finish_store); | 4248 __ bind(&finish_store); |
| 4249 if (elements_kind == FAST_SMI_ONLY_ELEMENTS) { | 4249 if (IsFastSmiElementsKind(elements_kind)) { |
| 4250 __ add(scratch, | 4250 __ add(scratch, |
| 4251 elements_reg, | 4251 elements_reg, |
| 4252 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 4252 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 4253 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); | 4253 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); |
| 4254 __ add(scratch, | 4254 __ add(scratch, |
| 4255 scratch, | 4255 scratch, |
| 4256 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); | 4256 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 4257 __ str(value_reg, MemOperand(scratch)); | 4257 __ str(value_reg, MemOperand(scratch)); |
| 4258 } else { | 4258 } else { |
| 4259 ASSERT(elements_kind == FAST_ELEMENTS); | 4259 ASSERT(IsFastObjectElementsKind(elements_kind)); |
| 4260 __ add(scratch, | 4260 __ add(scratch, |
| 4261 elements_reg, | 4261 elements_reg, |
| 4262 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); | 4262 Operand(FixedArray::kHeaderSize - kHeapObjectTag)); |
| 4263 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); | 4263 STATIC_ASSERT(kSmiTag == 0 && kSmiTagSize < kPointerSizeLog2); |
| 4264 __ add(scratch, | 4264 __ add(scratch, |
| 4265 scratch, | 4265 scratch, |
| 4266 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); | 4266 Operand(key_reg, LSL, kPointerSizeLog2 - kSmiTagSize)); |
| 4267 __ str(value_reg, MemOperand(scratch)); | 4267 __ str(value_reg, MemOperand(scratch)); |
| 4268 __ mov(receiver_reg, value_reg); | 4268 __ mov(receiver_reg, value_reg); |
| 4269 __ RecordWrite(elements_reg, // Object. | 4269 __ RecordWrite(elements_reg, // Object. |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4494 __ Jump(ic_slow, RelocInfo::CODE_TARGET); | 4494 __ Jump(ic_slow, RelocInfo::CODE_TARGET); |
| 4495 } | 4495 } |
| 4496 } | 4496 } |
| 4497 | 4497 |
| 4498 | 4498 |
| 4499 #undef __ | 4499 #undef __ |
| 4500 | 4500 |
| 4501 } } // namespace v8::internal | 4501 } } // namespace v8::internal |
| 4502 | 4502 |
| 4503 #endif // V8_TARGET_ARCH_ARM | 4503 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |