Commit graph

20641 commits

Author SHA1 Message Date
Johnni Winther 34f5c9d0b4 [cfe] Implement new async return rules
Closes #41800
Closes #41900
Closes #42134
Closes #42282
Closes #42236
Closes #42169

Change-Id: Ia994bc07fba4e2342fcb59d44fc77608198a328b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152150
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-06 07:04:40 +00:00
Ben Konyi c40ebbc65e [ DartDev ] Ignore SIGINT in DartDev process
If a user program installs custom signal handling for SIGINT,
the DartDev instance may exit before its child, potentially causing
confusing behavior and 'zombie' children. By ignoring these signals in
DartDev, the DartDev instance will only exit once its child process
exits.

Fixes https://github.com/dart-lang/sdk/issues/42092

Change-Id: I04bf6d1f375b8bb3a4f7022f2c79ddde3bd5f414
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149643
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Jaime Wren <jwren@google.com>
2020-07-06 03:02:00 +00:00
sgrekhov 3ccf7ce5d2 [co19] Language/Reference tests enabled
Change-Id: I51647c2e3de9e63d25b9bea29eae050b3473414a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153203
Reviewed-by: Alexander Thomas <athom@google.com>
2020-07-03 09:05:28 +00:00
sgrekhov 965a70a319 [co19] Enable Metadata, Mixin and Overview tests
Change-Id: I5a640e31eb50e17260386ef2aafe9864b54d8f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152642
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2020-07-02 19:12:40 +00:00
Erik Ernst f4d7951a88 For external/abstract fields: add tests and update Dart.g
This CL adds tests in language/external_abstract_fields, testing the
support for abstract instance variables, and for external top-level,
class, and instance variables. It is tested that the syntax of
supported declarations is accepted, and a number of non-supported
forms are rejected, and abstract fields are tested at run time as well.

The implementation of external fields is provided by an implementation
specific mechanism, and no tests are added for any such mechanisms
(that is, with external fields we only test errors).

This CL also updates the spec grammar Dart.g to include grammar
rules for the new kinds of declarations, and it has been verified that
the new tests are passing, respectively cause syntax errors, as
indicated in the test files.

The tests are a further development of the ones in
https://dart-review.googlesource.com/c/sdk/+/145862.

Change-Id: I13be746a05d5acf0117d8cb22151bd9863a71a78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148324
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-07-02 13:39:39 +00:00
Tess Strickland 9329995dd8 [vm] Add a separate invoke field dispatcher for dynamic closure calls.
Adds TODO comments in appropriate places for future work that will move
non-covariant type checks out of the closure body. Instead, the VM will
perform them in the invoke field dispatcher (or NoSuchMethodFromCallStub
if --no-lazy-dispatchers is used) when a dynamic call is detected.

This change has minimal negative effects on the code size. Here are the
code size change percentages for the Flutter Gallery in release mode:

* ARM7
  * Instructions: +0.0391%
  * ROData: -0.0040%
  * Total: +0.0239%
* ARM8:
  * Instructions: No change
  * ROData: +0.0015%
  * Total: +0.0004%

All other code size benchmarks are also <0.01% increase.

Bug: https://github.com/dart-lang/sdk/issues/40813
Change-Id: I4bf145803bb9e2d4ba5c22c12b6fd3bb5368441d
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-dartkb-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151826
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-07-02 13:16:19 +00:00
Srujan Gaddam f8ff12008e [dart:html] Revert commits using MDN compatibility info
This reverts commits aff77e7e..e24f205d.

Due to a breakage in a Flutter roll, this CL stack needs to be
reverted. It should be reintroduced with changes to Flutter code to
compile with the changes in dart:html.

Breakage: https://github.com/flutter/engine/runs/828631927

Change-Id: I9c93c4eab823337d09d2e347015ad9ec402f2038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152910
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-07-02 01:33:18 +00:00
Sigmund Cherem a114b165e5 [web] Fix dart:mirrors and include it with the dart2js SDK so we ensure it doesn't break accidentally
Change-Id: I047136bb5d09680be38408de9581cf6931e516d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152406
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-07-01 23:31:04 +00:00
Srujan Gaddam e24f205d16 [dart:html] Mark setters nullable if incompatible as well
Getter types need to be a subtype of the setter type, so if getters
are nullable due to incompatibility, the setter needs to be as well.
This change makes those changes, updates documentation, and modifies
a template and test file.

Change-Id: I2130538bb4005b3553eb7951af022c1c2ed59c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152607
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2020-07-01 22:06:34 +00:00
Srujan Gaddam 974be4805c [dart:html] Modify tests to compile with compat changes
Changes tests that use native getters that have changed to
nullable.

Change-Id: I469b283f65dc45b2359a850b09fc7f32f88086fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152405
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-07-01 22:06:34 +00:00
Jacob MacDonald 51ac86c753 update collection dep, and add flutter-engine patch
Change-Id: I5e8b0eb2b161b71734feebb6e13d039082ad6bc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152860
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2020-07-01 20:50:38 +00:00
Erik Ernst 1d264c53e4 Adjust nnbd tests that return voidy expressions
Change-Id: I3c9fb55e49630372d232d1dcf12ab323badac42a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152846
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-07-01 07:31:28 +00:00
Erik Ernst 41c9fb6a19 [CFE] Type infer aliased factory invocations.
This CL adds support for type inference on type aliased invocations of
factory constructors, redirected as well as non-redirected, and it adds
some tests using this feature.

Additionally, this CL resolves a couple of issues that arose when the
directory nonfunction_type_aliases was migrated to null-safety (by
means of two single line fixes, in 'usage*_test.dart').

Still missing: The shadow nodes should be eliminated in
_unaliasTypeAliasedConstructorInvocations and
_unaliasTypeAliasedFactoryInvocations, this will be done in a separate
CL.

Change-Id: Ic146bd16a02ca8f79c46b7df7c8dff7712f21189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152740
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-07-01 07:19:08 +00:00
Alexander Markov e6cbfd71f1 [vm/corelib/nnbd] Fix null check in _GrowableList.length=
We should verify that element type is nullable every time length is
increased, not only when capacity is increased.

Fixes https://github.com/dart-lang/sdk/issues/42502

Change-Id: Id91c702a99028634da8c2d41ae0ceac521af2cf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152900
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-30 17:14:14 +00:00
asiva b8adfa4ffc [Tests] : port remaining isolate tests for null safety.
- Some of the package config tests for isolates were not ported in the
  initial round, this CL ports these tests.
- lib_2/isolate/isolate_stress_test.dart is not ported as it is
  currently skipped for the VM and was probably intended to be a
  dart2js test.

Change-Id: I53c3641d2a83f2661ecdb8cd57a8c381234b06d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152940
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-06-30 17:04:44 +00:00
Brian Wilkerson 46a2fa6b99 Unify two error codes for diagnostics
Change-Id: I5714cec5e47b67e1a4be2f2895fa9cc96e869c45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152732
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-29 18:58:03 +00:00
Lasse Reichstein Holst Nielsen 17d0ba55e8 Add Stream.multi constructor.
A generalized stream which provides a controller for each listener.
Can be used to implement both broadcast streams and single subscription streams,
as well as any stream behavior between the two.

Change-Id: I7a75f8736ca6bc91ce266e768db68536efd24dfe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150936
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-06-29 14:04:53 +00:00
Brian Wilkerson d074bb1596 Improve the range selected by const_constructor_with_field_initialized_by_non_const
Instead of highlighting the entire constructor, which might be long, we
now highlight just the keyword `const`.

Change-Id: Ie520db0a2fcaf05db79d9e49e08f06a5212fef7f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152727
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-28 14:51:31 +00:00
Mayank Patke e8daaefabf [dart2js] Ensure generic local functions are marked as potentially
needing type arguments.

Change-Id: I50831df2530395b9ec3562be171422b0b6455335
Bug: https://github.com/dart-lang/sdk/issues/42501
Fixes: https://github.com/dart-lang/sdk/issues/42501
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152606
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-06-26 21:27:38 +00:00
Robert Nystrom 4472284758 Migrate a few language_2/invalid_returns tests that were missed.
Change-Id: I9930a6f0969249c6b1c59d694b76a28cbe3a6e90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152615
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 21:00:38 +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
Brian Wilkerson 41a884315f Clean up uses of @virtual in tests
The annotation has no semantics related to these tests, and the tests
will be cleaner without the extra code.

Change-Id: I0f31a30af624d2af707eae3003acb09a742bef3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152612
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-26 20:33:55 +00:00
Robert Nystrom 35da19ac07 Migrate standalone_2 to null safety.
Change-Id: I0e97add738bc79314a210cf137525b7391467fc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152595
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-06-26 19:17:50 +00:00
Robert Nystrom 48608ce9bc Migrate language_2/variance to NNBD.
Change-Id: I8e21f82dc241a63f78fb1f6a25669b1aa633788c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152080
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2020-06-26 18:37:00 +00:00
Robert Nystrom d4154ac6dc Migrate language_2/unsorted to NNBD.
Change-Id: Iad2963c7f9c184b089dc6d15aa4442f58d194bc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151983
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-06-26 18:34:14 +00:00
Robert Nystrom 1ab82dee7e Migrate language_2/nonfunction_type_aliases to NNBD.
Change-Id: I2cf8ebe11b86549488fa04f18d5e92c1bf9c3a15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152585
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-26 18:28:55 +00:00
Joshua Litt 66c1b51c07 [dart2js] 20 dart2js tests ported to nnbd #1.
Change-Id: I8cb1bb03655762669ac88775b5aee763e79c4b11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152594
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-06-26 15:21:42 +00:00
Daco Harkes da39a4abff [vm/ffi] Remove try-catch from ffi trampoline if no handle scope
https://dart-review.googlesource.com/c/sdk/+/145591 introduced a try
catch into FFI calls to call ExitHandleScope on the exception path.
However, we only need this try-catch if we actually need to exit the
handle scope on the exception path, which is not the case if we have
no handles in the signature. So this CL makes the try catch optional.

This speeds up ffi calls without handles (tested on JIT x64):
FfiCall.Uint8x01(RunTime): 206.4801280066068 us.
->
FfiCall.Uint8x01(RunTime): 203.7240782236708 us.

Also adds a test that checks that an exception can still be propagated
with Dart_PropagateError from native code when the FFI trampoline has
no try catch.

Change-Id: I9fac7078381c60fb8055b64fff29ea364fbc948f
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,app-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-dartkb-linux-release-x64-abi-try,vm-kernel-precomp-android-release-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,dart-sdk-linux-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,front-end-linux-release-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-mac-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-nnbd-linux-debug-x64-try,analyzer-nnbd-linux-release-try,front-end-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151239
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-06-26 12:03:02 +00:00
sgrekhov 85d37c1ede [co19] Enable Language/Libraries_and_Scripts tests
Change-Id: I9632efb404c7723258f64569fb5821b7a04941c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152326
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-26 09:11:14 +00:00
Alexander Markov 2639f146dd [gardening] Skip flaky lib_2/async/stream_state_nonzero_timer_test
This test sporadically crashes and confuses
vm-dartkb-linux-release-x64-abi bot which compares results on different
versions of ABI.

Issue: https://github.com/dart-lang/sdk/issues/42073
Issue: https://github.com/dart-lang/sdk/issues/42331
Change-Id: Ib61ca37ed07f40384f78e19e40c51096dd68dc08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152591
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-06-25 22:13:32 +00:00
Robert Nystrom ffa7969bb8 Migrate lib_2/developer/timeline_recorders_test.dart to null safety.
Looks like this was added to lib_2 after the initial migration.

Change-Id: Ic56357cd99c9b369c38628f4527cfa84f50f5f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152600
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-06-25 21:21:32 +00:00
Robert Nystrom 2034061433 Migrate language_2/vm to NNBD.
Change-Id: I313a57ed7c7ea2ada75065f55a7367376f6bdae5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152183
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-06-25 20:39:23 +00:00
Robert Nystrom 2af6c644db Migrate language_2/superinterface_variance to NNBD.
Change-Id: I48592c7d8a2d568dc8af14b51555bc59664ca36c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151467
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-25 20:21:42 +00:00
Robert Nystrom e49b9a141c Apply Karl's multitest changes to the migrated language tests.
Change-Id: I6cc37cc5aa7042aacabde4814aecdfe934876d7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152583
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-25 19:41:22 +00:00
Robert Nystrom 28583a42b6 Mark legacy boolean tests as complete for migration.
Change-Id: Id25f1e2bd0049ad1522bd5d2bc75101e6db00efe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152584
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-06-25 18:57:32 +00:00
sgrekhov 1c512ef120 [co19] Enable more migrated "Language" tests
Change-Id: Ib5e450d90bcce0a96d65f088b292b5db2ade1f5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152342
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-25 07:40:46 +00:00
Robert Nystrom 8eb0b79ac1 Migrate language_2/variable to NNBD.
Change-Id: I2c0182203d7566908a574208b7d8f10da08d7a43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152043
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-25 02:05:32 +00:00
Mayank Patke cf62339751 [dart2js] Ensure type arguments are passed when invoking a generic
function property.

Change-Id: I387977e2f1fb7732d94331b7a97cceeec767aaae
Bug: https://github.com/dart-lang/sdk/issues/41449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151301
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-06-24 20:12:39 +00:00
Martin Kustermann 39577ea564 [vm] Remove (unused & deprecated) --package-root parameter from VM binaries and from tests (Platform.packageRoot always returns null)
Closes https://github.com/dart-lang/sdk/issues/41245

Change-Id: Idd7526199b4c2479297c58b05bc13efcb79d01e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152321
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-06-24 18:17:53 +00:00
sgrekhov fb8b7a8a4e [co19] Generics and Superinterfaces tests enabled
Change-Id: If95d1ba2f935135c2038eb9a6e3525d62fccf72f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151529
Reviewed-by: Alexander Thomas <athom@google.com>
2020-06-24 13:13:03 +00:00
Brian Wilkerson 1d64ba0429 Merge 4 diagnostics for the purpose of documentation
Change-Id: I7e7a50ad924af9d200333d2d1640e3f8cd97a88f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151873
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-06-23 17:46:02 +00:00
Erik Ernst 5a6c1e5158 Type aliased inference of generative constructor invocation.
This CL adds some infrastructure that makes it possible to defer the
inference of type arguments for a type alias which is used to specify
an instance creation:

  class B<X, Y> {}
  class C<X> implements B<String, X> {}
  typedef T<X> = C<List<X>>;

  void main() {
    B<Object, Iterable<num>> c = T(); // Infer `T<num>()`.
  }

The CL contains an implementation for type inference in the case
where the target is a non-redirecting constructor.

There is not yet an implementation of type inference for the case
where the type alias ultimately resolves to a redirecting factory
constructor, and the shadow nodes are eliminated as null.

Change-Id: I9721b293dce37313e046a8339359e51c2d54b4c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/150301
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-06-23 14:14:11 +00:00
Robert Nystrom 7e756d6f86 Migrate language_2/type_variable to NNBD.
Change-Id: Iee96b1e254f17ee0b1b7b309cc807bf874a1491e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151982
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-06-22 21:20:26 +00:00
Robert Nystrom d872aea6a6 Migrate language_2/typedef to NNBD.
Change-Id: I415eb8b53e7808c9a09cbc725a422f432f084f66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151924
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
2020-06-22 18:27:21 +00:00
David Morgan 1d3fbbed7c Revert "Fix duration.toString() to conform the description"
This reverts commit 038e981f89.

Reason for revert: Breaks some tests; visible changes to some web UIs.

Original change's description:
> Fix duration.toString() to conform the description
> 
> Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
> But when `hours` is less than 10, toString() doesn't have the leading
> zero, which is "H:MM:SS.mmmmmm".
> 
> The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733
> 
> Bug: https://github.com/dart-lang/sdk/issues/41737
> Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
> Commit-Queue: Zichang Guo <zichangguo@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=lrn@google.com,zichangguo@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I4d7ef5de9807e8e2b2a77c2171d1693b7527f671
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151848
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-06-22 10:29:15 +00:00
Zichang Guo 34ab9f84ab [dart:io] HttpClientConnection is destroyed for "CONNECT" request
If "CONNECT" is used in HttpClientRequest, it is supposed to create a
tunnel and reuse the socket. The socket should remain open instead of
being closed.

Bug: https://github.com/dart-lang/sdk/issues/37808
Change-Id: Ic765bdc6fe4d3e21b3117e882b38e3abae15ceda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/148684
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-06-19 23:18:07 +00:00
Mayank Patke 6c593ac117 [dart2js] Visit type parameter bounds in the scope visitor.
Change-Id: Ief8cc2a88ef0833a10969237fa02cfdec869116d
Bug: https://github.com/dart-lang/sdk/issues/42344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151460
Reviewed-by: Stephen Adams <sra@google.com>
2020-06-19 23:17:47 +00:00
Robert Nystrom a2cc089472 Migrate language_2/type_promotion to NNBD.
Change-Id: Iff60de7b9fbe9371c71c098a9a36e43d2dc7f134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151810
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2020-06-19 23:09:27 +00:00
Zichang Guo 038e981f89 Fix duration.toString() to conform the description
Duration.toString() should return in a format of "HH:MM:SS.mmmmmm".
But when `hours` is less than 10, toString() doesn't have the leading
zero, which is "H:MM:SS.mmmmmm".

The corresponding co19 issue: https://github.com/dart-lang/co19/issues/733

Bug: https://github.com/dart-lang/sdk/issues/41737
Change-Id: I2264171b2b37e89056695f7f821125a5f78d87fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151163
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2020-06-19 22:52:30 +00:00
Stephen Adams 7425b3de51 [dart2js] Remove more dead code.
Change-Id: Iff5b3921f40981c8122d7720ce80a5f01731aa47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/151883
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-06-19 21:20:07 +00:00