| Index: src/arm/lithium-arm.cc
|
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
|
| index 344699533ee07e3a8003a100e2c0cdbb1081ce22..7ffe526985d606432e047af235cbd76810d051a3 100644
|
| --- a/src/arm/lithium-arm.cc
|
| +++ b/src/arm/lithium-arm.cc
|
| @@ -1807,15 +1807,22 @@ LInstruction* LChunkBuilder::DoLoadKeyedFastElement(
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DoLoadPixelArrayElement(
|
| - HLoadPixelArrayElement* instr) {
|
| +LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement(
|
| + HLoadKeyedSpecializedArrayElement* instr) {
|
| + // TODO(danno): Add support for other external array types.
|
| + if (instr->array_type() != kExternalPixelArray) {
|
| + Abort("unsupported load for external array type.");
|
| + }
|
| +
|
| ASSERT(instr->representation().IsInteger32());
|
| ASSERT(instr->key()->representation().IsInteger32());
|
| LOperand* external_pointer =
|
| UseRegisterAtStart(instr->external_pointer());
|
| LOperand* key = UseRegisterAtStart(instr->key());
|
| - LLoadPixelArrayElement* result =
|
| - new LLoadPixelArrayElement(external_pointer, key);
|
| + LLoadKeyedSpecializedArrayElement* result =
|
| + new LLoadKeyedSpecializedArrayElement(external_pointer,
|
| + key,
|
| + instr->array_type());
|
| return DefineAsRegister(result);
|
| }
|
|
|
| @@ -1849,8 +1856,13 @@ LInstruction* LChunkBuilder::DoStoreKeyedFastElement(
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DoStorePixelArrayElement(
|
| - HStorePixelArrayElement* instr) {
|
| +LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement(
|
| + HStoreKeyedSpecializedArrayElement* instr) {
|
| + // TODO(danno): Add support for other external array types.
|
| + if (instr->array_type() != kExternalPixelArray) {
|
| + Abort("unsupported store for external array type.");
|
| + }
|
| +
|
| ASSERT(instr->value()->representation().IsInteger32());
|
| ASSERT(instr->external_pointer()->representation().IsExternal());
|
| ASSERT(instr->key()->representation().IsInteger32());
|
| @@ -1859,7 +1871,10 @@ LInstruction* LChunkBuilder::DoStorePixelArrayElement(
|
| LOperand* value = UseTempRegister(instr->value()); // changed by clamp.
|
| LOperand* key = UseRegister(instr->key());
|
|
|
| - return new LStorePixelArrayElement(external_pointer, key, value);
|
| + return new LStoreKeyedSpecializedArrayElement(external_pointer,
|
| + key,
|
| + value,
|
| + instr->array_type());
|
| }
|
|
|
|
|
|
|