| Index: src/ia32/ic-ia32.cc
|
| ===================================================================
|
| --- src/ia32/ic-ia32.cc (revision 6456)
|
| +++ src/ia32/ic-ia32.cc (working copy)
|
| @@ -760,6 +760,40 @@
|
| }
|
|
|
|
|
| +void KeyedLoadIC::GeneratePixelArray(MacroAssembler* masm) {
|
| + // ----------- S t a t e -------------
|
| + // -- eax : key
|
| + // -- edx : receiver
|
| + // -- esp[0] : return address
|
| + // -----------------------------------
|
| + Label slow;
|
| +
|
| + // Verify that it's safe to access the receiver's elements.
|
| + GenerateKeyedLoadReceiverCheck(
|
| + masm, edx, ecx, Map::kHasNamedInterceptor, &slow);
|
| +
|
| + // Verify that the receiver has pixel array elements
|
| + __ mov(ecx, FieldOperand(edx, JSObject::kElementsOffset));
|
| + __ CheckMap(ecx, Factory::pixel_array_map(), &slow, true);
|
| +
|
| + // Verify that the key is a smi that's in range.
|
| + __ test(eax, Immediate(kSmiTagMask));
|
| + __ j(not_zero, &slow, not_taken);
|
| + __ SmiUntag(eax);
|
| + __ cmp(eax, FieldOperand(ecx, PixelArray::kLengthOffset));
|
| + __ j(above_equal, &slow);
|
| +
|
| + // Load the element and tag it as an smi.
|
| + __ mov(ebx, FieldOperand(ecx, PixelArray::kExternalPointerOffset));
|
| + __ movzx_b(eax, Operand(ebx, eax, times_1, 0));
|
| + __ SmiTag(eax);
|
| + __ ret(0);
|
| +
|
| + __ bind(&slow);
|
| + GenerateMiss(masm);
|
| +}
|
| +
|
| +
|
| void KeyedStoreIC::GenerateGeneric(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- eax : value
|
|
|