[dart2js] Migrate js/rewrite_async.dart

Change-Id: I3771393f27a41417ed0d43608ddae0ee6fb78748
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/245912
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
This commit is contained in:
Stephen Adams
2022-05-26 02:57:58 +00:00
committed by Commit Bot
parent 0e8eece6b6
commit 28e36a8ff9
2 changed files with 300 additions and 257 deletions
File diff suppressed because it is too large Load Diff
+24
View File
@@ -642,6 +642,18 @@ class Program extends Node {
}
abstract class Statement extends Node {
// Override for refined return type.
@override
Statement _clone();
// Override for refined return type.
@override
Statement withSourceInformation(
JavaScriptNodeSourceInformation? sourceInformation) {
if (sourceInformation == _sourceInformation) return this;
return _clone().._sourceInformation = sourceInformation;
}
@override
Statement toStatement() => this;
}
@@ -1277,6 +1289,18 @@ abstract class Expression extends Node {
// have precedence depending on how the deferred node is resolved.
int get precedenceLevel;
// Override for refined return type.
@override
Expression _clone();
// Override for refined return type.
@override
Expression withSourceInformation(
JavaScriptNodeSourceInformation? sourceInformation) {
if (sourceInformation == _sourceInformation) return this;
return _clone().._sourceInformation = sourceInformation;
}
@override
Statement toStatement() => ExpressionStatement(this);
}