Chromium Code Reviews| Index: sdk/lib/typed_data/dart2js/typed_data_dart2js.dart |
| diff --git a/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart b/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart |
| index a145ff2eac91a63c9a75cfcc68be798464d1f65b..a85651e63975244203030b8ceeb3297d37af7724 100644 |
| --- a/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart |
| +++ b/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart |
| @@ -1396,6 +1396,24 @@ class Uint32x4 { |
| return new Uint32x4(_x, _y, _z, _w); |
| } |
| + Uint32x4 operator+(Uint32x4 other) { |
| + var r = new Uint32x4(0, 0, 0, 0); |
| + r._storage[0] = (_storage[0] + other._storage[0])|0; |
|
srdjan
2013/08/19 21:45:23
Why '| 0'? In JS this creates an uint32 but should
Cutch
2013/08/19 21:58:25
Done.
|
| + r._storage[1] = (_storage[1] + other._storage[1])|0; |
| + r._storage[2] = (_storage[2] + other._storage[2])|0; |
| + r._storage[3] = (_storage[3] + other._storage[3])|0; |
| + return r; |
| + } |
| + |
| + Uint32x4 operator-(Uint32x4 other) { |
| + var r = new Uint32x4(0, 0, 0, 0); |
| + r._storage[0] = (_storage[0] - other._storage[0])|0; |
| + r._storage[1] = (_storage[1] - other._storage[1])|0; |
| + r._storage[2] = (_storage[2] - other._storage[2])|0; |
| + r._storage[3] = (_storage[3] - other._storage[3])|0; |
| + return r; |
| + } |
| + |
| /// Extract 32-bit mask from x lane. |
| int get x => _storage[0]; |
| /// Extract 32-bit mask from y lane. |