Index: src/x64/lithium-x64.cc |
diff --git a/src/x64/lithium-x64.cc b/src/x64/lithium-x64.cc |
index 853f65657d0741aee5303714b44bfc18e24d38f4..a68f57d6ee0e9320d666e6f85da617c4cae0b2a3 100644 |
--- a/src/x64/lithium-x64.cc |
+++ b/src/x64/lithium-x64.cc |
@@ -1920,13 +1920,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()); |
@@ -1935,7 +1937,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; |
} |
@@ -1971,18 +1973,21 @@ LInstruction* LChunkBuilder::DoStoreKeyedFastElement( |
LInstruction* LChunkBuilder::DoStoreKeyedSpecializedArrayElement( |
HStoreKeyedSpecializedArrayElement* instr) { |
Representation representation(instr->value()->representation()); |
- ExternalArrayType array_type = instr->array_type(); |
+ JSObject::ElementsKind elements_kind = instr->elements_kind(); |
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->external_pointer()->representation().IsExternal()); |
ASSERT(instr->key()->representation().IsInteger32()); |
LOperand* external_pointer = UseRegister(instr->external_pointer()); |
- bool val_is_temp_register = array_type == kExternalPixelArray || |
- array_type == kExternalFloatArray; |
+ bool val_is_temp_register = |
+ elements_kind == JSObject::EXTERNAL_PIXEL_ELEMENTS || |
+ elements_kind == JSObject::EXTERNAL_FLOAT_ELEMENTS; |
LOperand* val = val_is_temp_register |
? UseTempRegister(instr->value()) |
: UseRegister(instr->value()); |