Commit graph

82 commits

Author SHA1 Message Date
Lasse R.H. Nielsen 46b3b6352d Clean up null-aware tests.
Change-Id: I0e932695b00dc8fab34fbbeada5777cb4534150e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162510
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-05-12 15:21:10 +00:00
Tess Strickland 6730b12edc [vm] Add --resolve-dwarf-paths (disabled by default).
When --resolve-dwarf-paths is enabled, then paths output to DWARF
information will be resolved to either an absolute or relative path.
If this cannot be done, snapshot creation fails.

File URIs are output as absolute paths.

SDK URIs are output as paths relative to the SDK root.

TEST=vm/dart{,_2}/use_resolve_dwarf_paths_flag_test

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: I63c694f0f707ef6a3d3faa690e001fefe2b26094
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196491
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-04-26 11:44:47 +00:00
Tess Strickland 6c8f4aa190 Reland "[vm] Fix V8 snapshot profile handling of the dispatch table."
This is a reland of 5909fd111d

Does a large refactoring on the V8 snapshot profile writer
to clean things up, add more debugging support, and to fix
the problems that surfaced during the original landing.

Other changes:

Changes Serializer::CreateArtificialNodeIfNeeded() to create
artificial nodes for Code objects and immutable arrays.

Fixes CodeSerializationCluster::Trace() to only push needed parts of
discarded code objects, instead of tracing them like full code objects.

Adds test cases to v8_snapshot_profile_writer_test that exercise
the following situations (both separately and together):

* Non-symbolic stack traces are enabled and code and function objects
  are dropped when not needed at runtime.

* Creation of the dispatch table is disabled.

TEST=vm/dart{,_2}/v8_snapshot_profile_writer_test

Original change's description:
> [vm] Fix V8 snapshot profile handling of the dispatch table.
>
> Fixes https://github.com/dart-lang/sdk/issues/45702.
>
> TEST=Tests listed in the issue above.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
> Change-Id: Ibf5e3ccf3828c01f9dda47de360314dabe8cb8a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195272
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

Change-Id: I8e7030267fe190079a8f68d00fe20bf7170e5719
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-obfuscate-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195513
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-04-20 11:17:36 +00:00
Franklin Yow 03101c0c2b Update LICENSE
Changes to comply to internal review

Closes https://github.com/dart-lang/sdk/pull/45568
https://github.com/dart-lang/sdk/pull/45568

TEST=CL contains no code changes.

No-Try: true
GitOrigin-RevId: 65796784e5fdfddaa021b5c55ad435b1db419700
Change-Id: I085a948f16dc9a0de128ed0bd456ae69adf6c124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193888
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-04-07 10:28:38 +00:00
Tess Strickland bf74cad477 [vm/compiler] Change when parents of local functions are retained.
Now they are only retained if one of the following is true:

* The parent is Future.wait or Future.timeout.
* The local function is a generated body of an async/async*/sync*
  function.
* Symbolic stack traces are enabled.

When a local closure's parent is dropped, the parent name will
be printed as `<optimized out>` in places like exceptions.

Changes in Flutter gallery in release-sizeopt mode:

* ARM7: ROData -1.41%, Isolate snapshot -2.35%, Total snapshot -0.54%,
        Isolate heap -1.38%, Total heap -1.38%
* ARM8: ROData -1.55%, Isolate snapshot -2.34%, Total snapshot -0.65%,
        Isolate heap -1.41%, Total heap -1.41%

TEST=Existing tests on CI.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try, vm-kernel-precomp-dwarf-linux-product-x64-try
Change-Id: I9d05f9e0e30e9f428eff16a15b0f1eeb974419c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190023
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-03-25 13:47:03 +00:00
Alexander Thomas c88171c8af [sdk] Bump version to 2.13
TEST=Presubmit tests and local builds
Change-Id: I1b15d60eced0cf3f422548eda75706609f6640cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182624
Commit-Queue: Alexander Thomas <athom@google.com>
Auto-Submit: Alexander Thomas <athom@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-02-04 12:10:17 +00:00
Devon Carew 8cba879f46 Add additional validations to the pkg/ package pubspecs.
TEST=these are additional validations that we run on the bots

Redux of https://dart-review.googlesource.com/c/sdk/+/161040

Change-Id: Ia32ced5d48fbfeafacfa9e51dc4774d2e9425091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174601
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-12-02 17:27:18 +00:00
Tess Strickland 3b9b77964d Reland "[vm/compiler] Move AssertAssignables out of closure bodies."
This is a reland of 42c76fd910

Main issue was due to the parameter order of the invoke field dispatcher
not matching the argument order described by its saved arguments
descriptor. There's no reason for it not to, so now it does.

Also fixes some issues with stack trace tests that failed due to
increased deduplication of closures by forbidding deduplication for
those tests.

TEST=Run on trybots of all architectures as well as flutter engine
trybot, new test added for downstream issues seen after initial landing.

Original change's description:
> [vm/compiler] Move AssertAssignables out of closure bodies.
>
> This CL moves the final set of checks out of closure bodies and into
> dynamic closure call dispatchers.  It also adds stubs for checking top
> types and null assignability for types only known at runtime.
>
> Fixes https://github.com/dart-lang/sdk/issues/40813 .
>
> Changes in Flutter gallery in release mode:
>
> * arm7: -3.05% total, +0.99% vmisolate, -0.89% isolate,
>         -1.20% readonly, -4.43% instructions
> * arm8: -3.20% total, +0.99% vmisolate, -0.88% isolate,
>         -1.18% readonly, -5.05% instructions
>
> TEST=Run on trybots of all architectures, includes test adjustments where needed.
>
> Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try
> Change-Id: Ifb136c64339be76a642ecbb4fda26b6ce8f871f9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166622
> Commit-Queue: Tess Strickland <sstrickl@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Régis Crelier <regis@google.com>

Change-Id: Ic5ec59cf355f7779bb82db798d97d762ba1e5556
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-product-x64-try,flutter-engine-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172644
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-11-18 22:42:31 +00:00
Lasse Reichstein Holst Nielsen 1003e91a35 Remove uses of, and need for, Expect.throwsNullCheckedError.
All code which was tested now throws a TypeError in both
sound and unsound null safe mode.

Change-Id: I304dfa6b8683223562f8613f3d14823fccab35bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170439
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-11-11 13:30:30 +00:00
Erik Ernst 3a7eeb6315 Rename is{Strong,Weak}Mode to has{Sound,Unsound}NullSafety
Change-Id: If3912d75c5f89a741299b2fae4299d01ac928eec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170424
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-11-05 14:26:53 +00:00
Kevin Moore 063c3ede72 Update pkg dependencies on pkg:analyzer
Now `pub get` actually succeeds on `pkg:front_end`

Change-Id: Ifdab9d6741efba034ecd56f27fd83e288267e46c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168662
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-10-26 19:30:06 +00:00
Paul Berry def50905c2 Make flow analysis handling of is/==/??=/?. consistent with mixed mode semantics
Bug: https://github.com/dart-lang/language/issues/1143
Change-Id: Id177f8b19c15ef246f21ddd840410cddfee2e5cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163600
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-09-25 08:35:03 +00:00
Robert Nystrom 3af367cfd9 Migrate the new async error tests.
When we moved to make errors non-nullable in the async API, I added
legacy tests, but not NNBD tests because it is a static error in NNBD.
However, we've since started testing that null is caught dynamically
when flowing into those APIs from legacy code.

So this migrates those tests over.

Change-Id: I8002bacb45e947ef8c93dca10c7c1fd41afaa696
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152614
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-26 20:59:28 +00:00
Michael Thomsen f0c87e9f21 Clean up no-publish comments in pubspecs
Change-Id: I6cc1ab404de75cd02183b862842198c85b6d9256
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152005
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-23 10:34:09 +00:00
Robert Nystrom 4c78bacd1d Migrate language_2/implicit_creation to NNBD.
Change-Id: I4b287ab1f1160550682a6afb706f5985b9fb474d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148282
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-05-20 22:04:05 +00:00
Mayank Patke 99285ebe13 Add nnbd_mode_test to package:expect.
This test confirms that the NNBD mode predicates are consistent with
equivalent dynamic tests.

Change-Id: Ifeb2b9a14144ce3bee10580c80fd4a1aeea43c32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148581
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-05-19 06:55:30 +00:00
Robert Nystrom b955271e51 Migrate language_2/function_subtype to NNBD.
Change-Id: I8d41ad649c83cd97253006693a0cf3676de418e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145542
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-05-05 16:52:30 +00:00
Robert Nystrom d9bb487ca8 Treat the expect and async_helper packages as opted in to NNBD.
This should enable strong mode tests to be fully NNBD opted in. At the
same time, legacy tests when run with the experiment off should
hopefully be able to still consume these libraries because they don't
actually use any NNBD features.

To do this, I changed the script that generates the SDK repo's package
config to not put in a language version for any package whose pubspec
has no SDK version. According to language versioning, that means the
package should be considered to be at the "current" version of the SDK
running the code.

In NNBD, that's opted in. With the experiment off, that is (presumably)
"opted out" in the sense that NNBD doesn't exist.

In order to *not* opt in some of the other packages that currently
lack SDK constraints, I put those in and pinned them to "^2.7.0" which
was what the package config script used to implicitly fill in for them.

I see a bunch of other changes in the generated package config too. The
update script probably hasn't been run in a while.

Change-Id: I55193d42eac0696a6b0105546551efa45a1f3252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144305
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-04-27 21:04:56 +00:00
Robert Nystrom 54ae6c123e Make minitest and async_minitest NNBD agnostic.
Fix a couple of errors when compiling those libraries as opted in to
NNBD.

Change-Id: I7dfb629d951d8531c8bed4e765950984e9291f44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139686
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-03-16 19:58:10 +00:00
Mark Zhou 28fb096cfc Initializing ExpectException's name to the empty string instead of null when no name is provided.
Change-Id: I2d9d6cafe3e25b1ecf1a9385405262c557887667
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139325
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2020-03-12 23:16:01 +00:00
Leaf Petersen 5e9be81d5e Make all CastErrors be TypeErrors.
This makes CastError implement TypeError, and changes all test
expectations to look for TypeError.  A followup CL will deprecate
CastError.

Bug: https://github.com/dart-lang/language/issues/787
Bug: https://github.com/dart-lang/sdk/issues/34097
Change-Id: I7102c6260901317572d2df08c4be9c4c48197688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138670
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-11 23:31:06 +00:00
Robert Nystrom 63bff1a2fb Improve asynchronous test failures and async_minitest.
There's a bundle of improvements here:

- Show the stack trace of the failure when a test using async_minitest
  fails. The trade-off is that it now only reports the first failure.
  Collecting all of them didn't play nice with the stack trace
  deobfuscation the test runner does.

- Report the group and name of the test that failed when known.

- Fix as many double-reporting test result bugs as I could find. Also,
  in case that still happens, don't spew out a pile of useless JSON.

- Correctly wait for a test to complete even if it schedules its own
  asynchronous operations without returning futures.

- Generally simplify and clean some stuff up.

Change-Id: Ie020ae0b80a11764c455cf0ce24dfea09ca0adce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138903
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-03-11 01:12:48 +00:00
Robert Nystrom 4b7ba5a72f Add a script to generate a package_config.json for the SDK.
Also include the generated output.

Change-Id: Ic2818f544972c737f69913122e366ea48375e950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135795
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-27 17:52:23 +00:00
Robert Nystrom 01907a6f9b Migrate standalone tests off ancient deprecated unittest package.
We don't intend to migrate unittest to NNBD, so the remaining tests
that use it need to be migrated off. This takes care of the couple of
tests in standalone/ and standalone_2/ that used it.

The tests should behave the same as they did before. I verified by
making the tests fail in various ways after the migration and ensuring
that the tests failed as expected.

Change-Id: I938229cabad1d78a42a030970f2003edd36572f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136060
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-02-24 23:53:33 +00:00
Robert Nystrom 44f027b8b2 Remove the matchers_lite.dart library.
It was literally only used by one test, and only used a single function
not already defined in minitest. That function was only used in one
place and wasn't very useful, so just refactored to not use it.

Change-Id: Ib51ac255233aa29bcaf19aaba16bc99d7eff724d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135965
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-02-14 20:44:52 +00:00
Ryan Macnak 081e2acf29 [test] Update copied mirrors tests for Dart 3.
Bug: https://github.com/dart-lang/sdk/issues/40045
Change-Id: Ic0f62843d61b613e61f434b72b9553dd1e6897af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132441
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-01-23 18:09:37 +00:00
Nicholas Shahan 929a306bfc [tests] Fix missing space in failure message
Change-Id: I7d02362076fc17379dc67c98b87f96866dbde7aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122403
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-10-21 23:09:42 +00:00
Vijay Menon 596bd5b61c [dartdevc] Add modular NNBD test
Change-Id: I61cdd4a1f03232f1f8bab8b029e50b34bf7a1648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/117760
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-09-19 16:53:50 +00:00
Vijay Menon b37dd729ad Revert "Revert "Make package:expect NNBD agnostic""
Reland this CL.

Change-Id: I0e7684da01d417e76be44ce07a68a21d6a623b23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114635
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-08-28 14:02:11 +00:00
Vijay Menon 9b23c483ba Revert "Make package:expect NNBD agnostic"
This reverts commit 10c212f910.  This is breaking on mirrors_reader_test.dart
in the VM on debug mode.

TBR=leafp,asiva

Change-Id: I71f1d78c2e1ca800584438b161c89115cd46d644
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114627
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-08-27 20:39:52 +00:00
Vijay Menon 10c212f910 Make package:expect NNBD agnostic
Not sure this entirely a good goal, but this is attempt to make package:expect
NNBD-agnostic.  I.e., make the same code compile with or without the "non-nullable"
experiment enabled in order to avoid forking for tests.

I am still hitting two errors with NNBD - see comments.  They both appear to be
bugs with type promotion + NNBD.

Change-Id: Ibf444a20c484daa38fdb88b92a26c4acac833d1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113924
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-08-27 16:04:07 +00:00
Lasse R.H. Nielsen aee65636ba Add constructors to Stream which creates single data or error event streams.
Change-Id: I3f570b15d29601a488dc634ab3cc563783868ac2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108102
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-07-08 13:38:54 +00:00
Sigmund Cherem fb29d0e96d Move async_minitest to package:async_helper.
This allows to break a circular dependency between package:expect and

package:async_helper, which will simplify the support for modular tests using
package:modular_test.
Change-Id: Ie48723d3f35d51a8fbe622e0158450e8104fe3f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102140
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-10 19:43:58 +00:00
Johnni Winther 204651f3ab Replace package:expect annotations with @pragma
Change-Id: Ib43d0d71a3ee8b0f0e6d676e6a3e448a107b7ca5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95180
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2019-03-05 11:00:17 +00:00
Jenny Messerly 627e96c9c1 [dartdevc] simplify microtask scheduling using JS Promise
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>
2019-02-21 20:13:19 +00:00
Peter von der Ahé a92ddcf34b Add package:expect/matchers_lite.dart
Change-Id: I671f317ee2c806380584646c75412762e549418e
Reviewed-on: https://dart-review.googlesource.com/c/93023
Reviewed-by: Jens Johansen <jensj@google.com>
2019-02-13 14:35:15 +00:00
Kevin Moore a60a06ff7d Update pkg:expect to use @alwaysThrows annotation on fail functions
Change-Id: I4e87b2044fe429b42d8e96213f415437a7f2d1da
Reviewed-on: https://dart-review.googlesource.com/c/89421
Commit-Queue: Kevin Moore <kevmoo@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-01-14 21:17:38 +00:00
Kevin Moore 6f3ce5b9e9 Fixes for SDK packages
Change-Id: I544e4e085cc1e420397d6d825a93376ae586f9a4
Reviewed-on: https://dart-review.googlesource.com/c/88681
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-01-08 14:53:42 +00:00
Johnni Winther 6d4d3c6b07 Remove TrustTypeAnnotations
Change-Id: I7404d10c30642f5282d079e36cb4a20ee2066060
Reviewed-on: https://dart-review.googlesource.com/c/87401
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2018-12-18 11:00:09 +00:00
G?nter Z?chbauer 2da0b9f4f1 fix some typos
Closes #34738
https://github.com/dart-lang/sdk/pull/34738

GitOrigin-RevId: d211bbacfe65355cf7304c990ffb6c79d7a229cf
Change-Id: If690e6d378e543b300e1f6a353ceae73e39c29db
Reviewed-on: https://dart-review.googlesource.com/c/78900
Reviewed-by: Alexander Thomas <athom@google.com>
2018-10-10 19:15:30 +00:00
Jenny Messerly 0496569f09 implement super mixins in dartdevc and fix a few issues in Analyzer
Fixes #34167. This implements the Dart 2 mixin proposal
(https://goo.gl/KEKQyv) for DDC. When the mixin is applied, a class
is created for the application that extends the correct superclass
and has all of the instance members, so `super` works correctly.

This also fixes a few minor issues in Analyzer's (mostly complete)
implementation:
- InterfaceType.isObject now returns false for Dart 2 mixins.
- Least upper bound calculation recognizes mixins are not Object.
- Interface of the mixin now implements its superclass constraints.
- Mixin superclass constraints are checked against the superclass and
  all previously applied mixins (if any); this keeps it working with
  the subtype fix above, and also prevents a not-yet-applied mixin
  from satisfying the constraint

The language_2/mixin_declaration tests were updated with a few minor
fixes now that we can run Analyzer/dartdevc to test them.

This change implements super mixins for DDC's Kernel backend (DDK)
too. This will be enabled once Kernel adds a flag to recognize which
Class nodes are mixins (vs normal classes).


Change-Id: Ib3c4fcb12de9988345e52d92931196828d8227c3
Reviewed-on: https://dart-review.googlesource.com/74965
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2018-09-18 03:21:48 +00:00
Lasse R.H. Nielsen cc08d0e1da Add operators &, | and ^ to bool.
Change-Id: Idd6472f239445914c1ff1ab68fc7b38fa6b320ae
Reviewed-on: https://dart-review.googlesource.com/25240
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-09-17 12:33:12 +00:00
Lasse R.H. Nielsen b1eeacc30a Remove usage of unittest package from a number of tests.
Add simplified unittest replacement to package:expect.
(It is used in multi-tests, so it needs to be in an accessible place without using ".." in its path).

Change-Id: I60aa212ed67ffbdda17ca18fce1cdff16237f4fe
Reviewed-on: https://dart-review.googlesource.com/65700
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2018-07-20 13:26:38 +00:00
Lasse R.H. Nielsen 76db06cc24 Fix assert in Future code to allow a Future<Future<int>>.
Fix the `lib_2/async/future_test` test which was otherwise failing everywhere.
Updated status files.

Change-Id: I4e277dd7d47692b92b3303bfdd7cfbde120a8f87
Reviewed-on: https://dart-review.googlesource.com/65080
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2018-07-16 11:27:36 +00:00
Lasse R.H. Nielsen 6bc7288e70 Fix fused UTF-8/JSON decoding.
The VM version's parser did not allow a leading BOM, and it failed to parse a top-level integer.

Added test to check this.

Fixes #33251

Bug: http://dartbug.com/33251
Change-Id: I51e429082f0e9baac81e20f73b0885922b40b0b8
Reviewed-on: https://dart-review.googlesource.com/56860
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Florian Loitsch <floitsch@google.com>
2018-05-29 12:34:25 +00:00
Lasse R.H. Nielsen 5ea271bb01 Clean up documentation of implicit new/const insertions tests.
Add Expect.allIdentical to complement Expect.allDistinct.

Change-Id: I65e4e0005f141434bd8fb47d9c60153f32b293aa
Reviewed-on: https://dart-review.googlesource.com/50421
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-04-10 14:49:41 +00:00
Mike Fairhurst 56d59dd967 Reland https://dart-review.googlesource.com/c/sdk/+/37441 with fixes
Change-Id: If8e2ec2ca1ac4f533dcb56b0c95d55e4a13e0598
Reviewed-on: https://dart-review.googlesource.com/39881
Reviewed-by: Paul Berry <paulberry@google.com>
2018-02-08 20:46:19 +00:00
Mike Fairhurst ec58f5646a Revert "Make void a static warning to use almost everywhere."
This reverts commit 09eed74a8a.

Reason for revert: Too much SDK code is not yet compliant.

Original change's description:
> Make `void` a static warning to use almost everywhere.
> 
> Changed the hint to a StaticWarningCode, since that's the new spec'd
> error type and the hint is no longer needed.
> 
> Added a new set of methods to test the cases.
> 
> Didn't try to solve the problem generally ("all usages except ... are
> errors" means it easier, in theory, to make a ReportVoidExpressions
> style visitor that catches absolutely all types) because most of the
> work is actually about suppressing errors that are no longer needed.
> Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
> put the void handling logic into each AST method specially anyway.
> 
> Some redundant tests removed.
> 
> Don't flag: ternaries, void -> void assignments, void returns in
> dynamic.
> 
> Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
> Reviewed-on: https://dart-review.googlesource.com/37441
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>

TBR=leafp@google.com,scheglov@google.com,mfairhurst@google.com

Change-Id: I13ee4c6939468d35506779ade637a040833632f4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/39848
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2018-02-07 22:32:51 +00:00
Mike Fairhurst 09eed74a8a Make void a static warning to use almost everywhere.
Changed the hint to a StaticWarningCode, since that's the new spec'd
error type and the hint is no longer needed.

Added a new set of methods to test the cases.

Didn't try to solve the problem generally ("all usages except ... are
errors" means it easier, in theory, to make a ReportVoidExpressions
style visitor that catches absolutely all types) because most of the
work is actually about suppressing errors that are no longer needed.
Ie, from NO_SUCH_METHOD to USAGE_OF_VOID_RESULT which means we have to
put the void handling logic into each AST method specially anyway.

Some redundant tests removed.

Don't flag: ternaries, void -> void assignments, void returns in
dynamic.

Change-Id: Ief8035dcfe582b36b6372180ddcf4e453d320d9c
Reviewed-on: https://dart-review.googlesource.com/37441
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2018-02-07 21:36:01 +00:00
Lasse R.H. Nielsen 5d84d683a8 Update status files for more Safari breakage.
Actually document the Expect.throws behavior.

Change-Id: I4cfd540c5908fa6df8920cd87a327b1eded63f4d
Reviewed-on: https://dart-review.googlesource.com/36940
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2018-01-26 14:35:43 +00:00