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

Unified Diff: sdk/lib/typed_data/dart2js/typed_data_dart2js.dart

Issue 23018009: Add add and subtract operations to Uint32x4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 4 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 | « runtime/vm/intermediate_language_x64.cc ('k') | sdk/lib/typed_data/typed_data.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..31d2548bf9fa33de7881f21b24d5466d9651727c 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]);
+ r._storage[1] = (_storage[1] + other._storage[1]);
+ r._storage[2] = (_storage[2] + other._storage[2]);
+ r._storage[3] = (_storage[3] + other._storage[3]);
+ return r;
+ }
+
+ Uint32x4 operator-(Uint32x4 other) {
+ var r = new Uint32x4(0, 0, 0, 0);
+ r._storage[0] = (_storage[0] - other._storage[0]);
+ r._storage[1] = (_storage[1] - other._storage[1]);
+ r._storage[2] = (_storage[2] - other._storage[2]);
+ r._storage[3] = (_storage[3] - other._storage[3]);
+ return r;
+ }
+
/// Extract 32-bit mask from x lane.
int get x => _storage[0];
/// Extract 32-bit mask from y lane.
« no previous file with comments | « runtime/vm/intermediate_language_x64.cc ('k') | sdk/lib/typed_data/typed_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698