The original implementation was designed around a shared misunderstanding
of optional parameter handling in the spec. (which was also ambiguous about type parameters).
The correct behavior for optional/type parameters is to fill them in with their default values/bounds.
This behavior can be implemented without any backend support, as is done in this CL.
Change-Id: Ib81f17ead2d2920e755703e244db5afc328d0315
Reviewed-on: https://dart-review.googlesource.com/52802
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This adds a special RTI representation for a type argument of a
(supertype of a) js-interop class, which effectively is the Dart 1
`dynamic` type.
Closes#32969
Change-Id: Ifd92b3fc6779d96d354ad929bd7c07a349299ae6
Reviewed-on: https://dart-review.googlesource.com/53002
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The static methods allow type parameters to be registered,
but this means that the type parameters will be dropped unless in strong mode.
Change-Id: I91c1977c287c14742df7d59b988e64ddc46f794d
Reviewed-on: https://dart-review.googlesource.com/52870
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Change-Id: I1c1f22f3117ccbfc8620b3b0459bc96ed1ad1bdf
Reviewed-on: https://dart-review.googlesource.com/51128
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
The device running the test doesn't have dart_bootstrap or the SDK tree.
Change-Id: Ifb8047c6ddbc8d9d7fd5d0b728ab5ee732403bfc
Reviewed-on: https://dart-review.googlesource.com/52987
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Found two mistakes in the tests:
- label2_negative_test had no labels whatsoever.
- label8_negative_test called an undefined function, doAgain().
Change-Id: I4d17c969a2b1422ff96cf68996225ecaaf5fe829
Reviewed-on: https://dart-review.googlesource.com/52868
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
In the process, I discovered multitests can't handle imports to
non-existent libraries. So I fixed that and cleaned up the code.
Change-Id: I9a8557e84f91ba7858bdf98f8732cd0ded55aa1a
Reviewed-on: https://dart-review.googlesource.com/52869
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This test "passes" now that sync-async is enabled by default because the test
completes before it gets a chance to fail.
TBR=sra@google.com
Change-Id: I4e8aaade6b618ab8cd79fbfff354dc99214feb27
Reviewed-on: https://dart-review.googlesource.com/52982
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
In addition, this removes support for seeding the VM isolate snapshot with Instructions and referencing those Instructions in the isolate snapshot. This was leftover from an earlier experiment to share Instructions between a Core-JIT snapshot and App-JIT snapshots. Removing this reclaims the sign bit on Instruction offsets.
Add missing cases to TypeTestingStubFinder::StubNameFromAddresss.
Change-Id: Ie87216b4e284db1dc3eddb12f38ddbe8a841d312
Reviewed-on: https://dart-review.googlesource.com/50620
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Based on https://dart-review.googlesource.com/c/sdk/+/52340, but adds
the necessary plumbing through the test system to pass through
negations to strong and preview-dart-2. Also adds support for those
negations to the analyzer.
Change-Id: I9793ff28bb593d25bbb0a2ed8736b5b53e0a62d8
Reviewed-on: https://dart-review.googlesource.com/52461
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Most notably this fixes mixins, but a few others issues were discovered
as well. Fixes#32428.
This gets dartdevk closer to producing a valid Dart SDK file
Change-Id: I2973baef279d6b71ed29b97bec758b2d3209c275
Reviewed-on: https://dart-review.googlesource.com/51760
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
It's not generally safe to continue to use the Shadow nodes after they
have had their type inferred, because they give a false picture of the
tree. In this case it led to an assertion failure.
Move the assert to a place in the code where it is true. Use the
correct subexpression for subsequent check insertion. Clear the
parent pointer when Kernel nodes are removed from the tree to try to
catch problems like this.
Fixes https://github.com/dart-lang/sdk/issues/32050
Change-Id: I775747d7a6a5240d63881c8563c83cc84628e3d7
Reviewed-on: https://dart-review.googlesource.com/52525
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
This reduces small tagged integers on 64 bit platforms from 63 bits to
31 bits plus one tag bit.
This is a step on the way to compile-time-optional compressed pointers
on 64 bit platforms. See more about this at go/dartvmlearnings
This causes a slowdown for some uses of integers that don't fit in 31
signed bits, but because both x64 and ARM64 have unboxed 64 bit
integers now the performance hit should not be too bad.
This is a reapplication of
https://dart-review.googlesource.com/c/sdk/+/46244
It was reverted due to a compilation error on 32 bit
ARM with DBC.
R=vegorov@google.com
Change-Id: I943de1768519457f0e5a61ef0b4ef204b6a53281
Reviewed-on: https://dart-review.googlesource.com/51321
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This reverts commit 9bb085a1c6 due to
test failure in google3.
Change-Id: I63940e62bd97c83bc432db99b44c991e6c1e025e
Reviewed-on: https://dart-review.googlesource.com/52422
Reviewed-by: Dan Grove <dgrove@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Implements a new strategy for closed world computation that takes
the static type of the receiver into account when processing dynamic
calls.
For this to work, the J-model needs to only contain live members,
meaning queries can no longer assume that a J-model member exists for
instance for JSString.split because it might not be live.
This is the initial implementation which only uses
ir.MethodInvocation.invocationTarget. Later we will use the static
type of the expression on ir.MethodInvocation, ir.PropertyGet, and
ir.PropertySet.
Change-Id: I2dcc5a9148f27127d4e89c414a7d24f90f9cf2a4
Reviewed-on: https://dart-review.googlesource.com/48480
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>