dce0b514d4
This defers literals, to effectively split binary size for libraries that are more data than code, such as localizations. TEST=ci Bug: https://github.com/dart-lang/sdk/issues/41974 Change-Id: I506722037cc0247b90756959e6a6f12bb5021b5c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183781 Reviewed-by: Alexander Markov <alexmarkov@google.com> Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Ryan Macnak <rmacnak@google.com>
22 lines
623 B
Dart
22 lines
623 B
Dart
// Copyright (c) 2020, 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.
|
|
|
|
import "split_literals_deferred.dart" deferred as lib;
|
|
|
|
class Box {
|
|
final contents;
|
|
const Box(this.contents);
|
|
String toString() => "Box($contents)";
|
|
}
|
|
|
|
main() async {
|
|
print("Root literal!");
|
|
print(const <String>["Root literal in a list!"]);
|
|
print(const <String, String>{"key": "Root literal in a map!"});
|
|
print(const Box("Root literal in a box!"));
|
|
|
|
await lib.loadLibrary();
|
|
lib.foo();
|
|
}
|