The PluginServer class needs access to AssistProcessor in order to
compute assists. That class needs access to a few other classes, which
then must also be moved:
* assist_core.dart - the Assist class
* assist_dart.dart - the DartAssistContext class
* assist_generators.dart - the registeredAssistGenerators variable
* assist_performance.dart - the AssistPerformance and
GetAssistsPerformance classes
* assist_processor.dart - the AssistProcessor class with it's
singular API, `compute()`
* performance.dart - the ProducerRequestPerformance class
* the `addCaretAtOffset` helper function, refactored into a
`withCaretAt` extension method
This change is functionally a no-op.
Change-Id: Ic883d21e9cc8c3db1f6093f830f01ec6eb9a0976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
TFA tree shaker removes initializers of fields which cannot be accessed
but retained due to an entry point pragma / dynamic interface.
For late final fields with initializers that changes semantics as
late final fields without initializers have an implicit setter.
Such setter is not accounted in the kernel AST
(Field.setterReference == null and Field.hasSetter == false) and
it doesn't get an assigned selector id, which causes a crash in
dispatch table generator.
The change fixes this bug by retaining initializers for late final
fields. The initializer code is still replaced with
throw "Attempt to execute code removed by Dart AOT compiler (TFA)".
TEST=pkg/vm/testcases/transformations/type_flow/transformer/regress_b404559785.dart
Bug: b/404559785
Change-Id: Id998a715ea75a4768414997ce66bcdd1d4f19189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416720
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The "new" rti library has been standard for years now and no one should
be passing `--experiment-new-rti` or `--use-old-rti`. We can now clean
up any references to different versions of rtis.
Change-Id: I4421b8943fe5034ed4d259477e8112b25ba0c763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416326
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
The getter `SharedType.nullabilitySuffix` is replaced by
`SharedType.isQuestionType`, which returns a boolean.
The method `TypeAnalyzerOperations.withNullabilitySuffixInternal` is
replaced by `SharedType.setNullabilitySuffix`, which accepts a
boolean.
Support for `*` types has been removed from `mini_types.dart`.
A few test cases in `flow_analysis_test.dart` previously used `*`
types as a way of exercising corner cases involving types that were
mutual subtypes of each other. These tests have been changed to take
advantage of the fact that `dynamic` and `Object?` are mutual
subtypes.
Change-Id: Id9904f9570fc738b388192db8536848204af03e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414581
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
LongDeoptTask: MarkAndNotify(kFinishedDeoptOperation)
main: MarkAndNotify(kPleaseExit)
If main wins, LongDeoptTask will override the state and wait for a kPleaseExit that will never come.
TEST=ci
Change-Id: I2f29da2fca980ca8f2b3c42477c4e793d7379af4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416381
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Parse and build dot shorthand invocations that are constant.
Added a new listener to handle and store the const-ness. It didn't feel right re-using any of the other `beginConstPattern` methods.
Added an error message if invoking a non-const constructor where we expected a const constructor.
Bug: https://github.com/dart-lang/sdk/issues/59758
Change-Id: I8551e3b8f71e89a69d090510bb64694d5e09247d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/414660
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Transform factory calls to default map and set classes to the
constructor calls to the classes to improve kernel.
Also remove some redundant null checks in VM's transformer.
`source_map_simple_optimized_test.dart` is updated: with improved kernel
wasm-opt now eliminates the `testMain` function, so the stack trace
doesn't mention it.
Fixes https://github.com/dart-lang/sdk/issues/60343.
Tested: minor refactoring in VM doesn't need testing. Wasm tested with
existing tests.
Change-Id: Ie448d1374ff0e1b278859f22bc250899e0e4cfd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416640
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
The change at https://dart-review.googlesource.com/c/sdk/+/410760 to fix a race incorrectly assumed that once we had handled startup for a thread, we would never need to send an automatic resume again. However this was not the case - after a hot reload, we need to resume the thread even though we had technically already handled startup.
This is essentially a partial revert of 84e6ed0784, with a test to verify we trigger readyToResume on PausePostRequest.
Change-Id: I1e171043f04f38dd6f52e1692d9257d34e5248be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416580
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
In preparation for the `@awaitNotRequired` annotation, I looked into
the implementation of this rule, and changed the documentation to be
more specific about the very specific situations in which lints are
reported (there are only three). This should alleviate issues like
https://github.com/dart-lang/sdk/issues/60006.
I also added some test cases that will be useful in exploring what the
new annotation will be able to suppress.
Change-Id: Iea3a90b6c79df4b8eee7c33063780b3cf0298109
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415780
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Don't split the `--extra-compiler-option` values by commas, to allow
passing `-D`/`--define` flags like `-DFOO=a, b` as one argument.
Fixes the dart2wasm failure in #60346.
Change-Id: I9c621f93d4bcd4e35926e495735c8d15a3bac212
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416581
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Dart_Cleanup waited only for the isolate group to be unregistered, which happens before the group's heap is deleted.
TEST=tsan
Change-Id: I20046516635adbcbf63eae460d7b09e7e26169d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/416283
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This ensures we exercise the `<app>.support.js` code in our tests and
also catch it if a browser doesn't support what's needed (e.g. running
tests on Safari with `js-string` builtin)
Change-Id: Ib8874231d3aa82b598e0e206a2e27cb66775bbec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415882
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
This change means that during `dart analyze`, an exception caught in a plugin isolate will be printed to the terminal, and the process will
exit (similar to the support for when the isolate has static errors).
Change-Id: I31b1ebe7a71a331274d4f1dc1ea1b94f33e2329b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/415981
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>