Remove var or final from parameters.
Removed from `benchmarks/`, `runtime/`, `sdk/`, `tools/` and `utils/`. (Leaving `tests/`, `pkg/` and `third_party/`.) CoreLibraryReviewExempt: No real change. Tested: No test changes for no real code changes. Change-Id: Ieb42441457ca3d0ea4443dd153ee902ea33b28de Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/480241 Commit-Queue: Lasse Nielsen <lrn@google.com> Reviewed-by: Ben Konyi <bkonyi@google.com> Reviewed-by: Nate Bosch <nbosch@google.com>
This commit is contained in:
committed by
Commit Queue
parent
de5639663f
commit
0a88f4ef73
@@ -1540,7 +1540,7 @@ class OptimizedByteArrayTest {
|
||||
testFloat64ListImpl(array);
|
||||
}
|
||||
|
||||
static testInt8ListViewImpl(var array) {
|
||||
static testInt8ListViewImpl(array) {
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
Expect.equals(12, array.lengthInBytes);
|
||||
@@ -1779,7 +1779,7 @@ class OptimizedByteArrayTest {
|
||||
testInt8ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testUint8ListViewImpl(var array) {
|
||||
static testUint8ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -1980,7 +1980,7 @@ class OptimizedByteArrayTest {
|
||||
testUint8ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testInt16ListViewImpl(var array) {
|
||||
static testInt16ListViewImpl(array) {
|
||||
Expect.equals(24, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
Expect.equals(24, array.lengthInBytes);
|
||||
@@ -2341,7 +2341,7 @@ class OptimizedByteArrayTest {
|
||||
testInt16ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testUint16ListViewImpl(var array) {
|
||||
static testUint16ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(24, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -3144,7 +3144,7 @@ class OptimizedByteArrayTest {
|
||||
], array);
|
||||
}
|
||||
|
||||
static testUint32ListViewImpl(var array) {
|
||||
static testUint32ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(48, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -3542,7 +3542,7 @@ class OptimizedByteArrayTest {
|
||||
testUint32ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testInt64ListViewImpl(var array) {
|
||||
static testInt64ListViewImpl(array) {
|
||||
Expect.equals(96, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
Expect.equals(96, array.lengthInBytes);
|
||||
@@ -4244,7 +4244,7 @@ class OptimizedByteArrayTest {
|
||||
testInt64ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testUint64ListViewImpl(var array) {
|
||||
static testUint64ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(96, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -4743,7 +4743,7 @@ class OptimizedByteArrayTest {
|
||||
testUint64ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testFloat32ListViewImpl(var array) {
|
||||
static testFloat32ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(4, array.elementSizeInBytes);
|
||||
@@ -4973,7 +4973,7 @@ class OptimizedByteArrayTest {
|
||||
testFloat32ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testFloat64ListViewImpl(var array) {
|
||||
static testFloat64ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(8, array.elementSizeInBytes);
|
||||
|
||||
@@ -2107,7 +2107,7 @@ class ByteArrayTest {
|
||||
// TODO: byte_array.getFloat64(0)
|
||||
}
|
||||
|
||||
static testInt8ListViewImpl(var array) {
|
||||
static testInt8ListViewImpl(array) {
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
Expect.equals(12, array.lengthInBytes);
|
||||
@@ -2346,7 +2346,7 @@ class ByteArrayTest {
|
||||
testInt8ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testUint8ListViewImpl(var array) {
|
||||
static testUint8ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -2547,7 +2547,7 @@ class ByteArrayTest {
|
||||
testUint8ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testInt16ListViewImpl(var array) {
|
||||
static testInt16ListViewImpl(array) {
|
||||
Expect.equals(24, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
Expect.equals(24, array.lengthInBytes);
|
||||
@@ -2908,7 +2908,7 @@ class ByteArrayTest {
|
||||
testInt16ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testUint16ListViewImpl(var array) {
|
||||
static testUint16ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(24, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -3711,7 +3711,7 @@ class ByteArrayTest {
|
||||
], array);
|
||||
}
|
||||
|
||||
static testUint32ListViewImpl(var array) {
|
||||
static testUint32ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(48, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -4109,7 +4109,7 @@ class ByteArrayTest {
|
||||
testUint32ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testInt64ListViewImpl(var array) {
|
||||
static testInt64ListViewImpl(array) {
|
||||
Expect.equals(96, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
Expect.equals(96, array.lengthInBytes);
|
||||
@@ -4811,7 +4811,7 @@ class ByteArrayTest {
|
||||
testInt64ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testUint64ListViewImpl(var array) {
|
||||
static testUint64ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(96, array.length);
|
||||
Expect.equals(1, array.elementSizeInBytes);
|
||||
@@ -5310,7 +5310,7 @@ class ByteArrayTest {
|
||||
testUint64ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testFloat32ListViewImpl(var array) {
|
||||
static testFloat32ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(4, array.elementSizeInBytes);
|
||||
@@ -5540,7 +5540,7 @@ class ByteArrayTest {
|
||||
testFloat32ListViewImpl(array);
|
||||
}
|
||||
|
||||
static testFloat64ListViewImpl(var array) {
|
||||
static testFloat64ListViewImpl(array) {
|
||||
Expect.isTrue(array is List<int>);
|
||||
Expect.equals(12, array.length);
|
||||
Expect.equals(8, array.elementSizeInBytes);
|
||||
|
||||
@@ -14,7 +14,7 @@ int run(int Function() fn) => fn();
|
||||
@pragma('vm:testing:match-inner-flow-graph', 'foo')
|
||||
void main() {
|
||||
const int N = 100;
|
||||
int id(final int i) => i;
|
||||
int id(int i) => i;
|
||||
|
||||
@pragma('vm:testing:print-flow-graph')
|
||||
int foo() {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
class Test {
|
||||
@pragma("vm:entry-point")
|
||||
String func1(var k) {
|
||||
String func1(k) {
|
||||
try {
|
||||
for (var i = 0; i <= 50; i++) {
|
||||
func2(i * k);
|
||||
@@ -31,7 +31,7 @@ class Test {
|
||||
}
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
int func2(var i) {
|
||||
int func2(i) {
|
||||
var result = 0;
|
||||
for (var k = 0; k <= 10; k++) {
|
||||
result += func3(i + k);
|
||||
@@ -40,7 +40,7 @@ class Test {
|
||||
}
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
int func3(var i) {
|
||||
int func3(i) {
|
||||
var result = 0;
|
||||
for (var l = 0; l <= 1; l++) {
|
||||
result += func4(i + l);
|
||||
@@ -49,7 +49,7 @@ class Test {
|
||||
}
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
int func4(var i) {
|
||||
int func4(i) {
|
||||
var result = 0;
|
||||
for (var j = 0; j <= 10; j++) {
|
||||
result += func5(i + j);
|
||||
@@ -58,7 +58,7 @@ class Test {
|
||||
}
|
||||
|
||||
@pragma("vm:entry-point")
|
||||
int func5(var i) {
|
||||
int func5(i) {
|
||||
if (i >= 520) throw "show me inlined functions";
|
||||
return i;
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ final copyableClosures = <dynamic>[
|
||||
return inner;
|
||||
}(),
|
||||
() {
|
||||
foo(var arg) {
|
||||
foo(arg) {
|
||||
return () => arg;
|
||||
}
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ final nonCopyableClosures = <dynamic>[
|
||||
return inner;
|
||||
})(),
|
||||
(() {
|
||||
foo(var arg) {
|
||||
foo(arg) {
|
||||
return () => arg;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ import 'dart:typed_data';
|
||||
import 'package:expect/async_helper.dart' show asyncStart, asyncEnd;
|
||||
import 'package:expect/expect.dart';
|
||||
|
||||
Uint8List generateSampleList(final int size) {
|
||||
Uint8List generateSampleList(int size) {
|
||||
final list = Uint8List(size);
|
||||
for (int i = 0; i < size; i++) {
|
||||
list[i] = i % 243;
|
||||
@@ -18,7 +18,7 @@ Uint8List generateSampleList(final int size) {
|
||||
return list;
|
||||
}
|
||||
|
||||
void validateReceivedList(final int expectedSize, final list) {
|
||||
void validateReceivedList(int expectedSize, list) {
|
||||
Expect.equals(expectedSize, list.length);
|
||||
// probe few elements
|
||||
for (
|
||||
|
||||
@@ -102,7 +102,7 @@ List<Candidate<ObjectMirror>> candidateReceivers = <Candidate<ObjectMirror>>[];
|
||||
List<Candidate<InstanceMirror>> candidateArguments =
|
||||
<Candidate<InstanceMirror>>[];
|
||||
|
||||
void addInstance(var instance) {
|
||||
void addInstance(instance) {
|
||||
addInstanceMirror(reflect(instance));
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ throwsIfReceiverMaterializesMoreThanOnce() async {
|
||||
isolateErrors.close();
|
||||
}
|
||||
|
||||
void receiver(final transferable) {
|
||||
void receiver(transferable) {
|
||||
transferable.materialize();
|
||||
transferable.materialize();
|
||||
}
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
import "package:expect/expect.dart";
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
add_smi(var a, var b) => a + b;
|
||||
add_smi(a, b) => a + b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
add_mint(var a, var b) => a + b;
|
||||
add_mint(a, b) => a + b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
add_mint_consts() => 0x5000000000000000 + 0x6000000000000000;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
test_add(var v2, var v3, var v3fxx, var v5fxx, var v7fxx, var n60xx) {
|
||||
test_add(v2, v3, v3fxx, v5fxx, v7fxx, n60xx) {
|
||||
for (var i = 0; i < 20; i++) {
|
||||
Expect.equals(5, add_smi(v2, v3));
|
||||
}
|
||||
@@ -44,16 +44,16 @@ test_add(var v2, var v3, var v3fxx, var v5fxx, var v7fxx, var n60xx) {
|
||||
}
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
sub_smi(var a, var b) => a - b;
|
||||
sub_smi(a, b) => a - b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
sub_mint(var a, var b) => a - b;
|
||||
sub_mint(a, b) => a - b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
sub_mint_consts() => (-0x5000000000000000) - 0x6000000000000000;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
test_sub(var v2, var v3, var v3fxx, var v5fxx, var v7fxx, var n60xx) {
|
||||
test_sub(v2, v3, v3fxx, v5fxx, v7fxx, n60xx) {
|
||||
for (var i = 0; i < 20; i++) {
|
||||
Expect.equals(1, sub_smi(v3, v2));
|
||||
}
|
||||
@@ -79,16 +79,16 @@ test_sub(var v2, var v3, var v3fxx, var v5fxx, var v7fxx, var n60xx) {
|
||||
}
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
mul_smi(var a, var b) => a * b;
|
||||
mul_smi(a, b) => a * b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
mul_mint(var a, var b) => a * b;
|
||||
mul_mint(a, b) => a * b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
mul_mint_consts() => 0x5000000000000001 * 0x6000000000000001;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
test_mul(var v2, var v3, var v3fxx, var v5fxx, var v7fxx, var n60xx) {
|
||||
test_mul(v2, v3, v3fxx, v5fxx, v7fxx, n60xx) {
|
||||
for (var i = 0; i < 20; i++) {
|
||||
Expect.equals(6, mul_smi(v2, v3));
|
||||
}
|
||||
@@ -110,25 +110,25 @@ test_mul(var v2, var v3, var v3fxx, var v5fxx, var v7fxx, var n60xx) {
|
||||
}
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
shl_smi(var a, var b) => a << b;
|
||||
shl_smi(a, b) => a << b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
shl_mint(var a, var b) => a << b;
|
||||
shl_mint(a, b) => a << b;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
shl_mint_by_const16(var a) => a << 16;
|
||||
shl_mint_by_const16(a) => a << 16;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
shl_smi_by_const96(var a) => a << 96;
|
||||
shl_smi_by_const96(a) => a << 96;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
shl_mint_by_const96(var a) => a << 96;
|
||||
shl_mint_by_const96(a) => a << 96;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
shl_mint_consts() => 0x77665544aabbccdd << 48;
|
||||
|
||||
@pragma('vm:never-inline')
|
||||
test_shl(var v2, var v3, var v8, var v40) {
|
||||
test_shl(v2, v3, v8, v40) {
|
||||
for (var i = 0; i < 20; i++) {
|
||||
Expect.equals(16, shl_smi(v2, v3));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user