Index: src/arm/lithium-arm.cc |
diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc |
index a8602937c50fed4750c830b4f2e27cf41035bc81..470469fb9ed09b38a25e367a9c730f87b6d06ffd 100644 |
--- a/src/arm/lithium-arm.cc |
+++ b/src/arm/lithium-arm.cc |
@@ -2110,7 +2110,7 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
LLoadKeyed* result = NULL; |
- if (!instr->is_typed_elements()) { |
+ if (!instr->is_external()) { |
LOperand* obj = NULL; |
if (instr->representation().IsDouble()) { |
obj = UseRegister(instr->elements()); |
@@ -2122,19 +2122,20 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) { |
} else { |
ASSERT( |
(instr->representation().IsInteger32() && |
- !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
+ (elements_kind != EXTERNAL_FLOAT_ELEMENTS) && |
+ (elements_kind != EXTERNAL_DOUBLE_ELEMENTS)) || |
(instr->representation().IsDouble() && |
- IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
- LOperand* backing_store = UseRegister(instr->elements()); |
- result = new(zone()) LLoadKeyed(backing_store, key); |
+ ((elements_kind == EXTERNAL_FLOAT_ELEMENTS) || |
+ (elements_kind == EXTERNAL_DOUBLE_ELEMENTS)))); |
+ LOperand* external_pointer = UseRegister(instr->elements()); |
+ result = new(zone()) LLoadKeyed(external_pointer, key); |
} |
DefineAsRegister(result); |
// An unsigned int array load might overflow and cause a deopt, make sure it |
// has an environment. |
bool can_deoptimize = instr->RequiresHoleCheck() || |
- elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS || |
- elements_kind == UINT32_ELEMENTS; |
+ (elements_kind == EXTERNAL_UNSIGNED_INT_ELEMENTS); |
return can_deoptimize ? AssignEnvironment(result) : result; |
} |
@@ -2151,7 +2152,7 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) { |
LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
- if (!instr->is_typed_elements()) { |
+ if (!instr->is_external()) { |
ASSERT(instr->elements()->representation().IsTagged()); |
bool needs_write_barrier = instr->NeedsWriteBarrier(); |
LOperand* object = NULL; |
@@ -2180,17 +2181,16 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) { |
ASSERT( |
(instr->value()->representation().IsInteger32() && |
- !IsDoubleOrFloatElementsKind(instr->elements_kind())) || |
+ (instr->elements_kind() != EXTERNAL_FLOAT_ELEMENTS) && |
+ (instr->elements_kind() != EXTERNAL_DOUBLE_ELEMENTS)) || |
(instr->value()->representation().IsDouble() && |
- IsDoubleOrFloatElementsKind(instr->elements_kind()))); |
- ASSERT((instr->is_fixed_typed_array() && |
- instr->elements()->representation().IsTagged()) || |
- (instr->is_external() && |
- instr->elements()->representation().IsExternal())); |
+ ((instr->elements_kind() == EXTERNAL_FLOAT_ELEMENTS) || |
+ (instr->elements_kind() == EXTERNAL_DOUBLE_ELEMENTS)))); |
+ ASSERT(instr->elements()->representation().IsExternal()); |
LOperand* val = UseRegister(instr->value()); |
LOperand* key = UseRegisterOrConstantAtStart(instr->key()); |
- LOperand* backing_store = UseRegister(instr->elements()); |
- return new(zone()) LStoreKeyed(backing_store, key, val); |
+ LOperand* external_pointer = UseRegister(instr->elements()); |
+ return new(zone()) LStoreKeyed(external_pointer, key, val); |
} |