Bump package:lints to the latest; address instances of new lints.

Changes:
```
> git log --format="%C(auto) %h %s" 8d5f750..b044aca
 https://dart.googlesource.com/lints.git/+/b044aca add several rules to core and recommended (150)
 https://dart.googlesource.com/lints.git/+/81100a2 fix a dangling table link (146)
```

Diff: https://dart.googlesource.com/lints.git/+/8d5f7500024320654adb1e799e49fc10c5304ae7..b044acab9f6669b3d8e781923a8ff86877801177/
Change-Id: I031333ade99af700a7009b14a36d3aadba12fc94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327321
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
This commit is contained in:
Devon Carew 2023-09-25 21:15:15 +00:00 committed by Commit Queue
parent d4b9f2207c
commit 3b0b1bd863
47 changed files with 250 additions and 378 deletions

2
DEPS
View file

@ -156,7 +156,7 @@ vars = {
"intl_rev": "5d65e3808ce40e6282e40881492607df4e35669f",
"json_rpc_2_rev": "50a37863be221f43ef07533c0c154ae676fc5df0",
"leak_tracker_rev": "098bafcf99a5220e3c352d895d991e163568ee03", # b/299640139
"lints_rev": "8d5f7500024320654adb1e799e49fc10c5304ae7",
"lints_rev": "b044acab9f6669b3d8e781923a8ff86877801177",
"logging_rev": "bcaad0f781a889d6e5cf8fc564fd0722c446b96e",
"markdown_rev": "6cfd6f17651a8ba31b5a268f1139bb2c039dd4d4",
"matcher_rev": "80910d6698576ba486ace6e5fdf0e27324f138db",

View file

@ -6,7 +6,6 @@ import 'dart:async';
import 'dart:convert';
import 'dart:io';
import 'package:analysis_server_client/listener/server_listener.dart';
import 'package:analysis_server_client/protocol.dart';
import 'package:analysis_server_client/src/server_base.dart';
import 'package:path/path.dart';
@ -31,12 +30,8 @@ class Server extends ServerBase {
/// [listenToOutput] has not been called or [stop] has been called.
StreamSubscription<String>? _stdoutSubscription;
Server(
{ServerListener? listener,
Process? process,
bool stdioPassthrough = false})
: _process = process,
super(listener: listener, stdioPassthrough: stdioPassthrough);
Server({super.listener, Process? process, super.stdioPassthrough})
: _process = process;
/// Force kill the server. Returns exit code future.
@override

View file

@ -223,10 +223,8 @@ class HumanErrorFormatter extends ErrorFormatter {
// This is a Set in order to de-dup CLI errors.
final Set<CLIError> batchedErrors = {};
HumanErrorFormatter(
StringSink out, CommandLineOptions options, AnalysisStats stats,
{SeverityProcessor? severityProcessor})
: super(out, options, stats, severityProcessor: severityProcessor);
HumanErrorFormatter(super.out, super.options, super.stats,
{super.severityProcessor});
@override
void flush() {
@ -340,10 +338,8 @@ class HumanErrorFormatter extends ErrorFormatter {
}
class JsonErrorFormatter extends ErrorFormatter {
JsonErrorFormatter(
StringSink out, CommandLineOptions options, AnalysisStats stats,
{SeverityProcessor? severityProcessor})
: super(out, options, stats, severityProcessor: severityProcessor);
JsonErrorFormatter(super.out, super.options, super.stats,
{super.severityProcessor});
@override
void flush() {}
@ -431,10 +427,8 @@ class MachineErrorFormatter extends ErrorFormatter {
static final int _return = '\r'.codeUnitAt(0);
final Set<AnalysisError> _seenErrors = <AnalysisError>{};
MachineErrorFormatter(
StringSink out, CommandLineOptions options, AnalysisStats stats,
{SeverityProcessor? severityProcessor})
: super(out, options, stats, severityProcessor: severityProcessor);
MachineErrorFormatter(super.out, super.options, super.stats,
{super.severityProcessor});
@override
void flush() {}

View file

@ -52,11 +52,10 @@ class DartEditBuilderImpl extends EditBuilderImpl implements DartEditBuilder {
final bool isNonNullableByDefault;
/// Initialize a newly created builder to build a source edit.
DartEditBuilderImpl(
DartFileEditBuilderImpl sourceFileEditBuilder, int offset, int length)
DartEditBuilderImpl(DartFileEditBuilderImpl super.sourceFileEditBuilder,
super.offset, super.length)
: isNonNullableByDefault = sourceFileEditBuilder
.resolvedUnit.libraryElement.isNonNullableByDefault,
super(sourceFileEditBuilder, offset, length);
.resolvedUnit.libraryElement.isNonNullableByDefault;
DartFileEditBuilderImpl get dartFileEditBuilder =>
fileEditBuilder as DartFileEditBuilderImpl;
@ -2040,8 +2039,7 @@ class DartFileEditBuilderImpl extends FileEditBuilderImpl
class DartLinkedEditBuilderImpl extends LinkedEditBuilderImpl
implements DartLinkedEditBuilder {
/// Initialize a newly created linked edit builder.
DartLinkedEditBuilderImpl(DartEditBuilderImpl editBuilder)
: super(editBuilder);
DartLinkedEditBuilderImpl(DartEditBuilderImpl super.editBuilder);
DartEditBuilderImpl get dartEditBuilder => editBuilder as DartEditBuilderImpl;

View file

@ -11,9 +11,8 @@ import 'package:yaml/yaml.dart';
/// An [EditBuilder] used to build edits in YAML files.
class YamlEditBuilderImpl extends EditBuilderImpl implements YamlEditBuilder {
/// Initialize a newly created builder to build a source edit.
YamlEditBuilderImpl(
YamlFileEditBuilderImpl sourceFileEditBuilder, int offset, int length)
: super(sourceFileEditBuilder, offset, length);
YamlEditBuilderImpl(YamlFileEditBuilderImpl super.sourceFileEditBuilder,
super.offset, super.length);
YamlFileEditBuilderImpl get dartFileEditBuilder =>
fileEditBuilder as YamlFileEditBuilderImpl;
@ -80,5 +79,5 @@ class YamlFileEditBuilderImpl extends FileEditBuilderImpl
class YamlLinkedEditBuilderImpl extends LinkedEditBuilderImpl
implements YamlLinkedEditBuilder {
/// Initialize a newly created linked edit builder.
YamlLinkedEditBuilderImpl(EditBuilderImpl editBuilder) : super(editBuilder);
YamlLinkedEditBuilderImpl(super.editBuilder);
}

View file

@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer_plugin/plugin/assist_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart';
@ -66,8 +65,7 @@ class _TestAssistContributor implements AssistContributor {
}
class _TestServerPlugin extends MockServerPlugin with AssistsMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
PrioritizedSourceChange createChange() {
return PrioritizedSourceChange(0, SourceChange(''));

View file

@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer_plugin/plugin/completion_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol_common.dart';
@ -69,8 +68,7 @@ class _TestCompletionContributor implements CompletionContributor {
}
class _TestServerPlugin extends MockServerPlugin with CompletionMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
CompletionSuggestion createSuggestion() {
return CompletionSuggestion(

View file

@ -3,7 +3,6 @@
// BSD-style license that can be found in the LICENSE file.
import 'package:analyzer/error/error.dart';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/src/error/codes.dart';
import 'package:analyzer/src/generated/source.dart';
import 'package:analyzer_plugin/plugin/fix_mixin.dart';
@ -71,8 +70,7 @@ class _TestFixContributor implements FixContributor {
}
class _TestServerPlugin extends MockServerPlugin with FixesMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
PrioritizedSourceChange createChange() {
return PrioritizedSourceChange(0, SourceChange(''));

View file

@ -4,7 +4,6 @@
import 'dart:async';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer_plugin/plugin/folding_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol.dart';
@ -74,8 +73,7 @@ class _TestFoldingContributor implements FoldingContributor {
}
class _TestServerPlugin extends MockServerPlugin with FoldingMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
@override
List<FoldingContributor> getFoldingContributors(String path) {

View file

@ -4,7 +4,6 @@
import 'dart:async';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer_plugin/plugin/highlights_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol.dart';
@ -74,8 +73,7 @@ class _TestHighlightsContributor implements HighlightsContributor {
}
class _TestServerPlugin extends MockServerPlugin with HighlightsMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
@override
List<HighlightsContributor> getHighlightsContributors(String path) {

View file

@ -4,7 +4,6 @@
import 'dart:async';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer_plugin/plugin/navigation_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol.dart';
@ -88,8 +87,7 @@ class _TestNavigationContributor implements NavigationContributor {
}
class _TestServerPlugin extends MockServerPlugin with NavigationMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
@override
List<NavigationContributor> getNavigationContributors(String path) {

View file

@ -4,7 +4,6 @@
import 'dart:async';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer_plugin/plugin/occurrences_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol.dart';
@ -92,8 +91,7 @@ class _TestOccurrencesContributor implements OccurrencesContributor {
}
class _TestServerPlugin extends MockServerPlugin with OccurrencesMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
@override
List<OccurrencesContributor> getOccurrencesContributors(String path) {

View file

@ -4,7 +4,6 @@
import 'dart:async';
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer_plugin/plugin/outline_mixin.dart';
import 'package:analyzer_plugin/plugin/plugin.dart';
import 'package:analyzer_plugin/protocol/protocol.dart';
@ -74,8 +73,7 @@ class _TestOutlineContributor implements OutlineContributor {
}
class _TestServerPlugin extends MockServerPlugin with OutlineMixin {
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
@override
List<OutlineContributor> getOutlineContributors(String path) {

View file

@ -501,8 +501,7 @@ class _TestServerPlugin extends MockServerPlugin {
required String path,
})? analyzeFileHandler;
_TestServerPlugin(ResourceProvider resourceProvider)
: super(resourceProvider);
_TestServerPlugin(super.resourceProvider);
@override
Future<void> afterNewContextCollection({

View file

@ -41,7 +41,7 @@ f(List<MyClass> list) {
}
class TestVisitor extends LocalDeclarationVisitor {
TestVisitor(int offset) : super(offset);
TestVisitor(super.offset);
@override
void declaredLocalVar(

View file

@ -16,8 +16,7 @@ void main() {
}
class _VerifyTests extends VerifyTests {
_VerifyTests(String testDirPath, {List<String>? excludedPaths})
: super(testDirPath, excludedPaths: excludedPaths);
_VerifyTests(super.testDirPath);
@override
bool isExpensive(Resource resource) => resource.shortName == 'integration';

View file

@ -281,8 +281,7 @@ class Request extends ApiNode {
/// Base class for all possible types.
abstract class TypeDecl extends ApiNode {
TypeDecl(dom.Element? html, bool? experimental, bool? deprecated)
: super(html, experimental, deprecated);
TypeDecl(super.html, super.experimental, super.deprecated);
T accept<T>(ApiVisitor<T> visitor);
}

View file

@ -12,7 +12,7 @@ class DartCodegenVisitor extends HierarchicalApiVisitor {
'object': 'Map',
};
DartCodegenVisitor(Api api) : super(api);
DartCodegenVisitor(super.api);
/// Convert the given [TypeDecl] to a Dart type.
String dartType(TypeDecl type) {

View file

@ -24,9 +24,7 @@ class CodegenMatchersVisitor extends HierarchicalApiVisitor with CodeGenerator {
/// created.
String? context;
CodegenMatchersVisitor(Api api)
: toHtmlVisitor = ToHtmlVisitor(api),
super(api) {
CodegenMatchersVisitor(super.api) : toHtmlVisitor = ToHtmlVisitor(api) {
codeGeneratorSettings.commentLineLength = 79;
codeGeneratorSettings.docCommentStartMarker = null;
codeGeneratorSettings.docCommentLineLeader = '/// ';

View file

@ -35,9 +35,8 @@ class CodegenCommonVisitor extends CodegenProtocolVisitor {
/// the given [packageName] corresponding to the types in the given [api] that
/// are common to multiple protocols.
CodegenCommonVisitor(
String packageName, bool responseRequiresRequestTime, Api api,
{this.forClient = false})
: super(packageName, responseRequiresRequestTime, api);
super.packageName, super.responseRequiresRequestTime, super.api,
{this.forClient = false});
@override
void emitImports() {

View file

@ -17,7 +17,7 @@ final GeneratedFile target = GeneratedFile(
/// A visitor that produces Dart code defining constants associated with the
/// API.
class CodegenVisitor extends DartCodegenVisitor with CodeGenerator {
CodegenVisitor(Api api) : super(api) {
CodegenVisitor(super.api) {
codeGeneratorSettings.commentLineLength = 79;
codeGeneratorSettings.docCommentStartMarker = null;
codeGeneratorSettings.docCommentLineLeader = '/// ';
@ -71,7 +71,7 @@ class _ConstantVisitor extends HierarchicalApiVisitor {
List<_Constant> constants = <_Constant>[];
/// Initialize a newly created visitor to visit the given [api].
_ConstantVisitor(Api api) : super(api);
_ConstantVisitor(super.api);
@override
void visitNotification(Notification notification) {

View file

@ -37,7 +37,7 @@ class ImpliedType {
class _ImpliedTypesVisitor extends HierarchicalApiVisitor {
Map<String, ImpliedType> impliedTypes = <String, ImpliedType>{};
_ImpliedTypesVisitor(Api api) : super(api);
_ImpliedTypesVisitor(super.api);
void storeType(String name, String? nameSuffix, TypeDecl? type, String kind,
ApiNode apiNode) {

View file

@ -143,7 +143,7 @@ String _toTitleCase(String str) {
class ApiMappings extends HierarchicalApiVisitor {
Map<dom.Element, Domain> domains = <dom.Element, Domain>{};
ApiMappings(Api api) : super(api);
ApiMappings(super.api);
@override
void visitDomain(Domain domain) {
@ -214,9 +214,7 @@ class ToHtmlVisitor extends HierarchicalApiVisitor
/// Mappings from HTML elements to API nodes.
ApiMappings apiMappings;
ToHtmlVisitor(Api api)
: apiMappings = ApiMappings(api),
super(api) {
ToHtmlVisitor(super.api) : apiMappings = ApiMappings(api) {
apiMappings.visitApi();
}
@ -708,7 +706,7 @@ class TypeVisitor extends HierarchicalApiVisitor
/// objects are shown as simply "object", and enums are shown as "String".
final bool short;
TypeVisitor(Api api, {this.fieldsToBold, this.short = false}) : super(api);
TypeVisitor(super.api, {this.fieldsToBold, this.short = false});
@override
void visitTypeEnum(TypeEnum typeEnum) {

View file

@ -0,0 +1,7 @@
include: package:lints/recommended.yaml
analyzer:
errors:
# TODO: We need to address existing instances in
# lib/src/protocol_generated.dart (#53600).
use_super_parameters: ignore

View file

@ -28,7 +28,7 @@ class BytesBacked {
}
class CoffFileHeader extends BytesBacked {
CoffFileHeader._(ByteData data) : super(data);
CoffFileHeader._(super.data);
static const _fileHeaderSize = 20;
static const _sectionCountOffset = 2;
@ -53,7 +53,7 @@ class CoffFileHeader extends BytesBacked {
}
class CoffOptionalHeader extends BytesBacked {
CoffOptionalHeader._(ByteData data) : super(data);
CoffOptionalHeader._(super.data);
static const _pe32Magic = 0x10b;
static const _pe32PlusMagic = 0x20b;
@ -96,7 +96,7 @@ class CoffOptionalHeader extends BytesBacked {
}
class CoffSectionHeader extends BytesBacked {
CoffSectionHeader._(ByteData data) : super(data);
CoffSectionHeader._(super.data);
static const _virtualSizeOffset = 8;
static const _virtualAddressOffset = 12;
@ -148,7 +148,7 @@ class CoffSectionHeader extends BytesBacked {
}
class CoffSectionTable extends BytesBacked {
CoffSectionTable._(ByteData data) : super(data);
CoffSectionTable._(super.data);
static const _entrySize = 40;

View file

@ -309,7 +309,7 @@ abstract class MachOLoadCommand {
class MachOGenericLoadCommand extends MachOLoadCommand {
final Uint8List contents;
MachOGenericLoadCommand(cmd, cmdsize, this.contents) : super(cmd, cmdsize);
MachOGenericLoadCommand(super.cmd, super.cmdsize, this.contents);
@override
MachOLoadCommand adjust(OffsetsAdjuster adjuster) => this;
@ -509,8 +509,8 @@ class MachOSegmentCommand extends MachOLoadCommand {
final List<MachOSection> sections;
MachOSegmentCommand(
int code,
int size,
super.code,
super.size,
this.name,
this.memoryAddress,
this.memorySize,
@ -520,7 +520,7 @@ class MachOSegmentCommand extends MachOLoadCommand {
this.initialProtection,
this.flags,
this.sections,
) : super(code, size);
);
static const _nameLength = 16;
@ -810,13 +810,13 @@ class MachOSymtabCommand extends MachOLoadCommand {
final int stringTableSize;
MachOSymtabCommand(
int code,
int size,
super.code,
super.size,
this.fileOffset,
this.symbolsCount,
this.stringTableFileOffset,
this.stringTableSize,
) : super(code, size);
);
static MachOSymtabCommand fromStream(int code, int size, MachOReader stream) {
final fileOffset = stream.readUint32();
@ -939,8 +939,8 @@ class MachODysymtabCommand extends MachOLoadCommand {
final int localRelocationsCount;
MachODysymtabCommand(
int code,
int size,
super.code,
super.size,
this.localSymbolsIndex,
this.localSymbolsCount,
this.externalSymbolsIndex,
@ -958,8 +958,7 @@ class MachODysymtabCommand extends MachOLoadCommand {
this.externalRelocationsFileOffset,
this.externalRelocationsCount,
this.localRelocationsFileOffset,
this.localRelocationsCount)
: super(code, size);
this.localRelocationsCount);
static MachODysymtabCommand fromStream(
int code, int size, MachOReader stream) {
@ -1066,11 +1065,11 @@ class MachOLinkeditDataCommand extends MachOLoadCommand {
final int dataSize;
MachOLinkeditDataCommand(
int code,
int size,
super.code,
super.size,
this.dataFileOffset,
this.dataSize,
) : super(code, size);
);
static MachOLinkeditDataCommand fromStream(
int code, final int size, MachOReader stream) {
@ -1116,9 +1115,8 @@ class MachOEncryptionInfoCommand extends MachOLoadCommand {
/// `uint32_t pad` for `encryption_info_command_64` in the C headers.
final int? padding;
MachOEncryptionInfoCommand(int code, int size, this.fileOffset, this.fileSize,
this.encryptionSystem, this.padding)
: super(code, size);
MachOEncryptionInfoCommand(super.code, super.size, this.fileOffset,
this.fileSize, this.encryptionSystem, this.padding);
static MachOEncryptionInfoCommand fromStream(
int code, final int size, MachOReader stream) {
@ -1208,8 +1206,8 @@ class MachODyldInfoCommand extends MachOLoadCommand {
final int exportSize;
MachODyldInfoCommand(
int code,
int size,
super.code,
super.size,
this.rebaseOffset,
this.rebaseSize,
this.bindingOffset,
@ -1219,8 +1217,7 @@ class MachODyldInfoCommand extends MachOLoadCommand {
this.lazyBindingOffset,
this.lazyBindingSize,
this.exportOffset,
this.exportSize)
: super(code, size);
this.exportSize);
static MachODyldInfoCommand fromStream(
int code, int size, MachOReader stream) {
@ -1293,8 +1290,8 @@ class MachOEntryPointCommand extends MachOLoadCommand {
/// `uint64_t stacksize` in the C headers.
final int stackSize;
MachOEntryPointCommand(int code, int size, this.entryOffset, this.stackSize)
: super(code, size);
MachOEntryPointCommand(
super.code, super.size, this.entryOffset, this.stackSize);
static MachOEntryPointCommand fromStream(
int code, int size, MachOReader stream) {
@ -1335,12 +1332,12 @@ class MachODataInCodeEntry extends MachOLoadCommand {
final int kind;
MachODataInCodeEntry(
int code,
int size,
super.code,
super.size,
this.offset,
this.length,
this.kind,
) : super(code, size);
);
static MachODataInCodeEntry fromStream(
int code, int size, MachOReader stream) {
@ -1380,8 +1377,7 @@ class MachONoteCommand extends MachOLoadCommand {
final int fileSize;
MachONoteCommand(
int code, int size, this.dataOwner, this.fileOffset, this.fileSize)
: super(code, size);
super.code, super.size, this.dataOwner, this.fileOffset, this.fileSize);
static MachONoteCommand fromStream(int code, int size, MachOReader stream) {
final dataOwner =
@ -1440,9 +1436,8 @@ class MachOFileSetEntryCommand extends MachOLoadCommand {
/// `uint32_t reserved` in the C headers.
final int reserved;
MachOFileSetEntryCommand(int code, int size, this.memoryAddress,
this.fileOffset, this.entryId, this.reserved)
: super(code, size);
MachOFileSetEntryCommand(super.code, super.size, this.memoryAddress,
this.fileOffset, this.entryId, this.reserved);
static MachOFileSetEntryCommand fromStream(
int code, int size, MachOReader stream) {

View file

@ -152,11 +152,11 @@ Use linkMode as dynamic library instead.""");
Asset targetLocation(Asset asset) {
final path = asset.path;
switch (path.runtimeType) {
case AssetSystemPath:
case AssetInExecutable:
case AssetInProcess:
case const (AssetSystemPath):
case const (AssetInExecutable):
case const (AssetInProcess):
return asset;
case AssetAbsolutePath:
case const (AssetAbsolutePath):
return asset.copyWith(
path: AssetRelativePath(
Uri(

View file

@ -407,8 +407,8 @@ Sets the verbosity level of the compilation.
late final Option defineOption;
late final Option packagesOption;
CompileSubcommandCommand(String name, String description, bool verbose,
{bool hidden = false})
CompileSubcommandCommand(super.name, super.description, super.verbose,
{super.hidden})
: defineOption = Option(
flag: 'define',
abbr: 'D',
@ -424,8 +424,7 @@ For example: dart compile $name -Da=1,b=2 main.dart''',
help:
'''Get package locations from the specified file instead of .dart_tool/package_config.json.
<path> can be relative or absolute.
For example: dart compile $name --packages=/tmp/pkgs.json main.dart'''),
super(name, description, verbose, hidden: hidden);
For example: dart compile $name --packages=/tmp/pkgs.json main.dart''');
bool shouldAllowNoSoundNullSafety() {
// We need to maintain support for generating AOT snapshots and kernel

View file

@ -142,20 +142,13 @@ abstract class Generator implements Comparable<Generator> {
/// An abstract implementation of a [Generator].
abstract class DefaultGenerator extends Generator {
DefaultGenerator(
String id,
String label,
String description, {
String? alternateId,
List<String> categories = const [],
bool deprecated = false,
}) : super(
id,
label,
description,
categories: categories,
alternateId: alternateId,
deprecated: deprecated,
);
super.id,
super.label,
super.description, {
super.alternateId,
super.categories,
super.deprecated,
});
}
/// A target for a [Generator]. This class knows how to create files given a

View file

@ -108,39 +108,27 @@ class DartAttachRequestArguments extends DartCommonLaunchAttachRequestArguments
DartAttachRequestArguments({
this.vmServiceUri,
this.vmServiceInfoFile,
Object? restart,
String? name,
String? cwd,
List<String>? additionalProjectPaths,
bool? debugSdkLibraries,
bool? debugExternalPackageLibraries,
bool? showGettersInDebugViews,
bool? evaluateGettersInDebugViews,
bool? evaluateToStringInDebugViews,
bool? sendLogsToClient,
bool? sendCustomProgressEvents,
bool? allowAnsiColorOutput,
super.restart,
super.name,
super.cwd,
super.additionalProjectPaths,
super.debugSdkLibraries,
super.debugExternalPackageLibraries,
super.showGettersInDebugViews,
super.evaluateGettersInDebugViews,
super.evaluateToStringInDebugViews,
super.sendLogsToClient,
super.sendCustomProgressEvents = null,
super.allowAnsiColorOutput,
}) : super(
name: name,
cwd: cwd,
// env is not supported for Dart attach because we don't spawn a process.
env: null,
restart: restart,
additionalProjectPaths: additionalProjectPaths,
debugSdkLibraries: debugSdkLibraries,
debugExternalPackageLibraries: debugExternalPackageLibraries,
showGettersInDebugViews: showGettersInDebugViews,
evaluateGettersInDebugViews: evaluateGettersInDebugViews,
evaluateToStringInDebugViews: evaluateToStringInDebugViews,
sendLogsToClient: sendLogsToClient,
sendCustomProgressEvents: sendCustomProgressEvents,
allowAnsiColorOutput: allowAnsiColorOutput,
);
DartAttachRequestArguments.fromMap(Map<String, Object?> obj)
DartAttachRequestArguments.fromMap(super.obj)
: vmServiceUri = arg.read<String?>(obj, 'vmServiceUri'),
vmServiceInfoFile = arg.read<String?>(obj, 'vmServiceInfoFile'),
super.fromMap(obj);
super.fromMap();
@override
Map<String, Object?> toJson() => {
@ -2709,36 +2697,22 @@ class DartLaunchRequestArguments extends DartCommonLaunchAttachRequestArguments
this.console,
this.customTool,
this.customToolReplacesArgs,
Object? restart,
String? name,
String? cwd,
Map<String, String>? env,
List<String>? additionalProjectPaths,
bool? debugSdkLibraries,
bool? debugExternalPackageLibraries,
bool? showGettersInDebugViews,
bool? evaluateGettersInDebugViews,
bool? evaluateToStringInDebugViews,
bool? sendLogsToClient,
bool? sendCustomProgressEvents,
bool? allowAnsiColorOutput,
}) : super(
restart: restart,
name: name,
cwd: cwd,
env: env,
additionalProjectPaths: additionalProjectPaths,
debugSdkLibraries: debugSdkLibraries,
debugExternalPackageLibraries: debugExternalPackageLibraries,
showGettersInDebugViews: showGettersInDebugViews,
evaluateGettersInDebugViews: evaluateGettersInDebugViews,
evaluateToStringInDebugViews: evaluateToStringInDebugViews,
sendLogsToClient: sendLogsToClient,
sendCustomProgressEvents: sendCustomProgressEvents,
allowAnsiColorOutput: allowAnsiColorOutput,
);
super.restart,
super.name,
super.cwd,
super.env,
super.additionalProjectPaths,
super.debugSdkLibraries,
super.debugExternalPackageLibraries,
super.showGettersInDebugViews,
super.evaluateGettersInDebugViews,
super.evaluateToStringInDebugViews,
super.sendLogsToClient,
super.sendCustomProgressEvents = null,
super.allowAnsiColorOutput,
});
DartLaunchRequestArguments.fromMap(Map<String, Object?> obj)
DartLaunchRequestArguments.fromMap(super.obj)
: noDebug = arg.read<bool?>(obj, 'noDebug'),
program = arg.read<String>(obj, 'program'),
args = arg.readOptionalList<String>(obj, 'args'),
@ -2749,7 +2723,7 @@ class DartLaunchRequestArguments extends DartCommonLaunchAttachRequestArguments
console = arg.read<String?>(obj, 'console'),
customTool = arg.read<String?>(obj, 'customTool'),
customToolReplacesArgs = arg.read<int?>(obj, 'customToolReplacesArgs'),
super.fromMap(obj);
super.fromMap();
@override
Map<String, Object?> toJson() => {

View file

@ -11,8 +11,6 @@ import 'package:dap/dap.dart';
import 'package:path/path.dart' as path;
import 'package:vm_service/vm_service.dart' as vm;
import '../logging.dart';
import '../protocol_stream.dart';
import 'dart.dart';
import 'mixins.dart';
@ -29,20 +27,13 @@ class DartCliDebugAdapter extends DartDebugAdapter<DartLaunchRequestArguments,
final parseAttachArgs = DartAttachRequestArguments.fromJson;
DartCliDebugAdapter(
ByteStreamServerChannel channel, {
bool ipv6 = false,
bool enableDds = true,
bool enableAuthCodes = true,
Logger? logger,
Function? onError,
}) : super(
channel,
ipv6: ipv6,
enableDds: enableDds,
enableAuthCodes: enableAuthCodes,
logger: logger,
onError: onError,
);
super.channel, {
super.ipv6,
super.enableDds,
super.enableAuthCodes,
super.logger,
super.onError,
});
/// Whether the VM Service closing should be used as a signal to terminate the
/// debug session.

View file

@ -9,8 +9,6 @@ import 'dart:math' as math;
import 'package:vm_service/vm_service.dart' as vm;
import '../logging.dart';
import '../protocol_stream.dart';
import '../stream_transformers.dart';
import 'dart.dart';
import 'mixins.dart';
@ -28,20 +26,13 @@ class DartTestDebugAdapter extends DartDebugAdapter<DartLaunchRequestArguments,
final parseAttachArgs = DartAttachRequestArguments.fromJson;
DartTestDebugAdapter(
ByteStreamServerChannel channel, {
bool ipv6 = false,
bool enableDds = true,
bool enableAuthCodes = true,
Logger? logger,
Function? onError,
}) : super(
channel,
ipv6: ipv6,
enableDds: enableDds,
enableAuthCodes: enableAuthCodes,
logger: logger,
onError: onError,
);
super.channel, {
super.ipv6,
super.enableDds,
super.enableAuthCodes,
super.logger,
super.onError,
});
/// Whether the VM Service closing should be used as a signal to terminate the
/// debug session.

View file

@ -70,8 +70,7 @@ abstract class DapProgressReporter {
///
/// https://github.com/microsoft/vscode/issues/101405
class _CustomDapProgressReporter extends DapProgressReporter {
_CustomDapProgressReporter(DartDebugAdapter adapter, String idPrefix)
: super(adapter, idPrefix);
_CustomDapProgressReporter(super.adapter, super.idPrefix);
@override
void sendStart(ProgressStartEventBody body) {
@ -91,8 +90,7 @@ class _CustomDapProgressReporter extends DapProgressReporter {
/// Sends progress notifications using standard events.
class _StandardDapProgressReporter extends DapProgressReporter {
_StandardDapProgressReporter(DartDebugAdapter adapter, String idPrefix)
: super(adapter, idPrefix);
_StandardDapProgressReporter(super.adapter, super.idPrefix);
@override
void sendStart(ProgressStartEventBody body) {
@ -112,8 +110,7 @@ class _StandardDapProgressReporter extends DapProgressReporter {
/// A [DapProgressReporter] that does not send any events.
class _NoopDapProgressReporter extends DapProgressReporter {
_NoopDapProgressReporter(DartDebugAdapter adapter, String idPrefix)
: super(adapter, idPrefix);
_NoopDapProgressReporter(super.adapter, super.idPrefix);
@override
void sendStart(ProgressStartEventBody body) {}

View file

@ -12,7 +12,7 @@ import 'common/ring_buffer.dart';
/// `Logging` stream will be sent all messages contained within this repository
/// upon initial subscription.
class LoggingRepository extends RingBuffer<Map<String, dynamic>> {
LoggingRepository([int logHistoryLength = 10000]) : super(logHistoryLength) {
LoggingRepository([super.logHistoryLength = 10000]) {
// TODO(bkonyi): enforce log history limit when DartDevelopmentService
// allows for this to be set via Dart code.
}

View file

@ -48,7 +48,7 @@ class TemporaryId extends Identifier {
@override
set sourceInformation(Object? obj) {}
TemporaryId(String name) : super(name);
TemporaryId(super.name);
}
/// Creates a qualified identifier, without determining for sure if it needs to

View file

@ -623,7 +623,7 @@ class While extends Loop {
class Do extends Loop {
final Expression condition;
Do(Statement body, this.condition) : super(body);
Do(super.body, this.condition);
@override
T accept<T>(NodeVisitor<T> visitor) => visitor.visitDo(this);
@ -817,7 +817,7 @@ class Case extends SwitchClause {
}
class Default extends SwitchClause {
Default(Block body) : super(body);
Default(super.body);
@override
T accept<T>(NodeVisitor<T> visitor) => visitor.visitDefault(this);
@ -1140,7 +1140,7 @@ class SimpleBindingPattern extends BindingPattern {
}
class ObjectBindingPattern extends BindingPattern {
ObjectBindingPattern(List<DestructuredVariable> variables) : super(variables);
ObjectBindingPattern(super.variables);
@override
T accept<T>(NodeVisitor<T> visitor) =>
visitor.visitObjectBindingPattern(this);
@ -1153,7 +1153,7 @@ class ObjectBindingPattern extends BindingPattern {
}
class ArrayBindingPattern extends BindingPattern {
ArrayBindingPattern(List<DestructuredVariable> variables) : super(variables);
ArrayBindingPattern(super.variables);
@override
T accept<T>(NodeVisitor<T> visitor) => visitor.visitArrayBindingPattern(this);
@ -1213,7 +1213,7 @@ class Call extends Expression {
}
class New extends Call {
New(Expression cls, List<Expression> arguments) : super(cls, arguments);
New(super.cls, super.arguments);
@override
T accept<T>(NodeVisitor<T> visitor) => visitor.visitNew(this);

View file

@ -268,15 +268,14 @@ class VariableSymbol extends Symbol {
bool? isStatic,
this.getterId,
this.setterId,
required String localId,
required String scopeId,
required SourceLocation location,
required super.localId,
required String super.scopeId,
required SourceLocation super.location,
}) : isConst = isConst ?? false,
isFinal = isFinal ?? false,
isStatic = isStatic ?? false,
super(localId: localId, scopeId: scopeId, location: location);
isStatic = isStatic ?? false;
VariableSymbol.fromJson(Map<String, dynamic> json)
VariableSymbol.fromJson(super.json)
: name = _createValue(json['name']),
kind = _createValue(json['kind'],
parse: parseVariableSymbolKind, ifNull: VariableSymbolKind.none),
@ -286,7 +285,7 @@ class VariableSymbol extends Symbol {
isStatic = _createValue(json['isStatic']),
getterId = _createValue(json['getterId']),
setterId = _createValue(json['setterId']),
super.fromJson(json);
super.fromJson();
@override
Map<String, dynamic> toJson() => {
@ -344,30 +343,24 @@ class ClassSymbol extends ScopeSymbol implements TypeSymbol {
this.superClassId,
List<String>? interfaceIds,
Map<String, String>? typeParameters,
required String localId,
required String scopeId,
required SourceLocation location,
List<String>? variableIds,
List<String>? scopeIds,
required super.localId,
required String super.scopeId,
required SourceLocation super.location,
super.variableIds,
super.scopeIds,
}) : isAbstract = isAbstract ?? false,
isConst = isConst ?? false,
interfaceIds = interfaceIds ?? [],
typeParameters = typeParameters ?? {},
super(
localId: localId,
scopeId: scopeId,
variableIds: variableIds,
scopeIds: scopeIds,
location: location);
typeParameters = typeParameters ?? {};
ClassSymbol.fromJson(Map<String, dynamic> json)
ClassSymbol.fromJson(super.json)
: name = _createValue(json['name']),
isAbstract = _createValue(json['isAbstract']),
isConst = _createValue(json['isConst']),
superClassId = _createValue(json['superClassId']),
interfaceIds = _createValueList(json['interfaceIds']),
typeParameters = _createValueMap(json['typeParameters']),
super.fromJson(json);
super.fromJson();
@override
Map<String, dynamic> toJson() => {
@ -403,23 +396,22 @@ class FunctionTypeSymbol extends Symbol implements TypeSymbol {
List<String>? optionalParameterTypeIds,
Map<String, String>? namedParameterTypeIds,
required this.returnTypeId,
required String localId,
required String scopeId,
required SourceLocation location,
required super.localId,
required String super.scopeId,
required SourceLocation super.location,
}) : typeParameters = typeParameters ?? {},
parameterTypeIds = parameterTypeIds ?? [],
optionalParameterTypeIds = optionalParameterTypeIds ?? [],
namedParameterTypeIds = namedParameterTypeIds ?? {},
super(localId: localId, scopeId: scopeId, location: location);
namedParameterTypeIds = namedParameterTypeIds ?? {};
FunctionTypeSymbol.fromJson(Map<String, dynamic> json)
FunctionTypeSymbol.fromJson(super.json)
: parameterTypeIds = _createValueList(json['parameterTypeIds']),
optionalParameterTypeIds =
_createValueList(json['optionalParameterTypeIds']),
typeParameters = _createValueMap(json['typeParameters']),
namedParameterTypeIds = _createValueMap(json['namedParameterTypeIds']),
returnTypeId = _createValue(json['returnTypeId']),
super.fromJson(json);
super.fromJson();
@override
Map<String, dynamic> toJson() => {
@ -460,27 +452,20 @@ class FunctionSymbol extends ScopeSymbol {
required this.typeId,
bool? isStatic,
bool? isConst,
required String localId,
required String scopeId,
List<String>? variableIds,
List<String>? scopeIds,
required SourceLocation location,
required super.localId,
required String super.scopeId,
super.variableIds,
super.scopeIds,
required SourceLocation super.location,
}) : isStatic = isStatic ?? false,
isConst = isConst ?? false,
super(
localId: localId,
scopeId: scopeId,
variableIds: variableIds,
scopeIds: scopeIds,
location: location,
);
isConst = isConst ?? false;
FunctionSymbol.fromJson(Map<String, dynamic> json)
FunctionSymbol.fromJson(super.json)
: name = _createValue(json['name']),
typeId = _createValue(json['typeId']),
isStatic = _createValue(json['isStatic']),
isConst = _createValue(json['isConst']),
super.fromJson(json);
super.fromJson();
@override
Map<String, dynamic> toJson() => {
@ -510,23 +495,21 @@ class LibrarySymbol extends ScopeSymbol {
required this.uri,
List<LibrarySymbolDependency>? dependencies,
required this.scriptIds,
List<String>? variableIds,
List<String>? scopeIds,
super.variableIds,
super.scopeIds,
}) : name = name ?? '',
dependencies = dependencies ?? [],
super(
localId: uri,
variableIds: variableIds,
scopeIds: scopeIds,
);
LibrarySymbol.fromJson(Map<String, dynamic> json)
LibrarySymbol.fromJson(super.json)
: name = _createValue(json['name'], ifNull: ''),
uri = _createValue(json['uri']),
scriptIds = _createValueList(json['scriptIds']),
dependencies = _createObjectList(
json['dependencies'], LibrarySymbolDependency.fromJson),
super.fromJson(json);
super.fromJson();
@override
Map<String, dynamic> toJson() {
@ -622,21 +605,16 @@ class ScopeSymbol extends Symbol {
ScopeSymbol({
List<String>? variableIds,
List<String>? scopeIds,
required String localId,
String? scopeId,
SourceLocation? location,
required super.localId,
super.scopeId,
super.location,
}) : variableIds = variableIds ?? [],
scopeIds = scopeIds ?? [],
super(
localId: localId,
scopeId: scopeId,
location: location,
);
scopeIds = scopeIds ?? [];
ScopeSymbol.fromJson(Map<String, dynamic> json)
ScopeSymbol.fromJson(super.json)
: variableIds = _createValueList(json['variableIds']),
scopeIds = _createValueList(json['scopeIds']),
super.fromJson(json);
super.fromJson();
@override
Map<String, dynamic> toJson() => {

View file

@ -1018,8 +1018,7 @@ abstract class ExpressionCompilerWorkerTestDriver {
}
class StandardFileSystemTestDriver extends ExpressionCompilerWorkerTestDriver {
StandardFileSystemTestDriver(SetupCompilerOptions setup, bool verbose)
: super(setup, verbose);
StandardFileSystemTestDriver(super.setup, super.verbose);
@override
Future<void> start() async {
@ -1029,8 +1028,7 @@ class StandardFileSystemTestDriver extends ExpressionCompilerWorkerTestDriver {
}
class MultiRootFileSystemTestDriver extends ExpressionCompilerWorkerTestDriver {
MultiRootFileSystemTestDriver(SetupCompilerOptions setup, bool verbose)
: super(setup, verbose);
MultiRootFileSystemTestDriver(super.setup, super.verbose);
@override
Future<void> start() async {
@ -1045,8 +1043,7 @@ class AssetFileSystemTestDriver extends ExpressionCompilerWorkerTestDriver {
late TestAssetServer server;
late int port;
AssetFileSystemTestDriver(SetupCompilerOptions setup, bool verbose)
: super(setup, verbose);
AssetFileSystemTestDriver(super.setup, super.verbose);
@override
Future<void> start() async {

View file

@ -614,7 +614,7 @@ class _TestRecursiveVisitor extends RecursiveVisitor {
class NotNullCollector extends _TestRecursiveVisitor {
final notNullExpressions = <Expression>[];
NotNullCollector(Set<Library> librariesFromDill) : super(librariesFromDill);
NotNullCollector(super.librariesFromDill);
@override
void defaultExpression(Expression node) {
@ -626,7 +626,7 @@ class NotNullCollector extends _TestRecursiveVisitor {
}
class ExpectAllNotNull extends _TestRecursiveVisitor {
ExpectAllNotNull(Set<Library> librariesFromDill) : super(librariesFromDill);
ExpectAllNotNull(super.librariesFromDill);
@override
void defaultExpression(Expression node) {

View file

@ -694,7 +694,7 @@ class Note extends Section {
final String name;
final Uint8List description;
Note._(entry, this.type, this.name, this.description) : super._(entry);
Note._(super.headerEntry, this.type, this.name, this.description) : super._();
static Note fromReader(Reader originalReader, SectionHeaderEntry entry) {
final reader = originalReader.shrink(entry.offset, entry.size);
@ -735,7 +735,7 @@ class Note extends Section {
class StringTable extends Section implements DwarfContainerStringTable {
final Map<int, String> _entries;
StringTable._(entry, this._entries) : super._(entry);
StringTable._(super.headerEntry, this._entries) : super._();
static StringTable fromReader(Reader reader, SectionHeaderEntry entry) {
final sectionReader = reader.shrink(entry.offset, entry.size);
@ -920,9 +920,9 @@ class SymbolTable extends Section {
final List<Symbol> _entries;
final Map<String, Symbol> _nameCache;
SymbolTable._(SectionHeaderEntry entry, this._entries)
SymbolTable._(super.headerEntry, this._entries)
: _nameCache = {},
super._(entry);
super._();
static SymbolTable fromReader(Reader reader, SectionHeaderEntry entry) {
final sectionReader = reader.shrink(entry.offset, entry.size);
@ -987,8 +987,7 @@ class DynamicTable extends Section {
final Map<int, int> _entries;
final int _wordSize;
DynamicTable._(SectionHeaderEntry entry, this._entries, this._wordSize)
: super._(entry);
DynamicTable._(super.headerEntry, this._entries, this._wordSize) : super._();
static DynamicTable fromReader(Reader reader, SectionHeaderEntry entry) {
final sectionReader = reader.shrink(entry.offset, entry.size);

View file

@ -175,8 +175,8 @@ class SegmentCommand extends LoadCommand {
final Map<String, Section> sections;
SegmentCommand._(
int cmd,
int cmdsize,
super.cmd,
super.cmdsize,
this.segname,
this.vmaddr,
this.vmsize,
@ -187,7 +187,7 @@ class SegmentCommand extends LoadCommand {
this.nsects,
this.flags,
this.sections)
: super._(cmd, cmdsize);
: super._();
static SegmentCommand fromReader(Reader reader, int cmd, int cmdsize) {
final segname = reader.readFixedLengthNullTerminatedString(16);
@ -296,9 +296,9 @@ class SymbolTableCommand extends LoadCommand {
final int _stroff;
final int _strsize;
SymbolTableCommand._(int cmd, int cmdsize, this._symoff, this._nsyms,
SymbolTableCommand._(super.cmd, super.cmdsize, this._symoff, this._nsyms,
this._stroff, this._strsize)
: super._(cmd, cmdsize);
: super._();
static SymbolTableCommand fromReader(Reader reader, int cmd, int cmdsize) {
final symoff = _readMachOUint32(reader);

View file

@ -1,5 +1,10 @@
include: package:lints/recommended.yaml
analyzer:
errors:
# TODO: We need to address two instances in lib/src/vm_service.dart (#53601).
use_super_parameters: ignore
linter:
rules:
# still 6 errors in lib/src/vm_service.dart

View file

@ -301,10 +301,9 @@ class HttpTimelineLoggingState extends _State {
@override
String get type => 'HttpTimelineLoggingState';
HttpTimelineLoggingState({required bool enabled}) : super(enabled: enabled);
HttpTimelineLoggingState({required super.enabled});
HttpTimelineLoggingState._fromJson(Map<String, dynamic> json)
: super._fromJson(json);
HttpTimelineLoggingState._fromJson(super.json) : super._fromJson();
}
/// A collection of HTTP request data collected by the profiler.
@ -405,34 +404,25 @@ class HttpProfileRequest extends HttpProfileRequestRef {
static HttpProfileRequest? parse(Map<String, dynamic>? json) =>
json == null ? null : HttpProfileRequest._fromJson(json);
HttpProfileRequest._fromJson(Map<String, dynamic> json)
HttpProfileRequest._fromJson(super.json)
: requestBody =
Uint8List.fromList(json['requestBody']?.cast<int>() ?? <int>[]),
responseBody =
Uint8List.fromList(json['responseBody']?.cast<int>() ?? <int>[]),
super._fromJson(json);
super._fromJson();
HttpProfileRequest({
required String id,
required String isolateId,
required String method,
required Uri uri,
required int startTime,
required super.id,
required super.isolateId,
required super.method,
required super.uri,
required super.startTime,
required this.requestBody,
required this.responseBody,
int? endTime,
HttpProfileRequestData? request,
HttpProfileResponseData? response,
}) : super(
id: id,
isolateId: isolateId,
method: method,
uri: uri,
startTime: startTime,
endTime: endTime,
request: request,
response: response,
);
super.endTime,
super.request,
super.response,
});
/// The body sent as part of this request.
///
@ -735,10 +725,9 @@ class SocketProfilingState extends _State {
static SocketProfilingState? parse(Map<String, dynamic>? json) =>
json == null ? null : SocketProfilingState._fromJson(json);
SocketProfilingState({required bool enabled}) : super(enabled: enabled);
SocketProfilingState({required super.enabled});
SocketProfilingState._fromJson(Map<String, dynamic> json)
: super._fromJson(json);
SocketProfilingState._fromJson(super.json) : super._fromJson();
}
/// A [SpawnedProcessRef] contains identifying information about a spawned

View file

@ -2156,7 +2156,7 @@ class TextOutputVisitor implements NodeVisitor {
// string targetId [optional],
// string expression)
class MethodParser extends Parser {
MethodParser(Token? startToken) : super(startToken);
MethodParser(super.startToken);
void parseInto(Method method) {
// method is return type, name, (, args )
@ -2217,7 +2217,7 @@ class MethodParser extends Parser {
}
class TypeParser extends Parser {
TypeParser(Token? startToken) : super(startToken);
TypeParser(super.startToken);
void parseInto(Type type) {
// class ClassList extends Response {
@ -2268,7 +2268,7 @@ class TypeParser extends Parser {
}
class EnumParser extends Parser {
EnumParser(Token? startToken) : super(startToken);
EnumParser(super.startToken);
void parseInto(Enum e) {
// enum ErrorKind { UnhandledException, Foo, Bar }

View file

@ -403,7 +403,7 @@ class Enum extends Member {
}
class EnumParser extends Parser {
EnumParser(Token? startToken) : super(startToken);
EnumParser(super.startToken);
void parseInto(Enum e) {
// enum ErrorKind { UnhandledException, Foo, Bar }
@ -670,7 +670,7 @@ class MethodArg extends Member {
}
class MethodParser extends Parser {
MethodParser(Token? startToken) : super(startToken);
MethodParser(super.startToken);
void parseInto(Method method) {
// method is return type, name, (, args )
@ -1009,7 +1009,7 @@ class TypeField extends Member {
}
class TypeParser extends Parser {
TypeParser(Token? startToken) : super(startToken);
TypeParser(super.startToken);
void parseInto(Type type) {
// class ClassList extends Response {

View file

@ -46,8 +46,7 @@ abstract class Label {
}
class Expression extends Label {
Expression(List<ir.ValueType> inputs, List<ir.ValueType> outputs)
: super._(inputs, outputs) {
Expression(super.inputs, super.outputs) : super._() {
ordinal = null;
depth = 0;
baseStackHeight = 0;
@ -60,16 +59,14 @@ class Expression extends Label {
}
class Block extends Label {
Block(List<ir.ValueType> inputs, List<ir.ValueType> outputs)
: super._(inputs, outputs);
Block(super.inputs, super.outputs) : super._();
@override
List<ir.ValueType> get targetTypes => outputs;
}
class Loop extends Label {
Loop(List<ir.ValueType> inputs, List<ir.ValueType> outputs)
: super._(inputs, outputs);
Loop(super.inputs, super.outputs) : super._();
@override
List<ir.ValueType> get targetTypes => inputs;
@ -78,8 +75,7 @@ class Loop extends Label {
class If extends Label {
bool hasElse = false;
If(List<ir.ValueType> inputs, List<ir.ValueType> outputs)
: super._(inputs, outputs);
If(super.inputs, super.outputs) : super._();
@override
List<ir.ValueType> get targetTypes => outputs;
@ -88,8 +84,7 @@ class If extends Label {
class Try extends Label {
bool hasCatch = false;
Try(List<ir.ValueType> inputs, List<ir.ValueType> outputs)
: super._(inputs, outputs);
Try(super.inputs, super.outputs) : super._();
@override
List<ir.ValueType> get targetTypes => outputs;

View file

@ -426,95 +426,95 @@ abstract class MemoryInstruction implements Instruction {
}
class I32Load extends MemoryInstruction {
I32Load(MemoryOffsetAlign memory) : super(memory, encoding: 0x28);
I32Load(super.memory) : super(encoding: 0x28);
}
class I64Load extends MemoryInstruction {
I64Load(MemoryOffsetAlign memory) : super(memory, encoding: 0x29);
I64Load(super.memory) : super(encoding: 0x29);
}
class F32Load extends MemoryInstruction {
F32Load(MemoryOffsetAlign memory) : super(memory, encoding: 0x2A);
F32Load(super.memory) : super(encoding: 0x2A);
}
class F64Load extends MemoryInstruction {
F64Load(MemoryOffsetAlign memory) : super(memory, encoding: 0x2B);
F64Load(super.memory) : super(encoding: 0x2B);
}
class I32Load8S extends MemoryInstruction {
I32Load8S(MemoryOffsetAlign memory) : super(memory, encoding: 0x2C);
I32Load8S(super.memory) : super(encoding: 0x2C);
}
class I32Load8U extends MemoryInstruction {
I32Load8U(MemoryOffsetAlign memory) : super(memory, encoding: 0x2D);
I32Load8U(super.memory) : super(encoding: 0x2D);
}
class I32Load16S extends MemoryInstruction {
I32Load16S(MemoryOffsetAlign memory) : super(memory, encoding: 0x2E);
I32Load16S(super.memory) : super(encoding: 0x2E);
}
class I32Load16U extends MemoryInstruction {
I32Load16U(MemoryOffsetAlign memory) : super(memory, encoding: 0x2F);
I32Load16U(super.memory) : super(encoding: 0x2F);
}
class I64Load8S extends MemoryInstruction {
I64Load8S(MemoryOffsetAlign memory) : super(memory, encoding: 0x30);
I64Load8S(super.memory) : super(encoding: 0x30);
}
class I64Load8U extends MemoryInstruction {
I64Load8U(MemoryOffsetAlign memory) : super(memory, encoding: 0x31);
I64Load8U(super.memory) : super(encoding: 0x31);
}
class I64Load16S extends MemoryInstruction {
I64Load16S(MemoryOffsetAlign memory) : super(memory, encoding: 0x32);
I64Load16S(super.memory) : super(encoding: 0x32);
}
class I64Load16U extends MemoryInstruction {
I64Load16U(MemoryOffsetAlign memory) : super(memory, encoding: 0x33);
I64Load16U(super.memory) : super(encoding: 0x33);
}
class I64Load32S extends MemoryInstruction {
I64Load32S(MemoryOffsetAlign memory) : super(memory, encoding: 0x34);
I64Load32S(super.memory) : super(encoding: 0x34);
}
class I64Load32U extends MemoryInstruction {
I64Load32U(MemoryOffsetAlign memory) : super(memory, encoding: 0x35);
I64Load32U(super.memory) : super(encoding: 0x35);
}
class I32Store extends MemoryInstruction {
I32Store(MemoryOffsetAlign memory) : super(memory, encoding: 0x36);
I32Store(super.memory) : super(encoding: 0x36);
}
class I64Store extends MemoryInstruction {
I64Store(MemoryOffsetAlign memory) : super(memory, encoding: 0x37);
I64Store(super.memory) : super(encoding: 0x37);
}
class F32Store extends MemoryInstruction {
F32Store(MemoryOffsetAlign memory) : super(memory, encoding: 0x38);
F32Store(super.memory) : super(encoding: 0x38);
}
class F64Store extends MemoryInstruction {
F64Store(MemoryOffsetAlign memory) : super(memory, encoding: 0x39);
F64Store(super.memory) : super(encoding: 0x39);
}
class I32Store8 extends MemoryInstruction {
I32Store8(MemoryOffsetAlign memory) : super(memory, encoding: 0x3A);
I32Store8(super.memory) : super(encoding: 0x3A);
}
class I32Store16 extends MemoryInstruction {
I32Store16(MemoryOffsetAlign memory) : super(memory, encoding: 0x3B);
I32Store16(super.memory) : super(encoding: 0x3B);
}
class I64Store8 extends MemoryInstruction {
I64Store8(MemoryOffsetAlign memory) : super(memory, encoding: 0x3C);
I64Store8(super.memory) : super(encoding: 0x3C);
}
class I64Store16 extends MemoryInstruction {
I64Store16(MemoryOffsetAlign memory) : super(memory, encoding: 0x3D);
I64Store16(super.memory) : super(encoding: 0x3D);
}
class I64Store32 extends MemoryInstruction {
I64Store32(MemoryOffsetAlign memory) : super(memory, encoding: 0x3E);
I64Store32(super.memory) : super(encoding: 0x3E);
}
class MemorySize implements Instruction {