The agnostic mode was added to allow the platform dill embedded in
the VM to support both weak and strong mode. Since weak mode is no
longer supported in the VM, the agnostic mode can new be deleted.
All uses of the agnostic in Dart and Flutter have been removed prior
to this change.
Change-Id: Iff0f69d9cd64e887e01cd7e7d336a97761bd6d4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366801
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
No client of the VM uses this flag, only tests, and this flag was always
set to false in AOT mode. Thus, remove uses of this flag and instead
always lazily create dispatchers as needed when resolving method names
in JIT mode.
Remove the implicit value of `allow_add` for some Resolver
static methods. For callers that previously depended on the implicit
`true` value (which includes the AOT precompilier), pass `true` for
uses in the compiler and pass `!FLAG_precompiled_mode` for uses in the
runtime. Assert that `allow_add` is false when these methods are invoked
from the precompiled runtime.
Remove Resolver static methods that are no longer used.
TEST=ci
Change-Id: Ib6a7354f7a859e86743c381513a4129c14895753
Cq-Include-Trybots: luci.dart.try:vm-linux-debug-x64-try,vm-linux-release-x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-release-x64-try,vm-aot-mac-release-arm64-try,vm-mac-debug-arm64-try,vm-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366668
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
In the backend, handle the following cases that were assumed not to
happen before:
* If the index and offset are both 0, then the operation is a no-op
and so the output register should be the same as the first input.
(Should only happen if the instruction is used in a non-optimizing
context, as otherwise it is removed by canonicalization.)
* If the scaled index can be used as an instruction immediate and the
offset is 0, then emit the appropriate instruction(s).
* If the scaled index and offset can both be used as immediates to
instructions, but their sum (the total offset in bytes) cannot, then
allocate a register for the index and fall back to the non-constant
index case.
CalculateElementAddress::Canonicalize now only performs removal of
no-op instructions.
This CL also fixes a switch on the instruction tag in
FlowGraph::RenameRecursive to appropriately convert UnboxedConstant
instructions to initial definitions of the FlowGraph as it already does
for Constant instructions.
TEST=vm/dart/regress_55877
Issue: https://github.com/dart-lang/sdk/issues/55877
Cq-Include-Trybots: luci.dart.try:vm-aot-linux-debug-simarm_x64-try,vm-aot-linux-debug-simriscv64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-linux-debug-simriscv64-try,vm-mac-debug-arm64-try,vm-aot-mac-release-arm64-try
Change-Id: I613d6c8770fe02facf6bbdb3d2b11f842b51540d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369642
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
I plan using it to implement serialization of MacroExecutionResult(s).
Bug: https://github.com/dart-lang/language/issues/3877
Change-Id: I34d95ab6fd2c335ceb2a957c9222947b85e986a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369841
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This CL doesn't set up the analyzer to surface links to these destinations, just includes the new format in the diagnostic messages file.
Change-Id: I6c227448b42a5abac53d5c6a863e599c7e8809da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Marya Belanger <mbelanger@google.com>
- use the new RelevanceComputer to compute relevance for CandidateSuggestion's before calling into the SuggestionBuilder, as
part of the new flow for completions.
- reuse the RelevanceComputer where possible in SuggestionBuilder.
Change-Id: I8fdfaee81e68bc66f726c40a76ab6c81099a2cc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Late local variables are lowered by the CFE into a local:
* backing store variable
* get method
* set method
* isSet local variable (optionally when the type is nullable)
This change updates the name in JavaScript used for the backing store
variable to match the name for the late variable from the original
source. It also updates the scope information passed for expression
evaluation to remove the lowered name and replace it with the original
so evaluations will work as well.
The name change avoids the hiding performed by the debugger on
recognized temporary names so it appears in the list of local variables.
b/343405209
Issue: See https://github.com/dart-lang/sdk/issues/55918
Change-Id: I6b65a62baf6f26f6e9cfee9f14667d021e16645e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369506
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Work towards https://github.com/dart-lang/dartdoc/issues/3761
Sibling CL to https://dart-review.googlesource.com/c/sdk/+/365204
The analyzer has never recognized `[this]` as a valid doc comment
reference (and the `comment_references` lint rule has similarly
reported such reference attempts). dartdoc has its own algorithms
for resolving comment references, which we are dismantling in favor
of a single resolution, provided by the analyzer.
We've also decided against adding support in the analyzer (see
https://github.com/dart-lang/linter/issues/2079), so these
reference attempts should be re-written.
Change-Id: I872c215a574dc3d04f0708387408d22fdfd14c14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366882
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
This package was moved to third_party but the URL here was not updated so the link on Pub is a 404.
This will need a new Pub release before it updates, but I'm not sure it's worth doing until there are some changes.
Change-Id: Ibd1e4ba0208f13f27e1e04ba141e8a78155bd2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369700
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Helin Shiah <helinx@google.com>
Commit-Queue: Elliott Brooks <elliottbrooks@google.com>
Well, to be honest, remove all instances of Group. Instead, "groups"
are Strings. Because there was only one field left, a Group is just
a... name of a group.
Also, LintRule is no longer Comparable because that does not seem to
have served a purpose...
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I6e058139631dc1b06a4072a2549f156d1622c673
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369782
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
* Remove unused LinterException, Reporter, PrintingReporter.
* Mark Hyperlink as visible-for-testing, and make 3 fields private.
* Make the LinterConstantEvaluationResult constructor private.
* Make LinterContextParsedImpl.package a getter
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: Ib403fb7744e9454742d6555c8cdb8764ab4377be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369781
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Also update the coverage test so that it prints detailed results to
standard output, so that the repro instructions will produce a useful
result.
In my experiments, I've found that the number supplied for the
`--tasks` argument can have a small effect on coverage numbers (though
I'm not sure why), so I've included it in the repro instructions.
Change-Id: Ic347a9e5e3c2da0f73ceefbaa9322a60295735d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/368920
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Index checks in debug mode are useful to catch bugs earlier.
Also remove stale declaration of PcDescriptors::PrintHeaderString.
TEST=ci
Change-Id: I4a149c3516a6627b3d4d254b9b7eed403f8aea1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369721
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
And rename it to TestLinter.
We also get to remove `LintRule._locationInfo`,which was _only_ used
for testing pubspec-oriented rules.
This DartLinter class is only used in tests and tools of the linter
package, so it's good to move it out of analyzer lib/.
In order to remove `LintRule._locationInfo`, we move the singular
package_names test case to be a reflective test.
Cq-Include-Trybots: luci.dart.try:flutter-analyze-try,analyzer-win-release-try,pkg-win-release-try
Change-Id: I97b5e79daa07eb3942f5444502473a4ec1e9daf0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369562
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
PatternAssignment is a strange expression that syntactcally can have
declared variables inside.
Bug: https://github.com/dart-lang/sdk/issues/52363
Change-Id: Id6132be26581112941b7b4828c8e232143ed59b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369505
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
As discussed, remove dedicated wildcard experiment test classes in favor of language versioning exceptions.
Change-Id: I415485b42b6c356d6beec9203dcb7d838e341399
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369509
Auto-Submit: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
TEST=verified that
pkg/vm_service/test/breakpoint_resolves_immediately_in_compiled_field_initializer_test.dart
fails without the changes in this CL and passes with them, verified that
none of the existing debugger tests got broken by this CL
Change-Id: I6acb5576a80e5d633b012c866fe90bf13d2c1ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369162
Commit-Queue: Derek Xu <derekx@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Instead of hand-written assembly to instantiate various different kinds
of type constants, we simply lower type constants to `InstanceConstant`s
for which we already have code generation.
This lowering also means that types that are considered to be different
on the kernel `DartType` level may end up being lowered to the same
`InstanceConstant`.
=> We canonicalize them now where we didn't before
=> We reduce code size.
An example where this happens the `TypeParameterType`: On the kernel
level two such types are different if they refer to a different class.
But in the RTT data structure we do not care about what class they refer
to, only the index is important (as RTT knows which class it belongs
to).
Issue https://github.com/dart-lang/sdk/issues/55516
Change-Id: I7ebd68b2c48c752f6d074a7981da75fbbfbcf00f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369480
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
When checking against a destination type that isn't generic, we can
safely ignore the type arguments of the concrete class (as we only care
whether the object's class has the destination type in its transitive
super type hierarchy).
=> Avoid calling `Object._getTypeArguments(o)` if dst type is non-generic.
Issue https://github.com/dart-lang/sdk/issues/55516
Change-Id: Ie9c6a3ab2d99acc07546f9d28ca71ac740c4aad5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369462
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This makes it more consistent with other listener calls.
Change-Id: Iae98ae4c37078c15ea785faef1cb21b2ea85bb48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369060
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
If we do a type check against a class that isn't generic, then we can
safely ignore all the type arguments - because irrespective of their
values - either the class we test against is in the transitive super
hierarchy of an object's class or not.
Issue https://github.com/dart-lang/sdk/issues/55516
Change-Id: Ibf6950492d4c33d7eaf55d6ce8389ebfac201b00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/369461
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>