Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(562)

Unified Diff: test/mjsunit/osr-elements-kind.js

Issue 1257223002: Revert of Remove ExternalArray, derived types, and element kinds (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/opt-elements-kind.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/osr-elements-kind.js
diff --git a/test/mjsunit/osr-elements-kind.js b/test/mjsunit/osr-elements-kind.js
index bd15ef37e4ef65283c02702598c61ca43478018a..389b6dac6f7f5cb90980f2895e20464befe392bd 100644
--- a/test/mjsunit/osr-elements-kind.js
+++ b/test/mjsunit/osr-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;
}
}
« no previous file with comments | « test/mjsunit/opt-elements-kind.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698