SDK: replace unsupported `[this]` comment references with `this`.
Work towards https://github.com/dart-lang/dartdoc/issues/3761
The analyzer has never recognized `[this]` as a valid doc comment
reference (and the `comment_references` lint rule has similarly
reported such reference attempts). dartdoc has its own algorithms
for resolving comment references, which we are dismantling in favor
of a single resolution, provided by the analyzer.
We've also decided against adding support in the analyzer (see
https://github.com/dart-lang/linter/issues/2079), so these
reference attempts should be re-written.
CoreLibraryReviewExempt: Comments only.
Change-Id: I6cc85115186527820bdd38dcfda8f61e35ae3fe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/365204
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
diff --git a/sdk/lib/_internal/js_dev_runtime/patch/bigint_patch.dart b/sdk/lib/_internal/js_dev_runtime/patch/bigint_patch.dart
index 39e4f96..d6c87df 100644
--- a/sdk/lib/_internal/js_dev_runtime/patch/bigint_patch.dart
+++ b/sdk/lib/_internal/js_dev_runtime/patch/bigint_patch.dart
@@ -1940,7 +1940,7 @@
return _a + digit - 10;
}
- /// Converts [this] to a string representation in the given [radix].
+ /// Converts this [BigInt] to a string representation in the given [radix].
///
/// In the string representation, lower-case letters are used for digits above
/// '9', with 'a' being 10 an 'z' being 35.
diff --git a/sdk/lib/_internal/js_dev_runtime/private/js_array.dart b/sdk/lib/_internal/js_dev_runtime/private/js_array.dart
index 634c789..af4742c 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/js_array.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/js_array.dart
@@ -143,7 +143,7 @@
return false;
}
- /// Removes elements matching [test] from [this] List.
+ /// Removes elements matching [test] from this [JSArray].
void removeWhere(bool Function(E) test) {
checkGrowable('removeWhere');
_removeWhere(test, true);
diff --git a/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart b/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
index 2ff8abd..71bb75e 100644
--- a/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
+++ b/sdk/lib/_internal/js_dev_runtime/private/native_typed_data.dart
@@ -1272,7 +1272,7 @@
_cx ? -1 : 0, _cy ? -1 : 0, _cz ? -1 : 0, _cw ? -1 : 0);
}
- /// Returns a copy of [this] each lane being scaled by [s].
+ /// Returns a copy of this [Float32x4] each lane being scaled by [s].
Float32x4 scale(double s) {
double _x = s * x;
double _y = s * y;
@@ -1290,7 +1290,7 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Clamps [this] to be in the range [lowerLimit]-[upperLimit].
+ /// Clamps this [Float32x4] to be in the range [lowerLimit]-[upperLimit].
Float32x4 clamp(Float32x4 lowerLimit, Float32x4 upperLimit) {
double _lx = lowerLimit.x;
double _ly = lowerLimit.y;
@@ -1349,9 +1349,9 @@
return 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].
+ /// Shuffle the lane values in this [Float32x4] and [other]. The returned
+ /// Float32x4 will have XY lanes from this [Float32x4] and ZW lanes from
+ /// [other]. Uses the same [mask] as [shuffle].
Float32x4 shuffleMix(Float32x4 other, int mask) {
if ((mask < 0) || (mask > 255)) {
throw RangeError.range(mask, 0, 255, "mask");
@@ -1372,31 +1372,31 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Copy [this] and replace the [x] lane.
+ /// Copy this [Float32x4] and replace the [x] lane.
Float32x4 withX(double newX) {
ArgumentError.checkNotNull(newX);
return NativeFloat32x4._truncated(_truncate(newX), y, z, w);
}
- /// Copy [this] and replace the [y] lane.
+ /// Copy this [Float32x4] and replace the [y] lane.
Float32x4 withY(double newY) {
ArgumentError.checkNotNull(newY);
return NativeFloat32x4._truncated(x, _truncate(newY), z, w);
}
- /// Copy [this] and replace the [z] lane.
+ /// Copy this [Float32x4] and replace the [z] lane.
Float32x4 withZ(double newZ) {
ArgumentError.checkNotNull(newZ);
return NativeFloat32x4._truncated(x, y, _truncate(newZ), w);
}
- /// Copy [this] and replace the [w] lane.
+ /// Copy this [Float32x4] and replace the [w] lane.
Float32x4 withW(double newW) {
ArgumentError.checkNotNull(newW);
return NativeFloat32x4._truncated(x, y, z, _truncate(newW));
}
- /// Returns the lane-wise minimum value in [this] or [other].
+ /// Returns the lane-wise minimum value in this [Float32x4] or [other].
Float32x4 min(Float32x4 other) {
double _x = x < other.x ? x : other.x;
double _y = y < other.y ? y : other.y;
@@ -1405,7 +1405,7 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Returns the lane-wise maximum value in [this] or [other].
+ /// Returns the lane-wise maximum value in this [Float32x4] or [other].
Float32x4 max(Float32x4 other) {
double _x = x > other.x ? x : other.x;
double _y = y > other.y ? y : other.y;
@@ -1414,7 +1414,7 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Returns the square root of [this].
+ /// Returns the square root of this [Float32x4].
Float32x4 sqrt() {
double _x = Math.sqrt(x);
double _y = Math.sqrt(y);
@@ -1423,7 +1423,7 @@
return NativeFloat32x4._doubles(_x, _y, _z, _w);
}
- /// Returns the reciprocal of [this].
+ /// Returns the reciprocal of this [Float32x4].
Float32x4 reciprocal() {
double _x = 1.0 / x;
double _y = 1.0 / y;
@@ -1432,7 +1432,7 @@
return NativeFloat32x4._doubles(_x, _y, _z, _w);
}
- /// Returns the square root of the reciprocal of [this].
+ /// Returns the square root of the reciprocal of this [Float32x4].
Float32x4 reciprocalSqrt() {
double _x = Math.sqrt(1.0 / x);
double _y = Math.sqrt(1.0 / y);
@@ -1577,8 +1577,8 @@
return NativeInt32x4._truncated(_x, _y, _z, _w);
}
- /// Shuffle the lane values in [this] and [other]. The returned
- /// Int32x4 will have XY lanes from [this] and ZW lanes from [other].
+ /// Shuffle the lane values in this [Int32x4] and [other]. The returned
+ /// Int32x4 will have XY lanes from this [Int32x4] and ZW lanes from [other].
/// Uses the same [mask] as [shuffle].
Int32x4 shuffleMix(Int32x4 other, int mask) {
if ((mask < 0) || (mask > 255)) {
@@ -1600,28 +1600,28 @@
return NativeInt32x4._truncated(_x, _y, _z, _w);
}
- /// Returns a new [Int32x4] copied from [this] with a new x value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new x value.
Int32x4 withX(int x) {
ArgumentError.checkNotNull(x);
int _x = _truncate(x);
return NativeInt32x4._truncated(_x, y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new y value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new y value.
Int32x4 withY(int y) {
ArgumentError.checkNotNull(y);
int _y = _truncate(y);
return NativeInt32x4._truncated(x, _y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new z value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new z value.
Int32x4 withZ(int z) {
ArgumentError.checkNotNull(z);
int _z = _truncate(z);
return NativeInt32x4._truncated(x, y, _z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new w value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new w value.
Int32x4 withW(int w) {
ArgumentError.checkNotNull(w);
int _w = _truncate(w);
@@ -1640,33 +1640,33 @@
/// Extracted w value. Returns `false` for 0, `true` for any other value.
bool get flagW => w != 0;
- /// Returns a new [Int32x4] copied from [this] with a new x value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new x value.
Int32x4 withFlagX(bool flagX) {
int _x = flagX ? -1 : 0;
return NativeInt32x4._truncated(_x, y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new y value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new y value.
Int32x4 withFlagY(bool flagY) {
int _y = flagY ? -1 : 0;
return NativeInt32x4._truncated(x, _y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new z value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new z value.
Int32x4 withFlagZ(bool flagZ) {
int _z = flagZ ? -1 : 0;
return NativeInt32x4._truncated(x, y, _z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new w value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new w value.
Int32x4 withFlagW(bool flagW) {
int _w = flagW ? -1 : 0;
return NativeInt32x4._truncated(x, y, z, _w);
}
- /// Merge [trueValue] and [falseValue] based on [this]' bit mask:
- /// Select bit from [trueValue] when bit in [this] is on.
- /// Select bit from [falseValue] when bit in [this] is off.
+ /// Merge [trueValue] and [falseValue] based on this [Int32x4] bit mask:
+ /// Select bit from [trueValue] when bit in this [Int32x4] is on.
+ /// Select bit from [falseValue] when bit in this [Int32x4] is off.
Float32x4 select(Float32x4 trueValue, Float32x4 falseValue) {
var floatList = NativeFloat32x4._list;
var intView = NativeFloat32x4._uint32view;
@@ -1749,7 +1749,7 @@
return NativeFloat64x2._doubles(x / other.x, y / other.y);
}
- /// Returns a copy of [this] each lane being scaled by [s].
+ /// Returns a copy of this [Float64x2] each lane being scaled by [s].
Float64x2 scale(double s) {
return NativeFloat64x2._doubles(x * s, y * s);
}
@@ -1759,7 +1759,7 @@
return NativeFloat64x2._doubles(x.abs(), y.abs());
}
- /// Clamps [this] to be in the range [lowerLimit]-[upperLimit].
+ /// Clamps this [Float64x2] to be in the range [lowerLimit]-[upperLimit].
Float64x2 clamp(Float64x2 lowerLimit, Float64x2 upperLimit) {
double _lx = lowerLimit.x;
double _ly = lowerLimit.y;
@@ -1785,31 +1785,33 @@
return mx | my << 1;
}
- /// Returns a new [Float64x2] copied from [this] with a new x value.
+ /// Returns a new [Float64x2] copied from this [Float64x2] with a new x
+ /// value.
Float64x2 withX(double x) {
if (x is! num) throw ArgumentError(x);
return NativeFloat64x2._doubles(x, y);
}
- /// Returns a new [Float64x2] copied from [this] with a new y value.
+ /// Returns a new [Float64x2] copied from this [Float64x2] with a new y
+ /// value.
Float64x2 withY(double y) {
if (y is! num) throw ArgumentError(y);
return NativeFloat64x2._doubles(x, y);
}
- /// Returns the lane-wise minimum value in [this] or [other].
+ /// Returns the lane-wise minimum value in this [Float64x2] or [other].
Float64x2 min(Float64x2 other) {
return NativeFloat64x2._doubles(
x < other.x ? x : other.x, y < other.y ? y : other.y);
}
- /// Returns the lane-wise maximum value in [this] or [other].
+ /// Returns the lane-wise maximum value in this [Float64x2] or [other].
Float64x2 max(Float64x2 other) {
return NativeFloat64x2._doubles(
x > other.x ? x : other.x, y > other.y ? y : other.y);
}
- /// Returns the lane-wise square root of [this].
+ /// Returns the lane-wise square root of this [Float64x2].
Float64x2 sqrt() {
return NativeFloat64x2._doubles(Math.sqrt(x), Math.sqrt(y));
}
diff --git a/sdk/lib/_internal/js_runtime/lib/async_patch.dart b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
index 41baf93..129a23d 100644
--- a/sdk/lib/_internal/js_runtime/lib/async_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/async_patch.dart
@@ -556,7 +556,7 @@
// statements. For non-sync* iterators, [_nestedIterator] contains the
// iterator. We delegate to [_nestedIterator] when it is not `null`.
//
- // For nested sync* iterators, [this] iterator acts on behalf of the innermost
+ // For nested sync* iterators, this [Iterator] acts on behalf of the innermost
// nested sync* iterator. The current state machine is suspended on a stack
// until the inner state machine ends.
diff --git a/sdk/lib/_internal/js_runtime/lib/bigint_patch.dart b/sdk/lib/_internal/js_runtime/lib/bigint_patch.dart
index 05c5217..5715593 100644
--- a/sdk/lib/_internal/js_runtime/lib/bigint_patch.dart
+++ b/sdk/lib/_internal/js_runtime/lib/bigint_patch.dart
@@ -1959,7 +1959,7 @@
return _a + digit - 10;
}
- /// Converts [this] to a string representation in the given [radix].
+ /// Converts this [BigInt] to a string representation in the given [radix].
///
/// In the string representation, lower-case letters are used for digits above
/// '9', with 'a' being 10 an 'z' being 35.
diff --git a/sdk/lib/_internal/js_runtime/lib/js_array.dart b/sdk/lib/_internal/js_runtime/lib/js_array.dart
index f8f8ae31..00d4fe0 100644
--- a/sdk/lib/_internal/js_runtime/lib/js_array.dart
+++ b/sdk/lib/_internal/js_runtime/lib/js_array.dart
@@ -225,7 +225,7 @@
return false;
}
- /// Removes elements matching [test] from [this] List.
+ /// Removes elements matching [test] from this [JSArray].
void removeWhere(bool test(E element)) {
checkGrowable('removeWhere');
_removeWhere(test, true);
diff --git a/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart b/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart
index 88e6477..5aa7997 100644
--- a/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart
+++ b/sdk/lib/_internal/js_runtime/lib/native_typed_data.dart
@@ -1317,7 +1317,7 @@
_cx ? -1 : 0, _cy ? -1 : 0, _cz ? -1 : 0, _cw ? -1 : 0);
}
- /// Returns a copy of [this] each lane being scaled by [s].
+ /// Returns a copy of this [Float32x4] each lane being scaled by [s].
Float32x4 scale(double s) {
double _x = s * x;
double _y = s * y;
@@ -1335,7 +1335,7 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Clamps [this] to be in the range [lowerLimit]-[upperLimit].
+ /// Clamps this [Float32x4] to be in the range [lowerLimit]-[upperLimit].
Float32x4 clamp(Float32x4 lowerLimit, Float32x4 upperLimit) {
double _lx = lowerLimit.x;
double _ly = lowerLimit.y;
@@ -1394,9 +1394,9 @@
return 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].
+ /// Shuffle the lane values in this [Float32x4] and [other]. The returned
+ /// Float32x4 will have XY lanes from this [Float32x4] and ZW lanes from
+ /// [other]. Uses the same [mask] as [shuffle].
Float32x4 shuffleMix(Float32x4 other, int mask) {
if ((mask < 0) || (mask > 255)) {
throw RangeError.range(mask, 0, 255, 'mask');
@@ -1417,31 +1417,31 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Copy [this] and replace the [x] lane.
+ /// Copy this [Float32x4] and replace the [x] lane.
Float32x4 withX(double newX) {
double _newX = _truncate(checkNum(newX));
return NativeFloat32x4._truncated(_newX, y, z, w);
}
- /// Copy [this] and replace the [y] lane.
+ /// Copy this [Float32x4] and replace the [y] lane.
Float32x4 withY(double newY) {
double _newY = _truncate(checkNum(newY));
return NativeFloat32x4._truncated(x, _newY, z, w);
}
- /// Copy [this] and replace the [z] lane.
+ /// Copy this [Float32x4] and replace the [z] lane.
Float32x4 withZ(double newZ) {
double _newZ = _truncate(checkNum(newZ));
return NativeFloat32x4._truncated(x, y, _newZ, w);
}
- /// Copy [this] and replace the [w] lane.
+ /// Copy this [Float32x4] and replace the [w] lane.
Float32x4 withW(double newW) {
double _newW = _truncate(checkNum(newW));
return NativeFloat32x4._truncated(x, y, z, _newW);
}
- /// Returns the lane-wise minimum value in [this] or [other].
+ /// Returns the lane-wise minimum value in this [Float32x4] or [other].
Float32x4 min(Float32x4 other) {
double _x = x < other.x ? x : other.x;
double _y = y < other.y ? y : other.y;
@@ -1450,7 +1450,7 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Returns the lane-wise maximum value in [this] or [other].
+ /// Returns the lane-wise maximum value in this [Float32x4] or [other].
Float32x4 max(Float32x4 other) {
double _x = x > other.x ? x : other.x;
double _y = y > other.y ? y : other.y;
@@ -1459,7 +1459,7 @@
return NativeFloat32x4._truncated(_x, _y, _z, _w);
}
- /// Returns the square root of [this].
+ /// Returns the square root of this [Float32x4].
Float32x4 sqrt() {
double _x = Math.sqrt(x);
double _y = Math.sqrt(y);
@@ -1468,7 +1468,7 @@
return NativeFloat32x4._doubles(_x, _y, _z, _w);
}
- /// Returns the reciprocal of [this].
+ /// Returns the reciprocal of this [Float32x4].
Float32x4 reciprocal() {
double _x = 1.0 / x;
double _y = 1.0 / y;
@@ -1477,7 +1477,7 @@
return NativeFloat32x4._doubles(_x, _y, _z, _w);
}
- /// Returns the square root of the reciprocal of [this].
+ /// Returns the square root of the reciprocal of this [Float32x4].
Float32x4 reciprocalSqrt() {
double _x = Math.sqrt(1.0 / x);
double _y = Math.sqrt(1.0 / y);
@@ -1620,8 +1620,8 @@
return NativeInt32x4._truncated(_x, _y, _z, _w);
}
- /// Shuffle the lane values in [this] and [other]. The returned
- /// Int32x4 will have XY lanes from [this] and ZW lanes from [other].
+ /// Shuffle the lane values in this [Int32x4] and [other]. The returned
+ /// Int32x4 will have XY lanes from this [Int32x4] and ZW lanes from [other].
/// Uses the same [mask] as [shuffle].
Int32x4 shuffleMix(Int32x4 other, int mask) {
if ((mask < 0) || (mask > 255)) {
@@ -1643,25 +1643,25 @@
return NativeInt32x4._truncated(_x, _y, _z, _w);
}
- /// Returns a new [Int32x4] copied from [this] with a new x value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new x value.
Int32x4 withX(int x) {
int _x = _truncate(checkNum(x));
return NativeInt32x4._truncated(_x, y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new y value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new y value.
Int32x4 withY(int y) {
int _y = _truncate(checkNum(y));
return NativeInt32x4._truncated(x, _y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new z value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new z value.
Int32x4 withZ(int z) {
int _z = _truncate(checkNum(z));
return NativeInt32x4._truncated(x, y, _z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new w value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new w value.
Int32x4 withW(int w) {
int _w = _truncate(checkNum(w));
return NativeInt32x4._truncated(x, y, z, _w);
@@ -1679,33 +1679,33 @@
/// Extracted w value. Returns `false` for 0, `true` for any other value.
bool get flagW => w != 0;
- /// Returns a new [Int32x4] copied from [this] with a new x value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new x value.
Int32x4 withFlagX(bool flagX) {
int _x = flagX ? -1 : 0;
return NativeInt32x4._truncated(_x, y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new y value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new y value.
Int32x4 withFlagY(bool flagY) {
int _y = flagY ? -1 : 0;
return NativeInt32x4._truncated(x, _y, z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new z value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new z value.
Int32x4 withFlagZ(bool flagZ) {
int _z = flagZ ? -1 : 0;
return NativeInt32x4._truncated(x, y, _z, w);
}
- /// Returns a new [Int32x4] copied from [this] with a new w value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new w value.
Int32x4 withFlagW(bool flagW) {
int _w = flagW ? -1 : 0;
return NativeInt32x4._truncated(x, y, z, _w);
}
- /// Merge [trueValue] and [falseValue] based on [this]' bit mask:
- /// Select bit from [trueValue] when bit in [this] is on.
- /// Select bit from [falseValue] when bit in [this] is off.
+ /// Merge [trueValue] and [falseValue] based on this [Int32x4] bit mask:
+ /// Select bit from [trueValue] when bit in this [Int32x4] is on.
+ /// Select bit from [falseValue] when bit in this [Int32x4] is off.
Float32x4 select(Float32x4 trueValue, Float32x4 falseValue) {
var floatList = NativeFloat32x4._list;
var intView = NativeFloat32x4._uint32view;
@@ -1788,7 +1788,7 @@
return NativeFloat64x2._doubles(x / other.x, y / other.y);
}
- /// Returns a copy of [this] each lane being scaled by [s].
+ /// Returns a copy of this [Float64x2] each lane being scaled by [s].
Float64x2 scale(double s) {
return NativeFloat64x2._doubles(x * s, y * s);
}
@@ -1798,7 +1798,7 @@
return NativeFloat64x2._doubles(x.abs(), y.abs());
}
- /// Clamps [this] to be in the range [lowerLimit]-[upperLimit].
+ /// Clamps this [Float64x2] to be in the range [lowerLimit]-[upperLimit].
Float64x2 clamp(Float64x2 lowerLimit, Float64x2 upperLimit) {
double _lx = lowerLimit.x;
double _ly = lowerLimit.y;
@@ -1824,31 +1824,33 @@
return mx | my << 1;
}
- /// Returns a new [Float64x2] copied from [this] with a new x value.
+ /// Returns a new [Float64x2] copied from this [Float64x2] with a new x
+ /// value.
Float64x2 withX(double x) {
if (x is! num) throw ArgumentError(x);
return NativeFloat64x2._doubles(x, y);
}
- /// Returns a new [Float64x2] copied from [this] with a new y value.
+ /// Returns a new [Float64x2] copied from this [Float64x2] with a new y
+ /// value.
Float64x2 withY(double y) {
if (y is! num) throw ArgumentError(y);
return NativeFloat64x2._doubles(x, y);
}
- /// Returns the lane-wise minimum value in [this] or [other].
+ /// Returns the lane-wise minimum value in this [Float64x2] or [other].
Float64x2 min(Float64x2 other) {
return NativeFloat64x2._doubles(
x < other.x ? x : other.x, y < other.y ? y : other.y);
}
- /// Returns the lane-wise maximum value in [this] or [other].
+ /// Returns the lane-wise maximum value in this [Float64x2] or [other].
Float64x2 max(Float64x2 other) {
return NativeFloat64x2._doubles(
x > other.x ? x : other.x, y > other.y ? y : other.y);
}
- /// Returns the lane-wise square root of [this].
+ /// Returns the lane-wise square root of this [Float64x2].
Float64x2 sqrt() {
return NativeFloat64x2._doubles(Math.sqrt(x), Math.sqrt(y));
}
diff --git a/sdk/lib/_internal/vm_shared/lib/bigint_patch.dart b/sdk/lib/_internal/vm_shared/lib/bigint_patch.dart
index c1f8c1e..2ff00bd 100644
--- a/sdk/lib/_internal/vm_shared/lib/bigint_patch.dart
+++ b/sdk/lib/_internal/vm_shared/lib/bigint_patch.dart
@@ -2500,7 +2500,7 @@
}
/**
- * Converts [this] to a string representation in the given [radix].
+ * Converts this [BigInt] to a string representation in the given [radix].
*
* In the string representation, lower-case letters are used for digits above
* '9', with 'a' being 10 an 'z' being 35.
diff --git a/sdk/lib/_internal/vm_shared/lib/date_patch.dart b/sdk/lib/_internal/vm_shared/lib/date_patch.dart
index b40686d..b1fd03d 100644
--- a/sdk/lib/_internal/vm_shared/lib/date_patch.dart
+++ b/sdk/lib/_internal/vm_shared/lib/date_patch.dart
@@ -250,7 +250,7 @@
/**
* Returns the amount of microseconds in UTC that represent the same values
- * as [this].
+ * as this [DateTime].
*
* Say `t` is the result of this function, then
* * `this.year == new DateTime.fromMicrosecondsSinceEpoch(t, true).year`,
@@ -260,7 +260,7 @@
* * ...
*
* Daylight savings is computed as if the date was computed in [1970..2037].
- * If [this] lies outside this range then it is a year with similar
+ * If this [DateTime] lies outside this range then it is a year with similar
* properties (leap year, weekdays) is used instead.
*/
int get _localDateInUtcMicros {
diff --git a/sdk/lib/_internal/wasm/lib/closure.dart b/sdk/lib/_internal/wasm/lib/closure.dart
index d6ecbd6..eafee2f 100644
--- a/sdk/lib/_internal/wasm/lib/closure.dart
+++ b/sdk/lib/_internal/wasm/lib/closure.dart
@@ -95,7 +95,8 @@
/// Traps when the closure is not an instantiation.
external int _instantiationClosureTypeHash();
- /// When [this] and [other] are instantiations, compare captured types for equality.
+ /// When this [_Closure] and [other] are instantiations, compare captured
+ /// types for equality.
///
/// Traps when one or both of the closures are not an instantiation.
external bool _instantiationClosureTypeEquals(_Closure other);
diff --git a/sdk/lib/async/stream.dart b/sdk/lib/async/stream.dart
index 1ca1194..b36f68f 100644
--- a/sdk/lib/async/stream.dart
+++ b/sdk/lib/async/stream.dart
@@ -1630,7 +1630,7 @@
/// the returned future is completed with that error
/// and processing stops.
///
- /// If [this] is empty or has more than one element,
+ /// If this [Stream] is empty or has more than one element,
/// the returned future completes with an error.
Future<T> get single {
_Future<T> future = new _Future<T>();
diff --git a/sdk/lib/core/bigint.dart b/sdk/lib/core/bigint.dart
index 28da09d..33fa926 100644
--- a/sdk/lib/core/bigint.dart
+++ b/sdk/lib/core/bigint.dart
@@ -539,7 +539,7 @@
/// ```
String toString();
- /// Converts [this] to a string representation in the given [radix].
+ /// Converts this [BigInt] to a string representation in the given [radix].
///
/// In the string representation, lower-case letters are used for digits above
/// '9', with 'a' being 10 an 'z' being 35.
diff --git a/sdk/lib/core/date_time.dart b/sdk/lib/core/date_time.dart
index e90e14c..366995c 100644
--- a/sdk/lib/core/date_time.dart
+++ b/sdk/lib/core/date_time.dart
@@ -420,7 +420,7 @@
checkNotNullable(isUtc, "isUtc");
}
- /// Returns true if [other] is a [DateTime] at the same moment and in the
+ /// Whether [other] is a [DateTime] at the same moment and in the
/// same time zone (UTC or local).
///
/// ```dart
@@ -436,7 +436,7 @@
/// independently of their zones.
external bool operator ==(Object other);
- /// Returns true if [this] occurs before [other].
+ /// Whether this [DateTime] occurs before [other].
///
/// The comparison is independent
/// of whether the time is in UTC or in the local time zone.
@@ -456,7 +456,7 @@
/// ```
external bool isBefore(DateTime other);
- /// Returns true if [this] occurs after [other].
+ /// Whether this [DateTime] occurs after [other].
///
/// The comparison is independent
/// of whether the time is in UTC or in the local time zone.
@@ -476,7 +476,7 @@
/// ```
external bool isAfter(DateTime other);
- /// Returns true if [this] occurs at the same moment as [other].
+ /// Whether this [DateTime] occurs at the same moment as [other].
///
/// The comparison is independent of whether the time is in UTC or in the local
/// time zone.
@@ -520,7 +520,7 @@
/// Returns this DateTime value in the local time zone.
///
- /// Returns [this] if it is already in the local time zone.
+ /// Returns this [DateTime] if it is already in the local time zone.
/// Otherwise this method is equivalent to:
///
/// ```dart template:expression
@@ -536,7 +536,7 @@
/// Returns this DateTime value in the UTC time zone.
///
- /// Returns [this] if it is already in UTC.
+ /// Returns this [DateTime] if it is already in UTC.
/// Otherwise this method is equivalent to:
///
/// ```dart template:expression
@@ -642,7 +642,7 @@
}
}
- /// Returns a new [DateTime] instance with [duration] added to [this].
+ /// Returns a new [DateTime] instance with [duration] added to this [DateTime].
///
/// ```dart
/// final today = DateTime.now();
@@ -657,7 +657,8 @@
/// Be careful when working with dates in local time.
external DateTime add(Duration duration);
- /// Returns a new [DateTime] instance with [duration] subtracted from [this].
+ /// Returns a new [DateTime] instance with [duration] subtracted from this
+ /// [DateTime].
///
/// ```dart
/// final today = DateTime.now();
@@ -673,9 +674,10 @@
external DateTime subtract(Duration duration);
/// Returns a [Duration] with the difference when subtracting [other] from
- /// [this].
+ /// this [DateTime].
///
- /// The returned [Duration] will be negative if [other] occurs after [this].
+ /// The returned [Duration] will be negative if [other] occurs after this
+ /// [DateTime].
///
/// ```dart
/// final berlinWallFell = DateTime.utc(1989, DateTime.november, 9);
diff --git a/sdk/lib/core/int.dart b/sdk/lib/core/int.dart
index c59f308..520b53c 100644
--- a/sdk/lib/core/int.dart
+++ b/sdk/lib/core/int.dart
@@ -353,7 +353,7 @@
/// `i == int.parse(i.toString())`.
String toString();
- /// Converts [this] to a string representation in the given [radix].
+ /// Converts this [int] to a string representation in the given [radix].
///
/// In the string representation, lower-case letters are used for digits above
/// '9', with 'a' being 10 and 'z' being 35.
diff --git a/sdk/lib/core/iterable.dart b/sdk/lib/core/iterable.dart
index 1b8e559..383e10b 100644
--- a/sdk/lib/core/iterable.dart
+++ b/sdk/lib/core/iterable.dart
@@ -511,7 +511,7 @@
/// ```
Set<E> toSet() => Set<E>.of(this);
- /// The number of elements in [this].
+ /// The number of elements in this [Iterable].
///
/// Counting all elements may involve iterating through all elements and can
/// therefore be slow.
diff --git a/sdk/lib/core/map.dart b/sdk/lib/core/map.dart
index d3d4a7c..bdd86f0 100644
--- a/sdk/lib/core/map.dart
+++ b/sdk/lib/core/map.dart
@@ -269,7 +269,7 @@
/// Otherwise the key/value pair is added to the map.
void operator []=(K key, V value);
- /// The map entries of [this].
+ /// The map entries of this [Map].
Iterable<MapEntry<K, V>> get entries;
/// Returns a new map where all entries of this map are transformed by
@@ -417,7 +417,7 @@
/// ```
void forEach(void action(K key, V value));
- /// The keys of [this].
+ /// The keys of this [Map].
///
/// The returned iterable has efficient `length` and `contains` operations,
/// based on [length] and [containsKey] of the map.
@@ -428,7 +428,7 @@
/// Modifying the map while iterating the keys may break the iteration.
Iterable<K> get keys;
- /// The values of [this].
+ /// The values of this [Map].
///
/// The values are iterated in the order of their corresponding keys.
/// This means that iterating [keys] and [values] in parallel will
diff --git a/sdk/lib/core/weak.dart b/sdk/lib/core/weak.dart
index d08d76b..5fe4848 100644
--- a/sdk/lib/core/weak.dart
+++ b/sdk/lib/core/weak.dart
@@ -131,7 +131,7 @@
/// the `null` value, or certain other types of special objects.
external factory WeakReference(T target);
- /// The current object weakly referenced by [this], if any.
+ /// The current object weakly referenced by this [WeakReference], if any.
///
/// The value is either the object supplied in the constructor,
/// or `null` if the weak reference has been cleared.
diff --git a/sdk/lib/developer/profiler.dart b/sdk/lib/developer/profiler.dart
index f19c4f8..5e44962 100644
--- a/sdk/lib/developer/profiler.dart
+++ b/sdk/lib/developer/profiler.dart
@@ -12,11 +12,11 @@
external factory UserTag(String label);
- /// Label of [this].
+ /// Label of this [UserTag].
String get label;
- /// Make [this] the current tag for the isolate. Returns the current tag
- /// before setting.
+ /// Make this [UserTag] the current tag for the isolate. Returns the current
+ /// tag before setting.
UserTag makeCurrent();
/// The default [UserTag] with label 'Default'.
diff --git a/sdk/lib/io/directory.dart b/sdk/lib/io/directory.dart
index 88e3ef4..ae6eb05 100644
--- a/sdk/lib/io/directory.dart
+++ b/sdk/lib/io/directory.dart
@@ -316,7 +316,7 @@
/// [FileSystemException].
void deleteSync({bool recursive = false});
- /// A [Directory] whose path is the absolute path of [this].
+ /// A [Directory] whose path is the absolute path of this [Directory].
///
/// The absolute path is computed by prefixing
/// a relative path with the current working directory,
diff --git a/sdk/lib/io/link.dart b/sdk/lib/io/link.dart
index a8d5b02..8ee89d2 100644
--- a/sdk/lib/io/link.dart
+++ b/sdk/lib/io/link.dart
@@ -194,7 +194,7 @@
/// [FileSystemException].
void deleteSync({bool recursive = false});
- /// A [Link] instance whose path is the absolute path to [this].
+ /// A [Link] instance whose path is the absolute path to this [Link].
///
/// The absolute path is computed by prefixing
/// a relative path with the current working directory, or returning
diff --git a/sdk/lib/typed_data/typed_data.dart b/sdk/lib/typed_data/typed_data.dart
index 2a8bd07..3ad1c78 100644
--- a/sdk/lib/typed_data/typed_data.dart
+++ b/sdk/lib/typed_data/typed_data.dart
@@ -2551,14 +2551,15 @@
/// Relational not-equal.
Int32x4 notEqual(Float32x4 other);
- /// Returns a copy of [this] each lane being scaled by [s].
+ /// Returns a copy of this [Float32x4] each lane being scaled by [s].
/// Equivalent to this * new Float32x4.splat(s)
Float32x4 scale(double s);
/// Returns the lane-wise absolute value of this [Float32x4].
Float32x4 abs();
- /// Lane-wise clamp [this] to be in the range [lowerLimit]-[upperLimit].
+ /// Lane-wise clamp this [Float32x4] to be in the range
+ /// [lowerLimit]-[upperLimit].
Float32x4 clamp(Float32x4 lowerLimit, Float32x4 upperLimit);
/// Extracted x value.
@@ -2841,36 +2842,40 @@
/// Shuffle the lane values. [mask] must be one of the 256 shuffle constants.
Float32x4 shuffle(int mask);
- /// 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].
+ /// Shuffle the lane values in this [Float32x4] and [other]. The returned
+ /// Float32x4 will have XY lanes from this [Float32x4] and ZW lanes from
+ /// [other]. Uses the same [mask] as [shuffle].
Float32x4 shuffleMix(Float32x4 other, int mask);
- /// Returns a new [Float32x4] copied from [this] with a new x value.
+ /// Returns a new [Float32x4] copied from this [Float32x4] with a new x
+ /// value.
Float32x4 withX(double x);
- /// Returns a new [Float32x4] copied from [this] with a new y value.
+ /// Returns a new [Float32x4] copied from this [Float32x4] with a new y
+ /// value.
Float32x4 withY(double y);
- /// Returns a new [Float32x4] copied from [this] with a new z value.
+ /// Returns a new [Float32x4] copied from this [Float32x4] with a new z
+ /// value.
Float32x4 withZ(double z);
- /// Returns a new [Float32x4] copied from [this] with a new w value.
+ /// Returns a new [Float32x4] copied from this [Float32x4] with a new w
+ /// value.
Float32x4 withW(double w);
- /// Returns the lane-wise minimum value in [this] or [other].
+ /// Returns the lane-wise minimum value in this [Float32x4] or [other].
Float32x4 min(Float32x4 other);
- /// Returns the lane-wise maximum value in [this] or [other].
+ /// Returns the lane-wise maximum value in this [Float32x4] or [other].
Float32x4 max(Float32x4 other);
- /// Returns the square root of [this].
+ /// Returns the square root of this [Float32x4].
Float32x4 sqrt();
- /// Returns the reciprocal of [this].
+ /// Returns the reciprocal of this [Float32x4].
Float32x4 reciprocal();
- /// Returns the square root of the reciprocal of [this].
+ /// Returns the square root of the reciprocal of this [Float32x4].
Float32x4 reciprocalSqrt();
}
@@ -3178,21 +3183,21 @@
/// Shuffle the lane values. [mask] must be one of the 256 shuffle constants.
Int32x4 shuffle(int mask);
- /// Shuffle the lane values in [this] and [other]. The returned
- /// Int32x4 will have XY lanes from [this] and ZW lanes from [other].
+ /// Shuffle the lane values in this [Int32x4] and [other]. The returned
+ /// Int32x4 will have XY lanes from this [Int32x4] and ZW lanes from [other].
/// Uses the same [mask] as [shuffle].
Int32x4 shuffleMix(Int32x4 other, int mask);
- /// Returns a new [Int32x4] copied from [this] with a new x value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new x value.
Int32x4 withX(int x);
- /// Returns a new [Int32x4] copied from [this] with a new y value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new y value.
Int32x4 withY(int y);
- /// Returns a new [Int32x4] copied from [this] with a new z value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new z value.
Int32x4 withZ(int z);
- /// Returns a new [Int32x4] copied from [this] with a new w value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new w value.
Int32x4 withW(int w);
/// Extracted x value. Returns false for 0, true for any other value.
@@ -3207,21 +3212,21 @@
/// Extracted w value. Returns false for 0, true for any other value.
bool get flagW;
- /// Returns a new [Int32x4] copied from [this] with a new x value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new x value.
Int32x4 withFlagX(bool x);
- /// Returns a new [Int32x4] copied from [this] with a new y value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new y value.
Int32x4 withFlagY(bool y);
- /// Returns a new [Int32x4] copied from [this] with a new z value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new z value.
Int32x4 withFlagZ(bool z);
- /// Returns a new [Int32x4] copied from [this] with a new w value.
+ /// Returns a new [Int32x4] copied from this [Int32x4] with a new w value.
Int32x4 withFlagW(bool w);
- /// Merge [trueValue] and [falseValue] based on [this]' bit mask:
- /// Select bit from [trueValue] when bit in [this] is on.
- /// Select bit from [falseValue] when bit in [this] is off.
+ /// Merge [trueValue] and [falseValue] based on this [Int32x4] bit mask:
+ /// Select bit from [trueValue] when bit in this [Int32x4] is on.
+ /// Select bit from [falseValue] when bit in this [Int32x4] is off.
Float32x4 select(Float32x4 trueValue, Float32x4 falseValue);
}
@@ -3255,14 +3260,15 @@
/// Division operator.
Float64x2 operator /(Float64x2 other);
- /// Returns a copy of [this] each lane being scaled by [s].
+ /// Returns a copy of this [Float64x2] each lane being scaled by [s].
/// Equivalent to this * new Float64x2.splat(s)
Float64x2 scale(double s);
/// Returns the lane-wise absolute value of this [Float64x2].
Float64x2 abs();
- /// Lane-wise clamp [this] to be in the range [lowerLimit]-[upperLimit].
+ /// Lane-wise clamp this [Float64x2] to be in the range
+ /// [lowerLimit]-[upperLimit].
Float64x2 clamp(Float64x2 lowerLimit, Float64x2 upperLimit);
/// Extracted x value.
@@ -3276,18 +3282,20 @@
/// "y" lane is bit 1.
int get signMask;
- /// Returns a new [Float64x2] copied from [this] with a new x value.
+ /// Returns a new [Float64x2] copied from this [Float64x2] with a new x
+ /// value.
Float64x2 withX(double x);
- /// Returns a new [Float64x2] copied from [this] with a new y value.
+ /// Returns a new [Float64x2] copied from this [Float64x2] with a new y
+ /// value.
Float64x2 withY(double y);
- /// Returns the lane-wise minimum value in [this] or [other].
+ /// Returns the lane-wise minimum value in this [Float64x2] or [other].
Float64x2 min(Float64x2 other);
- /// Returns the lane-wise maximum value in [this] or [other].
+ /// Returns the lane-wise maximum value in this [Float64x2] or [other].
Float64x2 max(Float64x2 other);
- /// Returns the lane-wise square root of [this].
+ /// Returns the lane-wise square root of this [Float64x2].
Float64x2 sqrt();
}