A few private methods in common/elements.dart are used to lookup classes
and members. This is a step in normalizing these methods, so that we use
different APIs when the values are required and when they are not.
Ideally this is a change we'd do more generally in our APIs (e.g. the env APIs
should be split).
Change-Id: Iacc2f012f6f60ae960c61d8897630f6a7f1d60e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260080
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Registering custom elements are already broken -- see: https://github.com/dart-lang/sdk/issues/49536. There are plans on deleting this code at some point. This current change cleans up dynamic invocations in the deprecated code.
Removes cruft on already-deprecated code and doing it now because I assume dynamic clean up will finish before the issue resolves.
Change-Id: Ic6250c139c5d9b08d88650110f55442a7bf5dd42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259247
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
- `CaseHeadInfo` is renamed to `CaseHeadOrDefaultInfo`, to reflect the
fact that it is used for both case heads and default clauses.
- `CaseHeadOrDefaultInfo.node` is no longer needed; this used to be
used for error reporting, but after the refactor of
https://dart-review.googlesource.com/c/sdk/+/259021 is was no longer
used.
- `ExpressionCaseInfo` is renamed to `SwitchExpressionMemberInfo`,
consistent with the AST structure `SwitchExpressionMember` in the
analyzer.
- `SwitchExpressionMemberInfo.body` is renamed to
`SwitchExpressionMemberInfo.expression`, consistent with the
nomenclature used in the analyzer.
- `StatementCaseInfo` is renamed to `SwitchStatementMemberInfo` for
consistency with `SwitchExpressionMemberInfo`. Note that the
analyzer calls its corresponding AST structure `SwitchMember` rather
than `SwitchStatementMember` for legacy reasons.
- `SwitchExpressionMemberInfo` no longer extends
`CaseHeadOrDefaultInfo`; it contains a pointer to the head or
default info. This is more consistent with
`SwitchStatementMemberInfo`.
Change-Id: I727766a6f0601ec5cd8aff824364319a54446bd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Instead apply the same approach as we do in AOT: unbox based on the
static type information. There are no TFA results available in JIT,
but we could still unbox fields when running in sound null-safety.
TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-kernel-reload-linux-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-rollback-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-linux-debug-simriscv64-try,vm-kernel-precomp-linux-debug-simriscv64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try
Change-Id: Ide2e78c6659261ef8d245a4586cf699ea0fbb459
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256211
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Both the production and try builders for the Windows SDK have been
migrated to the new recipe that doesn't use the test matrix.
Bug: b/247507699
Change-Id: I7a603e716492ffa272a43eea959b721c8c4a8f1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259842
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
This change makes third_party/emsdk/upstream/emscripten/emcc available
if the gclient variable `download_emscripten` is `True`.
Fixes: b/247449715
Change-Id: Ia57d75b7c74a811dc50c3ef6e37f2b35db7116d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260100
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
I also added a few more TODO's because as I went through the code I
thought about what we'd need to do in order to make this production
ready.
Change-Id: I54e0d62790303c4b52269cb89cbf3601aa27af1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259882
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Adds the helper functions HasIsolateId(), HasIsolateGroupId(),
GetFormattedIsolateId(), and GetFormattedIsolateGroupId() to
timeline.h
The Perfetto recorder that will be added in a future CL will make use of
these.
TEST=ci
Change-Id: I50e234d9c2cc551ae9fbad7e92fc6e019213e264
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259220
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Derek Xu <derekx@google.com>
The spec has been updated so that the pattern type schema is only used
in irrefutable contexts, and consequently we don't need to come up
with a type schema for refutable patterns.
The prototype code already made these assumptions, so there is no
change, only comment updates.
Bug: https://github.com/dart-lang/language/issues/2458
Change-Id: I4179953fff24ad596d990ab0423fe35f8a010805
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259860
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
They were simply passing arguments to constructors.
Change-Id: Ic986d357902ea540c1de0c8b9f8b6a4cf1c8cdc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259646
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
I removed factory methods that are already unused, and update other.
Ideally we should use Token(s) in AstBuilder as well, but it was too
complicated right now, so I will try doing this later.
Change-Id: I2dcfa0b419818ba551401cd08b7c496ebb90c840
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259641
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Adds tests to check that various members are correctly mocked,
inheritance on both the Dart and @staticInterop side work as
expected with respect to mocking, and pkg:mockito can be used
with the new mocking functionality.
Change-Id: I7346339f15c14e934b045d75260c1e4540f89d0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257161
Reviewed-by: Riley Porter <rileyporter@google.com>
Bug: https://github.com/dart-lang/sdk/issues/49351
After static checks have passed, adds functionality for a JS
object literal to mock a @staticInterop class using a Dart
implementation. Fields, getters, setters, and methods' names are
added to the object literal, and their values are closures which
call the Dart mock's members.
Change-Id: Ie2ef27179eb79039d3aa28737b246c5091f4beb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257160
Reviewed-by: Riley Porter <rileyporter@google.com>
Adds tests for the following cases:
- Type arguments to createStaticInteropMock
- Missing members in implementing class
- Members that need to be implemented through inheritance
- Members that implement through inheritance and mixins
- Implemented members are correct subtypes
- Static checker checks for potential extension conflicts
Change-Id: I866ba47189d8f397fe6a934af1c5ecb0b231aa68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256422
Reviewed-by: Riley Porter <rileyporter@google.com>