Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ed98948

Browse files
author
Dart CI
committed
Version 2.12.0-74.0.dev
Merge commit 'dab1efeb5d471f354dedd15b136420a5bef999af' into 'dev'
2 parents 34c5d8d + dab1efe commit ed98948

27 files changed

+277
-239
lines changed

pkg/compiler/lib/src/dart2js.dart

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ Future<api.CompilationResult> compile(List<String> argv,
285285
}
286286

287287
void setCfeOnly(String argument) {
288+
if (writeStrategy == WriteStrategy.toClosedWorld) {
289+
fail("Cannot use ${Flags.cfeOnly} "
290+
"and write serialized closed world simultaneously.");
291+
}
288292
if (writeStrategy == WriteStrategy.toData) {
289293
fail("Cannot use ${Flags.cfeOnly} "
290294
"and write serialized data simultaneously.");
@@ -644,7 +648,10 @@ Future<api.CompilationResult> compile(List<String> argv,
644648
case WriteStrategy.toKernel:
645649
out ??= Uri.base.resolve('out.dill');
646650
options.add(Flags.cfeOnly);
647-
if (readStrategy == ReadStrategy.fromData) {
651+
if (readStrategy == ReadStrategy.fromClosedWorld) {
652+
fail("Cannot use ${Flags.cfeOnly} "
653+
"and read serialized closed world simultaneously.");
654+
} else if (readStrategy == ReadStrategy.fromData) {
648655
fail("Cannot use ${Flags.cfeOnly} "
649656
"and read serialized data simultaneously.");
650657
} else if (readStrategy == ReadStrategy.fromCodegen) {

pkg/compiler/test/end_to_end/command_line_test.dart

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,16 @@ main() {
2727
await test([Flags.cfeOnly], exitCode: 1);
2828
await test([Flags.cfeOnly, 'foo.dart'], out: 'out.dill');
2929
await test([Flags.cfeOnly, 'foo.dart', '--out=out.dill'], out: 'out.dill');
30+
await test([Flags.cfeOnly, 'foo.dart', Flags.readClosedWorld], exitCode: 1);
31+
await test(['foo.dart', Flags.readClosedWorld, Flags.cfeOnly], exitCode: 1);
3032
await test([Flags.cfeOnly, 'foo.dart', Flags.readData], exitCode: 1);
3133
await test(['foo.dart', Flags.readData, Flags.cfeOnly], exitCode: 1);
3234
await test([Flags.cfeOnly, 'foo.dart', Flags.readCodegen], exitCode: 1);
3335
await test(['foo.dart', Flags.readCodegen, Flags.cfeOnly], exitCode: 1);
36+
await test([Flags.cfeOnly, 'foo.dart', Flags.writeClosedWorld],
37+
exitCode: 1);
38+
await test(['foo.dart', Flags.writeClosedWorld, Flags.cfeOnly],
39+
exitCode: 1);
3440
await test([Flags.cfeOnly, 'foo.dart', Flags.writeData], exitCode: 1);
3541
await test(['foo.dart', Flags.writeData, Flags.cfeOnly], exitCode: 1);
3642
await test([Flags.cfeOnly, 'foo.dart', Flags.writeCodegen], exitCode: 1);
@@ -40,11 +46,51 @@ main() {
4046
out: 'out.dill', writeData: 'out.dill.data');
4147
await test(['${Flags.writeData}=foo.data', 'foo.dart', '--out=foo.dill'],
4248
out: 'foo.dill', writeData: 'foo.data');
49+
await test([Flags.readClosedWorld, Flags.writeClosedWorld, 'foo.dart'],
50+
exitCode: 1);
51+
await test([Flags.writeClosedWorld, Flags.readClosedWorld, 'foo.dart'],
52+
exitCode: 1);
4353
await test([Flags.readData, Flags.writeData, 'foo.dart'], exitCode: 1);
4454
await test([Flags.writeData, Flags.readData, 'foo.dart'], exitCode: 1);
55+
await test([Flags.readCodegen, Flags.writeClosedWorld, 'foo.dart'],
56+
exitCode: 1);
4557
await test([Flags.readCodegen, Flags.writeData, 'foo.dart'], exitCode: 1);
58+
await test([Flags.writeClosedWorld, Flags.readData, 'foo.dart'],
59+
exitCode: 1);
60+
await test([Flags.writeClosedWorld, Flags.readCodegen, 'foo.dart'],
61+
exitCode: 1);
4662
await test([Flags.writeData, Flags.readCodegen, 'foo.dart'], exitCode: 1);
4763

64+
await test([
65+
Flags.writeClosedWorld,
66+
'foo.dart',
67+
], out: 'out.dill', writeClosedWorld: 'out.dill.world');
68+
await test(
69+
['${Flags.writeClosedWorld}=foo.world', 'foo.dart', '--out=foo.dill'],
70+
out: 'foo.dill', writeClosedWorld: 'foo.world');
71+
72+
await test([Flags.readClosedWorld, 'foo.dill'],
73+
out: 'out.js', readClosedWorld: 'foo.dill.world');
74+
await test([Flags.readClosedWorld, 'foo.dill', '--out=foo.js'],
75+
out: 'foo.js', readClosedWorld: 'foo.dill.world');
76+
await test(['${Flags.readClosedWorld}=out.world', 'foo.world'],
77+
out: 'out.js', readClosedWorld: 'out.world');
78+
await test(
79+
['${Flags.readClosedWorld}=out.world', 'foo.world', '--out=foo.js'],
80+
out: 'foo.js', readClosedWorld: 'out.world');
81+
await test(
82+
[Flags.readClosedWorld, Flags.writeData, 'foo.dill'],
83+
out: 'out.dill',
84+
readClosedWorld: 'foo.dill.world',
85+
writeData: 'out.dill.data',
86+
);
87+
await test([
88+
'${Flags.readClosedWorld}=foo.world',
89+
'${Flags.writeData}=foo.data',
90+
'foo.dart',
91+
'--out=foo.dill'
92+
], out: 'foo.dill', readClosedWorld: 'foo.world', writeData: 'foo.data');
93+
4894
await test([Flags.readData, 'foo.dill'],
4995
out: 'out.js', readData: 'foo.dill.data');
5096
await test([Flags.readData, 'foo.dill', '--out=foo.js'],
@@ -199,6 +245,8 @@ main() {
199245
Future test(List<String> arguments,
200246
{int exitCode,
201247
String out,
248+
String readClosedWorld,
249+
String writeClosedWorld,
202250
String readData,
203251
String writeData,
204252
String readCodegen,
@@ -231,6 +279,10 @@ Future test(List<String> arguments,
231279
if (actualExitCode == null) {
232280
Expect.isNotNull(options, "Missing options object");
233281
Expect.equals(toUri(out), options.outputUri, "Unexpected output uri.");
282+
Expect.equals(toUri(readClosedWorld), options.readClosedWorldUri,
283+
"Unexpected readClosedWorld uri");
284+
Expect.equals(toUri(writeClosedWorld), options.writeClosedWorldUri,
285+
"Unexpected writeClosedWorld uri");
234286
Expect.equals(
235287
toUri(readData), options.readDataUri, "Unexpected readData uri");
236288
Expect.equals(

pkg/kernel/lib/ast.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9829,7 +9829,7 @@ abstract class BinarySource {
98299829

98309830
int readByte();
98319831
List<int> readBytes(int length);
9832-
int readUInt();
9832+
int readUInt30();
98339833
int readUint32();
98349834

98359835
/// Read List<Byte> from the source.

0 commit comments

Comments
 (0)