The tests least_upper_bound_{futureor,function}_test.dart are corrected:
The expected least upper bound was changed in one case in each test,
because the case matches a rule earlier in the ruleset, so the new rules
are not used in these cases.
Change-Id: I1f5f303ccde10af6084771a90d92d81d636909d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166635
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
The internal closure was wrongly marked with the async marker of the
torn-off method.
Change-Id: Ie29eee6ed77fb07e9c0992bd0e49590cc10edd3e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166634
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-10-09 irina.arkhipets@gmail.com Fixes 950: typo corrected.
2020-10-09 irina.arkhipets@gmail.com Fixes 950: test adjusted.
2020-10-08 irina.arkhipets@gmail.com Fixes 946: LanguageFeatures/Instantiate-to-bounds/typedef-static/typedef_typedef_* tests updated according to the recent SDK changes.
2020-10-08 irina.arkhipets@gmail.com Fixes 946: LanguageFeatures/Instantiate-to-bounds/typedef/static/typedef_l2_06_* tests updated according to the recent SDK changes.
2020-10-08 irina.arkhipets@gmail.com Issue 946: LanguageFeatures/Instantiate-to-bounds/typedef/static/typedef_l2_t05_* tests updated according to the recent SDK changes.
2020-10-08 irina.arkhipets@gmail.com Fixes 946: LanguageFeatures/Instantiate-to-bounds/typedef/static/typedef_l2_t04_* tests updated according to the recent SDK changes.
2020-10-08 sgrekhov@unipro.ru Fixes 912. Abstract variables tests added
2020-10-08 sgrekhov@unipro.ru Fixes 949. Explicitly cast initializer expression as nullable
2020-10-07 sgrekhov@unipro.ru Fixes 944. Add check for HttpStatus.permanentRedirect
2020-10-07 irina.arkhipets@gmail.com Issue 946: LanguageFeatures/Instantiate-to-bounds/typedef/static/typedef_l2_t03_* tests updated according to the recent SDK changes.
2020-10-07 sgrekhov@unipro.ru 948. Change type of additional required argument to dynamic
2020-10-07 sgrekhov@unipro.ru Fixes 948. Add two positional parameters to Language/Libraries_and_Scripts/Scripts/main_required_parameters_t03 to match the test description
2020-10-06 sgrekhov@unipro.ru 923. More tests for local variable read and definite (un)assignment
2020-10-06 irina.arkhipets@gmail.com Fixes 946: LanguageFeatures/Instantiate-to-bounds/typedef/static/typedef_l2_02_* tests updated according to the recent SDK changes.
2020-10-05 sgrekhov@unipro.ru Fixes 947. It's compile error to declare getter named 'main'
2020-10-05 irina.arkhipets@gmail.com Issue 946: LanguageFeatures/Instantiate-to-bounds/typrdef/static/typedef_l2_* tests updated according to the SDK changes.
2020-10-04 sgrekhov@unipro.ru Fix Process/exitCode_A01_t02 test on Windows. Allow 1 exit code
2020-10-02 sgrekhov@unipro.ru 923. Added tests for local variables assignment and read
Change-Id: Ibdc85b357abfe3c5f8dc0c44b30b354480250d91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166632
Reviewed-by: Karl Klose <karlklose@google.com>
Unlike cfc8e6de, this does _not_ replace the default variable length
encoding for {Read,Write}Streams, but insteads adds separate
{Read,Write}{S,}LEB128 methods to the appropriate classes. If we later
find the cause of the issues that led to the revert of cfc8e6de, it'll
be easy to switch over then.
Note that WriteLEB128 asserts that the value is non-negative if used
with a signed type (since negative values suggests that SLEB128 should
be used instead for minimal encoding).
Also removes the various other encoding and decoding methods for
(S)LEB128 across the codebase and changes those clients to use
{Read,Write}Streams instead.
Other cleanups:
* Various constant-related cleanups in datastream.h.
* Adds DART_FORCE_INLINE to ReadStream::ReadByte and uses it in the
default variable length decoding methods for retrieving bytes
from the stream instead of managing current_ by hand.
* Creates a canonical empty CompressedStackMaps instance and uses
that instead of the null CompressedStackMaps instance in most cases.
The only remaining (expected) use of the null CompressedStackMaps
instance is for the global table in the object store when no global
table exists (e.g., in JIT mode before any snapshotting).
* Moves CompressedStackMapsIterator from code_descriptors.h to an
Iterator class within CompressedStackMaps in object.h (similar to
PcDescriptors::Iterator), to limit friend declarations and because it
conceptually makes more sense as part of CompressedStackMaps.
* Removed CompressedStackMaps::PayloadByte, since existing clients
(CompressedStackMaps::Iterator, StackMapEntry in program_visitor.cc)
are better served by just operating on the payload buffer directly
(with appropriate NoSafepointScopes).
* WriteStreams no longer allocate their initial space on construction,
but rather on the first write, so no allocation is performed by
constructing a never-used WriteStream.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-mac-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-ubsan-linux-release-x64-try,vm-kernel-tsan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-asan-linux-release-x64-try
Change-Id: Ice63321abaa79157fbe9f230a864c8bba0e6dea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166421
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
The sources assignment filter is considered a misfeature of gn
and is planned for removal (see discussion at [1]).
Convert dart BUILD.gn rules to manually filter the files that
are build using explicit `if` expressions. Remove obsolete call
to set_sources_assignment_filter() to filter '*_test.*' files
as no such files are present in the variables used to build the
`sources` value.
[1]: https://groups.google.com/a/chromium.org/g/gn-dev/c/oQcYStl_WkI/m/roukYTxSDAAJ
Bug: gn:125
Change-Id: I591fbb746cf694f7d2a5a330f81652380acf5c11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166629
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Core snapshots should be agnostic to the sound null safety mode
(so they can be used both in weak and strong modes), and snapshot
writer verifies that.
Snapshot::kFull was previously used both for core snapshots and
app snapshots on ia32. However, app snapshots are not guaranteed to
be agnostic, which appeared as failures on a few test on ia32.
Also, VM should be able to detect null safety mode from app snapshots,
even if they do not contain code, but null safety mode was not
written into features string of kFull snapshots.
In order to disambiguate core snapshots, a new Snapshot::Kind is
added. Snapshot::kFullCore works exactly as Snapshot::kFull, except
for verification of agnostic null safety and snapshot features string
omitting null safety mode. All snapshots except kFullCore now have
null safety mode included into their features string.
Fixes https://github.com/dart-lang/sdk/issues/43626
Issue https://github.com/dart-lang/sdk/issues/43613
Change-Id: I8cd3b049ef4e428dd5e1ce666d4c7aa3b596d70c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166308
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Note that due to https://github.com/dart-lang/sdk/issues/43725 we
can't yet downcast to these subclasses in all cases; added a test case
that would fail if we did.
Change-Id: Idd498840484a6a4c60a0cf2f8e01092ba75e7d2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166722
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The test was written when a more disruptive solution for the unsoundness
fix was planned. A more lenient solution was found and the test is updated
accordingly.
Closes#43707
Change-Id: I31936fdc3aa0ae23fddd72c850eca5da50b22352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166620
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
https://github.com/dart-lang/language/pull/1195 changes the UP function
such that it uses the greatest closure with bounded and promoted type
variables, and adjusts the catch-all rules about function types (used
with `Function(int)` and `String` and other "otherwise" cases).
This PR adds tests for the updated rules.
Change-Id: I793b85ceec76105d013c03e8d9bccdd187bb476f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166101
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
The previous approach was reverted.
Change-Id: Ib4b9d09d740511cd2ef76d663412a3358c7f666d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
One of the bugs I recently found caused the transform for a getter to be
applied against a parameter. This CL fixes that particular issue by
correctly computing the element name to be the name of the enclosing
invocation rather than the parameter.
It also introduces an `ElementMatcher` to hold the data currently being
used to match elements with the intent that more information will be
added in the future to prevent similar sorts of mismatches.
Change-Id: I14abbece334b3dc660d3854b817362c441efa11d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166600
Reviewed-by: Phil Quitslund <pquitslund@google.com>
The recent changes to `for` statements were necessary to ensure that
if a `for` statement causes type promotion due to an unreachable
branch without type promotion joining a reachable one with type
promotion, the type promotion would still happen properly even if the
top of the `for` statement was itself unreachable. There is no need
for a similar change to `for each` statements, because they are simple
enough that this situation cannot arise. But it's still worth making
the corresponding change for consistency.
Bug: https://github.com/dart-lang/sdk/issues/40009
Change-Id: Idabf7745f04a99152e688bf050a8d80e07b004e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166520
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
It turns out we didn't have enough id test coverage to tell that we
were passing the wrong value for `conditional_end`'s
`conditionalExpression` argument.
This change fixes the call site and adds an id test that would have
caught the bug.
Change-Id: Ie99b1b7045e757ee78d72fcb435222fd27d680d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166307
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The StackTrace argument will never be null, but may be a default.
Also rewrite the type descriptions to use function type syntax instead
of the legacy argument syntax, and remove a redundant parameter name.
Bug: #43655
Change-Id: Ie91024b2a70d66c24ce29e413c811a61beae3bfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166460
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>