mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +00:00
[pkg/dart2native] address several lint issues
Change-Id: I3414710e504e1c63a9689028bbcca066f913d7b7 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/243923 Reviewed-by: William Hesse <whesse@google.com> Commit-Queue: Devon Carew <devoncarew@google.com> Reviewed-by: Tess Strickland <sstrickl@google.com>
This commit is contained in:
parent
c40fe123f9
commit
063ee76dc7
|
@ -6,6 +6,8 @@
|
|||
// part of the Apple system headers. All comments, which detail the format of
|
||||
// Mach-O files, have been reproduced from the orginal header.
|
||||
|
||||
// ignore_for_file: non_constant_identifier_names, constant_identifier_names
|
||||
|
||||
import 'dart:io';
|
||||
import 'dart:typed_data';
|
||||
|
||||
|
@ -87,6 +89,7 @@ class Uint64 extends IntLike {
|
|||
return _data > other;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
if (other is Uint64) {
|
||||
return _data == other._data;
|
||||
|
@ -94,6 +97,9 @@ class Uint64 extends IntLike {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => _data.hashCode;
|
||||
}
|
||||
|
||||
class Int32 extends IntLike {
|
||||
|
@ -103,6 +109,7 @@ class Int32 extends IntLike {
|
|||
return Int32(_data | other._data);
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
if (other is Int32) {
|
||||
return _data == other._data;
|
||||
|
@ -110,6 +117,9 @@ class Int32 extends IntLike {
|
|||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => _data.hashCode;
|
||||
}
|
||||
|
||||
class Uint16 extends IntLike {
|
||||
|
@ -147,6 +157,7 @@ class Uint32 extends IntLike {
|
|||
return _data >= other;
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) {
|
||||
if (other is Uint32) {
|
||||
return _data == other._data;
|
||||
|
@ -155,6 +166,9 @@ class Uint32 extends IntLike {
|
|||
}
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => _data.hashCode;
|
||||
|
||||
Uint64 asUint64() {
|
||||
return Uint64(_data);
|
||||
}
|
||||
|
@ -420,9 +434,9 @@ class MachOSegmentCommand64 extends IMachOLoadCommand<MachOSegmentCommand64> {
|
|||
stream.writeUint32(nsects);
|
||||
stream.writeUint32(flags);
|
||||
|
||||
sections.forEach((section) {
|
||||
for (final section in sections) {
|
||||
section.writeContentsSync(stream);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -261,9 +261,9 @@ class MachOFile {
|
|||
}
|
||||
|
||||
// Write all of the commands.
|
||||
commands.forEach((command) {
|
||||
for (var command in commands) {
|
||||
writeLoadCommandToStream(command, stream);
|
||||
});
|
||||
}
|
||||
|
||||
// Pad the header according to the offset.
|
||||
final int paddingAmount = headerMaxOffset - stream.positionSync();
|
||||
|
|
|
@ -3401,6 +3401,15 @@
|
|||
"pkg/compiler"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "analyze pkg/dart2native",
|
||||
"script": "out/ReleaseX64/dart-sdk/bin/dart",
|
||||
"arguments": [
|
||||
"analyze",
|
||||
"--fatal-infos",
|
||||
"pkg/dart2native"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "analyze pkg/dartdev",
|
||||
"script": "out/ReleaseX64/dart-sdk/bin/dart",
|
||||
|
|
Loading…
Reference in a new issue