Currently on sim* architectures we use a script snapshot (and not an app
jit snapshot, as we normally do) for the kernel isolate.
-> See utils/application_snapshot.gni:declare_args()
The change in [0] causes a deadlock where we try to compile the kernel
isolate (or rather a script snapshot of it) via the kernel isolate.
This CL fixes all the dartk-sim* builders by allowing us to run the
kernel snapshot from a script snapshot.
[0] https://dart-review.googlesource.com/52986
Change-Id: I513993f7c78310165d90f7622879482598f1e577
Reviewed-on: https://dart-review.googlesource.com/53380
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
The original implementation was designed around a shared misunderstanding
of optional parameter handling in the spec. (which was also ambiguous about type parameters).
The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
This behavior can be implemented without any backend support, as is done in this CL.
Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
Reviewed-on: https://dart-review.googlesource.com/52802
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Bug: None
Change-Id: I5627ac27907acfa5e304e47720758383a2e6376a
Reviewed-on: https://dart-review.googlesource.com/53166
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Change kernel serialization so that
a) We don't UTF8 encode strings up front, but only as needed
(if nothing else it makes it more obvious where the cost of stuff is)
b) Don't call toString on URIs to save them in a StringIndexer, only to
parse the string later to get a URI back again.
This shaves a bit of the serialization time.
Timings from running `flutter test` in flutter/packages/flutter:
Without change:
```
02:14 +2438 ~18: All tests passed!
02:12 +2438 ~18: All tests passed!
02:14 +2438 ~18: All tests passed!
```
with change:
```
02:10 +2438 ~18: All tests passed!
02:11 +2438 ~18: All tests passed!
02:09 +2438 ~18: All tests passed!
```
=> -2.5% +/- 1.83615%
Change-Id: I03e651bbef23445fb1901452a4efcc732789a168
Reviewed-on: https://dart-review.googlesource.com/51302
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
- use platform independent path specification is test so that
it works on windows
- skip test for precompiled and dartk builds as the test uses
spawnUri which is not supported in these modes
Change-Id: I7b73222ae331f863a65e6f7ff30d244533f29880
Reviewed-on: https://dart-review.googlesource.com/53340
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
We needed bytes only to get their length.
This CL replaces it to using the content (String) length.
This should help to fix heap usage regression.
R=paulberry@google.com
Change-Id: I4d58e91987db21233a71ca600eea8fae3fb38346
Reviewed-on: https://dart-review.googlesource.com/53243
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
int.tryParse is now available to internal Google users, so it is safe
to land this change now.
This reverts commit 115850ca1d.
Original commit 86ba29265a.
Change-Id: I92c3d19533d3108c06910f21070266953c3a065b
Reviewed-on: https://dart-review.googlesource.com/53244
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
...if they are within the working directory
Makes output from dump-info more stable, especially with pkg:build
Change-Id: I3e6c444a0aa7df55c10e1bdff4b59ef035d2acc3
Reviewed-on: https://dart-review.googlesource.com/53168
Reviewed-by: Harry Terkelsen <het@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Previously doubles was saved as strings in the string table,
with a DoubleLiteral holding a StringReference.
This can cause overhead in both computation time
(converting the double to and from string) as well as size
(e.g. a single usage of the previously unused double 1000000.42
would use (at least)
* 10 bytes for the characters
* 1 byte for the size
* 1 byte for the reference to the string
whereas saving it as a double would simply save the 8 bytes.
On the other hand the string table doesn't contain duplicates so
many usages of the same double will use more space.
The SDK dill file size decreases slightly (< 1 KB).
On a Dart file with 1M different doubles (0.42, 1.42, ..., 999999.42)
added to a list:
Before:
compile and write via fasta (non-strong-mode): 0:12.18
Reading (via dart, eager): 2500-2600 ms
Writing (to null sink) (after reading): 1600-1800 ms
Output dill file (via fasta compile): ~62 MB
After:
compile and write via fasta (non-strong-mode): 0:11.76
Reading (via dart, eager): 2050-2350 ms
Writing (to null sink) (after reading): 400-550 ms
Output dill file (via fasta compile): ~54 MB
Running the dill file is ~the same time, but "Maximum resident set size
(kbytes)" (from /usr/bin/time -v) decreases with ~4%.
On the other side, if it's 1M of the same doubles (0.42), while
compiling is ~the same speed, the output dill goes from 43MB to 50MB.
Surprisingly the "Maximum resident set size (kbytes)" still decreases
though (~3%).
Running flutter test in flutter/packages/flutter:
Before:
```
02:33 +2425 ~18: All tests passed!
02:28 +2425 ~18: All tests passed!
02:28 +2425 ~18: All tests passed!
```
After:
```
02:12 +2425 ~18: All tests passed!
02:11 +2425 ~18: All tests passed!
02:12 +2425 ~18: All tests passed!
```
So that's -12.0267% +/- 3.15253%
File size of a dill file of an arbitrary test using flutter is reduced by ~44 KB (~0.3%).
Change-Id: I64151376cde1dae6f0d02b3d96991bc432a994ae
Reviewed-on: https://dart-review.googlesource.com/41660
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Closes#32961
Change-Id: Ib326ce5c1027ca32b368904e0d57514779ea170b
Reviewed-on: https://dart-review.googlesource.com/53080
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This adds a special RTI representation for a type argument of a
(supertype of a) js-interop class, which effectively is the Dart 1
`dynamic` type.
Closes#32969
Change-Id: Ifd92b3fc6779d96d354ad929bd7c07a349299ae6
Reviewed-on: https://dart-review.googlesource.com/53002
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Allows the finalizer to be associated with the correct object when creating ByteData. The finalizer should be associated with the underlying ExternalUint8List, since it can outlive the ByteData via byteData.buffer.asUint8List()
Bug: b/78150644
Change-Id: I3db58792bbe3abf7ed41d2adaf225fa554b8fb25
Reviewed-on: https://dart-review.googlesource.com/52860
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This has no formatting changes, so is safe to roll without coordinating
with a new prebuilt SDK.
Change-Id: If8b966a7fd402909f82aa016ee9958672a275e8b
Reviewed-on: https://dart-review.googlesource.com/53161
Reviewed-by: Natalie Weizenbaum <nweiz@google.com>
The static methods allow type parameters to be registered,
but this means that the type parameters will be dropped unless in strong mode.
Change-Id: I91c1977c287c14742df7d59b988e64ddc46f794d
Reviewed-on: https://dart-review.googlesource.com/52870
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>