Chromium Code Reviews| Index: src/ia32/lithium-ia32.cc |
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
| index 6e720f118d498d3bd5086a31a59f03577f169b95..4437240b84dd056a6d4e8b380322fb73ff29418b 100644 |
| --- a/src/ia32/lithium-ia32.cc |
| +++ b/src/ia32/lithium-ia32.cc |
| @@ -2301,7 +2301,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); |
| } |
| @@ -2316,7 +2319,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()); |
| @@ -2348,21 +2351,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()) || |
|
Toon Verwaest
2013/12/23 10:40:32
Align the instr at the same level of indentation.
Dmitry Lomov (no reviews)
2014/01/07 15:48:43
Done.
|
| + (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, |
| + return new(zone()) LStoreKeyed(backing_store, |
|
Toon Verwaest
2013/12/23 10:40:32
I'd put backing_store, key, val); on a single line
Dmitry Lomov (no reviews)
2014/01/07 15:48:43
Done.
|
| key, |
| val); |
| } |