Index: src/hydrogen.cc |
diff --git a/src/hydrogen.cc b/src/hydrogen.cc |
index 48c27c93c6383d93eae83d87a0eeb9e70abb6fcf..d77dff3c18d2dc0c786233a4eeb44586c9ef2d88 100644 |
--- a/src/hydrogen.cc |
+++ b/src/hydrogen.cc |
@@ -3747,7 +3747,7 @@ HInstruction* HGraphBuilder::BuildLoadKeyedSpecializedArrayElement( |
AddInstruction(external_elements); |
HLoadKeyedSpecializedArrayElement* pixel_array_value = |
new(zone()) HLoadKeyedSpecializedArrayElement( |
- external_elements, key, expr->external_array_type()); |
+ external_elements, key, map->elements_kind()); |
return pixel_array_value; |
} |
@@ -3826,34 +3826,38 @@ HInstruction* HGraphBuilder::BuildStoreKeyedSpecializedArrayElement( |
HLoadExternalArrayPointer* external_elements = |
new(zone()) HLoadExternalArrayPointer(elements); |
AddInstruction(external_elements); |
- ExternalArrayType array_type = expr->external_array_type(); |
- switch (array_type) { |
- case kExternalPixelArray: { |
+ JSObject::ElementsKind elements_kind = map->elements_kind(); |
+ switch (elements_kind) { |
+ case JSObject::EXTERNAL_PIXEL_ELEMENTS: { |
HClampToUint8* clamp = new(zone()) HClampToUint8(val); |
AddInstruction(clamp); |
val = clamp; |
break; |
} |
- case kExternalByteArray: |
- case kExternalUnsignedByteArray: |
- case kExternalShortArray: |
- case kExternalUnsignedShortArray: |
- case kExternalIntArray: |
- case kExternalUnsignedIntArray: { |
+ case JSObject::EXTERNAL_BYTE_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
+ case JSObject::EXTERNAL_SHORT_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
+ case JSObject::EXTERNAL_INT_ELEMENTS: |
+ case JSObject::EXTERNAL_UNSIGNED_INT_ELEMENTS: { |
HToInt32* floor_val = new(zone()) HToInt32(val); |
AddInstruction(floor_val); |
val = floor_val; |
break; |
} |
- case kExternalFloatArray: |
- case kExternalDoubleArray: |
+ case JSObject::EXTERNAL_FLOAT_ELEMENTS: |
+ case JSObject::EXTERNAL_DOUBLE_ELEMENTS: |
+ case JSObject::FAST_ELEMENTS: |
+ case JSObject::FAST_DOUBLE_ELEMENTS: |
+ case JSObject::DICTIONARY_ELEMENTS: |
+ UNREACHABLE(); |
break; |
} |
return new(zone()) HStoreKeyedSpecializedArrayElement( |
external_elements, |
key, |
val, |
- expr->external_array_type()); |
+ map->elements_kind()); |
} |