We set them during linking, so for consistency and to keep the same
expectations for linking and loaded elements tests, we need to
store and read them.
Change-Id: I8de88e2dbf4e08eee2d654b27f7cb548ffb7f1be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202161
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This is a necessary step to keep linking elements without loading
from bytes.
Change-Id: I7bc8bdc0b10e178ab46d15e288a76eb3d732891f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
* Adds a couple of arrow function and method tests
* Does not add support for method interpolation (like in DDC).
Change-Id: I73ccbbf2907611dae6f1720f7933e3469d4eb9b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198883
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This feature is gated behind the --experiment-late-instance-variables
flag.
Change-Id: I1ecb2d4d960b58204207ea055361463efa3a0bcb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200922
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
- enable and fix other lints as well
- Split up generated code into part file - less boilerplate
- Clean up exception checks
Change-Id: I6d8e0753b496356e3c001b9d0b902131d7d03c20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202142
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Token position and script reference information are cheap to provide and
make it possible to tie objects to scripts without requiring additional
requests for full objects.
TEST=Existing
Change-Id: I917714149a72a53081fee5626ccad858e86f5313
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201864
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This is a reland of 7af28d8274
Original change's description:
> [dart2js] Only emit holders into a part file if they are used.
>
> Change-Id: Ie1eb4dcf71e30002e3030603f201e2b6a97d4182
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200483
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
Change-Id: I06966217925a7d17615c80a5534d58f5095e579b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201985
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Change-Id: I0b947240ba8b84e810fed61c238d1837ae4b8597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202067
Auto-Submit: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
We suggest user-defined identifier anywhere inside the first token, so I
think we should be consistent and suggest keywords there as well. As a
bonus, this will increase the accuracy of our completion metrics.
Change-Id: I88daf6b3b047ccfacd06cf25184d8bbbf42c682b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202064
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This starts the app paused, connects t the VM service and resumes. It handles dart:developer log() events, but no other debugging functionality yet (for ex. breakpoints, stepping).
Change-Id: Ib50680c775da5d13df95771eec62e77a4af75a08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201566
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Instead of explicitly listing certain subclasses in some places, instead
allow any AllocationInstr subclass and just reject certain subclasses if
necessary.
Code size different in Flutter gallery (release-sizeopt):
* ARM7: Total -0.12%, instructions -0.14%, readonly -0.11%
* ARM8: Total -0.12%, instructions -0.15%, readonly -0.09%
TEST=Current test suite.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try
Change-Id: I4ce42d7185d4b3a83356e5131a5835fa858c4882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201832
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
With this change, allocation instructions can now be direct inputs to
other allocation instructions, so the redundancy eliminator is extended
to handle this possibility.
Methods for working with instruction input-related slots are added to
subclasses of AllocationInstr, so that the redundancy eliminator can be
written more generically in places, instead of needing to add cases for
new allocation instructions and/or instruction inputs.
Code size different in Flutter gallery (release-sizeopt):
* ARM7: Total -0.30%, instructions -0.41%
* ARM8: Total -0.31%, instructions -0.47%
TEST=Current test suite.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try
Change-Id: Idc1aa2a1cb8c0c62f0bcb64aee89a7525dd3d1e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198406
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
The frontend is no longer capable of handling embedded scripts.
TEST=ci
Change-Id: Iea8bb45e701f29648ec2fe15f6be68c4561a6933
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201980
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
The new "constructor tearoffs" feature includes the ability to use the
`new` keyword in a place where an identifier is expected, and that
identifier could denote a constructor name. We handle this by
replacing the `new` keyword token with an identifier token whose
identifier string is `new` (this should ease the burden on the
implementations, since they are already set up to handle constructor
names that are identifiers).
Since all such situations follow a `.`, and `new` was never previously
allowed after a `.`, the parser treats `new` as an identifier in any
situation where it could possibly refer to a constructor, regardless
of whether the "constructor tearoffs" feature is enabled. (This
should allow for easier error recovery in the situation where the user
tries to use the feature with a language feature that does not support
it). It is up to the client to report an error if the feature is
disabled.
In this CL, I've implemented logic for the analyzer to choose whether
to report an error based on whether the feature is enabled. I've
implemented logic for the CFE to report the error unconditionally.
Bug: https://github.com/dart-lang/sdk/issues/46020, https://github.com/dart-lang/sdk/issues/46044
Change-Id: I36a496688400d2d9f699dd42be4d0ba620cda244
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201961
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This also fixes a bug in the completion metrics that I found while
adding the suggestion. The bug happens when an experiment causes a kind
of completion to be produced that wasn't produced before.
Change-Id: I244ae41161a9ff607c18273d0744f3cf27eb5caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202062
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This adds the providesSymbol method to DynamicLibrary. It returns
whether the library contains a function with the given name.
As per dlsym(3), it is valid for dlsym to return nullptr in a success
case if the symbol actually has a NULL value. So I've changed the logic
to check for dlerror() after we invoke dlsym(), both in the existing
lookup and in the new method.
Closes https://github.com/dart-lang/sdk/issues/46192
TEST=tests/ffi(_2)/has_symbol_test.dart
Change-Id: Ibcb1c051cc0cdd95a104fe86ef2fc76da5bafb5d
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-ffi-android-debug-arm-try,vm-kernel-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-mac-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201900
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
The test contained hardcoded line numbers that changed when the language
version comment was added[1].
[1] https://dart-review.googlesource.com/c/sdk/+/201564
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try
Change-Id: I2fda2b013a8ac3ee71dd98a6c243c00a5aeae823
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202040
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
* This adds a mac amd64 SDK as the arm64 SDK to bootstrap arm64
development on macOS.
Change-Id: I519e5ad2343360bc2e692b52d95c94076bfd9e87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201833
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
https://github.com/dart-lang/co19/issues/1090
TEST=Standard tryjobs, all changes are in test code only.
Change-Id: Ie73174447ab165827335652cf035f85b7510ab55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201564
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
There are two ways the test runner might want to parse and show errors
from analyzer:
1. When a static error test's output doesn't match the expected errors.
2. When a normal runtime test produces unexpected errors.
The former were correctly migrated over to parse and read the analyzer's
JSON output. The latter wasn't. It was still trying to parse the old
"|"-separated machine format.
Worse, when migrating to the new JSON output, a try-catch-block was
added to handle any unexpected errors. That had the unintended side
effect of silently catching this parse error and then continuing. The
end result is that if an analyzer test failed on a normal runtime test,
the test runner didn't print any of the analyzer errors. :(
This fixes that. It uses a single code path to parse the JSON output to
AnalyzerError. Then, for static error tests, it converts those to
StaticErrors.
Change-Id: I51c1277f0ed04faead82f579d668f8897f379a49
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201382
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
This reverts commit 7af28d8274.
Reason for revert: This breaks the angular goldens. This is a known breaking change, but because these tests are on the cbuild it breaks dart rolls into flutter. I will try and figure out a way to land this change less disruptively.
Original change's description:
> [dart2js] Only emit holders into a part file if they are used.
>
> Change-Id: Ie1eb4dcf71e30002e3030603f201e2b6a97d4182
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200483
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
TBR=sra@google.com,joshualitt@google.com
Change-Id: I19ac272c7eafc1172370b39baf4c2c0ec6ead540
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201984
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Now that we have an AST and visitor support for the FunctionReference
structure (which represents `Expression<TypeArguments>` for various
kinds of expressions), we no longer need to error recover this as a
FunctionExpressionInvocation with synthetic arguments. The resolver
still doesn't resolve the syntax properly, but that's ok because it's
not permitted in valid code (for now we just treat it as having type
`dynamic`).
Fixes#46150.
Change-Id: I357175cc16bcf2f9027be2e1da66bb6ca70a9400
Bug: https://github.com/dart-lang/sdk/issues/46020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199682
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>