| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index 2649b618c127c6c6d42e77f9c1ec27529fac45d6..1ae6261ec12fbc7977493933e2fdd06a8b5dd615 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -2175,19 +2175,17 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
| : UseRegisterOrConstantAtStart(instr->key());
|
| LLoadKeyed* result = NULL;
|
|
|
| - if (!instr->is_external()) {
|
| + if (!instr->is_external() && !instr->is_fixed_typed_array()) {
|
| LOperand* obj = UseRegisterAtStart(instr->elements());
|
| result = new(zone()) LLoadKeyed(obj, key);
|
| } else {
|
| ASSERT(
|
| (instr->representation().IsInteger32() &&
|
| - (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
|
| - (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
|
| + !(IsDoubleOrFloatElementsKind(instr->elements_kind()))) ||
|
| (instr->representation().IsDouble() &&
|
| - ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
|
| - (elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
|
| - LOperand* external_pointer = UseRegister(instr->elements());
|
| - result = new(zone()) LLoadKeyed(external_pointer, key);
|
| + (IsDoubleOrFloatElementsKind(instr->elements_kind()))));
|
| + LOperand* backing_store = UseRegister(instr->elements());
|
| + result = new(zone()) LLoadKeyed(backing_store, key);
|
| }
|
|
|
| DefineAsRegister(result);
|
| @@ -2217,7 +2215,10 @@ LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) {
|
| bool val_is_fixed_register =
|
| elements_kind == EXTERNAL_BYTE_ELEMENTS ||
|
| elements_kind == EXTERNAL_UNSIGNED_BYTE_ELEMENTS ||
|
| - elements_kind == EXTERNAL_PIXEL_ELEMENTS;
|
| + elements_kind == EXTERNAL_PIXEL_ELEMENTS ||
|
| + elements_kind == UINT8_ELEMENTS ||
|
| + elements_kind == INT8_ELEMENTS ||
|
| + elements_kind == UINT8_CLAMPED_ELEMENTS;
|
| if (val_is_fixed_register) {
|
| return UseFixed(instr->value(), eax);
|
| }
|
| @@ -2232,7 +2233,7 @@ LOperand* LChunkBuilder::GetStoreKeyedValueOperand(HStoreKeyed* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
| - if (!instr->is_external()) {
|
| + if (!instr->is_external() && !instr->is_fixed_typed_array()) {
|
| ASSERT(instr->elements()->representation().IsTagged());
|
| ASSERT(instr->key()->representation().IsInteger32() ||
|
| instr->key()->representation().IsSmi());
|
| @@ -2264,23 +2265,22 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
| ElementsKind elements_kind = instr->elements_kind();
|
| ASSERT(
|
| (instr->value()->representation().IsInteger32() &&
|
| - (elements_kind != EXTERNAL_FLOAT_ELEMENTS) &&
|
| - (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) ||
|
| + !IsDoubleOrFloatElementsKind(elements_kind)) ||
|
| (instr->value()->representation().IsDouble() &&
|
| - ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) ||
|
| - (elements_kind == EXTERNAL_DOUBLE_ELEMENTS))));
|
| - ASSERT(instr->elements()->representation().IsExternal());
|
| + IsDoubleOrFloatElementsKind(elements_kind)));
|
| + ASSERT((instr->is_fixed_typed_array() &&
|
| + instr->elements()->representation().IsTagged()) ||
|
| + (instr->is_external() &&
|
| + instr->elements()->representation().IsExternal()));
|
|
|
| - LOperand* external_pointer = UseRegister(instr->elements());
|
| + LOperand* backing_store = UseRegister(instr->elements());
|
| LOperand* val = GetStoreKeyedValueOperand(instr);
|
| bool clobbers_key = ExternalArrayOpRequiresTemp(
|
| instr->key()->representation(), elements_kind);
|
| LOperand* key = clobbers_key
|
| ? UseTempRegister(instr->key())
|
| : UseRegisterOrConstantAtStart(instr->key());
|
| - return new(zone()) LStoreKeyed(external_pointer,
|
| - key,
|
| - val);
|
| + return new(zone()) LStoreKeyed(backing_store, key, val);
|
| }
|
|
|
|
|
|
|