Remove some unnecessary ignore comments in compiler

Change-Id: I323c846776637b91922abac73acc2eac6017d4de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274722
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Brian Wilkerson 2022-12-09 22:54:08 +00:00 committed by Commit Queue
parent 78fb91e739
commit 1e4a974a5d
5 changed files with 1 additions and 16 deletions

View file

@ -169,7 +169,6 @@ class CodePosition {
CodePosition(this.startPosition, this.endPosition, this.closingPosition); CodePosition(this.startPosition, this.endPosition, this.closingPosition);
// ignore: MISSING_RETURN
int? getPosition(CodePositionKind kind) { int? getPosition(CodePositionKind kind) {
switch (kind) { switch (kind) {
case CodePositionKind.START: case CodePositionKind.START:
@ -246,7 +245,6 @@ enum SourcePositionKind {
INNER, INNER,
} }
// ignore: MISSING_RETURN
SourceLocation? getSourceLocation(SourceInformation sourceInformation, SourceLocation? getSourceLocation(SourceInformation sourceInformation,
[SourcePositionKind sourcePositionKind = SourcePositionKind.START]) { [SourcePositionKind sourcePositionKind = SourcePositionKind.START]) {
assert((sourceInformation as dynamic) != null); assert((sourceInformation as dynamic) != null);

View file

@ -82,10 +82,7 @@ class SsaSimplifyInterceptors extends HBaseVisitor<bool>
// possible that all uses can be rewritten to use different constants. // possible that all uses can be rewritten to use different constants.
HInstruction? constant = tryComputeConstantInterceptor( HInstruction? constant = tryComputeConstantInterceptor(
// ignore: avoid_dynamic_calls invoke.inputs[1], interceptor.interceptedClasses);
invoke.inputs[1],
// ignore: avoid_dynamic_calls
interceptor.interceptedClasses);
if (constant != null) { if (constant != null) {
invoke.changeUse(interceptor, constant); invoke.changeUse(interceptor, constant);
} }

View file

@ -203,7 +203,6 @@ class IntValue extends Value {
@override @override
bool operator ==(other) { bool operator ==(other) {
if (other is! IntValue) return false; if (other is! IntValue) return false;
// ignore: avoid_dynamic_calls
return this.value == other.value; return this.value == other.value;
} }
@ -294,7 +293,6 @@ class InstructionValue extends Value {
@override @override
bool operator ==(other) { bool operator ==(other) {
if (other is! InstructionValue) return false; if (other is! InstructionValue) return false;
// ignore: avoid_dynamic_calls
return this.instruction == other.instruction; return this.instruction == other.instruction;
} }
@ -367,9 +365,7 @@ class AddValue extends BinaryOperationValue {
@override @override
bool operator ==(other) { bool operator ==(other) {
if (other is! AddValue) return false; if (other is! AddValue) return false;
// ignore: avoid_dynamic_calls
return (left == other.left && right == other.right) || return (left == other.left && right == other.right) ||
// ignore: avoid_dynamic_calls
(left == other.right && right == other.left); (left == other.right && right == other.left);
} }
@ -425,7 +421,6 @@ class SubtractValue extends BinaryOperationValue {
@override @override
bool operator ==(other) { bool operator ==(other) {
if (other is! SubtractValue) return false; if (other is! SubtractValue) return false;
// ignore: avoid_dynamic_calls
return left == other.left && right == other.right; return left == other.left && right == other.right;
} }
@ -482,7 +477,6 @@ class NegateValue extends Value {
@override @override
bool operator ==(other) { bool operator ==(other) {
if (other is! NegateValue) return false; if (other is! NegateValue) return false;
// ignore: avoid_dynamic_calls
return value == other.value; return value == other.value;
} }
@ -631,7 +625,6 @@ class Range {
@override @override
bool operator ==(other) { bool operator ==(other) {
if (other is! Range) return false; if (other is! Range) return false;
// ignore: avoid_dynamic_calls
return other.lower == lower && other.upper == upper; return other.lower == lower && other.upper == upper;
} }

View file

@ -30,8 +30,6 @@ void test(List<String> strings, String expected, {bool minified = false}) {
} }
extension on List<String> { extension on List<String> {
// TODO(42122): Remove when analyzer doesn't think `*` is unused.
// ignore: unused_element
List<String> operator *(int count) { List<String> operator *(int count) {
return List.filled(count, this).expand((list) => list).toList(); return List.filled(count, this).expand((list) => list).toList();
} }

View file

@ -42,7 +42,6 @@ void main() {
var mainOutputUnit = closedWorld.outputUnitData.mainOutputUnit; var mainOutputUnit = closedWorld.outputUnitData.mainOutputUnit;
var backendStrategy = compiler.backendStrategy; var backendStrategy = compiler.backendStrategy;
// ignore: deprecated_member_use_from_same_package
var classes = backendStrategy.emitterTask.neededClasses; var classes = backendStrategy.emitterTask.neededClasses;
var inputElement = classes.where((e) => e.name == 'InputElement').single; var inputElement = classes.where((e) => e.name == 'InputElement').single;
dynamic lib1 = lookupLibrary("memory:lib1.dart"); dynamic lib1 = lookupLibrary("memory:lib1.dart");