[dart2wasm] Dart format pkg/wasm_builder

The change in [0] increased the language version of pkg/dart2wasm. That
in return changes how the package is formatted by the autoformatter.

This CL runs now the formatter to re-format the code. Unfortunately this
makes blame lists worse. But not doing it will make us have to disable
auto-formatting before saving files which is very annoying.

[0] https://dart-review.googlesource.com/c/sdk/+/487944

Change-Id: Ie3cbdc58bbd7f5aba187470554b7c958719fa795
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/496940
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Martin Kustermann
2026-04-21 05:52:14 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 0b7c68fad4
commit 4201b2677e
30 changed files with 3637 additions and 1461 deletions
+30 -11
View File
@@ -13,8 +13,11 @@ class Local {
Local(this.index, this.type);
void printTo(IrPrinter p, Map<int, String> localNames,
{bool isParam = false}) {
void printTo(
IrPrinter p,
Map<int, String> localNames, {
bool isParam = false,
}) {
p.write(isParam ? 'param' : 'local');
p.write(' ');
p.writeLocalIndexReference(index);
@@ -41,8 +44,12 @@ abstract class BaseFunction with Indexable, Exportable {
/// `binaryen.removable.if.unused` custom section.
bool isPure = false;
BaseFunction(this.enclosingModule, this.finalizableIndex, this.type,
[this.functionName]);
BaseFunction(
this.enclosingModule,
this.finalizableIndex,
this.type, [
this.functionName,
]);
@override
String get name => functionName ?? super.name;
@@ -64,12 +71,19 @@ class DefinedFunction extends BaseFunction implements Serializable {
Map<int, String> get localNames => body.localNames;
DefinedFunction(
super.enclosingModule, this.body, super.finalizableIndex, super.type,
[super.functionName]);
super.enclosingModule,
this.body,
super.finalizableIndex,
super.type, [
super.functionName,
]);
DefinedFunction.withoutBody(
super.enclosingModule, super.finalizableIndex, super.type,
[super.functionName]);
super.enclosingModule,
super.finalizableIndex,
super.type, [
super.functionName,
]);
@override
void serialize(Serializer s) {
@@ -154,9 +168,14 @@ class ImportedFunction extends BaseFunction implements Import {
@override
final String name;
ImportedFunction(super.enclosingModule, this.module, this.name,
super.finalizableIndex, super.type,
[super.functionName]);
ImportedFunction(
super.enclosingModule,
this.module,
this.name,
super.finalizableIndex,
super.type, [
super.functionName,
]);
@override
void serialize(Serializer s) {