Additionally, I see that _deferred types_ are not constant, and make
great examples of non-const function references, constructor references,
and type literals.
Fixes language/const/constant_type_variable_test
Bug: https://github.com/dart-lang/sdk/issues/46020,
https://github.com/dart-lang/sdk/issues/47302
Change-Id: I9df3a9eb758d058888f7d374b76756ec1443c8d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215860
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Erasure and subtyping need to be handled before we're ready to
expose static interop classes.
Change-Id: Idf939ef196845e4e068276c326d3bfbec54fdd38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215012
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Adds @staticInterop annotation to allow users to declare static interop
classes. Also adds errors for erroneous usage of static interop
classes, like including instance members or using a non-static
supertype.
Change-Id: I21abafbf6ea6c2eb7cd0425f0a54c1ba35d6ec6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215010
Reviewed-by: Sigmund Cherem <sigmund@google.com>
These are the same diffing visualization used by heap snapshots.
TEST=examine "process memory" in Observatory
Change-Id: I927291fe5901589314504a0fe3f945b22b9a7e96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215641
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
pthread_setname_np ignores names that are too long rather than truncating. This was causing most dart:io threads to remain unnamed.
Cf. eec49f34c4.
TEST="thread info" in gdb
Change-Id: I12f47b06b81f1204f742d829e14784d792a4fb96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215800
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This change moves a lot of logic into `error_code_info.dart`. In a
follow-up CL I'll make use of this code to re-work
`verify_diagnostics_test.dart` and the code generator for the
analyzer's `diagnostics.md` file.
Change-Id: I0dca7d30a9def771f03c6a51d26335aeab1c964c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215662
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Fix typos in comments of Zone.bindUnaryCallback() and Zone.bindBinaryCallback()
Change-Id: I359bdd3623399fae163e57453b52e97039859392
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215700
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
We can't rely on GC to trigger the finalizer of a given test object,
so the previous liveness test was unreliable.
Instead we add an expect test to verify we generate the necessary
`reachabilityFence(..)`s to ensure liveness.
TEST=Adds expect.
Bug: https://github.com/dart-lang/sdk/issues/47362
Change-Id: Ia57a07522c8b8265b24780f00f3339b50534eb60
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-mac-release-arm64-try,vm-kernel-nnbd-mac-debug-x64-try,vm-kernel-mac-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215542
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
`DART_EXTERN` in `dart_api_dl.h` was missing `__declspec(dllexport)` on
Windows, causing `Dart_InitializeApiDL` to not be visible.
Using `DART_EXPORT` instead doesn't work because the definitions added
by `DART_API_ALL_DL_SYMBOLS` do not support having a 'used' attribute.
Instead, define a `DART_EXPORT_DL` for these which is identical but
without the 'used' attribute.
Note that the precompiler `DART_SHARED_LIB` macro must be defined for
`__declspec(dllexport)` to be part of `DART_EXPORT`/`DART_EXPORT_DL`.
Also fixes `#define DART_EXTERN_C` to be `extern` in C. Without this,
the linker will see duplicate symbols for things `DART_EXPORT`ed when
the `dart_api_dl.h` is included in C files.
TEST=SDK build on all OSes
Change-Id: I0af1d46d22409599203d9be310d54bd16c6a5b59
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,dart-sdk-win-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215550
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
All NamedTypeBuilder objects from user code contain the needed file uri
and char offset.
Change-Id: Ia067c5ef740967302aa207eaf2d46fc2f75c1c8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215600
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This became obsolete when we added separate exit stubs for each wrapper.
TEST=ci
Change-Id: Icf73452aebd20e00e16d0a75ffec877715c9e5c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215646
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Isolate.exit() message validation diverged from SendPort.send one, so this CL aligns them back.
Fixes https://github.com/dart-lang/sdk/issues/47373
TEST=sendandexit_test
Change-Id: I4c85933acb87a29892df5eb3cd2843e3207418b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215502
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Bug: b/195948110
`setAttribute` stringifies any non-string value. `setAttributeNS` is
also similarly modified for consistency.
Change-Id: I883516f5ed2c977cdc591b697594817378607e53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215621
Reviewed-by: Gary Roumanis <grouma@google.com>
Commit-Queue: Gary Roumanis <grouma@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Impact on CM:
Before(3a):
Serialized 1,224,950,828 bytes data to 520,676,411 bytes
Before(3b):
Compiled 1,745,627,239 bytes data to 425,409,433 characters
After(3a):
Serialized 1,224,950,828 bytes data to 350,134,862 bytes
After(3b):
Compiled 1,575,085,690 bytes data to 425,409,433 characters
Change-Id: Ie0247e33f7bcccd0492c3d209ad02dc947341098
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215480
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Previously this logic was duplicated in two separate locations,
`verify_diagnostics_test.dart` and the code generator for
`diagnostics.md`. Unifying it will pave the way for a follow-up CL in
which I intend to parse the documentation directly from the
`messages.yaml` files (rather than from comments in the analyzer
classes that are generated from those files).
I've also taken this opportunity to add some more checks to the
parsing logic, so that mistakes in the documentation (e.g. misspelling
a section header) will be reported as errors rather than causing a
silent loss of functionality.
Change-Id: Icfcb52229eb94bb06bc57334e265ef4d6db299de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215580
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
TEST=Makes iso-stress builder not run into issues during coredump archiving
Change-Id: I2998328f63759cf4c02d29e6480b3d8410730e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215548
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This change removes the extra pass over global object pool after AOT
snapshot is loaded by adding extra kSwitchableCallMissEntryPoint and
kMegamorphicCallEntryPoint object pool entry kinds which are handled
during ReadFill phase.
On a low-end phone and large Flutter app compiled in release mode
with dwarf_stack_traces, FullSnapshotReader::ReadProgramSnapshot time
Before: 232.41 ms
After: 202.43 ms (-12.8%)
Also, this change adds PrintTimeScope utility class which can be used
to measure and print time in release mode without timeline and profiling
tools:
ApiErrorPtr FullSnapshotReader::ReadProgramSnapshot() {
PrintTimeScope tm("FullSnapshotReader::ReadProgramSnapshot");
...
}
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/46116
Change-Id: I42bd46761eac8fc1e52ca695cacd2b86705034d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215500
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The code for parsing `%uri` directives requires them to use double
quotes. In a follow-up change I will be improving the error checking
around these directives, so this fix will prevent that CL from
provoking test failures.
Change-Id: I39353f5705442aafeb760c2912aec6c0217e18d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
NamedTypeBuilder is now created with a state that determines whether it
can validly be resolved to an instance type variable.
Change-Id: I1e7f5f8e05a5f68ec18a063476b6cda291a1aca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214643
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>