These methods create new sets, whose implementation must match the
target platform. Thus, they should be specialized for the VM and
dart2wasm instead of being implemented in the shared mixin.
Change-Id: I102a45686e3eb373463f2fcdf84ee861e202ecc0
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258362
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Rename `_CompactLinkedHashSet` to `_InternalLinkedHashSet` and
`_CompactImmutableLinkedHashSet` to `_InternalImmutableLinkedHashSet`
to make the names consistent with the corresponding `Map` class names
and to distinguish them from the non-VM-specific hash maps and sets,
which are generally named starting with `_Compact`.
Tested: ci
Change-Id: Ic1ebc44ba8beba34ceab382a4edddc6624fe3fb3
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258002
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This should prevent new code using old syntax.
Change-Id: I0620369a34b3838fb4555f5264c93bccf92acc42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256213
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
This gets rid of some occurrences of `dynamic` and makes the
associated implicit conversions explicit.
Based on https://dart-review.googlesource.com/c/sdk/+/237582
Tested: ci
Change-Id: I7faeffab395c916800b29ea7e56bd3f7d15aac54
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258242
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Ensure that instructions that may throw and also have unknown side effects still load from all places.
Also since this optimization concerns AOT only, instructions that don't deopt but may throw(and don't have unknown side effects), still only load escaping stores.
Follow-up to 88fc8b65d2.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/49657
Change-Id: I55b1347badcd74b4c334bb7b37571e91ebb310a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258440
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Visitor support is underway.
Change-Id: If4e54515650d21a202635973e2ce63b686bb98f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258400
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I270c6fa43f53cda0816dfb63f2379302c2cfda0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258322
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
The fragment emitter already tries to skip the call to `addRules` if the
ruleset is empty, but this occurs too early. The ruleset encoder strips
tautologies like `T <: T` and `InterfaceType <: Object`, but this occurs
after the empty check.
This CL removes the preprocessing from the encoder and instead performs
checks when entries are added to the ruleset, fixing the issue.
Change-Id: I62f937e0ff6abac12973f82b2c89d8ea6f3162b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258040
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
I believe that this is a change we had wanted to make but that I forgot
about until after I'd committed the earlier CL. If that's not the case,
please let me know.
Change-Id: Ida7c70f8b6f5c7e8c2369fd7b709c68ce4322ca1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Because the value type is dynamic, I noticed use sites passing in
`Map<String, String?>`. After inspecting the implementation, it looks
like this is by design: `writeParameter` in `_makeQuery` takes a
nullable value.
This CL updates the documented type to reflect this.
Change-Id: I7b6f1c4a59ec44282e5e8b4ada86becafb308d30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258240
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Update the documentation for TypeAnalyzer and related classes so that
they explain the behavior of each method in terms of its effect on a
stack. (The test logic already contained an implementation of such a
stack; production clients may or may not need to keep a stack
depending on their requirements). This should make it more
straightforward to write clients of TypeAnalyzer.
Also, beef up the test logic in flow_analysis_mini_ast.dart and so that:
- In the event of a test error, a source location is shown, so that
it's easy to debug and/or update the test. This source location is
obtained by parsing `StackTrace.current`, an approach which I
wouldn't recommend for production code, but which is servicable for
these low-level tests.
- Items that are popped off the stack are checked to make sure they
have the expected kind.
The kind-checking caught a minor flaw in the previous test logic: it
was failing to distinguish expressions from expression statements.
This as been corrected, and as a result, a few test expectations in
type_inference_test.dart needed to be updated.
Change-Id: I0a2b257f6e970478c0c8e1b663dd5a367e7f24ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257486
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Implementation classes will follow after the interfaces have been
finalized, with visitor support following that.
Change-Id: I27e9c12bf299677faa743097869319dc568ad48a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257922
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
In order to compute type, ParameterInstr::ComputeType() uses
environment index to get a LocalVariable from LocalScope,
assuming that environment index matches a variable index in the scope.
This is only true for direct parameters (which are not copied in
prologue).
This change limits use of LocalVariable type for ParameterInstr
corresponding to direct parameters. Note that it only affects
Parameter instructions used in catch block entries, as
ParameterInstr in function entry always corresponds to a direct
parameter.
TEST=runtime/tests/vm/dart/regress_flutter110715_il_test.dart
Fixes https://github.com/flutter/flutter/issues/110715
Change-Id: I68d423860928d7e65143844522e3006d9ccfcf66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257441
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
It's possible the browser has been closed but is in the SSE timeout period and therefore looks active. Ping it to see if it's actually responsive before deciding whether to reuse it or launch a new window.
Fixes https://github.com/Dart-Code/Dart-Code/issues/3966.
Change-Id: I2fdcba036b8b63f7ab974e8fef5dd565c2917b64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257581
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
* Move parsing functions to static methods of the classes that
represent the data being parsed.
* Move calculations for adjusting offsets in load commands into the
corresponding classes.
* Make function to insert a new payload segment an instance method
of MachOFile.
* Remove unnecessary abstractions and definitions for MachO load
commands that we don't need to parse.
These refactorings are being done to make later changes easier to
review, by first lifting the initial refactorings out into a
separate CL.
Issue: https://github.com/dart-lang/sdk/issues/49783
Change-Id: I133eb368cbb9ee0d8e4f3998ba1a0bbe8555b8aa
Cq-Include-Trybots: luci.dart.try:analyzer-mac-release-try,dart-sdk-mac-arm64-try,dart-sdk-mac-try,pkg-mac-release-arm64-try,pkg-mac-release-try,vm-kernel-precomp-mac-product-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256821
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Change-Id: If6ccea08ccd27d0ed001892e2d170ca042b40f47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257062
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
`testConfigurations` expects at least one configuration, so avoid
calling it when there are no configurations.
This fixes the unhandled exception with `test_runner.dart --help`:
```
No build targets found.
Unhandled exception:
RangeError (index): Invalid value: Valid value range is empty: 0
<asynchronous suspension>
```
With this commit, `--help` just prints "No build targets found" and
exits with 0.
This crash was previously fixed in
02a0396f74.
Change-Id: Id82c83f66871c4e811a7502f1e831a0592db2065
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257580
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>