Files
sdk/pkg/compiler/test/serialization/on_disk_split_test.dart
T
Joshua Litt 81092839c7 Reland "[dart2js] Avoid reserializing the closed world alongside type inference."
This is a reland of 7b022a7f2f

Original change's description:
> [dart2js] Avoid reserializing the closed world alongside type inference.
>
> This cl adds a temporary flag '--no-closed-world-in-data' in order to
> support serializing global inference results with and without the closed
> world.
>
> This flag only exists to allow us to roll this into google3. Afterwards,
> it will be removed.
>
> Change-Id: I6e9712739edd148edcf43007b6ece35efa688538
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192124
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>

Change-Id: I47c08edb868f272c7501ae139a9533fa07d4176f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193585
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-03-31 16:11:39 +00:00

39 lines
1.1 KiB
Dart

// Copyright (c) 2018, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
// @dart = 2.7
import 'dart:io';
import 'package:async_helper/async_helper.dart';
import 'package:compiler/src/commandline_options.dart';
import 'package:compiler/src/dart2js.dart';
import '../helpers/memory_compiler.dart';
main(List<String> args) {
asyncTest(() async {
Directory dir = await Directory.systemTemp.createTemp('on_disk');
Uri dillUri = dir.uri.resolve('out.dill');
Uri outUri = dir.uri.resolve('out.js');
var commonArgs = [
Flags.verbose,
'--libraries-spec=$sdkLibrariesSpecificationUri',
];
await internalMain([
'samples-dev/swarm/swarm.dart',
Flags.writeClosedWorld,
'--out=${dillUri}',
] +
commonArgs);
await internalMain([
'${dillUri}',
Flags.readClosedWorld,
Flags.writeData,
'--out=${outUri}',
] +
commonArgs);
await dir.delete(recursive: true);
});
}