This helps triage/resolve various issues in testRuntimeErrors:
* for_non_bool_condition_test isolates the code causing a crash on the
dart2js-production-linux-d8 configuration. (See
https://github.com/dart-lang/sdk/issues/36442 and the status file.)
* for_null_condition_test will be an approved failure for all dart2js
configurations due to https://github.com/dart-lang/sdk/issues/36446.
* for_runtime_error_test contains all the remaining expected type
errors. On the dart2js-production-linux-d8 configuration (which runs
with -O3), we assume no type errors exist - even ones guarded by
Expect.throwsTypeError - so the optimized code produces runtime errors
instead. See https://dart-review.googlesource.com/c/sdk/+/97820 for a
similar discussion.
* for_test contains the remaining tests, which are valid on all dart2js
configurations.
Change-Id: Ifef4f7d2e27e2731cdd4a3fec03754ea63b6328d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98606
Reviewed-by: Bob Nystrom <rnystrom@google.com>
This helps triage/resolve issues in testRuntimeErrors:
* if_null_condition_test will be an approved failure for all dart2js
configurations due to https://github.com/dart-lang/sdk/issues/34147.
* if_runtime_error_test contains all the expected type errors. On the
dart2js-production-linux-d8 configuration (which runs with -O3), we
assume no type errors exist - even ones guarded by
Expect.throwsTypeError - so the optimized code produces runtime errors
instead. See https://dart-review.googlesource.com/c/sdk/+/97820 for a
similar discussion.
Change-Id: Iaf2df85af16cc03fcd7ec7ef2a9e57a2bc3ce081
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98622
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Including supertypes (and not just superclasses) this time.
Change-Id: Ib398f6f2fab0ae502dd754727b482641793dd225
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98569
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
These tests break on all backends. It looks like the original intent was to run to completion.
Change-Id: I895638c522285f280cbb608c82a8a496bfd11d72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98302
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
The change was already reverted and I accidentally relanded this.
Change-Id: I62ff3367db7aaaf3a470727fdb587830a23fe53c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98566
Reviewed-by: Martin Kustermann <kustermann@google.com>
This is a reland of 49c94d3600
It appears that the major regressions were introduced not by the typed data unification
changes but rather by 3fd124db1f "[vm] Repair the resolver abstraction." which got
reverted in e979895efb "Revert "[vm] Repair the resolver abstraction."
Original change's description:
> Temporary revert of two changes which potentially caused performance regressions in Flutter.
>
> Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
>
> This reverts commit a062221b76.
>
> Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
>
> This reverts commit 94362f1af0.
>
> Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
> Reviewed-by: Ben Konyi <bkonyi@google.com>
Change-Id: I758775ccc426a02bce538d07ea04d9c67e8933d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98562
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
When disambiguating between maps and sets, ensure that `await for`
loops are marked as asynchronous. Otherwise, there will be a spurious
type error because we have a Stream and would expect an Iterable.
Change-Id: Ie97eaf74ff7a9e4dfb262ab0447f4322d04701aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98467
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This reverts commit 49c94d3600.
Reason for revert: Relanding
Original change's description:
> Temporary revert of two changes which potentially caused performance regressions in Flutter.
>
> Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
>
> This reverts commit a062221b76.
>
> Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
>
> This reverts commit 94362f1af0.
>
> Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
> Reviewed-by: Ben Konyi <bkonyi@google.com>
TBR=bkonyi@google.com,asiva@google.com
Change-Id: I5c5be67fcec05434283153cb2592ba41afd1f41f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98505
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Revert "[vm] Re-number class ids for internal/external typed data and typed data views"
This reverts commit a062221b76.
Revert "[vm] Unify internal/external/view typed data into new RawTypedDataBase class"
This reverts commit 94362f1af0.
Change-Id: I7189c976aa86cdcf0a3802631bff754baf3ca2cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98521
Reviewed-by: Ben Konyi <bkonyi@google.com>
Types are compared with `Expect.equals` instead of `Expect.identical`
since they are not always canonicalized.
Change-Id: I43c878986d190c361efaae321621f204a4bb8495
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98425
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Invocation of == and != is only constant on receivers of types bool, int, double, and String or null operands. This is now handled correctly in constant evaluation. The case for method invocation of `a != b` is removed since it is parsed as `!(a == b)`.
Change-Id: I65d8ddf2716f319f61fc0609803a5237f4aba644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98349
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Added tests and changes to constant implementation have changed
the result of the front-end compiler on some tests.
Change-Id: I112027f2ca5ed72cc640ce01f577e498020866f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98356
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The constant evaluator assumed that any ConstantExpression met during evaluation of a sub expression was not an unevaluated constant. This do occur, for instance when a field is initialized to an unevaluated constant. With the change, unevaluated constants met during evaluation are themselves evaluated.
This change also fixed handling of assert initializers in unevaluated constants.
Change-Id: Id9e676f40bc829c4d234f34a74ef0ca5c4c6ec48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98348
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Tests that dart2js can handle evaluation of unevaluated constants from CFE, including handling of potential compile-time errors found during evaluation.
The CL fixes a bug in the constant evaluator where it created map literals that were not marked as constant as needed.
Change-Id: I7df77a3c68e52392a143478b3567d19e09ebe6bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98347
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Change-Id: I5f06c2849ed3f610023a399f65c0cbfaf1921b34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97510
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
This moves the length field as well as an inner pointer to the start of
the data into the RawTypedDataBase class. The inner pointer is updated
on allocation, scavenges and old space compactions.
To avoid writing more assembly the typed data view factory constructors
will be generated using IL, which will update the inner pointer. This
required adding new IR instructions and changing the existing
UnboxedIntConverter instruction.
This is the foundation work to de-virtualize calls on the public typed
data types, e.g. Uint8List.
Issue https://github.com/dart-lang/sdk/issues/35154
Cq-Include-Trybots: luci.dart.try:vm-canary-linux-debug-try, vm-dartkb-linux-debug-x64-try, vm-dartkb-linux-release-x64-try, vm-kernel-asan-linux-release-x64-try, vm-kernel-checked-linux-release-x64-try, vm-kernel-linux-debug-ia32-try, vm-kernel-linux-debug-simdbc64-try, vm-kernel-linux-debug-x64-try, vm-kernel-linux-product-x64-try, vm-kernel-linux-release-ia32-try, vm-kernel-linux-release-simarm-try, vm-kernel-linux-release-simarm64-try, vm-kernel-linux-release-simdbc64-try, vm-kernel-linux-release-x64-try, vm-kernel-optcounter-threshold-linux-release-ia32-try, vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-android-release-arm-try, vm-kernel-precomp-bare-linux-release-simarm-try, vm-kernel-precomp-bare-linux-release-simarm64-try, vm-kernel-precomp-bare-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-product-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-obfuscate-linux-release-x64-try, vm-kernel-precomp-win-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-reload-linux-debug-x64-try, vm-kernel-reload-linux-release-x64-try, vm-kernel-reload-rollback-linux-debug-x64-try, vm-kernel-reload-rollback-linux-release-x64-try, vm-kernel-win-debug-ia32-try, vm-kernel-win-debug-x64-try, vm-kernel-win-product-x64-try, vm-kernel-win-release-ia32-try, vm-kernel-win-release-x64-try
Change-Id: I1aab0dd93fa0f06a05299ab4cb019cf898b9e1ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97960
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
This fixes a problem where a set or map in a spread would not be
properly recognized by the constant evaluator when compiling for a
VM target.
Fixes https://github.com/dart-lang/sdk/issues/36387
Change-Id: I01efc932994c143fa5a5a2fbacda21fe9206e3e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98330
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Rolls the version of co19 tests in the SDK checkout to
c3b33ee90c5ee7f88fdb0ead08fdbb40c54954d2
Change-Id: I11a181e2fb1e37ff73fb038cd51b3ad38e2a0ae9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98344
Reviewed-by: Jonas Termansen <sortie@google.com>
Change-Id: I9ba3aa4e3ebaedee3a2cd20ccdcc533af96b9bda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98018
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Those will be failing in 2.3, and we don't want that to make the entire
await_for_test to fail.
Change-Id: I5f81ada877a5ecef8a3034f071313a6729b53aaa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98242
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
dart2js doesn't canonicalize types so comparing with identical causes the test
to fail.
Change-Id: I3e6f19f8ab95d949402c3bf0caf0c31cc0fccbad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98241
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This lets you test that a callback returns a Future that completes to
a given error. Like Expect.throws(), but async.
At first, I added support for this directly to Expect.throws(), but I
think it's better to minimize the amount of dynamic logic going on in
the language test framework.
I was worried about having to duplicate all of the Expect.throws___()
convenience functions but now that we have generic methods, those
functions aren't that much more convenient.
Change-Id: I8b288945611fa16f8d27056f3cf79181fc22d256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97881
Reviewed-by: William Hesse <whesse@google.com>
It's not a compile error. Instead, a runtime cast is inserted.
Change-Id: I871191d9f6fdb72276449abe7016c86ac098fd60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97946
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Since we already have support for Block in our visitors, we can extend
them to support BlockExpression fairly easily.
co19_2 and language_2 tests still need to be unskipped, but we can't do
that until CFE respects the --enable-experiment=control-flow-collections
flag.
Change-Id: I48da19cc33dbf35c5ead3ea13266b01d3e0de959
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97820
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This change replaces kernel AST declarations of fields and functions
with bytecode declarations.
Size of dilp files is reduced by 11-12%.
Startup latency:
Time to the first full frame: 1.945s -> 1.687s
FinalizeClass: 554ms -> 277ms
FinishClassLoading: 296ms -> 156ms
There are following regressions in bytecode mode, which will be fixed
in future:
* dart:mirrors are not supported yet (implementation of mirrors relies
on reading kernel AST in certain cases).
As the result, lib_2/mirrors/* tests fail.
* native extensions are not supported yet (annotations on libraries
and classes in AST are cleaned up as they could reference members
which are now removed from AST).
As the result, standalone_2/entrypoints_verification_test test fails.
* language_2/spread_collections/const_error_test/* tests fail
due to https://github.com/dart-lang/sdk/issues/36286.
Change-Id: I5130f401fd7b84038b136136e7ccc1a6e51b6cea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97561
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Add support for compiling for and for-in loops in map literals. They
are lowered to block expressions.
Change-Id: I555401257ba028543310edbd0547166d7c6a26a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97929
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Implement the translation of for and for-in loops in non-const lists
and sets. They are lowered to block expressions containing a loop.
It is impossible to target these loops with a break or continue
because they do not contain statements in their body.
Type inference is not yet implemented.
Change-Id: I35ff1650fde54cd376fe0b444891010435c74507
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97922
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
New tests were added without status file updates.
Change-Id: Ibd8e48d6a3818e69649e881594be78afd490ba91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97920
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
In collection literals, support for and for-in in Fasta's body
builder. They are removed when encountered during type inference and
their lowering to block expressions is not yet implemented.
Change-Id: I41e6a7a4aca7ffafdc12119e1503e9c0df5a6589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97628
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This doesn't cover all of the corner cases around the synthesized
stream subscription and stuff, but I honestly don't know if I'm
qualified to write those tests. This should cover all of the basic
static and runtime semantics that users care about.
Change-Id: I7237f0ccb9bf02af291d3175ab2c0074d0547c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97548
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This reverts commit 9db4119b67.
Revert "Change default of 'keepFields' in constant transformation to true"
This reverts commit b1e14cbe5f.
Revert "[fasta] Don't create forwarding stub if there's already a member"
This reverts commit 51da94da76.
These commits are reverted to unblock rolls into Flutter.
b1e14cbe5f is reverted because it contained
changes that prevented clean revert of the other CLs.
Change-Id: I8d3c00f0c1b146f4debe7f1a1a7de75be154e265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97802
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
* Move FFI tests into a separate test suite.
They never belonged in standalone_2/ since they are not only available in
the standalone VM. Also, we want to have a separate status file.
* Add new "SharedObjects" option to test files to copy needed shared objects
to the Android device for testing.
* Add support to compiler/runtime_configuration.dart for testing JIT-mode on Android.
* Add new configurations and builders to test_matrix.json to test JIT-mode on Android.
* Clean up status file entries for FFI (we didn't need to special-case stress & subtype tests).
Change-Id: Ifb32ef7051754f477d00ecd7a0f9b19ca8a66eae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97334
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
This is necessary to support modular constant transformation as
needed for instance of for platform dill files.
This change also restricts the removal of additionExports to fields.
Change-Id: Ie7379f09672d8caeaf0689d42af9e1246b9678fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97632
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Also clean out obsolete status file entries due to renamed constant
update test directory.
Change-Id: I135d8c9cac19342143bf8154d1b2e72cf0b8dd01
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93161
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Given `obj.foo(1, 2, 3)`, if `obj.foo` succeeds but `call()` on the
resulting object fails, DDC should call `noSuchMethod()` on the result
of `obj.foo`, not on `obj`. This CL also adds a few more test cases that
DDC was failing on.
Change-Id: I76c3cc73e4cc81791f961c6b2a55cbfea7a5240b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97701
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
1. Remove support for the following flags '-c', '--checked' and '--enable-checked-mode'
2. Cleanup some of the tests and test scripts where these options were being passed.
https://github.com/dart-lang/sdk/issues/34660
Change-Id: I4d8aa0d14bd054cfba08d78a411a0df4fc829df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97550
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Change-Id: I2760f72f4eaa44bd192747179e843f017db30874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97301
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
- Use "{" and "}" for maps.
- Add tests for Object and non-Iterable in for-in loop.
- Fix copy/paste error in inference test.
Change-Id: I563df4e94e221a1a03bbc52cf6f312aae5e07310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97524
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Add regression test.
This fixes issue 36084.
Issue 36293 filed against ddc, which fails on the new test.
Change-Id: I1112572d72671fbc1d78a768ee85affff41951a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97142
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The test corelib_2/regexp/lookbehind_test/01 always passes or fails
uniformly on a single build. But on different builds, on dartdevk on
mac.
TBR: vsm@google.com
Bug: dartbug.com/36280
Change-Id: If70b7a2f0ce34e9f8ba3032d17e7244f2e84aa96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97332
Reviewed-by: William Hesse <whesse@google.com>
Change-Id: I1704001605f01721b01254fdc032aacebf472c80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97304
Commit-Queue: Peter von der Ahé <ahe@google.com>
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
If elements are compiled to if statements. The type inference rules
including insertion of runtime checks are not yet implemented.
Change-Id: Iaa7ab709a7acacf952887b17ac1081a9fecd7cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97200
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Due to API changes, the implicit cast visitor (CodeChecker) was not
finding the correct substituted member type, so the implicit return
type cast was not inserted.
Also fixes another issue that paulberry@ discovered: covariant return
type casts were overwriting the implicit casts from the context type.
The context type should always take priority; implicit covariance
checks are only needed when there isn't a type cast from the context.
Change-Id: I998e8f87371c15175c57864b7e334449268fe339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97143
Reviewed-by: Paul Berry <paulberry@google.com>
See https://github.com/tc39/proposal-regexp-named-groups
for a high-level description of the feature and examples. This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.
This is a partial implementation because while there is a way to retrieve
groups via Dart by name, it requires casting the returned Match to the
new RegExpMatch interface to avoid changing the RegExp interface.
Changing the RegExp interface will happen in a future update, since there
are other planned changes to the RegExp interface coming soon and that way
we only change it once. See https://github.com/dart-lang/sdk/issues/36171
for more details on the planned changes.
Also, since only BMP regular expressions are supported, not full
Unicode ones (i.e., those with the /u flag in ECMAscript), \k<NAME>
will only be parsed as a named back reference if there are named
captures in the string. Otherwise, the \k will be parsed as the identity
escape for backwards compatibility. The new tests illustrate this
difference.
Change-Id: Ieeb0374813db78924c9aa8ac3e652dfb6d4a5934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95461
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
When testing runs with certain set of VM options and tests launch
new Dart processes, VM options should be also forwarded to child
processes.
Change-Id: I7207fe87672cd61fd50d7ac77ef1da67744af183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97169
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The lazy static initializer returns null after throwing on the first use.
Change-Id: I44fbb6f8af263dc5c813ed5dff2291fb27e48b4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96984
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Most importantly, we move resolution of symbols in function_test to the toplevel
so the same function object is re-used on each invocation. This makes it possible to
tests repeated invocations with the optimization counter enabled.
Also added some comments and new tests.
Change-Id: I3772a1f15d1ad9924c8583112ddf3b1349fb6c09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96083
Reviewed-by: Daco Harkes <dacoharkes@google.com>
The set-literals feature has shipped and is on be default. There is
no longer any need to pass it as an option to tests and the tools
cannot remove support for the flag while it is used in tests.
Change-Id: Ibf105ec01193ebb08d6e22600e6c7748897cc2ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96941
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Using runtime objects of the right type so that the spread doesn't
throw at runtime before we can check its type.
Change-Id: I6838079ff7f0f0267796058eee4c077c993484d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97002
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Update the excludes in the test directory analysis options to match the
files that were not updated to add override annotations.
Update the excludes in `testing.json` to match the analysis options.
With a consistent analysis options test config the diagnostics in
editors will match what is enforced by the test.
Also clean up the no longer required `enableSuperMixins` config.
Change-Id: If0e23642c25e0b5c1aced6a5a8c8c05a6da538f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96836
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
See https://github.com/tc39/proposal-regexp-lookbehind
for a high-level description of the feature and examples. This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.
This work takes the feature as present in the v8 engine and appropriately
merges it into our irregexp fork. Notable changes to the irregexp codebase to
introduce this feature:
-----
We can no longer assume that all matching proceeds forwards, since lookbehind
matching proceeds backwards. Similarly, we cannot assume that we can only be
at the start of a string if we started matching from that point. The direction
of matching must also be taken into consideration when doing bounds checking,
which previously assumed the engine would never attempt to look before the
start of a string.
-----
We may now parse backreferences to captures before the capture they
reference, since we parse regular expressions left to right, but lookbehinds
perform captures as they evaluate the string from right to left. Since
RegExpBackReference objects contain a pointer to their corresponding capture,
this means that we may need to create RegExpCapture objects prior to the
parsing of the corresponding captured subexpression.
Thus, RegExpCapture objects are now only initialized with their index, and the
body is set later when the subexpression is encountered and parsed. This means
any method that operates on the body of a RegExpCapture can no longer be const,
which also affects the rest of the RegExpTree class hierarchy. This also means
that we don't have a valid max_match length for backreferences based off the
capture body, and must assume they can end up being any length.
-----
Change-Id: Iffe0e71b17b1a0c6fea77235e8aee5c093005811
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94540
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This feature is under development in the front end. Testing it on the
runtimes leads to numerous spurious status changes. Skip the tests
for now. The intent is that when a backend change causes a test to
start passing, then that test will be un-skipped.
Change-Id: I6c8c1f45315607039240c3edc61ba8340ae9cda0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96902
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Support compiling if elements and map entries by constructing
IfElement or IfMapEntry when they are seen. There is no support for
lowering them to block expressions yet.
Change-Id: I74c2492fefc9703e9e2f639baad7f737bbe63721
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96786
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
In preparation of enforcing these in the analysis options.
Change-Id: I316f2efea510ecc8ff1b975e96d166a5f8c0286c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96834
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This test suite is not comprehensive by any means. The goal is to
establish the right structure for the tests (so that we get the right
inlining and constant folding behavior). Broader semantic tests will be
added later.
Change-Id: Ib028ec05f063b98046f5946272cfbfe986244d3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94040
Reviewed-by: Stephen Adams <sra@google.com>
Change-Id: Ifc336b706fa1315f206f2214eb233489bd21c763
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96645
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
This reverts commit 7f812dea1a.
Reason for revert: Flutter build is broken on Golem.
Original change's description:
> [vm/ffi] Support Windows 64 bit
>
> Enables dart:ffi on Windows 64 bit.
>
> Note that function_stress_test.dart fails in two different ways, these are known bugs. https://github.com/dart-lang/sdk/issues/36138
>
> Closes: https://github.com/dart-lang/sdk/issues/35771
> Change-Id: I73012123f2bd90b737fdc1c87c9a9630c20d5660
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95647
> Commit-Queue: Daco Harkes <dacoharkes@google.com>
> Reviewed-by: Samir Jindel <sjindel@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
TBR=kustermann@google.com,sjindel@google.com,dacoharkes@google.com
Change-Id: I5be4538e3c99632a852e4dfb856248eb437fb3ea
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96683
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
This preserves the invariant that method invocations and property sets
with an interface target handle static types at the call site.
This is a prerequisite to improving dart2js with implicit checks.
With this we can mark dynamic invocations a statically safe and
discover when instance methods don't need to check parameter types.
Change-Id: Ife7a3f947952b3c1f73316b922b2aa107343068e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95400
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Ensures that constants of effectively constant instance fields are
registered also with --omit-implicit-checks.
Change-Id: Icc31799f1cc5f565321c832780f30c711e9c8c50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
- Remove tests that expect ForElements in const collections.
- Add missing value (or was it the key) in map.
Change-Id: Ic61cbb4326a105618ae4ea169655411359c52045
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96020
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Add ModularStrategy as a step towards loading modular data from disk.
Change-Id: I9d0baebef8899794742164be4350bedbd3da5b68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95650
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Rationale:
Found by DartFuzz. One of the trickier bugs I had to debug.
While building the flow graph from kernel, the finalizer
builder expects the program context to be in the same state
as when the finalizer was seen first, not the context seen
by the breaking/continuing statement. This was done partially,
but only partially. Finding loop context or breakable
and switchable blocks was missing. Something only
a fuzzer can find :-)
https://github.com/dart-lang/sdk/issues/36076
Change-Id: Ie63912c5fad4d3c15f6559b60cc102b237949957
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95720
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
These don't try to comprehensively cover every interaction of async
and the new syntax, but they should test that an implementation handles
an await appearing in all the various places in the new syntax where an
expression is permitted.
Change-Id: I4852815002fcad6697f3bad4103693b1d4288d06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/94121
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
We will only run the tests on supported configurations. Issues are open
to expand coverage.
This reverts commit 1d3a0d5129.
Change-Id: I28d90f36a97914dc0cb04c39046cb4bdafe1740b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95023
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Samir Jindel <sjindel@google.com>
Add a new kind of constant context in the body builder for expressions
that must be constant but where constness is not inferred.
This context is used for parameter default values and initializing
expressions for non-final fields in classes containing at least one
const constructor.
Fixes https://github.com/dart-lang/sdk/issues/34191
Change-Id: I200ca88586b19335b185dad0839dfad4eef1f75f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93520
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
@ForceInline is still used by dart:html, will be removed in a later CL.
Change-Id: I480325fe91cc6baefb17ead49f839442e023d441
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95160
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
The size of the result digit array was not computed correctly.
When 64-bit intrinsics are used, one extra digit pair must be allocated.
Change-Id: Id3ca3a16ef24b598e44bf25221d400b9be71248a
Reviewed-on: https://dart-review.googlesource.com/c/94683
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Needed for passing the --enable-experiments=constant-update-2018 option to start working on ir.Constant nodes.
Change-Id: I4f3d8fa6a59ddbda1635fe2da64591bcffcb0f12
Reviewed-on: https://dart-review.googlesource.com/c/95030
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This reverts commit b186a270e4.
Revert "[vm] Fix windows build after "[vm/ffi] Stress tests for FFI functions.""
This reverts commit 3dcc0c69a1.
Revert "[vm] Update status file for standalone_2/ffi/function_stress_test"
This reverts commit 9d609426b2.
Revert "[gardening] Skip ffi/negative_function_test on asan bot"
This reverts commit 223f407af5.
Reasons for revert:
1) timeouts on app-kernel-linux-debug-x64 bot when it
tries to deflake new tests.
2) crash dump archiving fails on vm-kernel-asan-linux-release-x64
when trying to archive crash dumps from these tests.
Issue: https://github.com/dart-lang/sdk/issues/36033
Issue: https://github.com/dart-lang/sdk/issues/36034
Change-Id: Ifa338fb96b490e8137a8aa6a4a62f4a6f9e6ea83
Reviewed-on: https://dart-review.googlesource.com/c/94963
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Aart Bik <ajcbik@google.com>
This newly added test causes crash dump archiving to fail on
vm-kernel-asan-linux-release-x64 bot. This causes bot to fail
although the test failure was approved.
The test was added in b186a270e4.
Issue: https://github.com/dart-lang/sdk/issues/36033
Issue: https://github.com/dart-lang/sdk/issues/36034
Change-Id: I9ac201124db239d9c4bcce176c54e66cfdf1b54e
Reviewed-on: https://dart-review.googlesource.com/c/94961
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Several improvements
(1) makes implicit control dependence of a null check
explicit by means of data dependence (already
done for bounds checks); also see the doc in
runtime/docs/compiler/data_dep_for_control_dep.md
(2) improves CSE properties of various IL nodes
(3) allows LICM on invariant code that may-throw
as long as the visible behavior is preserved
https://github.com/dart-lang/sdk/issues/35323https://github.com/dart-lang/sdk/issues/34684
Change-Id: Icb4520a649da38eddc3d7c85af21427d3c64d22e
Reviewed-on: https://dart-review.googlesource.com/c/93822
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Spreads are compiled as if they were spread elements in list or set
literals. When one occurs in a map literal it is translated to a new
spread map entry.
Change-Id: Ic618b1e85e595b4c2cd65e184b9d2c49e9c34b79
Reviewed-on: https://dart-review.googlesource.com/c/94547
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Code-size difference on a large app is very small (0.007% worse), but
this cuts the time spent in type-propagation by more than half
(23s -> 10s on my machine).
I saw a 0.4% code-size regression in pop-pop-win, but that is
recovered once we are smarter about generating simple is-checks
when the "raw" type can be used because the type arguments
match the bounds (see separate CL).
Change-Id: I45c0fb1afabdca3d045aec576c131ed764dc31ce
Reviewed-on: https://dart-review.googlesource.com/c/94120
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Add spread elements to the Kernel syntax. They are currently replaced
by an invalid expression during type inference.
Change-Id: Icdb489e2c9993c6517983cfafdefc801ebb378ab
Reviewed-on: https://dart-review.googlesource.com/c/94501
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Change-Id: Ifc33abb2279554373bdfb9c1c54f468d7fd683c2
Reviewed-on: https://dart-review.googlesource.com/c/94480
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Rationale:
Make sure open range is closed when skipping
special cids. This bug was probably undetected
for a while, since only kByteBufferCid is adjacent
to kNullCid.
https://github.com/flutter/flutter/issues/28260
Change-Id: Ic22c83aeb26c3130132dc901004a0ad818246dbc
Reviewed-on: https://dart-review.googlesource.com/c/93926
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
* no longer narrow by selector use, only narrow by type and non-null
* check for narrow nesting
* add non-null in a couple known places
One large apps, I compared the type-masks in dump-info and all differences were improvements with non-null. We weren't doing any narrowing based on the possible targets of a selector.
Change-Id: I270f360f70fbe3171d09ccd71d10517be9140194
Reviewed-on: https://dart-review.googlesource.com/c/90340
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This is a reland of 027b76ecbf
Original change's description:
> Eliminate singleton/static access to the constant system and expose its
> functionality at the top level.
>
> Use sites have been updated to import the library with a prefix.
>
> Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
> Reviewed-on: https://dart-review.googlesource.com/c/93842
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Change-Id: Ib04a9d48c8dca51020258313256e0fb0df330d9b
Reviewed-on: https://dart-review.googlesource.com/c/94107
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This is a reland of cf51eb2fba
Original change's description:
> Merge the JavaScript constant system into the base constant system and
> flatten the inheritance hierarchy.
>
> dart2js only needs one constant system at most.
>
> Change-Id: I72e446652ea44298677e986b06e63152e381353b
> Reviewed-on: https://dart-review.googlesource.com/c/93880
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Change-Id: I83960035a7b0989397f9646f2f834ec468aa4908
Reviewed-on: https://dart-review.googlesource.com/c/94106
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This is a reland of 1702b986c8
Original change's description:
> Move the JavaScript constant system into constants/constant_system.dart
> in preparation to merge it with the base constant system and flatten the
> constant system hierarchy.
>
> Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
> Reviewed-on: https://dart-review.googlesource.com/c/93840
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Change-Id: I20ef9755886a6b54135aa7169c9d7de08e8cbe93
Reviewed-on: https://dart-review.googlesource.com/c/94105
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This is a reland of 5af8de8954
Original change's description:
> Remove the Dart constant system and move all required classes into the
> JavaScript constant system.
>
> Change-Id: I2a31ea743270459284c42b615b0dffd1c7aa2584
> Reviewed-on: https://dart-review.googlesource.com/c/93746
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
Change-Id: I8c8399e94dd80c1f543a54454efc9cf59ef6ac7b
Reviewed-on: https://dart-review.googlesource.com/c/94104
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This reverts commit 1702b986c8.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Move the JavaScript constant system into constants/constant_system.dart
> in preparation to merge it with the base constant system and flatten the
> constant system hierarchy.
>
> Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
> Reviewed-on: https://dart-review.googlesource.com/c/93840
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com
Change-Id: If1b6291508c9792a6135a2ad5333b4bb3b800f69
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94103
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
This reverts commit 027b76ecbf.
Reason for revert: <INSERT REASONING HERE>
Original change's description:
> Eliminate singleton/static access to the constant system and expose its
> functionality at the top level.
>
> Use sites have been updated to import the library with a prefix.
>
> Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
> Reviewed-on: https://dart-review.googlesource.com/c/93842
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
TBR=johnniwinther@google.com,sigmund@google.com,fishythefish@google.com
Change-Id: I65310b2579c6746620ed6129e670206ed9bf5e91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/94101
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
functionality at the top level.
Use sites have been updated to import the library with a prefix.
Change-Id: I0f5e4e47bec089d2d0dc2fcd50caccfd98947cf5
Reviewed-on: https://dart-review.googlesource.com/c/93842
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
flatten the inheritance hierarchy.
dart2js only needs one constant system at most.
Change-Id: I72e446652ea44298677e986b06e63152e381353b
Reviewed-on: https://dart-review.googlesource.com/c/93880
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
in preparation to merge it with the base constant system and flatten the
constant system hierarchy.
Change-Id: I6ef27b210515140d4516336fea015f74c8a0cd6a
Reviewed-on: https://dart-review.googlesource.com/c/93840
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This is the second of several CLs updating the parser and its listeners
to conform to the unified collection spec:
https://github.com/dart-lang/language/pull/200
Change-Id: I5c277d05a3726a3f5a40823cf878f025167340e6
Reviewed-on: https://dart-review.googlesource.com/c/93741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Disable while we look into variable allocator assertion.
Change-Id: Ib1e7c2eb869020ae8ecfa123801009adb6a742c7
Reviewed-on: https://dart-review.googlesource.com/c/93925
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
All of DDC's supported platforms have Promises, so we can use them
instead of MutationObservers (web) and timers (node.js).
See issue #20055 (same issue, but for dart2js).
Change-Id: Id635a4a9fa104a2ab19dd20824d209f682f831f9
Reviewed-on: https://dart-review.googlesource.com/c/91765
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
We continue to accept `--dump-info`, but now also accept `--dump-info=binary` so
we can use the new cheaper encoding.
Change-Id: I971cb9a3634ae1a333cfee14b2927c0e25000a01
Reviewed-on: https://dart-review.googlesource.com/c/93823
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Extend the logic for chaining field assignments to static variables.
Change-Id: Ia87d8ff3400d6f04257a546c7a1bb74775a3019e
Reviewed-on: https://dart-review.googlesource.com/c/93620
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
- and rename to field analysis.
This prepares for recognizing effectively constant fields.
Change-Id: I1caa2e1a4f6d90fcd2562ec17d3093bff3a9b0d8
Reviewed-on: https://dart-review.googlesource.com/c/93427
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
The set literal desugaring was missing set literals in constructor
initializers and parameter default values. Furthermore, it assumed
that a constructor that contained a set literal had a body.
Fixes https://github.com/dart-lang/sdk/issues/35989
Change-Id: I42c77b96bbe751ee6f7c7ba7921e9b9df24c16e9
Reviewed-on: https://dart-review.googlesource.com/c/93660
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Also fixes 2 html tests whose failure was caught by this change.
Change-Id: I707cba922bc7e7728ba0b026ad056b547fcd1432
Reviewed-on: https://dart-review.googlesource.com/c/92392
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
This is a re-land of "[vm/extensions] Fix Loader::ReloadNativeExtensions(...)."
The native extension test was failing in hot-reload: this has been fixed.
Change-Id: Ic18da8cfbc6a3dba8aac09d654dce616487a67d7
Reviewed-on: https://dart-review.googlesource.com/c/92800
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
Prototype for `dart:ffi` on Linux/MacOS x64 in JIT mode.
`dart:ffi` is experimental and its API is likely to change in the future.
Progress and design decisions are tracked in https://github.com/dart-lang/sdk/projects/13
issue: https://github.com/dart-lang/sdk/issues/34452
Change-Id: Ifa4566388e42c8757f154741d11e303465ef305d
Cq-Include-Trybots: luci.dart.try:vm-kernel-optcounter-threshold-linux-release-x64-try, vm-kernel-precomp-linux-debug-x64-try, vm-kernel-precomp-linux-release-simarm-try, vm-kernel-precomp-linux-release-simarm64-try, vm-kernel-precomp-linux-release-x64-try, vm-kernel-precomp-mac-release-simarm64-try, vm-kernel-precomp-win-release-x64-try, vm-kernel-mac-debug-x64-try, vm-kernel-asan-linux-release-x64
Reviewed-on: https://dart-review.googlesource.com/c/80124
Reviewed-by: Samir Jindel <sjindel@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
JSON parser was not rewritten when integers became fixed-size, so
some large integers could overflow silently and give the wrong
result, as could some doubles where the pre-decimal point digits
overflowed an `int`. Also added overflow protection for exponent.
Change-Id: I02941272c36fba4b9226e324936aebd4a5c5aa3b
Reviewed-on: https://dart-review.googlesource.com/c/91521
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
The issue derives from the fact that `parameterStructure` has only the preserved parameters,
however the SSA was emitting values for all arguments.
I fixed this by emitting all parameters. I also noticed that the parameter order should
probably be the native-ordering here as well (it doesn't matter for the factory, but it may
matter for other static native calls, if any)
Bug: https://github.com/dart-lang/sdk/issues/35916
Change-Id: I2e93c7f8e3baf5c9285107d23786bb3bf4f3a511
Reviewed-on: https://dart-review.googlesource.com/c/92626
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Some of the new control flow collections tests are using the spread operator.
Change-Id: Id050025342692a5e3d88471840c4f0ca5cdab5da
Reviewed-on: https://dart-review.googlesource.com/c/92480
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Rationale:
Static calls were formerly unexplored in our constant
folding. This is a first step towards making the
constant folder aware of semantics of recognized methods.
https://github.com/dart-lang/sdk/issues/35882
Change-Id: Id6e366f4d25f08a618931fc3c8a8c065f6358feb
Reviewed-on: https://dart-review.googlesource.com/c/92410
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
This is a pre-step to modularizing the world impact computation.
Change-Id: I4f59f9767e7399fdcf9a070074864e6873b61a52
Reviewed-on: https://dart-review.googlesource.com/c/92044
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This is a prestep towards tracking initialization through field
initializers with the aim at discovering effectively constant instance
fields.
Change-Id: Iefc36382589e4fbe03e1bc4314230f62fb925b9a
Reviewed-on: https://dart-review.googlesource.com/c/92265
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
This change ensures that DDC tests won't accidentally "pass", and then
silently fail or timeout later, when the async tests actually run.
Change-Id: Id18d3343e5dadcf266f39568a93381daf4c54e1c
Reviewed-on: https://dart-review.googlesource.com/c/92247
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
The deflaking phase of testing is breaking when trying to handle
too many timing-out tests at once, stopping the builder runs.
Skipping them until we can debug the problem.
Change-Id: Id3243d8123465ca119262028dfe04d18d41b48c6
Reviewed-on: https://dart-review.googlesource.com/c/92139
Reviewed-by: Vijay Menon <vsm@google.com>
These expectations were for a stale version of the precompiled
runtime.
Change-Id: Ie4bafb50b89e76df4e782d240674968f078a6c6c
Reviewed-on: https://dart-review.googlesource.com/c/92135
Reviewed-by: Samir Jindel <sjindel@google.com>
Also stop skipping the corresponding tests. Add status file entries
for Fasta and VM configurations.
Change-Id: Iecc1e048915df598ba69ac79261cfc836d38f95a
Reviewed-on: https://dart-review.googlesource.com/c/92045
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Set literals have an exact type of Set<T> for some T. An implicit
downcast to a subtype is a static error.
Change-Id: I922b078b1b9e595243520e73c7130c23fe91f454
Reviewed-on: https://dart-review.googlesource.com/c/91640
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
When mixin application is transformed, mixin is added to the end of
interfaces list. This may cause assertion failure if the same class
is used as mixin and mentioned among implemented interfaces.
This CL relaxes that assertion for mixins as this duplication is very
rare and seems harmless.
Note that it would not be valid to remove duplicated interface/mixin
from the list of interfaces, as it would break dart:mirrors in this case:
dart:mirrors needs to reflect duplicated interface/mixin both in
ClassMirror.superinterfaces (which is populated from the
list of interfaces without last element) and ClassMirror.mixin (the last
element in the list of interfaces).
Fixes https://github.com/dart-lang/sdk/issues/35854
Change-Id: I9b986f7759a76cb6f963ebd837e9ea26f6242f8e
Reviewed-on: https://dart-review.googlesource.com/c/91961
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
These statuses should be more specific, but this should get the bots
green first.
Change-Id: Ifa734f74f866974332b2926398f2a01eb0707ac7
Reviewed-on: https://dart-review.googlesource.com/c/91767
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
I'm sure there's mistakes since I can't parse the tests, much less run
them, but I did my best.
Is there anything else you think we should add? I feel like the tests
around inference are weak, but I don't know what else would help.
Change-Id: If4b573acad4395310ad6fc3477861f8d28c16255
Reviewed-on: https://dart-review.googlesource.com/c/89085
Reviewed-by: Leaf Petersen <leafp@google.com>