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

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

Issue 23591069: Fix runtime clamp logic to match optimized code (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 3 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/lib/simd128.cc ('k') | tests/lib/typed_data/float32x4_clamp_test.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 c6d34c3f8d0ff8061277e358d3aca4175454916b..4b7ea7b8004adee6498c6b2f321dd49e3ce49db2 100644
--- a/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart
+++ b/sdk/lib/typed_data/dart2js/typed_data_dart2js.dart
@@ -969,14 +969,15 @@ class Float32x4 {
double _y = _storage[1];
double _z = _storage[2];
double _w = _storage[3];
- _x = _x < _lx ? _lx : _x;
+ // MAX(MIN(self, upper), lower).
_x = _x > _ux ? _ux : _x;
- _y = _y < _ly ? _ly : _y;
_y = _y > _uy ? _uy : _y;
- _z = _z < _lz ? _lz : _z;
_z = _z > _uz ? _uz : _z;
- _w = _w < _lw ? _lw : _w;
_w = _w > _uw ? _uw : _w;
+ _x = _x < _lx ? _lx : _x;
+ _y = _y < _ly ? _ly : _y;
+ _z = _z < _lz ? _lz : _z;
+ _w = _w < _lw ? _lw : _w;
return new Float32x4(_x, _y, _z, _w);
}
« no previous file with comments | « runtime/lib/simd128.cc ('k') | tests/lib/typed_data/float32x4_clamp_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698