Index: src/harmony-simd.js |
diff --git a/src/harmony-simd.js b/src/harmony-simd.js |
index a4378167dacdbb5e3729ad7ad53d6bfad8a19a9d..2a42f35bb1ede01a4ad50bfff3f5f250a90e9cce 100644 |
--- a/src/harmony-simd.js |
+++ b/src/harmony-simd.js |
@@ -3,6 +3,12 @@ |
// found in the LICENSE file. |
var $float32x4ToString; |
+var $int32x4ToString; |
+var $bool32x4ToString; |
+var $int16x8ToString; |
+var $bool16x8ToString; |
+var $int8x16ToString; |
+var $bool8x16ToString; |
(function(global, utils) { |
@@ -15,15 +21,18 @@ var $float32x4ToString; |
var GlobalSIMD = global.SIMD; |
var GlobalFloat32x4 = GlobalSIMD.Float32x4; |
+var GlobalInt32x4 = GlobalSIMD.Int32x4; |
+var GlobalBool32x4 = GlobalSIMD.Bool32x4; |
+var GlobalInt16x8 = GlobalSIMD.Int16x8; |
+var GlobalBool16x8 = GlobalSIMD.Bool16x8; |
+var GlobalInt8x16 = GlobalSIMD.Int8x16; |
+var GlobalBool8x16 = GlobalSIMD.Bool8x16; |
//------------------------------------------------------------------- |
-function Float32x4Constructor(x, y, z, w) { |
+function Float32x4Constructor(c0, c1, c2, c3) { |
if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Float32x4"); |
- if (!IS_NUMBER(x) || !IS_NUMBER(y) || !IS_NUMBER(z) || !IS_NUMBER(w)) { |
- throw MakeTypeError(kInvalidArgument); |
- } |
- return %CreateFloat32x4(x, y, z, w); |
+ return %CreateFloat32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3)); |
rossberg
2015/07/29 14:37:55
Nit: line length
bbudge
2015/07/30 13:46:58
Done.
|
} |
function Float32x4Splat(s) { |
@@ -40,11 +49,12 @@ function Float32x4ToString() { |
"Float32x4.prototype.toString", this); |
} |
var value = %_ValueOf(this); |
- var w = GlobalFloat32x4.extractLane(value, 0), |
- x = GlobalFloat32x4.extractLane(value, 1), |
- y = GlobalFloat32x4.extractLane(value, 2), |
- z = GlobalFloat32x4.extractLane(value, 3); |
- return "SIMD.Float32x4(" + w + ", " + x + ", " + y + ", " + z + ")"; |
+ var str = "SIMD.Float32x4("; |
+ str += %Float32x4ExtractLane(value, 0); |
+ for (var i = 1; i < 4; i++) { |
+ str += ", " + %Float32x4ExtractLane(value, i); |
+ } |
+ return str + ")"; |
} |
function Float32x4ToLocaleString() { |
@@ -53,11 +63,12 @@ function Float32x4ToLocaleString() { |
"Float32x4.prototype.toLocaleString", this); |
} |
var value = %_ValueOf(this); |
- var w = GlobalFloat32x4.extractLane(value, 0).toLocaleString(), |
- x = GlobalFloat32x4.extractLane(value, 1).toLocaleString(), |
- y = GlobalFloat32x4.extractLane(value, 2).toLocaleString(), |
- z = GlobalFloat32x4.extractLane(value, 3).toLocaleString(); |
- return "SIMD.Float32x4(" + w + ", " + x + ", " + y + ", " + z + ")"; |
+ var str = "SIMD.Float32x4("; |
+ str += %Float32x4ExtractLane(value, 0).toLocaleString(); |
+ for (var i = 1; i < 4; i++) { |
+ str += ", " + %Float32x4ExtractLane(value, i).toLocaleString(); |
+ } |
+ return str + ")"; |
} |
function Float32x4ValueOf() { |
@@ -68,10 +79,384 @@ function Float32x4ValueOf() { |
return %_ValueOf(this); |
} |
+function Float32x4ExtractLaneJS(a, lane) { |
+ return %Float32x4ExtractLane(a, lane); |
+} |
+ |
+function Float32x4ReplaceLaneJS(a, lane, value) { |
+ return %Float32x4ReplaceLane(a, lane, TO_NUMBER_INLINE(value)); |
+} |
+ |
+//------------------------------------------------------------------- |
rossberg
2015/07/29 14:37:55
Would it be possible to avoid all the repetition b
bbudge
2015/07/30 13:46:58
Macros in JS? I didn't know! Done.
|
+ |
+function Int32x4Constructor(c0, c1, c2, c3) { |
+ if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int32x4"); |
+ return %CreateInt32x4(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), |
+ TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3)); |
+} |
+ |
+function Int32x4Splat(s) { |
+ return %CreateInt32x4(s, s, s, s); |
+} |
+ |
+function Int32x4CheckJS(a) { |
+ return %Int32x4Check(a); |
+} |
+ |
+function Int32x4ToString() { |
+ if (!(IS_INT32X4(this) || IS_INT32X4_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int32x4.prototype.toString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Int32x4("; |
+ str += %Int32x4ExtractLane(value, 0); |
+ for (var i = 1; i < 4; i++) { |
+ str += ", " + %Int32x4ExtractLane(value, i); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Int32x4ToLocaleString() { |
+ if (!(IS_INT32X4(this) || IS_INT32X4_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int32x4.prototype.toLocaleString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Int32x4("; |
+ str += %Int32x4ExtractLane(value, 0).toLocaleString(); |
+ for (var i = 1; i < 4; i++) { |
+ str += ", " + %Int32x4ExtractLane(value, i).toLocaleString(); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Int32x4ValueOf() { |
+ if (!(IS_INT32X4(this) || IS_INT32X4_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int32x4.prototype.valueOf", this); |
+ } |
+ return %_ValueOf(this); |
+} |
+ |
+function Int32x4ExtractLaneJS(a, lane) { |
+ return %Int32x4ExtractLane(a, lane); |
+} |
+ |
+function Int32x4ReplaceLaneJS(a, lane, value) { |
+ return %Int32x4ReplaceLane(a, lane, TO_NUMBER_INLINE(value)); |
+} |
+ |
+//------------------------------------------------------------------- |
+ |
+function Bool32x4Constructor(c0, c1, c2, c3) { |
+ if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool32x4"); |
+ return %CreateBool32x4(c0, c1, c2, c3); |
+} |
+ |
+function Bool32x4Splat(s) { |
+ return %CreateBool32x4(s, s, s, s); |
+} |
+ |
+function Bool32x4CheckJS(a) { |
+ return %Bool32x4Check(a); |
+} |
+ |
+function Bool32x4ToString() { |
+ if (!(IS_BOOL32X4(this) || IS_BOOL32X4_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool32x4.prototype.toString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Bool32x4("; |
+ str += %Bool32x4ExtractLane(value, 0); |
+ for (var i = 1; i < 4; i++) { |
+ str += ", " + %Bool32x4ExtractLane(value, i); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Bool32x4ToLocaleString() { |
+ if (!(IS_BOOL32X4(this) || IS_BOOL32X4_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool32x4.prototype.toLocaleString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Bool32x4("; |
+ str += %Bool32x4ExtractLane(value, 0).toLocaleString(); |
+ for (var i = 1; i < 4; i++) { |
+ str += ", " + %Bool32x4ExtractLane(value, i).toLocaleString(); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Bool32x4ValueOf() { |
+ if (!(IS_BOOL32X4(this) || IS_BOOL32X4_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool32x4.prototype.valueOf", this); |
+ } |
+ return %_ValueOf(this); |
+} |
+ |
+function Bool32x4ExtractLaneJS(a, lane) { |
+ return %Bool32x4ExtractLane(a, lane); |
+} |
+ |
+function Bool32x4ReplaceLaneJS(a, lane, value) { |
+ return %Bool32x4ReplaceLane(a, lane, value); |
+} |
+ |
//------------------------------------------------------------------- |
-function Float32x4ExtractLaneJS(value, lane) { |
- return %Float32x4ExtractLane(value, lane); |
+function Int16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) { |
+ if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int16x8"); |
+ return %CreateInt16x8(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), |
+ TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3), |
+ TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5), |
+ TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7)); |
+} |
+ |
+function Int16x8Splat(s) { |
+ return %CreateInt16x8(s, s, s, s, s, s, s, s); |
+} |
+ |
+function Int16x8CheckJS(a) { |
+ return %Int16x8Check(a); |
+} |
+ |
+function Int16x8ToString() { |
+ if (!(IS_INT16X8(this) || IS_INT16X8_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int16x8.prototype.toString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Int16x8("; |
+ str += %Int16x8ExtractLane(value, 0); |
+ for (var i = 1; i < 8; i++) { |
+ str += ", " + %Int16x8ExtractLane(value, i); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Int16x8ToLocaleString() { |
+ if (!(IS_INT16X8(this) || IS_INT16X8_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int16x8.prototype.toLocaleString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Int16x8("; |
+ str += %Int16x8ExtractLane(value, 0).toLocaleString(); |
+ for (var i = 1; i < 8; i++) { |
+ str += ", " + %Int16x8ExtractLane(value, i).toLocaleString(); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Int16x8ValueOf() { |
+ if (!(IS_INT16X8(this) || IS_INT16X8_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int16x8.prototype.valueOf", this); |
+ } |
+ return %_ValueOf(this); |
+} |
+ |
+function Int16x8ExtractLaneJS(a, lane) { |
+ return %Int16x8ExtractLane(a, lane); |
+} |
+ |
+function Int16x8UnsignedExtractLaneJS(a, lane) { |
+ return %Int16x8UnsignedExtractLane(a, lane); |
+} |
+ |
+function Int16x8ReplaceLaneJS(a, lane, value) { |
+ return %Int16x8ReplaceLane(a, lane, TO_NUMBER_INLINE(value)); |
+} |
+ |
+//------------------------------------------------------------------- |
+ |
+function Bool16x8Constructor(c0, c1, c2, c3, c4, c5, c6, c7) { |
+ if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool16x8"); |
+ return %CreateBool16x8(c0, c1, c2, c3, c4, c5, c6, c7); |
+} |
+ |
+function Bool16x8Splat(s) { |
+ return %CreateBool16x8(s, s, s, s, s, s, s, s); |
+} |
+ |
+function Bool16x8CheckJS(a) { |
+ return %Bool16x8Check(a); |
+} |
+ |
+function Bool16x8ToString() { |
+ if (!(IS_BOOL16X8(this) || IS_BOOL16X8_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool16x8.prototype.toString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Bool16x8("; |
+ str += %Bool16x8ExtractLane(value, 0); |
+ for (var i = 1; i < 8; i++) { |
+ str += ", " + %Bool16x8ExtractLane(value, i); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Bool16x8ToLocaleString() { |
+ if (!(IS_BOOL16X8(this) || IS_BOOL16X8_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool16x8.prototype.toLocaleString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Bool16x8("; |
+ str += %Bool16x8ExtractLane(value, 0).toLocaleString(); |
+ for (var i = 1; i < 8; i++) { |
+ str += ", " + %Bool16x8ExtractLane(value, i).toLocaleString(); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Bool16x8ValueOf() { |
+ if (!(IS_BOOL16X8(this) || IS_BOOL16X8_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool16x8.prototype.valueOf", this); |
+ } |
+ return %_ValueOf(this); |
+} |
+ |
+function Bool16x8ExtractLaneJS(a, lane) { |
+ return %Bool16x8ExtractLane(a, lane); |
+} |
+ |
+function Bool16x8ReplaceLaneJS(a, lane, value) { |
+ return %Bool16x8ReplaceLane(a, lane, value); |
+} |
+ |
+//------------------------------------------------------------------- |
+ |
+function Int8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, |
+ c12, c13, c14, c15) { |
+ if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Int8x16"); |
+ return %CreateInt8x16(TO_NUMBER_INLINE(c0), TO_NUMBER_INLINE(c1), TO_NUMBER_INLINE(c2), TO_NUMBER_INLINE(c3), |
+ TO_NUMBER_INLINE(c4), TO_NUMBER_INLINE(c5), TO_NUMBER_INLINE(c6), TO_NUMBER_INLINE(c7), |
+ TO_NUMBER_INLINE(c8), TO_NUMBER_INLINE(c9), TO_NUMBER_INLINE(c10), TO_NUMBER_INLINE(c11), |
+ TO_NUMBER_INLINE(c12), TO_NUMBER_INLINE(c13), TO_NUMBER_INLINE(c14), TO_NUMBER_INLINE(c15)); |
+} |
+ |
+function Int8x16Splat(s) { |
+ return %CreateInt8x16(s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s); |
+} |
+ |
+function Int8x16CheckJS(a) { |
+ return %Int8x16Check(a); |
+} |
+ |
+function Int8x16ToString() { |
+ if (!(IS_INT8X16(this) || IS_INT8X16_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int8x16.prototype.toString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Int8x16("; |
+ str += %Int8x16ExtractLane(value, 0); |
+ for (var i = 1; i < 16; i++) { |
+ str += ", " + %Int8x16ExtractLane(value, i); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Int8x16ToLocaleString() { |
+ if (!(IS_INT8X16(this) || IS_INT8X16_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int8x16.prototype.toLocaleString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Int8x16("; |
+ str += %Int8x16ExtractLane(value, 0).toLocaleString(); |
+ for (var i = 1; i < 16; i++) { |
+ str += ", " + %Int8x16ExtractLane(value, i).toLocaleString(); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Int8x16ValueOf() { |
+ if (!(IS_INT8X16(this) || IS_INT8X16_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Int8x16.prototype.valueOf", this); |
+ } |
+ return %_ValueOf(this); |
+} |
+ |
+function Int8x16ExtractLaneJS(a, lane) { |
+ return %Int8x16ExtractLane(a, lane); |
+} |
+ |
+function Int8x16UnsignedExtractLaneJS(a, lane) { |
+ return %Int8x16UnsignedExtractLane(a, lane); |
+} |
+ |
+function Int8x16ReplaceLaneJS(a, lane, value) { |
+ return %Int8x16ReplaceLane(a, lane, TO_NUMBER_INLINE(value)); |
+} |
+ |
+//------------------------------------------------------------------- |
+ |
+function Bool8x16Constructor(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, |
+ c12, c13, c14, c15) { |
+ if (%_IsConstructCall()) throw MakeTypeError(kNotConstructor, "Bool8x16"); |
+ return %CreateBool8x16(c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, |
+ c13, c14, c15); |
+} |
+ |
+function Bool8x16Splat(s) { |
+ return %CreateBool8x16(s, s, s, s, s, s, s, s, s, s, s, s, s, s, s, s); |
+} |
+ |
+function Bool8x16CheckJS(a) { |
+ return %Bool8x16Check(a); |
+} |
+ |
+function Bool8x16ToString() { |
+ if (!(IS_BOOL8X16(this) || IS_BOOL8X16_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool8x16.prototype.toString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Bool8x16("; |
+ str += %Bool8x16ExtractLane(value, 0); |
+ for (var i = 1; i < 16; i++) { |
+ str += ", " + %Bool8x16ExtractLane(value, i); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Bool8x16ToLocaleString() { |
+ if (!(IS_BOOL8X16(this) || IS_BOOL8X16_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool8x16.prototype.toString", this); |
+ } |
+ var value = %_ValueOf(this); |
+ var str = "SIMD.Bool8x16("; |
+ str += %Bool8x16ExtractLane(value, 0).toLocaleString(); |
+ for (var i = 1; i < 16; i++) { |
+ str += ", " + %Bool8x16ExtractLane(value, i).toLocaleString(); |
+ } |
+ return str + ")"; |
+} |
+ |
+function Bool8x16ValueOf() { |
+ if (!(IS_BOOL8X16(this) || IS_BOOL8X16_WRAPPER(this))) { |
+ throw MakeTypeError(kIncompatibleMethodReceiver, |
+ "Bool8x16.prototype.valueOf", this); |
+ } |
+ return %_ValueOf(this); |
+} |
+ |
+function Bool8x16ExtractLaneJS(a, lane) { |
+ return %Bool8x16ExtractLane(a, lane); |
+} |
+ |
+function Bool8x16ReplaceLaneJS(a, lane, value) { |
+ return %Bool8x16ReplaceLane(a, lane, value); |
} |
// ------------------------------------------------------------------- |
@@ -79,11 +464,46 @@ function Float32x4ExtractLaneJS(value, lane) { |
%AddNamedProperty(GlobalSIMD, symbolToStringTag, 'SIMD', READ_ONLY | DONT_ENUM); |
%SetCode(GlobalFloat32x4, Float32x4Constructor); |
+%SetCode(GlobalInt32x4, Int32x4Constructor); |
+%SetCode(GlobalBool32x4, Bool32x4Constructor); |
+%SetCode(GlobalInt16x8, Int16x8Constructor); |
+%SetCode(GlobalBool16x8, Bool16x8Constructor); |
+%SetCode(GlobalInt8x16, Int8x16Constructor); |
+%SetCode(GlobalBool8x16, Bool8x16Constructor); |
%FunctionSetPrototype(GlobalFloat32x4, {}); |
-%AddNamedProperty( |
- GlobalFloat32x4.prototype, 'constructor', GlobalFloat32x4, DONT_ENUM); |
-%AddNamedProperty( |
- GlobalFloat32x4.prototype, symbolToStringTag, 'Float32x4', |
+%FunctionSetPrototype(GlobalInt32x4, {}); |
+%FunctionSetPrototype(GlobalBool32x4, {}); |
+%FunctionSetPrototype(GlobalInt16x8, {}); |
+%FunctionSetPrototype(GlobalBool16x8, {}); |
+%FunctionSetPrototype(GlobalInt8x16, {}); |
+%FunctionSetPrototype(GlobalBool8x16, {}); |
+%AddNamedProperty(GlobalFloat32x4.prototype, 'constructor', GlobalFloat32x4, |
+ DONT_ENUM); |
+%AddNamedProperty(GlobalInt32x4.prototype, 'constructor', GlobalInt32x4, |
+ DONT_ENUM); |
+%AddNamedProperty(GlobalBool32x4.prototype, 'constructor', GlobalBool32x4, |
+ DONT_ENUM); |
+%AddNamedProperty(GlobalInt16x8.prototype, 'constructor', GlobalInt16x8, |
+ DONT_ENUM); |
+%AddNamedProperty(GlobalBool16x8.prototype, 'constructor', GlobalBool16x8, |
+ DONT_ENUM); |
+%AddNamedProperty(GlobalInt8x16.prototype, 'constructor', GlobalInt8x16, |
+ DONT_ENUM); |
+%AddNamedProperty(GlobalBool8x16.prototype, 'constructor', GlobalBool8x16, |
+ DONT_ENUM); |
+%AddNamedProperty(GlobalFloat32x4.prototype, symbolToStringTag, 'Float32x4', |
+ DONT_ENUM | READ_ONLY); |
+%AddNamedProperty(GlobalInt32x4.prototype, symbolToStringTag, 'Int32x4', |
+ DONT_ENUM | READ_ONLY); |
+%AddNamedProperty(GlobalBool32x4.prototype, symbolToStringTag, 'Bool32x4', |
+ DONT_ENUM | READ_ONLY); |
+%AddNamedProperty(GlobalInt16x8.prototype, symbolToStringTag, 'Int16x8', |
+ DONT_ENUM | READ_ONLY); |
+%AddNamedProperty(GlobalBool16x8.prototype, symbolToStringTag, 'Bool16x8', |
+ DONT_ENUM | READ_ONLY); |
+%AddNamedProperty(GlobalInt8x16.prototype, symbolToStringTag, 'Int8x16', |
+ DONT_ENUM | READ_ONLY); |
+%AddNamedProperty(GlobalBool8x16.prototype, symbolToStringTag, 'Bool8x16', |
DONT_ENUM | READ_ONLY); |
utils.InstallFunctions(GlobalFloat32x4.prototype, DONT_ENUM, [ |
@@ -92,12 +512,99 @@ utils.InstallFunctions(GlobalFloat32x4.prototype, DONT_ENUM, [ |
'valueOf', Float32x4ValueOf, |
]); |
+utils.InstallFunctions(GlobalInt32x4.prototype, DONT_ENUM, [ |
+ 'toLocaleString', Int32x4ToLocaleString, |
+ 'toString', Int32x4ToString, |
+ 'valueOf', Int32x4ValueOf, |
+]); |
+ |
+utils.InstallFunctions(GlobalBool32x4.prototype, DONT_ENUM, [ |
+ 'toLocaleString', Bool32x4ToLocaleString, |
+ 'toString', Bool32x4ToString, |
+ 'valueOf', Bool32x4ValueOf, |
+]); |
+ |
+utils.InstallFunctions(GlobalInt16x8.prototype, DONT_ENUM, [ |
+ 'toLocaleString', Int16x8ToLocaleString, |
+ 'toString', Int16x8ToString, |
+ 'valueOf', Int16x8ValueOf, |
+]); |
+ |
+utils.InstallFunctions(GlobalBool16x8.prototype, DONT_ENUM, [ |
+ 'toLocaleString', Bool16x8ToLocaleString, |
+ 'toString', Bool16x8ToString, |
+ 'valueOf', Bool16x8ValueOf, |
+]); |
+ |
+utils.InstallFunctions(GlobalInt8x16.prototype, DONT_ENUM, [ |
+ 'toLocaleString', Int8x16ToLocaleString, |
+ 'toString', Int8x16ToString, |
+ 'valueOf', Int8x16ValueOf, |
+]); |
+ |
+utils.InstallFunctions(GlobalBool8x16.prototype, DONT_ENUM, [ |
+ 'toLocaleString', Bool8x16ToLocaleString, |
+ 'toString', Bool8x16ToString, |
+ 'valueOf', Bool8x16ValueOf, |
+]); |
+ |
utils.InstallFunctions(GlobalFloat32x4, DONT_ENUM, [ |
'splat', Float32x4Splat, |
'check', Float32x4CheckJS, |
'extractLane', Float32x4ExtractLaneJS, |
+ 'replaceLane', Float32x4ReplaceLaneJS, |
+]); |
+ |
+utils.InstallFunctions(GlobalInt32x4, DONT_ENUM, [ |
+ 'splat', Int32x4Splat, |
+ 'check', Int32x4CheckJS, |
+ 'extractLane', Int32x4ExtractLaneJS, |
+ 'replaceLane', Int32x4ReplaceLaneJS, |
+]); |
+ |
+utils.InstallFunctions(GlobalBool32x4, DONT_ENUM, [ |
+ 'splat', Bool32x4Splat, |
+ 'check', Bool32x4CheckJS, |
+ 'extractLane', Bool32x4ExtractLaneJS, |
+ 'replaceLane', Bool32x4ReplaceLaneJS, |
+]); |
+ |
+utils.InstallFunctions(GlobalInt16x8, DONT_ENUM, [ |
+ 'splat', Int16x8Splat, |
+ 'check', Int16x8CheckJS, |
+ 'extractLane', Int16x8ExtractLaneJS, |
+ 'unsignedExtractLane', Int16x8UnsignedExtractLaneJS, |
+ 'replaceLane', Int16x8ReplaceLaneJS, |
+]); |
+ |
+utils.InstallFunctions(GlobalBool16x8, DONT_ENUM, [ |
+ 'splat', Bool16x8Splat, |
+ 'check', Bool16x8CheckJS, |
+ 'extractLane', Bool16x8ExtractLaneJS, |
+ 'replaceLane', Bool16x8ReplaceLaneJS, |
+]); |
+ |
+utils.InstallFunctions(GlobalInt8x16, DONT_ENUM, [ |
+ 'splat', Int8x16Splat, |
+ 'check', Int8x16CheckJS, |
+ 'extractLane', Int8x16ExtractLaneJS, |
+ 'unsignedExtractLane', Int8x16UnsignedExtractLaneJS, |
+ 'replaceLane', Int8x16ReplaceLaneJS, |
+]); |
+ |
+utils.InstallFunctions(GlobalBool8x16, DONT_ENUM, [ |
+ 'splat', Bool8x16Splat, |
+ 'check', Bool8x16CheckJS, |
+ 'extractLane', Bool8x16ExtractLaneJS, |
+ 'replaceLane', Bool8x16ReplaceLaneJS, |
]); |
$float32x4ToString = Float32x4ToString; |
+$int32x4ToString = Int32x4ToString; |
+$bool32x4ToString = Bool32x4ToString; |
+$int16x8ToString = Int16x8ToString; |
+$bool16x8ToString = Bool16x8ToString; |
+$int8x16ToString = Int8x16ToString; |
+$bool8x16ToString = Bool8x16ToString; |
}) |