These mixin constructors are now marked callable by the dynamic interface annotator: https://dart-review.googlesource.com/c/sdk/+/430002
However, they are not directly invokeable and trying to compile the constructor entrypoints causes dart2wasm to crash. So we explicitly skip them when considering dynamic callable constructors.
Note: This is blocking internal rolls as code patterns like this show up in our internal codebase.
Change-Id: I76383aec07bc53a0dbd1581c0577cba370d956f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430801
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
For a few months the "original" flutter gallery has had compile errors
and the weekly bot has been a lot slower (and doesn't really test the
default "advanced invalidation").
This updates the compile target to the one in
flutter/dev/integration_tests/new_gallery which doesn't have compile
time errors.
Change-Id: I59aa701700bc6b3530d73d9c0474dbff525288c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430700
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
This CL includes changes to BenchMaker and test type parser that
include recent developments in the DartType system, such as extension
types and record types, outstanding existing features, such as
typedefs, and recent changes in the CFE type model, such as structural
parameters.
Change-Id: I16ca13273e83de7942abad67b8a2b67146fb24bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430661
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This combines the creation SourcePropertyBuilder for fields, getters,
setters, enum elements and primary constructor fields through the same
method.
This prepares for combining getter/setter and final field/setter
pairs in the same SourcePropertyBuilder.
Change-Id: I664ccded46c79235281cbd0799f9567bfb451eb2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430440
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
We add the `dart.tool.dart2wasm.minify` environment define (analogous to
how dart2js exposes `dart.tool.dart2js.minify`).
We make `package:expect/variations.dart` then expose to tests what
guarantees they can assume, namely
* `readableTypeStrings`
* `preciseErrorsWithDetails`
Change-Id: I43da09ed924ca9137721f4d70b7a494e01bf36e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430680
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Make the `HInstruction.sideEffects` field final. The instruction owns
the mutable SideEffects objects so it would be dangerous to make the
field reference a shared SideEffects object.
Update the side effects of an interface call when the target becomes
known. We were essentially missing any benefit of inferred
side-effects for instance members.
Change-Id: I46da1d87e166864cd7fa4cee01f209bcc19986af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430546
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
- For direct calls in selector branch, ensure 'if' branches have correct inputs.
- For overrideable selectors, the receiver type cannot be known in the main module so use 'top' type. Technically we could do better if selectors tracked interfaces they targeted. Then we could take the LUB of all those classes. But this would be a significant refactor for a small benefit.
- Type checks on classes defined in the main module should use the class ID ranges from the main module rather than those from the dynamic submodule. This only applies to non-dynamic module extendable types (otherwise we'd use the RTT checks). So we know the class can only exist in one of the range sets, not both.
I discovered (1) from running Flutter which led me to create this test which uncovered (2) and (3).
Change-Id: I80f39835f66aa7cf0cff527341e3f4a948a7a0cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430360
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
This CL contains no functional differences; it just reorganizes the code.
I expect to be adding data to the collected report, and I decided that
it would be better to break the massive method up before doing so in
order to improve overall readability.
I also wondered whether we might want to structure the data in a similar
way. For example, the top-level map could have entries corresponding to
each of these methods, each of which has a value that is a map
containing the data collected by that method. I don't know whether this
would make the output easier to read or whether the current form is
depended on anywhere, but it's something to consider for the future.
Change-Id: Id0ef3c2f64b00ea58069c496e7c485c7b3f163c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430560
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
This CL contains breaking changes for package:dtd and prepares both package:dart_service_protocol_shared and package:dtd for publish.
This CL also fixes https://github.com/dart-lang/sdk/issues/60757 so that DTD-registered services are sent over the `Service` stream upon initial subscription like what is done for client-registered services.
Change-Id: I619af816e64af01864c7ed9b98743c6691bf7e0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429161
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
These functions have not been used since we switched to the new Rti.
In modern Dart it is not worth special-casing `<dynamic,dynamic>{}` and
`<dynamic>{}`.
Bug: #37715
Change-Id: I535bc67055a7dc02016b14d1a0ae43ca1f850e79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430320
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
UNUSED_ELEMENT and UNUSED_FIELD were added to the "ignore list" for
the tests of a dozen lint rules. I think it is pretty harmless to ignore
them by default, and save plugin authors some `// ignore:` comments, or
hand-wringing about how to get rid of an "unused" field in a test which
is needed in order to test an analysis rule.
Change-Id: Ic35fead8a44d8d3341f9e32e92b53610b517edf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430121
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
This change further prepares for the removal of Observatory from the
shipped Dart SDK by creating a fork to be used by the remaining
Observatory users.
This is basically a straight copy of the contents from
runtime/observatory with the exception of two new scripts:
- `bin/observatory.dart`, a utility to launch Observatory
- `bin/activate.dart`, which globally activates `bin/observatory.dart`
as `observatory`
This change also updates the presubmits to ensure that
`runtime/observatory` is effectively placed in read-only mode to prevent
any divergences with the fork.
Work towards https://github.com/dart-lang/sdk/issues/50233
Change-Id: Iff3a7512058f36afa2a96d45d94a1dff424401d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429800
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
When const constructor is exposed through a dynamic interface,
dynamic module can create constants with that const constructor and
it can reference everything used in that constructor including default
values of parameters and field initializers. So dynamic interface
annotator should visit bodies of const constructors and add all
references to implicit uses.
Annotator should also visit initializers of instance fields of
classes which can be used in a constant (as they participate in
the constant evaluation too). Kernel trim tool should not remove such
field initializers.
TEST=pkg/dynamic_modules/test/data/const_constructor
Fixes b/418928636
Change-Id: Ie216f3a4257fe5a905b83af8c60dfe8a5b774ecf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/430002
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
- When return type is not directly supported and just a Dart_Handle,
automatically create persistent handles
- Change `Dart_LoadLibrary` to `Dart_LookupLibrary`
- switch from iostream to cstdio, I have no idea why, but it doesn't
work for me in emulators and it's not a big difference.
TEST=ci,manual
Change-Id: I9b6539c7f16e81af9e8a9ab3995d6040bac64a1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429962
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
This adds a UriOffsetLength that passes uri, offset and length of a source locations. This is used to support
field/getter/setterUriOffset to prepare for getter/setter and final
field/setter pairs to be contained in the same builder object, while
still allowing messaging to point to the specific aspect.
UriOffsetLength is furthermore used on ClassMember which improves the
precision of messages from hierarchy checks.
Change-Id: I0776c8b66177164e326d3fb61e32a7620955f4c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429961
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Add `@pragma('dart2js:allow-cse')` and `@pragma('dart2js:allow-dce')`.
These annotations allow the compiler to do common subexpression
elimination and dead code elimination on calls to getters and methods.
Change-Id: Ie4091466e4782a4d28a7f9bfbfdb60a5de45a384
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/426360
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
`needsCapture` will ensure that any variables used within an async scope get included in the 'asyncScope' object that's created for that scope.
The variables used to lower Dart late variables in particular get emitted separately. But they can still be used across async scopes so they need the special capture logic as well.
Bug: https://github.com/dart-lang/sdk/issues/60748
Change-Id: I2486fce41f88f186fd799029c2cc59635f7ad8f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/429780
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>