- Skip stdio_newline_test in AOT mode
- Fix capture_stdio_test and dds_stdout_stderr_history tests under the
observatory directory to account for the new line fix.
TEST=ci
Bug:54641
Change-Id: Ic5403ab30a1367e4ec9e6798545837813f8f1060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346685
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
SuspendState changes shape on suspend and resume as new PCs change which StackMap is used to interpret the saved frame area. Shape changes are not compatible with concurrent marking because they can cause the concurrent marker to misinterpret a non-pointer as a pointer.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/54410
Change-Id: I5ec35b812a4e94a2bae2628a8914f6d05116dbc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346620
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
For addFile(), changeFile(), getResolvedLibrary(), getResolvedUnit()
These should cover the main need of DAS, and IDE integration.
Change-Id: Ie711ceaec7dd4fa4a5f8f8f51b9ddc3ff0b418d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346582
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Since we already cache instantiation of type argument vectors to avoid
runtime calls as long as the cache has room, remove the default
type arguments field from Closure objects. Instead, just perform any
needed instantiation when the default type arguments are needed
using the instantiator and parent function type arguments stored
in the closure.
Also rename DefaultTypeArgumentsKind to InstantiationMode and
generalize the calculations to determine how to instantiate default
type arguments to an operation that can be performed on type arguments
in general.
TEST=ci
Fixes: https://github.com/dart-lang/sdk/issues/54589
Issue: https://github.com/dart-lang/sdk/issues/54564
Change-Id: I704ea4244fb10cbc08175629c8e92cf05b8aabea
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-release-arm64-try,vm-aot-linux-release-x64-try,vm-aot-tsan-linux-release-x64-try,vm-tsan-linux-release-x64-try,vm-aot-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346021
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This reverts commit 66d3eedb33.
Reason for revert: breaks google3 (b/320642692)
Original change's description:
> [vm/aot/tfa] Analyze function calls
>
> This change adds analysis of function calls when closure target
> of a call can be inferred. Local functions are now analyzed separately
> from enclosing members. Inferred result type of function calls is now
> used in the AOT compiler.
>
> Time of AOT compilation step 2 (TFA) on a large Flutter application:
> Before: 59.448s
> After: 61.870s (+4%)
>
> Maintaining hierarchy of function types and analysis of all function
> calls is not feasible as it causes unbearable increase in AOT
> compilation time.
>
> TEST=existing
> Issue: https://github.com/dart-lang/sdk/issues/39692
>
> Change-Id: Ieb4d5dce23868b5ab5c87fa1e77e49b85fd656fe
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345083
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
Issue: https://github.com/dart-lang/sdk/issues/39692
Change-Id: Ieb9104f4263e19ef9e5bd749e935f6c2dbec3046
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346780
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Removes:
FIELD_INITIALIZER_IN_STRUCT
FIELD_IN_STRUCT_WITH_INITIALIZER
These are not reported anymore.
Change-Id: I0e96ad2804750d315e2ffd75205464b6f7751dca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345830
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This is a slight refactor that should not change any behaviour extracted to make a future CL smaller. It:
1. replaces the previous `dartFiles` filter that was specifically for the `file://` scheme with a `List` that can be added to in future.
2. wraps calls to pathContext.fromUri() and pathContext.toUri() in all LSP server to go through a new class (`ClientUriConverter`) that will be extended to support mapping between to custom URI schemes (instead of `file:///`) for generated files.
Change-Id: Ie8eadcca3cfd708e4dfde07c22d411101cc9ca0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346540
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
This change adds analysis of function calls when closure target
of a call can be inferred. Local functions are now analyzed separately
from enclosing members. Inferred result type of function calls is now
used in the AOT compiler.
Time of AOT compilation step 2 (TFA) on a large Flutter application:
Before: 59.448s
After: 61.870s (+4%)
Maintaining hierarchy of function types and analysis of all function
calls is not feasible as it causes unbearable increase in AOT
compilation time.
TEST=existing
Issue: https://github.com/dart-lang/sdk/issues/39692
Change-Id: Ieb4d5dce23868b5ab5c87fa1e77e49b85fd656fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345083
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Acquire reload opreation scope when deoptimizing the world to ensure locks can be acquired for compilation.
Set up scope for operations that can be run while the world is deoptimized and stopped to avoid races.
Ensure code stays unoptizimed when single stepping, prevent other isolates to reoptimize it.
TEST=DeoptimizeFramesWhenSettingBreakpoint
BUG=https://github.com/flutter/flutter/issues/140878
Change-Id: Id4c891bd585d42365fd3a60cfb9a4869892c2b03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345743
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
I didn't add this exception to the documentation as it's pretty niche and I'm afraid it might detract from the goal of the lint. Happy to add something if you think it's worth while though :)
Bug reference: https://github.com/dart-lang/sdk/issues/54611
Change-Id: I977be945208aee285f7bb44f73f7953b0646dc14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346100
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Parker Lougheed <parlough@gmail.com>
Also remove 'onlyCrashes' option which was only used there.
Change-Id: Iba1486058d561284d71aabf13431f302e7c5b9b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346520
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The refactoring in https://dart-review.googlesource.com/c/sdk/+/345002
erroneously assumed that if the caller to
Assembler::AddressCanHoldConstantIndex didn't pass an out parameter to
detect whether a base register was needed, that that case shouldn't be
considered.
While it's true that LoadIndexedInstr::MakeLocationSummary originally
ignored the value stored in the out parameter, it did that because it
can use TMP to store the array base, unlike the code for
StoreIndexedInstr which must have a temporary register allocated during
register allocation.
Thus, fix Assembler::AddressCanHoldConstantIndex to always require
the out parameter, and add a comment in LoadIndexedInstr as to why
we ignore the out parameter in this case instead of allocating an
additional temporary register.
TEST=vm/cc/Assembler_Regress54621
Fixes: https://github.com/dart-lang/sdk/issues/54621
Change-Id: I0af557565faf657a87641457884334446e9b7cc5
Cq-Include-Trybots: luci.dart.try:vm-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346201
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
The file doesn't seem to have field promotion enabled in g3.
Change-Id: I1eafd191064fa24e62f60b7d29bb7468f55cfceb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346460
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This moves the hoisted declaration of pattern variables till after the
variable cache declarations, such that any use of variables in the
matched expression, shadowed by the pattern variables, occurs before the
declaration of the shadowing variables.
Closes#54559
Change-Id: Id8ca8e7a499b9d71a50cd9987808d159f26bbd24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345942
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
In order for CorrectionProducers to be used in analyzer plugins, we
need to access DartFixContributor which needs to compute fixes via
FixProcessor. So both DartFixContributor and FixProcessor need to be
moved into analyzer_plugin (eventually). For now, to support
prototyping, I am moving FixProcessor to its own library, and
separating all of the built in mappings (from diagnostic to producer
generators).
I think this separation actually stands on its own as being tidier,
simplifying fix_internal.dart, and separating code from data, as it
were.
Work towards https://github.com/dart-lang/sdk/issues/53402
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try
Change-Id: I3b4fadc7ed94c23597d72bef7dcd832380d34e9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345561
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
`lub` was implemented twice (once as `lub` and once as `_lub`), with
some behaviors implemented in each, and other behaviors not
implemented. This was good enough to make unit tests pass, but for
long term maintainability, it's better to have a single unified
implementation.
The unified implementation makes use of `promoteToNonNull`, which had
a subtle bug: it interpreted the unknown type `?` as a nullable type
and tried to convert it to ``. That bug has now been fixed.
Change-Id: If257a446e46f916843fe0ff95b6bc48c6c820d93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346421
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
According to the patterns spec
(https://github.com/dart-lang/language/blob/main/accepted/3.0/patterns/feature-specification.md),
if `A` is the type of the formal parameter of the operator
declaration, then operand should be type checked with context type
`A?` when op is `==` or `!=`, and with context type `A` otherwise.
Prior to this commit, context type `A` was always used.
There should be no observable behavior difference, because the operand
of a relational operator is required to be a constant expression, and
there is no constant expression that behaves differently when its
context is `A?` vs `A`.
However, we are contemplating some possible future language changes
that *would* make the difference observable (e.g.,
https://github.com/dart-lang/language/issues/3471), so it seems
prudent to fix the behavior to match the spec.
Change-Id: Ib3a1c82de45c65a851cbd613899ba1f72c215fbe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346420
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Allows the builds to be run with non-default arguments, for example:
dart tools/run_offsets_extractor.dart --no-rbe
Change-Id: I1299b156a40baab27db890c0b0ae5f2f945c4259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346361
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Additionally, fix the textual representation of nullable named type
builders without type arguments. Before the fix the nullability marker
was skipped on them.
Closes https://github.com/dart-lang/sdk/issues/54553
Change-Id: I137d60ec3325be6fc9b6371ec0d6af2c5c956239
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346300
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>