Skip to content
This repository was archived by the owner on Jan 26, 2022. It is now read-only.

Commit 8773a96

Browse files
committed
Remove withFlag{X,Y,Z,W} from the polyfill / spec.
1 parent 6b188cb commit 8773a96

File tree

2 files changed

+0
-121
lines changed

2 files changed

+0
-121
lines changed

src/ecmascript_simd.js

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,54 +1438,6 @@ SIMD.int32x4.withW = function(t, w) {
14381438
return SIMD.int32x4(t.x, t.y, t.z, w);
14391439
}
14401440

1441-
/**
1442-
* @param {int32x4} t An instance of int32x4.
1443-
* @param {boolean} x flag used for x lane.
1444-
* @return {int32x4} New instance of int32x4 with the values in t and
1445-
* x lane replaced with {x}.
1446-
*/
1447-
SIMD.int32x4.withFlagX = function(t, flagX) {
1448-
checkInt32x4(t);
1449-
var x = flagX ? 0xFFFFFFFF : 0x0;
1450-
return SIMD.int32x4(x, t.y, t.z, t.w);
1451-
}
1452-
1453-
/**
1454-
* @param {int32x4} t An instance of int32x4.
1455-
* @param {boolean} y flag used for y lane.
1456-
* @return {int32x4} New instance of int32x4 with the values in t and
1457-
* y lane replaced with {y}.
1458-
*/
1459-
SIMD.int32x4.withFlagY = function(t, flagY) {
1460-
checkInt32x4(t);
1461-
var y = flagY ? 0xFFFFFFFF : 0x0;
1462-
return SIMD.int32x4(t.x, y, t.z, t.w);
1463-
}
1464-
1465-
/**
1466-
* @param {int32x4} t An instance of int32x4.
1467-
* @param {boolean} z flag used for z lane.
1468-
* @return {int32x4} New instance of int32x4 with the values in t and
1469-
* z lane replaced with {z}.
1470-
*/
1471-
SIMD.int32x4.withFlagZ = function(t, flagZ) {
1472-
checkInt32x4(t);
1473-
var z = flagZ ? 0xFFFFFFFF : 0x0;
1474-
return SIMD.int32x4(t.x, t.y, z, t.w);
1475-
}
1476-
1477-
/**
1478-
* @param {int32x4} t An instance of int32x4.
1479-
* @param {boolean} w flag used for w lane.
1480-
* @return {int32x4} New instance of int32x4 with the values in t and
1481-
* w lane replaced with {w}.
1482-
*/
1483-
SIMD.int32x4.withFlagW = function(t, flagW) {
1484-
checkInt32x4(t);
1485-
var w = flagW ? 0xFFFFFFFF : 0x0;
1486-
return SIMD.int32x4(t.x, t.y, t.z, w);
1487-
}
1488-
14891441
/**
14901442
* @param {int32x4} t An instance of int32x4.
14911443
* @param {int32x4} other An instance of int32x4.

src/ecmascript_simd_tests.js

Lines changed: 0 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,79 +1556,6 @@ test('int32x4 withW', function() {
15561556
equal(20, c.w);
15571557
});
15581558

1559-
test('int32x4 withFlagX', function() {
1560-
var a = SIMD.int32x4.bool(true, false, true, false);
1561-
var c = SIMD.int32x4.withFlagX(a, true);
1562-
equal(true, c.flagX);
1563-
equal(false, c.flagY);
1564-
equal(true, c.flagZ);
1565-
equal(false, c.flagW);
1566-
c = SIMD.int32x4.withFlagX(a, false);
1567-
equal(false, c.flagX);
1568-
equal(false, c.flagY);
1569-
equal(true, c.flagZ);
1570-
equal(false, c.flagW);
1571-
equal(0x0, c.x);
1572-
equal(0x0, c.y);
1573-
equal(-1, c.z);
1574-
equal(0x0, c.w);
1575-
});
1576-
1577-
test('int32x4 withFlagY', function() {
1578-
var a = SIMD.int32x4.bool(true, false, true, false);
1579-
var c = SIMD.int32x4.withFlagY(a, true);
1580-
equal(true, c.flagX);
1581-
equal(true, c.flagY);
1582-
equal(true, c.flagZ);
1583-
equal(false, c.flagW);
1584-
c = SIMD.int32x4.withFlagY(a, false);
1585-
equal(true, c.flagX);
1586-
equal(false, c.flagY);
1587-
equal(true, c.flagZ);
1588-
equal(false, c.flagW);
1589-
equal(-1, c.x);
1590-
equal(0x0, c.y);
1591-
equal(-1, c.z);
1592-
equal(0x0, c.w);
1593-
});
1594-
1595-
test('int32x4 withFlagZ', function() {
1596-
var a = SIMD.int32x4.bool(true, false, true, false);
1597-
var c = SIMD.int32x4.withFlagZ(a, true);
1598-
equal(-1, c.x);
1599-
equal(true, c.flagX);
1600-
equal(false, c.flagY);
1601-
equal(true, c.flagZ);
1602-
equal(false, c.flagW);
1603-
c = SIMD.int32x4.withFlagZ(a, false);
1604-
equal(true, c.flagX);
1605-
equal(false, c.flagY);
1606-
equal(false, c.flagZ);
1607-
equal(false, c.flagW);
1608-
equal(-1, c.x);
1609-
equal(0x0, c.y);
1610-
equal(0x0, c.z);
1611-
equal(0x0, c.w);
1612-
});
1613-
1614-
test('int32x4 withFlagW', function() {
1615-
var a = SIMD.int32x4.bool(true, false, true, false);
1616-
var c = SIMD.int32x4.withFlagW(a, true);
1617-
equal(true, c.flagX);
1618-
equal(false, c.flagY);
1619-
equal(true, c.flagZ);
1620-
equal(true, c.flagW);
1621-
c = SIMD.int32x4.withFlagW(a, false);
1622-
equal(true, c.flagX);
1623-
equal(false, c.flagY);
1624-
equal(true, c.flagZ);
1625-
equal(false, c.flagW);
1626-
equal(-1, c.x);
1627-
equal(0x0, c.y);
1628-
equal(-1, c.z);
1629-
equal(0x0, c.w);
1630-
});
1631-
16321559
test('int32x4 and', function() {
16331560
var m = SIMD.int32x4(0xAAAAAAAA, 0xAAAAAAAA, -1431655766, 0xAAAAAAAA);
16341561
var n = SIMD.int32x4(0x55555555, 0x55555555, 0x55555555, 0x55555555);

0 commit comments

Comments
 (0)