If parent is a param in the TimelineTask.withTaskId() constructor, we have the possibility of running into this situation:
TimelineTaskA - id 0
TimelineTaskB - id 1
TimelineTaskC - id 2 - parentId 1
TimelineTaskD - id 0 - parentId 2 (this task created with TimelineTask.withTaskId(0, parent: C))
TimelineTaskE - id 3 - parentId 0 (now who is the parent of E? D or A?)
If we do not allow the user to specify parent in the withTaskId() constructor, we remove the possibility of this clash. This clash happens because the user was able to inject an event with id 0 into an async tree defined by the parent parameter.
By removing the parent parameter from the withTaskId() constructor, we can rely on different sources of truth for the different TimelineTask constructors.
- If taskId is specified via TimelineTask.withTaskId(), then that is the source of truth for inferring the async event tree (events with the same async id are in the same async tree).
- If parent is specified via TimelineTask(parent: parent), then that is the source of truth for inferring the async event tree.
- If neither taskId nor parent are specified (e.g. TimelineTask()), we default to timestamp inference.
Change-Id: I491a20cf1d1aaea744ab92e56602269390e73fb0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121680
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Use "enable-experiment" to be consistent with other tools.
Change-Id: If9598f667517443a4f61ef91955ff57a477f0a5c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121681
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Fix#38792.
Change-Id: I6fc98538f75ed03612cd25ba4f0c12054819a3fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121406
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Release notes: https://github.com/dart-lang/dartdoc/releases/tag/v0.28.8
This also reverts the workaround in ff23f546db by dacoharkes@.
Instead of crashing, dartdoc v0.28.8 displays some fairly spammy warnings that the functionality is unimplemented.
warning: Comment reference resolution inside extension methods is not yet implemented, from dart-ffi.DoublePointer.value: Field value.location
warning: unresolved doc reference [address], from dart-ffi.DoublePointer.value: Field value.location
warning: unresolved doc reference [Double], from dart-ffi.DoublePointer.value: Field value.location
warning: unresolved doc reference [value], from dart-ffi.DoublePointer.value: Field value.location
warning: unresolved doc reference [Float], from dart-ffi.DoublePointer.value: Field value.location
Issue: https://github.com/dart-lang/sdk/issues/38786
Change-Id: Ie8fef572f5d50bd7f031b498c0cd066a4765c493
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121644
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
This reverts commit d77f4913a1.
Reason for revert: large number of flaky crashes on flakiness dashboard (https://github.com/dart-lang/sdk/issues/38873); crashes on vm-kernel-mac-debug-simdbc64 bot.
Original change's description:
> [vm/compiler] Further compress the information previously in StackMaps.
>
> Lifting the PC offset in a2bb730 was a small, lightweight change that
> gave us big gains, at least on 32-bit architectures. Here, we make
> much more invasive changes that will improve the amount of memory used
> by the information previously stored in StackMap objects.
>
> Instead of allocating separate objects for StackMaps, we instead compress
> all StackMap information for a given Code object into a single object
> (CompressedStackMaps, or CSM for short). This replaces the Array used to
> store PC offsets (as Smis) and the individual StackMap objects.
>
> While we lose all canonicalization for individual StackMap entries, the
> drop in space required to store stack map information more than offsets that.
>
> -----
>
> The impact on AOT snapshot size when compiling the Flutter Gallery
> in release mode:
>
> armv7: Total size -2.58% (Isolate RO: +14.46%, Isolate snapshot: -22.93%)
> armv8: Total size -1.85% (Isolate RO: +15.69%, Isolate snapshot: -22.97%)
>
> The impact on in-memory, not on-disk, size for the Flutter Gallery as seen
> in the Observatory while running a profile (not release) build:
>
> armv7: Drops from 7.1 MB to 6.2MB (-0.9 MB)
> armv8: Drops from 13.5MB to 11.7MB (-1.8 MB)
>
> -----
>
> Bug: https://github.com/dart-lang/sdk/issues/35274
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try
> Change-Id: Ie3bb898d557215146260a560423f5fa27bdff512
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119640
> Commit-Queue: Teagan Strickland <sstrickl@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=kustermann@google.com,rmacnak@google.com,sstrickl@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/dart-lang/sdk/issues/35274
Change-Id: Ib844b4d52e3aa4aca62a896cfe349c680bda7461
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-debug-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121642
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This code is shared with similar code in EdgeBuilder.
Change-Id: I807269a21472be396e7ba42a89f20efa15eca7fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121523
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Previously we only set it for index expressions, prefixed identifiers,
and simple identifiers.
Change-Id: Ib666aa936f0e7bf7421cb74e491d35ab5507d412
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
There are still two checks that I'm aware of that are not being performed
(there are TODOs for them) and two diagnostics that need to be removed
because `Struct` will soon not take a type argument.
Change-Id: I17424a32225eeff7e3b2c0e0f36cfc6ccd45e0a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121640
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Here we can see the mixture network is assigning probability mass
to a new, project-specific name by reference https://i.imgur.com/6Zbs2qf.png.
I also took this opportunity to decrease model size targeting 100M, in line
with our original size goals.
My initial strategy was to implement a separate pointer network
in https://dart-review.googlesource.com/c/sdk/+/117005 but having
a single network that can assign probability mass across local
references and vocabulary lexemes is better since
1) only one network and model file
2) no need to coalesce predictions from multiple models
Change-Id: I23cfc2ece61ce30bb69785149a5a6cf1604af18d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121461
Commit-Queue: Ari Aye <ariaye@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In order to support obfuscation, string constants are decoupled
from public names in bytecode (names are obfuscated, but string
constants aren't). List of protected names is written in a separate
section in bytecode component.
Obfuscator is extended to support getter and setter
names coming from bytecode.
Change-Id: I8e8d820d1a8b97e32e8ad1b064b827bdb017430b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121261
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
- Started cleaning up places where we emit matching parens/braces manually
- Started handling indentation in less places
- Started de-duping code
- Started using constants where possible
Output code is still logically and structurally the same, although it formats
differently.
Change-Id: I367c8629174139c7083f6a12b7221230d884e628
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120742
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Fixes imports (the order of patch files is not defined, so the imports need to be equal in all files).
Change-Id: I2dc16f4930253b25c7ae6ab6b0699581f9e2dd46
Cq-Include-Trybots: luci.dart.try:flutter-engine-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121428
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
When visiting an assignment target that is an index expression
(`x[y]`) we'll need to know whether we are doing a compound assignment
or not, because this will influence whether the type context for the
index expression (`y`) should come from `operator[]` or `operator[]=`.
So before adding index expression support to FixBuilder, let's add an
`isCompound` boolean to indicate whether the assignment context is a
compound assignment or not.
Change-Id: I26a41544e10ef9c9ba042c1d7862563bd9d18b68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121407
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
A few changes here:
- Prefix expressions didn't support dynamic invocations.
- Prefix expressions didn't support generic types.
- Postfix expressions were handled incorrectly (we used the return
type of operator+ for `x++`, whereas the type should have been the
same as the type of `x`).
Change-Id: I35077b82a6e9c4e4f6ad8bb1264f5d725ec0d9a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121401
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
We now handle expression statements and variable declaration
statements where the variable type is an interface type.
Change-Id: I00f53a326495bcbeeba785b25c46abf1f3e9ab49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121260
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Instead of forcing the client to provide a way to de-parenthesize an
expression, the client informs flow analysis when a parenthesized
expression is encountered. This reduces the runtime overhead to zero
for non-parenthesized expressions, and it saves the front end from
having to worry about support for parenthesized expressions (since its
internal representation doesn't care about parentheses).
Change-Id: I0bb6e91c87acaa05591e1b075da18700b11e4aae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121080
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Rationale:
Adds stricter asserts on push arguments to flow graph
checker and fixes various places where the environment
assumptions on push arguments were violated.
https://github.com/dart-lang/sdk/issues/38577
Change-Id: I30b827c6400daaa8597e7957bd71b5d91d729cd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120722
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
tcmalloc and jemalloc have both been observed to hold onto lots of free'd zone segments (jemalloc to the point of causing OOM), so instead of using malloc to allocate segments, we allocate directly from mmap/zx_vmo_create/VirtualAlloc, and cache a small number of the normal sized segments.
flutter doctor at exit ("idle")
Process::MaxRSS() 261009408 -> 258756608 (-0.86%)
Process::CurrentRSS() 252932096 -> 205881344 (-18.6%)
Bug: https://github.com/dart-lang/sdk/issues/38820
Change-Id: I319069678b9d44383a9921ec03a963517991dd11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121264
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
For a switch statement
switch(foo) {
case c_1: ...
...
case c_N: ...
}
Bytecode was calling foo.operator==(c_i). This is less efficient than
c_i.operator==(foo), as c_i is a constant with a known actual type
and operator== can be always devirtualized and inlined.
Change-Id: I786ea193de1fa1830854602318e436f601296f5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121405
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Both a test file and now a test configuration can specify that
experiment flags should be enabled. Since they both can, passing those
to the tools is a little tricky because we need to merge the two
command line arguments. It's made worse by the fact that this corner of
test_runner is riddled with poorly factored code.
This doesn't fix the redundant code, but does merge and pass the flags
through. Right now, it parses them from the test file by looking for
them in the SharedOptions line, which is where they currently appear.
That's pretty hacky. Eventually, we should change these tests to use:
// Requirements=
Fixes#38386, #38387, #38388, and #38389.
Change-Id: I1aea1482b30b9ba19c427319f895822d81ee12ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121262
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
The benchmark spawns an isolate that compiles hello world app with dart2js, measures time it takes for spawned isolate to get up and running, measures delta rss when isolate is spawned.
This also adds analysis_options.yaml that helps with keeping the code lint-free.
Change-Id: I5f1ffa9706766cd00bf1ea3fdad76957952de8a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119538
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>