Specifying a parent will result in an argument being added to 'start'
events for that TimelineTask named 'parentId', which contains the task
ID of the parent. This is to be used by DevTools to show relationships
between asynchronous tasks that are not currently supported in the trace
event format used by Catapult.
Change-Id: Id0a030f018f5a6ac1e3b0ef2e89c1cd732790f02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119520
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Fixes symbol resolution on Darwin.
The original commit is in patchset 1.
Change-Id: If71e9a72b8a2f45db2591bfa45ec4018745ee2c4
Cq-Include-Trybots:luci.dart.try:dart-sdk-mac-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119646
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Usage: dart2native <main-dart-file> [<options>]
Generates an executable or an AOT snapshot from <main-dart-file>.
-D, --define=<key=value> Set values of environment variables. To specify
multiple variables, use multiple options or use
commas to separate key-value pairs.
E.g.: dart2native -Da=1,b=2 main.dart
--enable-asserts Enable assert statements.
-h, --help Display this help message.
-o, --output=<path> Set the output filename. <path> can be relative
or absolute.
E.g.: dart2native main.dart -o ../bin/my_app.exe
-k, --output-kind=<aot|exe>
[aot] Generate an AOT snapshot.
[exe] (default) Generate a standalone executable.
-p, --packages=<path> Get package locations from the specified file
instead of .packages. <path> can be relative or
absolute.
E.g.: dart2native --packages=/tmp/pkgs main.dart
-v, --verbose Show verbose output.
Change-Id: Id4d5542a946326fb8c009643f16fa1be99c9a97e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118994
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
Use interface ClassMember instead of Builder in ClassHierarchyBuilder.
This avoids the coupling between DelayedMember and Builder and is a
precursor to removing Builder.target.
Change-Id: Ie2067512051618a60fcb94b5aae7e7f3d8c02b15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119644
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Adds support for:
* ints
* doubles
* enums
* Strings
Up next: Colors, Iterables, Transforms and a catch-all.
Also note the TODO to change how types are being written (will be needed for Iterables).
See: https://github.com/dart-lang/sdk/issues/38633
Change-Id: I9d545ce9e090059ae330f9ae5dadf8e7d4b373c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119725
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
...other than the places where we should not set the type at all,
because these identifiers are not expressions. This is being done in
a separate CL, which will probably land as a breaking change.
Change-Id: I710488f0d1aa2475e51b59e383a1192b16162855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119766
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This treats whether or not to use the forked NNBD SDK as a build flag
similar to mode or architecture. When this flag is passed, it appends
"NNBD" to the main output directory, like xcodebuild/ReleaseX64NNBD.
It also defines a "use_nnbd" flag that is available inside BUILD.gn
files to determine whether or not to use the forked SDK. This flag
currently isn't used. Implementation teams will need to edit their
build steps to take that into account.
In order to use this mode on the bots, we'll need to tweak the bot
scripts to figure out whether the mode is enabled or not. There are a
couple of TODOs in the Python scripts for that. I'm not sure how that
should be specified in dart_sdk.py.
This CL does not remove my previous change to allow building the NNBD
fork next to dart-sdk in the same root output directory. I'll revert
those changes in a different CL once this one lands.
Change-Id: I3bd28f273106ee90caf9474b2fadad120b2c2d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119602
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This matches behavior of AST-based flow graph builder. Debugger ignores
synthetic (is_generated) try blocks when it figures out if thrown
exception is unhandled, so in order to ignore all try/finally blocks
they should be marked as synthetic.
Fixes https://github.com/dart-lang/sdk/issues/38697
Change-Id: I06840362a255b500e1e9317af90a61bbdea2a310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119726
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
This fixes the issue we had with shared/diamond depedencies. This also matches
more closely how DDK is invoked internally and externally.
While the change to use `--dart-sdk-summary` is not necessary, this brings the
API closer to how it is used elsewhere. It should be cleaned up in the future to
reuse the `--input-summary` flag instead.
Change-Id: Iec3695b5541ffaf7f5762a3d77f071a596237da1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119723
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
When type testing stub is generated it captures whatever subclasses are
present at this moment. As program continues running, new classes could be
loaded and finalized. This is especially true in bytecode mode with
its more lazy class loading. So type testing stubs could get outdated and
will fall back to slow path. This could cause performance regressions as
slow path is (1) slower :) and (2) it populates and uses SubtypeTestCache,
which has a limited capcity (controlled by max_subtype_cache_entries flag).
Once SubtypeTestCache overflows type checks are not longer cached which
makes type checks at particular location significantly slower.
The solution is to rebuild specialized type testing stub in TypeCheck
runtime entry after fast path failed but check succeeded.
Change-Id: Ied166e19be2870acef7a066b83bb73931bd1073d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119184
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Rationale:
Useful to implement the simulator, but also useful
in the future when compiler wants to constant fold
operations related to bit reversal.
https://github.com/dart-lang/sdk/issues/38346
Change-Id: I2f09ba6b1897202b5c07a2cff771afd7bbc99495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119703
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This is now consistent with Set and Map constants.
Change-Id: I4a65f372eeeaaba5d6b7c229c452ba4dc7870708
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119582
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Rationale:
We are adding library support for bit operations:
lowZeroBitCount/highZeroBitCount/nonZeroBitCount
The rbit on AM32 will enable very efficient direct
native implementations of these operations in the
DartVM codegen.
https://github.com/dart-lang/sdk/issues/38346
Change-Id: Icedf4af301b5c8011922fccb1530a9c28e5c0964
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Rationale:
We are adding library support for bit operations:
lowZeroBitCount/highZeroBitCount/nonZeroBitCount
The rbit on AM64 will enable very efficient direct
native implementations of these operations in the
DartVM codegen.
https://github.com/dart-lang/sdk/issues/38346
Change-Id: I4456a622d7bad1a2cfbf9383927c76983c1de9ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119586
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This allows navigation to work from migrated files, but some navigation
from unmiograted files doesn't work.
This also causes the content of the output directory to be deleted
before generation starts so that old files won't confuse the user.
Change-Id: I0007d811e56b82cb6b91582e3237c7383ae2d060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Block nodes inside BlockExpression are not serialized separately in
kernel binary, so attached metadata is not preserved.
This change fixes Fixes pkg/kernel/test/metadata_test test failure
revealed by https://dart-review.googlesource.com/c/sdk/+/119520.
Change-Id: I38c2cde6311e001f16faf2641762aaf42dd6d2b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119527
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Like the constant pool, this pool is populated when the flag
`--populate-llvm-constant-pool` is used. This pool contains the `Function`
objects that were compiled, and each `FlowGraph` node in the serialized flow
graphs will contain extra information labeled by `llvm-index` which is the
index of its corresponding `Function` object in the pool.
Also fix up printing of the constant and function pools when the flag
`--print-llvm-constant-pool` is used so that the output is buffered to avoid
overlapping output from concurrently running isolates.
Bug: https://github.com/dart-lang/sdk/issues/38297
Change-Id: I67739500c665e509ed16becc2e6bca7fe4928eb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119543
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The interpretation of the subtype check result depends on the mode. In partial
NNBD mode all type errors that wouldn't be errors in non-NNBD programs should
become warnings. In full NNBD mode all such errors are errors. This CL adds
the mode explicitly to the interface of the subtype check as a parameter.
Bug: http://dartbug.com/38673
Change-Id: I14bcdd260618530cfdd8189c01abba7469a16679
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119545
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
The code from these precompiled constructors is thrown away,
and if we are adding constants to the LLVM constant pool, then
we may add constants that will not actually appear in the final
program which may cause issues for tree shaking.
If these constructors are actually used, then they will be
recompiled normally.
In addition, we also do not add unreferenced constants to the
constant pool. That is, these constant definitions will not have
an `llvm_index` value in their serialized form when the LLVM
constant pool is populated.
Bug: https://github.com/dart-lang/sdk/issues/38661
Change-Id: I2a3702fd3f174504a5f01458064306cd687d7949
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119339
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Fuchsia is about to turn on ShadowCallStack for ARM64. Once this is enabled, we need to treat R18 like a preserved register. Generated Dart has not accessed this register because it is reserved on iOS, and in the absence of Dart exceptions this would be sufficient for us to be ShadowCallStack compatible. However, our exception handling mechanism jumps past all the C++ frames between the Dart exit frame and Exceptions::JumpToFrame, skipping code that would pop from R18.
Add save/restore of R18 in the invocation stubs, and restore of R18 in the jump stub. The latter prevents the ShadowCallStack from overflowing for code that has lots of exceptions without a native call.
Bug: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=37449
Change-Id: I2ce6e46624c8d72507e7afa7a44839b1f0def556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/119481
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>