Skip to content

Commit 475367a

Browse files
committed
Version 2.9.0-15.0.dev
Merge commit '391d3bcdd861efde45bd77e9cbdce814cbda3762' into dev
2 parents 35cf8c3 + 391d3bc commit 475367a

File tree

595 files changed

+17321
-12869
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

595 files changed

+17321
-12869
lines changed

DEPS

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ vars = {
4444
# co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
4545
# hashes. It requires access to the dart-build-access group, which EngProd
4646
# has.
47-
"co19_rev": "9dacb12cf963ce92fb056b7f2fb87096fd576e9a",
47+
"co19_rev": "c6adf63baea76b1f7e7833482eec023fd244fc33",
4848
"co19_2_rev": "620c1148c8b7a3d7f74afacf348c46f109eb64f2",
4949

5050
# The internal benchmarks to use. See go/dart-benchmarks-internal
51-
"benchmarks_internal_rev": "4f5285d3711ed4225d0bf5673379e7afdc6cb8e5",
51+
"benchmarks_internal_rev": "6c5cf5ca4f29f0e498a9ad51146ccb2ad3bbd2b4",
5252
"checkout_benchmarks_internal": False,
5353

5454
# As Flutter does, we use Fuchsia's GN and Clang toolchain. These revision
@@ -122,14 +122,14 @@ vars = {
122122
"mustache_rev": "664737ecad027e6b96d0d1e627257efa0e46fcb1",
123123
"oauth2_tag": "1.6.0",
124124
"package_config_rev": "9c586d04bd26fef01215fd10e7ab96a3050cfa64",
125-
"path_rev": "4b8c83cd5ccfcc8101acd2940ffb5a44d24ec57e",
125+
"path_rev": "4f3bb71843fe5493ba490828a1721821d7b33746",
126126
"pedantic_tag": "v1.9.0",
127127
"ply_rev": "604b32590ffad5cbb82e4afef1d305512d06ae93",
128128
"pool_rev": "86fbb2cde9bbc66c8d159909d2f65a5981ea5b50",
129129
"protobuf_rev": "3746c8fd3f2b0147623a8e3db89c3ff4330de760",
130130
"pub_rev": "6178cdf284baf2345d1ea578b7176a754aa576fe",
131131
"pub_semver_tag": "v1.4.4",
132-
"quiver-dart_tag": "2.0.0+1",
132+
"quiver-dart_tag": "246e754fe45cecb6aa5f3f13b4ed61037ff0d784",
133133
"resource_rev": "f8e37558a1c4f54550aa463b88a6a831e3e33cd6",
134134
"root_certificates_rev": "16ef64be64c7dfdff2b9f4b910726e635ccc519e",
135135
"rust_revision": "60960a260f7b5c695fd0717311d72ce62dd4eb43",
@@ -501,7 +501,7 @@ deps = {
501501
],
502502
"dep_type": "cipd",
503503
},
504-
Var("dart_root") + "/benchmarks/FfiCall/dart/native/out/": {
504+
Var("dart_root") + "/benchmarks/FfiCall/native/out/": {
505505
"packages": [
506506
{
507507
"package": "dart/benchmarks/fficall",
@@ -559,21 +559,21 @@ hooks = [
559559
],
560560
},
561561
{
562-
# Pull Debian wheezy sysroot for i386 Linux
562+
# Pull Debian sysroot for i386 Linux
563563
'name': 'sysroot_i386',
564564
'pattern': '.',
565565
'action': ['python', 'sdk/build/linux/sysroot_scripts/install-sysroot.py',
566566
'--arch', 'i386'],
567567
},
568568
{
569-
# Pull Debian wheezy sysroot for amd64 Linux
569+
# Pull Debian sysroot for amd64 Linux
570570
'name': 'sysroot_amd64',
571571
'pattern': '.',
572572
'action': ['python', 'sdk/build/linux/sysroot_scripts/install-sysroot.py',
573573
'--arch', 'amd64'],
574574
},
575575
{
576-
# Pull Debian wheezy sysroot for arm Linux
576+
# Pull Debian sysroot for arm Linux
577577
'name': 'sysroot_amd64',
578578
'pattern': '.',
579579
'action': ['python', 'sdk/build/linux/sysroot_scripts/install-sysroot.py',

PRESUBMIT.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,16 +67,19 @@ def _CheckNnbdTestSync(input_api, output_api):
6767
a test, the test's counterpart (if it exists at all) should be in the CL
6868
too.
6969
"""
70-
DIRS = ["co19", "corelib", "ffi", "language", "lib", "standalone"]
70+
DIRS = [
71+
"tests/co19", "tests/corelib", "tests/ffi", "tests/language",
72+
"tests/lib", "tests/standalone", "runtime/tests/vm/dart"
73+
]
7174

7275
files = [git_file.LocalPath() for git_file in input_api.AffectedTextFiles()]
7376
unsynchronized = []
7477
for file in files:
7578
if file.endswith('.status'): continue
7679

7780
for dir in DIRS:
78-
legacy_dir = "tests/{}_2/".format(dir)
79-
nnbd_dir = "tests/{}/".format(dir)
81+
legacy_dir = "{}_2/".format(dir)
82+
nnbd_dir = "{}/".format(dir)
8083

8184
counterpart = None
8285
if file.startswith(legacy_dir):

benchmarks/BigIntParsePrint/dart/BigIntParsePrint.dart

Lines changed: 49 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
// ignore_for_file: avoid_function_literals_in_foreach_calls
6+
57
import 'package:benchmark_harness/benchmark_harness.dart';
68
import 'package:fixnum/fixnum.dart';
79

@@ -38,23 +40,25 @@ class ParseBigIntBenchmark extends BenchmarkBase {
3840
: seed = (BigInt.one << bits) - BigInt.one,
3941
super(name);
4042

43+
@override
4144
void setup() {
42-
BigInt b = seed;
43-
int totalLength = 0;
45+
var b = seed;
46+
var totalLength = 0;
4447
while (totalLength < requiredDigits) {
4548
if (b.bitLength < bits) {
4649
b = seed;
4750
}
48-
String string = b.toString();
51+
final string = b.toString();
4952
strings.add(string);
5053
totalLength += string.length;
5154
b = b - (b >> 8);
5255
}
5356
}
5457

58+
@override
5559
void run() {
56-
for (String s in strings) {
57-
BigInt b = BigInt.parse(s);
60+
for (final s in strings) {
61+
final b = BigInt.parse(s);
5862
sink1 = s;
5963
sink2 = b;
6064
}
@@ -73,23 +77,25 @@ class ParseInt64Benchmark extends BenchmarkBase {
7377
: seed = (Int64.ONE << bits) - Int64.ONE,
7478
super(name);
7579

80+
@override
7681
void setup() {
77-
Int64 b = seed;
78-
int totalLength = 0;
82+
var b = seed;
83+
var totalLength = 0;
7984
while (totalLength < requiredDigits) {
8085
if (int64UnsignedBitLength(b) < bits) {
8186
b = seed;
8287
}
83-
String string = b.toStringUnsigned();
88+
final string = b.toStringUnsigned();
8489
strings.add(string);
8590
totalLength += string.length;
8691
b = b - b.shiftRightUnsigned(8);
8792
}
8893
}
8994

95+
@override
9096
void run() {
91-
for (String s in strings) {
92-
Int64 b = Int64.parseInt(s);
97+
for (final s in strings) {
98+
final b = Int64.parseInt(s);
9399
sink1 = s;
94100
sink2 = b;
95101
}
@@ -109,24 +115,26 @@ class ParseJsBigIntBenchmark extends BenchmarkBase {
109115
nativeBigInt.one),
110116
super(name);
111117

118+
@override
112119
void setup() {
113-
Object b = seed;
114-
int totalLength = 0;
120+
var b = seed;
121+
var totalLength = 0;
115122
while (totalLength < requiredDigits) {
116123
if (nativeBigInt.bitLength(b) < bits) {
117124
b = seed;
118125
}
119-
String string = nativeBigInt.toStringMethod(b);
126+
final string = nativeBigInt.toStringMethod(b);
120127
strings.add(string);
121128
totalLength += string.length;
122129
b = nativeBigInt.subtract(
123130
b, nativeBigInt.shiftRight(b, nativeBigInt.eight));
124131
}
125132
}
126133

134+
@override
127135
void run() {
128-
for (String s in strings) {
129-
Object b = nativeBigInt.parse(s);
136+
for (final s in strings) {
137+
final b = nativeBigInt.parse(s);
130138
sink1 = s;
131139
sink2 = b;
132140
}
@@ -143,26 +151,28 @@ class FormatBigIntBenchmark extends BenchmarkBase {
143151
: seed = (BigInt.one << bits) - BigInt.one,
144152
super(name);
145153

154+
@override
146155
void setup() {
147-
BigInt b = seed;
148-
int totalLength = 0;
156+
var b = seed;
157+
var totalLength = 0;
149158
while (totalLength < requiredDigits) {
150159
if (b.bitLength < bits) {
151160
b = seed;
152161
}
153-
String string = b.toString();
162+
final string = b.toString();
154163
values.add(b - BigInt.one); // We add 'one' back later.
155164
totalLength += string.length;
156165
b = b - (b >> 8);
157166
}
158167
}
159168

169+
@override
160170
void run() {
161-
for (BigInt b0 in values) {
171+
for (final b0 in values) {
162172
// Instances might cache `toString()`, so use arithmetic to create a new
163173
// instance to try to protect against measuring a cached string.
164-
BigInt b = b0 + BigInt.one;
165-
String s = b.toString();
174+
final b = b0 + BigInt.one;
175+
final s = b.toString();
166176
sink1 = s;
167177
sink2 = b;
168178
}
@@ -179,26 +189,28 @@ class FormatInt64Benchmark extends BenchmarkBase {
179189
: seed = (Int64.ONE << bits) - Int64.ONE,
180190
super(name);
181191

192+
@override
182193
void setup() {
183-
Int64 b = seed;
184-
int totalLength = 0;
194+
var b = seed;
195+
var totalLength = 0;
185196
while (totalLength < requiredDigits) {
186197
if (int64UnsignedBitLength(b) < bits) {
187198
b = seed;
188199
}
189-
String string = b.toStringUnsigned();
200+
final string = b.toStringUnsigned();
190201
values.add(b - Int64.ONE);
191202
totalLength += string.length;
192203
b = b - b.shiftRightUnsigned(8);
193204
}
194205
}
195206

207+
@override
196208
void run() {
197-
for (Int64 b0 in values) {
209+
for (final b0 in values) {
198210
// Instances might cache `toString()`, so use arithmetic to create a new
199211
// instance to try to protect against measuring a cached string.
200-
Int64 b = b0 + Int64.ONE;
201-
String s = b.toStringUnsigned();
212+
final b = b0 + Int64.ONE;
213+
final s = b.toStringUnsigned();
202214
sink1 = s;
203215
sink2 = b;
204216
}
@@ -218,29 +230,31 @@ class FormatJsBigIntBenchmark extends BenchmarkBase {
218230
nativeBigInt.one),
219231
super(name);
220232

233+
@override
221234
void setup() {
222235
final one = nativeBigInt.one;
223-
Object b = seed;
224-
int totalLength = 0;
236+
var b = seed;
237+
var totalLength = 0;
225238
while (totalLength < requiredDigits) {
226239
if (nativeBigInt.bitLength(b) < bits) {
227240
b = seed;
228241
}
229-
String string = nativeBigInt.toStringMethod(b);
242+
final string = nativeBigInt.toStringMethod(b);
230243
values.add(nativeBigInt.subtract(b, one)); // We add 'one' back later.
231244
totalLength += string.length;
232245
b = nativeBigInt.subtract(
233246
b, nativeBigInt.shiftRight(b, nativeBigInt.eight));
234247
}
235248
}
236249

250+
@override
237251
void run() {
238252
final one = nativeBigInt.one;
239-
for (Object b0 in values) {
253+
for (final b0 in values) {
240254
// Instances might cache `toString()`, so use arithmetic to create a new
241255
// instance to try to protect against measuring a cached string.
242-
Object b = nativeBigInt.add(b0, one);
243-
String s = nativeBigInt.toStringMethod(b);
256+
final b = nativeBigInt.add(b0, one);
257+
final s = nativeBigInt.toStringMethod(b);
244258
sink1 = s;
245259
sink2 = b;
246260
}
@@ -251,6 +265,7 @@ class FormatJsBigIntBenchmark extends BenchmarkBase {
251265
/// [DummyBenchmark] instantly returns a fixed 'slow' result.
252266
class DummyBenchmark extends BenchmarkBase {
253267
DummyBenchmark(String name) : super(name);
268+
@override
254269
double measure() => 2000 * 1000 * 1.0; // A rate of one run per 2s.
255270
}
256271

@@ -274,7 +289,7 @@ BenchmarkBase Function() selectFormatNativeBigIntBenchmark(
274289
: () => DummyBenchmark(name);
275290
}
276291

277-
main() {
292+
void main() {
278293
final benchmarks = [
279294
() => ParseInt64Benchmark('Int64.parse.0009.bits', 9),
280295
() => ParseInt64Benchmark('Int64.parse.0032.bits', 32),

benchmarks/BigIntParsePrint/dart/native_version_dummy.dart

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,41 @@ const NativeBigIntMethods nativeBigInt = _DummyMethods();
99
class _DummyMethods implements NativeBigIntMethods {
1010
const _DummyMethods();
1111

12+
@override
1213
bool get enabled => false;
1314

1415
static Object bad(String message) => UnimplementedError(message);
1516

17+
@override
1618
Object parse(String string) => throw bad('parse');
19+
20+
@override
1721
String toStringMethod(Object value) => throw bad('toStringMethod');
1822

23+
@override
1924
Object fromInt(int i) => throw bad('fromInt');
2025

26+
@override
2127
Object get one => throw bad('one');
28+
29+
@override
2230
Object get eight => throw bad('eight');
2331

32+
@override
2433
int bitLength(Object value) => throw bad('bitLength');
34+
35+
@override
2536
bool isEven(Object value) => throw bad('isEven');
2637

38+
@override
2739
Object add(Object left, Object right) => throw bad('add');
40+
41+
@override
2842
Object shiftLeft(Object value, Object count) => throw bad('shiftLeft');
43+
44+
@override
2945
Object shiftRight(Object value, Object count) => throw bad('shiftRight');
46+
47+
@override
3048
Object subtract(Object left, Object right) => throw bad('subtract');
3149
}

0 commit comments

Comments
 (0)