The comment makes it sound like a worthy exception type, but it is never
thrown or even instantiated.
Change-Id: Icc946250ed730a3eb61cdc39eed3dc68206e9663
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348083
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The current implementation externalizes and internalizes the Dart
value instead of adding a box and using a runtime-specific symbol.
This makes the implementation consistent with the JS backends.
Change-Id: Iefa382f742bc819b18dfe27ca33741b12473ee39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347222
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
* No need to give an extension a private name, without an explicit extension override. Just go unnamed.
* Co-locate the two extensions on `AstNode` and on AstNode?` in analyzer package.
* Combine two linter extensions on the same type, `AstNode?`.
Change-Id: I88fef7d5b85bb04bf7263af3810a1c8c3b35f541
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347652
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
The initial global evaluation support only worked when the open script was loaded into the VM as a `file:///` URI (eg. things in a `bin/` folder, and not a `lib/` folder). This is because we short-cut resolving file paths to `package:` URIs for most VM functionality (for example setting breakpoints) because it's unnecessary (the VM supports setting breakpoints with file:/// URIs even for `lib/`).
This change forces us to resolve paths to their resolved URIs (eg. `package:` where applicable) in the case where we're looking up a script for global evaluation.
We could enable this lookup for all cases (to remove the additional `force` flag here), but since it's called much more from the other path (breakpoints) we should add caching (which was more than I wanted to change for this fix).
Fixes https://github.com/Dart-Code/Dart-Code/issues/4932
Change-Id: I57a99ec3b7c726d9d120e6cda7d0b938fec397bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346400
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
And add a bit to our style doc about naming of extensions.
Change-Id: I22dd05dfe08b46ae38cc200456eb008e02eb002f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347782
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
The google3 CL landed, so this CL might work.
Change-Id: I5ed108f7a2dd00d3fe581a6a9f8647fd900e40bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347648
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
The updates the expectation tests to use * instead of line/column number
for sdk messages.
Change-Id: I882abe6e3b1d88238d87a71d655ca9807869592c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347901
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
This updates the processing of macro generated augmentation libraries
to add library dependencies of the augmentation libraries to the
emitted library.
Change-Id: Ibc06a3c309fb3cfc8eb1f02beda637dfd9a3ea62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347601
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Now that dart2js only takes migrated files as input, all tests should
use the current language version.
Change-Id: I6c84850f5786aeac04154b67bd7a3c19083c8bba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345344
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Clear local caches storing const values in each module.
Change-Id: I7766e92df6b8d1f91bad5fbb2addb8ace7763646
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347220
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Change-Id: I4b847f20e53ba57012a412e0099a6310fdc9c6d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
This method takes advantage of a class, PatternCaseExpression, which
was only introduced for the method. The class should not be made
private, as it is returned by the method, to code outside the library. However, since patternOfBoolCondition is only used by one correction producer, I think it is more pragmatic to just inline it into that producer.
We can remove the need for the PatternCaseExpression class, as it can easily be replaced by a record. I think this change nicely simplifies both ConvertToSwitchStatement, and the correction/util.dart library.
Change-Id: If630994ce74451047c5ce5cccd2641475121a94b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347781
Auto-Submit: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
These fences were added before we decided that (1) `NativeFinalizer`s
are only attached to `Finalizable`s and (2) `Finalizer`s do not have
a guarantee against premature finalization.
Now that we're inlining, we should avoid allocating the `Pointer`
object.
TEST=Should be a no-op, running a bunch of bots just in case.
Closes: https://github.com/dart-lang/sdk/issues/54680
Change-Id: I3b2702d910c8ed53a3f3fcbf0e6f437d1b8026c5
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-aot-win-debug-arm64-try,vm-aot-win-debug-x64-try,vm-aot-win-debug-x64c-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347740
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Change-Id: Idca54c94a583d688e3f2470f1e062e9f44f0d131
CoreLibraryReviewExempt: doc only change to the web libraries
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347387
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
This logic ends up unused as the CFE was updated to report the relevant errors in language versions before 3.0. With a language version of 3.0 or greater, they aren't relevant.
Change-Id: Ie14849f1d5be7588dd0093e10a1a9b8a967669d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346720
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
This fixes resolution of metadata in library augmentations, and brings
us a step closer to supporting JsonSerializable.
Change-Id: I8874540cb020a40f551d72b842f1e75f2d3ad118
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347424
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This test was written to validate correctness of the web
implementation of `dart:isolates`, back when it was supported.
Today, this API is unsupported in both dart2js and DDC. The test was
consistently failing in DDC and skipped in dart2js. We don't believe
it's valuable to continue running this test at this moment.
Change-Id: I578533b09c4172daf3f49fcc528ccb2cebebb53d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347642
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Previously they were built with TARGET_OS_FUCHSIA regardless of target OS.
TEST=ci
Change-Id: I53e95bb61c3926334e861ed56ceb3ea018e7bf1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347202
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
It caused race condition via async nature of DAS and AnalysisDriver.
My understanding of the scenario:
1. We started fulling AD with files.
2. We set `priorityFiles`, this notifies the scheduler.
3. We add Dart files to AD.
4. We do something async, this allows the scheduler to ask AD
to takes the next file, and start analyzing it.
5. We run transitionToAnalyzingToIdleIfNoFilesToAnalyze(), it sees
there there are no files _to_ analyze (the only file is _being_
analyzed). So, it turns analysis on/off.
6. DAS sends "analysis: done", `dart analyze` says, I'm done, no errors.
7. AD ends analysis of the file, report errors. Too late.
I believe we don't need this (hackish) method anymore.
1. We switch to analysis status with `priorityFiles`, for good or bad.
2. We are more aggressive now to switch status on/off.
Bug: https://github.com/flutter/flutter/issues/141873
Change-Id: If4e8b74ebdce33b173a686a7b87d14368dfc175d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/347421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>