Index: src/ia32/lithium-ia32.cc |
diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc |
index 44af661199a2371c49d823089fd999bba191c7fc..0dbb77b29e9dea5a36ac6c9f094c1c8fe38bfcb7 100644 |
--- a/src/ia32/lithium-ia32.cc |
+++ b/src/ia32/lithium-ia32.cc |
@@ -1965,13 +1965,15 @@ LInstruction* LChunkBuilder::DoLoadKeyedFastElement( |
LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( |
HLoadKeyedSpecializedArrayElement* instr) { |
- ExternalArrayType array_type = instr->array_type(); |
+ JSObject::ElementsKind elements_kind = instr->elements_kind(); |
Representation representation(instr->representation()); |
ASSERT( |
- (representation.IsInteger32() && (array_type != kExternalFloatArray && |
- array_type != kExternalDoubleArray)) || |
- (representation.IsDouble() && (array_type == kExternalFloatArray || |
- array_type == kExternalDoubleArray))); |
+ (representation.IsInteger32() && |
+ (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && |
+ (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || |
+ (representation.IsDouble() && |
+ ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || |
+ (elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS)))); |
ASSERT(instr->key()->representation().IsInteger32()); |
LOperand* external_pointer = UseRegister(instr->external_pointer()); |
LOperand* key = UseRegisterOrConstant(instr->key()); |
@@ -1981,7 +1983,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedSpecializedArrayElement( |
LInstruction* load_instr = DefineAsRegister(result); |
// An unsigned int array load might overflow and cause a deopt, make sure it |
// has an environment. |
- return (array_type == kExternalUnsignedIntArray) |
+ return (elements_kind == JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS) |
? AssignEnvironment(load_instr) |
: load_instr; |
} |
@@ -2019,21 +2021,23 @@ LInstruction* LChunkBuilder::DoStoreKeyedFastElement( |
LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( |
HStoreKeyedSpecializedArrayElement* instr) { |
Representation representation(instr->value()->representation()); |
- ExternalArrayType array_type = instr->array_type(); |
- ASSERT( |
- (representation.IsInteger32() && (array_type != kExternalFloatArray && |
- array_type != kExternalDoubleArray)) || |
- (representation.IsDouble() && (array_type == kExternalFloatArray || |
- array_type == kExternalDoubleArray))); |
+ JSObject::ElementsKind elements_kind = instr->elements_kind(); |
+ ASSERT( |
+ (representation.IsInteger32() && |
+ (elements_kind != JSObject::EXTERNAL_FLOAT_ELEMENTS) && |
+ (elements_kind != JSObject::EXTERNAL_DOUBLE_ELEMENTS)) || |
+ (representation.IsDouble() && |
+ ((elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS) || |
+ (elements_kind == JSObject::EXTERNAL_DOUBLE_ELEMENTS)))); |
ASSERT(instr->external_pointer()->representation().IsExternal()); |
ASSERT(instr->key()->representation().IsInteger32()); |
LOperand* external_pointer = UseRegister(instr->external_pointer()); |
LOperand* key = UseRegisterOrConstant(instr->key()); |
LOperand* val = NULL; |
- if (array_type == kExternalByteArray || |
- array_type == kExternalUnsignedByteArray || |
- array_type == kExternalPixelArray) { |
+ if (elements_kind == JSObject::EXTERNAL_BYTE_ELEMENTS || |
+ elements_kind == JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS || |
+ elements_kind == JSObject::EXTERNAL_PIXEL_ELEMENTS) { |
// We need a byte register in this case for the value. |
val = UseFixed(instr->value(), eax); |
} else { |