Index: src/arm/ic-arm.cc |
diff --git a/src/arm/ic-arm.cc b/src/arm/ic-arm.cc |
index 301b915bb1e500fcfb07a6fd1230963a457615a7..6c7aa0643ace46483f80a1032373044605b4db06 100644 |
--- a/src/arm/ic-arm.cc |
+++ b/src/arm/ic-arm.cc |
@@ -1475,24 +1475,20 @@ void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) { |
// Check whether the elements is a pixel array. |
// r4: elements map. |
__ bind(&check_pixel_array); |
- __ LoadRoot(ip, Heap::kPixelArrayMapRootIndex); |
- __ cmp(r4, ip); |
- __ b(ne, &slow); |
- // Check that the value is a smi. If a conversion is needed call into the |
- // runtime to convert and clamp. |
- __ JumpIfNotSmi(value, &slow); |
- __ mov(r4, Operand(key, ASR, kSmiTagSize)); // Untag the key. |
- __ ldr(ip, FieldMemOperand(elements, PixelArray::kLengthOffset)); |
- __ cmp(r4, Operand(ip)); |
- __ b(hs, &slow); |
- __ mov(r5, Operand(value, ASR, kSmiTagSize)); // Untag the value. |
- __ Usat(r5, 8, Operand(r5)); // Clamp the value to [0..255]. |
- |
- // Get the pointer to the external array. This clobbers elements. |
- __ ldr(elements, |
- FieldMemOperand(elements, PixelArray::kExternalPointerOffset)); |
- __ strb(r5, MemOperand(elements, r4)); // Elements is now external array. |
- __ Ret(); |
+ GenerateFastPixelArrayStore(masm, |
+ r2, |
+ r1, |
+ r0, |
+ elements, |
+ r4, |
+ r5, |
+ r6, |
+ false, |
+ false, |
+ NULL, |
+ &slow, |
+ &slow, |
+ &slow); |
// Extra capacity case: Check if there is extra capacity to |
// perform the store and update the length. Used for adding one |