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

Unified Diff: sdk/lib/_internal/compiler/js_lib/native_typed_data.dart

Issue 1160903002: Revert "Change RangeError instances to use RangeError.range." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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/symbols.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart b/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
index 4c5aa2ff36bfac95528b7abe3d41bd9b7da8f8a0..84b25bc52c1d630b83202a160314f1c34bb2b4ba 100644
--- a/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
+++ b/sdk/lib/_internal/compiler/js_lib/native_typed_data.dart
@@ -1540,42 +1540,42 @@ class NativeFloat32x4 implements Float32x4 {
}
/// Shuffle the lane values. [mask] must be one of the 256 shuffle constants.
- Float32x4 shuffle(int mask) {
- if ((mask < 0) || (mask > 255)) {
- throw new RangeError.range(mask, 0, 255, "mask");
+ Float32x4 shuffle(int m) {
+ if ((m < 0) || (m > 255)) {
+ throw new RangeError('mask $m must be in the range [0..256)');
}
_list[0] = x;
_list[1] = y;
_list[2] = z;
_list[3] = w;
- double _x = _list[mask & 0x3];
- double _y = _list[(mask >> 2) & 0x3];
- double _z = _list[(mask >> 4) & 0x3];
- double _w = _list[(mask >> 6) & 0x3];
+ double _x = _list[m & 0x3];
+ double _y = _list[(m >> 2) & 0x3];
+ double _z = _list[(m >> 4) & 0x3];
+ double _w = _list[(m >> 6) & 0x3];
return new NativeFloat32x4._truncated(_x, _y, _z, _w);
}
/// Shuffle the lane values in [this] and [other]. The returned
/// Float32x4 will have XY lanes from [this] and ZW lanes from [other].
/// Uses the same [mask] as [shuffle].
- Float32x4 shuffleMix(Float32x4 other, int mask) {
- if ((mask < 0) || (mask > 255)) {
- throw new RangeError.range(mask, 0, 255, "mask");
+ Float32x4 shuffleMix(Float32x4 other, int m) {
+ if ((m < 0) || (m > 255)) {
+ throw new RangeError('mask $m must be in the range [0..256)');
}
_list[0] = x;
_list[1] = y;
_list[2] = z;
_list[3] = w;
- double _x = _list[mask & 0x3];
- double _y = _list[(mask >> 2) & 0x3];
+ double _x = _list[m & 0x3];
+ double _y = _list[(m >> 2) & 0x3];
_list[0] = other.x;
_list[1] = other.y;
_list[2] = other.z;
_list[3] = other.w;
- double _z = _list[(mask >> 4) & 0x3];
- double _w = _list[(mask >> 6) & 0x3];
+ double _z = _list[(m >> 4) & 0x3];
+ double _w = _list[(m >> 6) & 0x3];
return new NativeFloat32x4._truncated(_x, _y, _z, _w);
}
@@ -1763,7 +1763,7 @@ class NativeInt32x4 implements Int32x4 {
/// Shuffle the lane values. [mask] must be one of the 256 shuffle constants.
Int32x4 shuffle(int mask) {
if ((mask < 0) || (mask > 255)) {
- throw new RangeError.range(m, 0, 255, "mask");
+ throw new RangeError('mask $mask must be in the range [0..256)');
}
_list[0] = x;
_list[1] = y;
@@ -1781,7 +1781,7 @@ class NativeInt32x4 implements Int32x4 {
/// Uses the same [mask] as [shuffle].
Int32x4 shuffleMix(Int32x4 other, int mask) {
if ((mask < 0) || (mask > 255)) {
- throw new RangeError.range(m, 0, 255, "mask");
+ throw new RangeError('mask $mask must be in the range [0..256)');
}
_list[0] = x;
_list[1] = y;
« no previous file with comments | « runtime/vm/symbols.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698