Index: test/mjsunit/opt-elements-kind.js |
diff --git a/test/mjsunit/opt-elements-kind.js b/test/mjsunit/opt-elements-kind.js |
index 515305a928880ad72937a3fab21b9efa66907feb..5f4f437299a5551d6c0075095630b5209bacb3f6 100644 |
--- a/test/mjsunit/opt-elements-kind.js |
+++ b/test/mjsunit/opt-elements-kind.js |
@@ -33,19 +33,19 @@ |
// Flags: --stress-runs=2 |
var elements_kind = { |
- fast_smi_only : 'fast smi only elements', |
- fast : 'fast elements', |
- fast_double : 'fast double elements', |
- dictionary : 'dictionary elements', |
- fixed_int32 : 'fixed int8 elements', |
- fixed_uint8 : 'fixed uint8 elements', |
- fixed_int16 : 'fixed int16 elements', |
- fixed_uint16 : 'fixed uint16 elements', |
- fixed_int32 : 'fixed int32 elements', |
- fixed_uint32 : 'fixed uint32 elements', |
- fixed_float32 : 'fixed float32 elements', |
- fixed_float64 : 'fixed float64 elements', |
- fixed_uint8_clamped : 'fixed uint8_clamped elements' |
+ fast_smi_only : 'fast smi only elements', |
+ fast : 'fast elements', |
+ fast_double : 'fast double elements', |
+ dictionary : 'dictionary elements', |
+ external_byte : 'external byte elements', |
+ external_unsigned_byte : 'external unsigned byte elements', |
+ external_short : 'external short elements', |
+ external_unsigned_short : 'external unsigned short elements', |
+ external_int : 'external int elements', |
+ external_unsigned_int : 'external unsigned int elements', |
+ external_float : 'external float elements', |
+ external_double : 'external double elements', |
+ external_pixel : 'external pixel elements' |
} |
function getKind(obj) { |
@@ -53,33 +53,34 @@ |
if (%HasFastObjectElements(obj)) return elements_kind.fast; |
if (%HasFastDoubleElements(obj)) return elements_kind.fast_double; |
if (%HasDictionaryElements(obj)) return elements_kind.dictionary; |
- |
- if (%HasFixedInt8Elements(obj)) { |
- return elements_kind.fixed_int8; |
+ // Every external kind is also an external array. |
+ assertTrue(%HasExternalArrayElements(obj)); |
+ if (%HasExternalByteElements(obj)) { |
+ return elements_kind.external_byte; |
} |
- if (%HasFixedUint8Elements(obj)) { |
- return elements_kind.fixed_uint8; |
+ if (%HasExternalUnsignedByteElements(obj)) { |
+ return elements_kind.external_unsigned_byte; |
} |
- if (%HasFixedInt16Elements(obj)) { |
- return elements_kind.fixed_int16; |
+ if (%HasExternalShortElements(obj)) { |
+ return elements_kind.external_short; |
} |
- if (%HasFixedUint16Elements(obj)) { |
- return elements_kind.fixed_uint16; |
+ if (%HasExternalUnsignedShortElements(obj)) { |
+ return elements_kind.external_unsigned_short; |
} |
- if (%HasFixedInt32Elements(obj)) { |
- return elements_kind.fixed_int32; |
+ if (%HasExternalIntElements(obj)) { |
+ return elements_kind.external_int; |
} |
- if (%HasFixedUint32Elements(obj)) { |
- return elements_kind.fixed_uint32; |
+ if (%HasExternalUnsignedIntElements(obj)) { |
+ return elements_kind.external_unsigned_int; |
} |
- if (%HasFixedFloat32Elements(obj)) { |
- return elements_kind.fixed_float32; |
+ if (%HasExternalFloatElements(obj)) { |
+ return elements_kind.external_float; |
} |
- if (%HasFixedFloat64Elements(obj)) { |
- return elements_kind.fixed_float64; |
+ if (%HasExternalDoubleElements(obj)) { |
+ return elements_kind.external_double; |
} |
- if (%HasFixedUint8ClampedElements(obj)) { |
- return elements_kind.fixed_uint8_clamped; |
+ if (%HasExternalPixelElements(obj)) { |
+ return elements_kind.external_pixel; |
} |
} |