mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 12:24:24 +00:00
[dart2js] Cleanup a few minor uses of dynamic.
Change-Id: Ic29689ce30f368bfa21bdd2bd13cca038973fba0 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232321 Reviewed-by: Stephen Adams <sra@google.com> Commit-Queue: Joshua Litt <joshualitt@google.com>
This commit is contained in:
parent
bbefb29ab2
commit
971772bf6d
5 changed files with 9 additions and 23 deletions
|
@ -240,7 +240,7 @@ class FormattingDiagnosticHandler implements CompilerDiagnostics {
|
|||
if (kind != api.Diagnostic.INFO) {
|
||||
lastKind = kind;
|
||||
}
|
||||
var color;
|
||||
String Function(String) color;
|
||||
if (kind == api.Diagnostic.ERROR) {
|
||||
color = colors.red;
|
||||
} else if (kind == api.Diagnostic.WARNING) {
|
||||
|
|
|
@ -6347,7 +6347,7 @@ class KernelSsaGraphBuilder extends ir.Visitor<void> with ir.VisitorVoidMixin {
|
|||
if (element == _commonElements.traceHelper) return;
|
||||
// TODO(sigmund): create a better uuid for elements.
|
||||
HConstant idConstant = graph.addConstantInt(element.hashCode, closedWorld);
|
||||
n(e) => e == null ? '' : e.name;
|
||||
String n(Entity e) => e == null ? '' : e.name;
|
||||
String name = "${n(element.library)}:${n(element.enclosingClass)}."
|
||||
"${n(element)}";
|
||||
HConstant nameConstant = graph.addConstantString(name, closedWorld);
|
||||
|
@ -6437,7 +6437,7 @@ class TryCatchFinallyBuilder {
|
|||
kernelBuilder.open(startTryBlock);
|
||||
}
|
||||
|
||||
void _addExitTrySuccessor(successor) {
|
||||
void _addExitTrySuccessor(HBasicBlock successor) {
|
||||
if (successor == null) return;
|
||||
// Iterate over all blocks created inside this try/catch, and
|
||||
// attach successor information to blocks that end with
|
||||
|
@ -6451,7 +6451,7 @@ class TryCatchFinallyBuilder {
|
|||
}
|
||||
}
|
||||
|
||||
void _addOptionalSuccessor(block1, block2) {
|
||||
void _addOptionalSuccessor(HBasicBlock block1, HBasicBlock block2) {
|
||||
if (block2 != null) block1.addSuccessor(block2);
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,8 @@ class SideEffects {
|
|||
}
|
||||
|
||||
@override
|
||||
bool operator ==(other) => _flags == other._flags;
|
||||
bool operator ==(Object other) =>
|
||||
other is SideEffects && _flags == other._flags;
|
||||
|
||||
@override
|
||||
int get hashCode => throw UnsupportedError('SideEffects.hashCode');
|
||||
|
|
|
@ -160,8 +160,8 @@ String? stackTraceFilePrefix = null;
|
|||
/// anything which supports [:write:] and [:writeCharCode:], for example,
|
||||
/// [StringBuffer]. Note that JS supports \xnn and \unnnn whereas JSON only
|
||||
/// supports the \unnnn notation. Therefore we use the \unnnn notation.
|
||||
void writeJsonEscapedCharsOn(String string, buffer) {
|
||||
void addCodeUnitEscaped(var buffer, int code) {
|
||||
void writeJsonEscapedCharsOn(String string, StringBuffer buffer) {
|
||||
void addCodeUnitEscaped(StringBuffer buffer, int code) {
|
||||
assert(code < 0x10000);
|
||||
buffer.write(r'\u');
|
||||
if (code < 0x1000) {
|
||||
|
@ -176,7 +176,7 @@ void writeJsonEscapedCharsOn(String string, buffer) {
|
|||
buffer.write(code.toRadixString(16));
|
||||
}
|
||||
|
||||
void writeEscapedOn(String string, var buffer) {
|
||||
void writeEscapedOn(String string, StringBuffer buffer) {
|
||||
for (int i = 0; i < string.length; i++) {
|
||||
int code = string.codeUnitAt(i);
|
||||
if (code == $DQ) {
|
||||
|
|
|
@ -4,13 +4,6 @@
|
|||
"Dynamic invocation of 'resume'.": 1,
|
||||
"Dynamic invocation of 'pause'.": 1
|
||||
},
|
||||
"pkg/compiler/lib/src/source_file_provider.dart": {
|
||||
"Dynamic invocation of 'call'.": 3
|
||||
},
|
||||
"pkg/compiler/lib/src/util/util.dart": {
|
||||
"Dynamic invocation of 'write'.": 11,
|
||||
"Dynamic invocation of 'writeCharCode'.": 1
|
||||
},
|
||||
"pkg/compiler/lib/src/util/maplet.dart": {
|
||||
"Dynamic access of 'isEmpty'.": 1,
|
||||
"Dynamic access of 'length'.": 1,
|
||||
|
@ -85,14 +78,6 @@
|
|||
"pkg/dart2js_info/lib/binary_serialization.dart": {
|
||||
"Dynamic invocation of 'cast'.": 1
|
||||
},
|
||||
"pkg/compiler/lib/src/universe/side_effects.dart": {
|
||||
"Dynamic access of 'universe.side_effects::_flags'.": 1
|
||||
},
|
||||
"pkg/compiler/lib/src/ssa/builder_kernel.dart": {
|
||||
"Dynamic access of 'name'.": 1,
|
||||
"Dynamic access of 'id'.": 1,
|
||||
"Dynamic invocation of 'addSuccessor'.": 1
|
||||
},
|
||||
"pkg/compiler/lib/src/ssa/types.dart": {
|
||||
"Dynamic access of 'element'.": 1
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue