Commit graph

70141 commits

Author SHA1 Message Date
Konstantin Shcheglov
6a2afca361 Convert SimpleIdentifier in setter to legacy.
Change-Id: Ia7728995353666445c7e9ebb9c1c215a34bc270d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134800
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-06 22:52:38 +00:00
Robert Nystrom
688801cb27 Migrate language_2/assert to NNBD.
Change-Id: I4daa09afa52f76076374591b3e3f3420a46b169b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134240
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-06 22:47:25 +00:00
Alexander Markov
7bf057bdfa [vm/nnbd] Stop using Function::nnbd_mode() in a couple of places
This CL fixes crashes

../../runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc: 3637: error: expected: nnbd_mode == parsed_function()->function().nnbd_mode()

due to Function::nnbd_mode() returning incorrect result when function
belongs to a synthetic mixin application class.

Change-Id: I7860eb6120b7291848d655d8151af2472421920d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134785
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2020-02-06 22:44:34 +00:00
Ryan Macnak
a85f6ec3a1 Fix VM service message routing and asset loading.
Change-Id: I8c36663fd2324e731283ea65dd8a0d3b5e13d55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134760
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-06 22:28:04 +00:00
Jaime Wren
a8a4497cc6 Some tests for the utilities in metrics_util.dart, part of the completion metrics.
Change-Id: I2cccfe899d38ce5518a32c8a26fd4d3511cf91d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134569
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 21:33:35 +00:00
Ben Konyi
49850e6919 [ VM / Service ] Fixed mismatching type in migrated NNBD service code
Change-Id: If2bd92c48893adf46a7fe08e725d908f50317e2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134782
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2020-02-06 21:06:11 +00:00
Joshua Litt
9781d3dc9f Fix minor bug with NNBD and Math.exp
This cl simply adds a missing nullcheck to Math.exp

Change-Id: I5a5a145b1c60e31d956891c530cba2bb9a718b4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134761
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-02-06 20:41:07 +00:00
Zichang Guo
748bbb720a Revert "fix hanging of write on Windows"
This reverts commit eb075dcc21.

Reason for revert: Out of memory on IA32 and On MacOS, invalid path argument on MacOS.

Original change's description:
> fix hanging of write on Windows
> 
> When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.
> 
> Bug: https://github.com/dart-lang/sdk/issues/40339
> Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
> Reviewed-by: Zach Anderson <zra@google.com>
> Commit-Queue: Zichang Guo <zichangguo@google.com>

TBR=zra@google.com,asiva@google.com,zichangguo@google.com

Change-Id: I9d515912ad99f523c6d19fac0c8fbbb23a897986
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/40339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134768
Reviewed-by: Zichang Guo <zichangguo@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-02-06 20:34:32 +00:00
Mike Fairhurst
a98f4acd1a [analyzer] Fix #32913, no error for inferring a non-const type argument in a generic function used in a const location
Bug: 32913
Change-Id: I7e5ef10fdd9befdc7d8a19b2c5c5b91639c82666
Fixed: 33439
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/91105
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-06 20:33:02 +00:00
Mike Fairhurst
a62b9c8d23 [analyzer] Add a recursive type visitor that can be stopped midtraverse.
Change-Id: I9c0b7b8866a44446e7b8044cba59aacd7ee93c72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134482
Reviewed-by: Paul Berry <paulberry@google.com>
2020-02-06 20:33:02 +00:00
Devon Carew
6701595458 [front_end] fix a long line in a test helper file
Change-Id: I1bdf3390c0c84f2d934620d6dee69a162aa1541b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134417
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-06 20:19:02 +00:00
Zichang Guo
eb075dcc21 fix hanging of write on Windows
When using File::Write(), Var size in int64_t is casted to DWORD(unsigned long). When Var size is out of DWORD range, casted value will be zero. Before calling into File::Write() on Windows, validate the size.

Bug: https://github.com/dart-lang/sdk/issues/40339
Change-Id: I36fade62dfa3025f418405cb3e45c286dd6b7db1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134440
Reviewed-by: Zach Anderson <zra@google.com>
Commit-Queue: Zichang Guo <zichangguo@google.com>
2020-02-06 19:58:52 +00:00
Konstantin Shcheglov
c33935faa8 Extract SwitchStatement errors into separate files.
R=brianwilkerson@google.com

Change-Id: I0832e2c4ebc9c2597bba6dc13bb9dcf376888b88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134764
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-06 19:49:42 +00:00
Jason Simmons
04339705d0 [vm] Bring back the Fuchsia implementation of File::OpenStdio
Change-Id: Ic143fabd106c693779799916da9d0e81809d580f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134762
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Jason Simmons <jsimmons@google.com>
2020-02-06 19:44:07 +00:00
Brian Wilkerson
8d6e4e46b1 Add an assist to shadow a field when a local variable might be promotable
This is a fairly limited initial version of the assist. In addition to
implementation comments I'm interested in knowing whether there is value
in committing it as-is or whether it should be enhanced first.

Change-Id: Ia28328e1e5a759c0cec3936b334f719927f46dcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134620
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 19:43:32 +00:00
Alexander Markov
ff34fd8110 [vm/aot/tfa] Tree shake write-only fields
So far tree shaking was removing fields which are not used at all.
This change improves tree shaking of fields so fields
which are only written or used as interface targets can be removed.

The following limitations apply:

* Field is not removed if there is a constant object with that field, as
  it may impact identity of constant objects which is an observable
  behavior.
* Field is not removed if it has a non-trivial initializer as it may
  have side-effects.
* Late final fields are not removed, as writing such fields may have
  side-effect.
* When field is removed, we may need to introduce an abstract getter
  or abstract setter if field is used as a target of an interface call.
  If a field was written, then setter would be non-abstract (but empty).

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

Change-Id: I79c00158b8eb658081a647c5dbdecde481fddb41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134204
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-06 19:31:32 +00:00
Robert Nystrom
cb6b535108 Create a package_config.json file for the SDK tests.
This (assuming it works right) tells Dart implementations to treat all
of the libraries in the legacy test directories as opting out of NNBD.

Change-Id: I36e5cd966921f759306f5b4bb50f18ae6049d4db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134409
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
2020-02-06 19:27:12 +00:00
Jaime Wren
efefe78522 [completion metrics] Add a simple CLI at the start of completion_metrics.dart. This will allow run configurations in IntelliJ hold onto the directory paths instead of being hard coded.
Change-Id: I90680e9a867a5dc48f20bfd8fac3ecece6177c3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134740
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 19:00:32 +00:00
Konstantin Shcheglov
545b80ef0e Analyze SDK with non-nullable experiment enabled, update MockSdk.
Change-Id: I80264a6533045c33ed794a5938f6719f3b5a6d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134401
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-06 18:04:02 +00:00
Liam Appelbe
130de1a837 [vm] Reland NNBD flag flip
Bug: https://github.com/dart-lang/sdk/issues/40179
Change-Id: I3ab5e1f5a0ee69e9850910eee59611eb4583e498
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134601
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2020-02-06 17:52:52 +00:00
Samir Jindel
9ec978eb4f [vm] Don't use write barrier for stores of nullable bools.
Fixes https://github.com/dart-lang/sdk/issues/39591.

Change-Id: I26ab979b54d74e3d0380c5002928ec897a8a7ef4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/131073
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-02-06 17:40:42 +00:00
Jonas Termansen
f688645909 [dart:io] [vm] Fix poll(2) loop while waiting for a process to exit.
The loop didn't correctly handle if the fd closed wasn't the last in the
list, instead it would skip an entry and would accidentally consider the
closed entry twice.

The error handling was also wrong, where a file descriptor could be
closed multiple times if an error occured after one of the file
descriptors had already been closed. Additionally the POLLERR and
POLLNVAL conditions were not handled.

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

Change-Id: I4b4da067bbaf40af329e37ccf45d85f8bbf6c914
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134723
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-06 16:40:32 +00:00
Robert Nystrom
4a76bafa5a Migrate lib_2/typed_data/typed_data_view_sublist_test.dart to NNBD.
Change-Id: I70eb2c4ffcff7bf0ed788e9586694daca945e831
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134603
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-02-06 14:59:11 +00:00
Jens Johansen
669b06dab8 [CFE] Update expectations caused by two CLs landing at the same time
Change-Id: I798be2c058f9d5c34366f144dd2dd4d00a59aacb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134703
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-06 13:31:12 +00:00
Johnni Winther
e74c829499 [cfe] Add test for Never in opt-out code
Change-Id: I91683d57e25457e371aaf8f0bb0092426409186e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134526
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-02-06 13:25:51 +00:00
Alexander Thomas
43b751c15b [co19] Roll co19 to def1183bacc28f008db4fdd3d0442ed05f1889f8
2020-02-06 irina.arkhipets@gmail.com Fixed Issue 465: Issue tags updated.
2020-02-04 irina.arkhipets@gmail.com Fixed Issue 465: re-factoring.
2020-02-04 irina.arkhipets@gmail.com Fixed Issue 465: re-factoring.
2020-02-04 irina.arkhipets@gmail.com Fixed Issue 465: New nnbd tests added (overriding).
2020-02-03 irina.arkhipets@gmail.com Fixed Issue 465: Overriding tests updated.
2020-01-31 irina.arkhipets@gmail.com Fixed Issue 465: New tests for overriding added.
2020-01-31 irina.arkhipets@gmail.com Fixed Issue 465: New tests for overriding added.
2020-01-31 irina.arkhipets@gmail.com Fixed Issue 518: Issue tags updated.
2020-01-30 irina.arkhipets@gmail.com Fixed Issue 518: Minor tests correction.
2020-01-30 irina.arkhipets@gmail.com Fixed Issue 518: Minor tests correction.
2020-01-30 irina.arkhipets@gmail.com Merge branch 'master' of https://github.com/dart-lang/co19
2020-01-30 sgrekhov@unipro.ru NNBD tests updated according last roll results (fixed, issue numbers added)
2020-01-30 sgrekhov@unipro.ru Null aware test fixed
2020-01-30 sgrekhov@unipro.ru Null aware test fixed
2020-01-29 irina.arkhipets@gmail.com Fixed Issue 518: Issue tags added for the NNBD tests which fail because of the issues 40367, 40368
2020-01-29 sgrekhov@unipro.ru NNBD tests fixed after the next roll results investigation
2020-01-28 irina.arkhipets@gmail.com Fixed Issue 516: expected result for the tests which check methods with required arguments updated.

Change-Id: I8efb2e49a7dd5f6ef4422dd068264d0cfb57586e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134701
Reviewed-by: Jonas Termansen <sortie@google.com>
2020-02-06 13:07:20 +00:00
Johnni Winther
80dacdf3a0 [kernel] Add Class.hasConstConstructor and Member.isNonNullableByDefault predicates
Closes #40440

Change-Id: I2776c165d23e2aa2bf5d7515741bd0f0d067b26d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134292
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-02-06 12:27:37 +00:00
Jens Johansen
ddd6e31dee [CFE] Allow experimental invalidation to work on DillLibraryBuilders
This CL makes experimental invalidation work on DillLibraryBuilders,
and solves all found issues (e.g. old references (aka leaks)) with it.

Note: This CL introduces a few writes that seems weird (e.g. setting
variables that's about to be out-of-scope to null). This is done to
prevent "leaks", or probably more likely, prevent a "false positive"
leak detection and it currently gives a "clean bill of health" from
the leak detector.

Change-Id: I5b01df6e9ede710a5b624a8a4c21015214140318
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134288
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-06 12:19:51 +00:00
Daco Harkes
be38459b98 [vm] Arm Assembler simplify code for SubImmediateSetFlags
See https://dart-review.googlesource.com/c/sdk/+/124136/9/runtime/vm/compiler/assembler/assembler_arm.cc#3203

Change-Id: I8d2a1bb781f22d6aae0e02eacf042a203a44790d
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-product-arm-try,vm-ffi-android-release-arm-try,vm-kernel-linux-release-simarm-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-bare-linux-release-simarm-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134333
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2020-02-06 12:19:31 +00:00
Teagan Strickland
158f865f6c [vm/compiler] Fix parsing of Unicode escapes in S-expressions.
Change-Id: Ia8439b19f5c1901ad0205152ad1fdce0371cccad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134720
Commit-Queue: Teagan Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2020-02-06 12:08:51 +00:00
Dmitry Stefantsov
af323cfa56 [cfe] Move isTop, isBottom, isObject, and isNull to CoreTypes
Change-Id: I15fbcc5b853e6786244994efef530a96436fb457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134721
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-02-06 11:56:51 +00:00
Jens Johansen
3371a49964 [cfe] Quick standalone deps calulation
Change-Id: Iee4d7c12f82e4e4692e33fda4b55fd9778a2cf96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93661
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-02-06 11:10:11 +00:00
Dmitry Stefantsov
11790fe024 [cfe] Warn about non-nullable operands in null-aware operations
Closes #40094.

Bug: http://dartbug.com/40094
Change-Id: I3af5258bf0845257915eb090889fde0fdcb96bf9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134339
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-06 11:06:41 +00:00
Karl Klose
a6ba130b73 Minor edit in README.md
Change-Id: Icba92b6fa5e87616e44495042a94f9af09696a86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134525
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
2020-02-06 10:27:52 +00:00
Victor Lima
43b69d4ba9 Refactor Instruction::speculative_mode()
The same instruction should be able to set different speculative
modes for its inputs when they are inserted by select representations,
e.g. static calls that have unboxed parameters might set unbox
instructions for those parameters as non speculative.

Change-Id: Ie450f0431e4dbbf0269869f520f59d5d5e946887
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134334
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Victor Agnez Lima <victoragnez@google.com>
2020-02-06 09:21:31 +00:00
Johnni Winther
0fe2779149 [cfe] Don't check override for member signatures.
Closes #40460

Change-Id: If418c0c809ec15febfa63c5363f8353cb16fc9de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134521
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-06 08:59:31 +00:00
Ben Konyi
aadcb4418b [ DartFuzz ] Disable floating point operations when comparing different architectures
Comparing floating point results from different architectures can lead
to false divergences due to floating point errors or slightly different
implementations of specific operations (e.g., Float32x4.clamp behaves
differently around 0.0 for ARM and x64).

Should fix false divergences related to https://github.com/dart-lang/sdk/issues/40426

Change-Id: Ife0ab07d20e87add4e754e328bb8f7389920021d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134573
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-06 02:00:49 +00:00
Régis Crelier
3598d4340d [VM/nnbd] Consider nullability of type parameters in function type tests.
This also fixes issue #40259.

Change-Id: I2e603e927e98270bb24b726444490993e6360f97
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134572
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2020-02-06 01:45:29 +00:00
Konstantin Shcheglov
fe0735f959 Fix for constant dependencies when opt-out depends on opt-in.
R=brianwilkerson@google.com

Change-Id: I31bb8073fa1059e2edf8903b5fa604afb0f19f50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134571
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-02-06 00:55:20 +00:00
pq
8439158668 completion driver wip
Gotta start somewhere.

All subject to revision.  (Names especially.)

This gets us an end-to-end test and a starting point for client algorithm implementations.

Note that this was designed to run outside `test/`.  We should be able to move it out if so desired.

Needless to say any thoughts on any of it are welcome!

Change-Id: Iecf5c7ce854f619aa5677454091ceb68dd45827b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134542
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-06 00:33:10 +00:00
Jaime Wren
e525e42267 Initial working 'dartdev format *' tool with the set of args and flags to match the 'flutter format *' tool
Change-Id: I292a85cf7b10a725f82a7a86d90aada4972b7c38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134566
Commit-Queue: Jaime Wren <jwren@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-02-06 00:09:19 +00:00
Ben Konyi
6548694a82 Reland "[ VM / DartDev ] Added support for format and pub commands via standalone VM"
Fixes a malloc/delete[] mismatch.

This reverts commit b3396cbdca.

Change-Id: I18fe142bc60bedd8af4c588ba4039742e1d34606
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134570
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2020-02-06 00:04:09 +00:00
Ryan Macnak
d7fd79480e [vm] Don't hold IdleTimeHandler::mutex_ when entering a safepoint.
Change-Id: I8b6f6db81d1fa6047114ba4caea61dcbba8f316f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134580
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-02-05 23:29:02 +00:00
Martin Kustermann
7339b27f7f [vm/concurrency] Fix bug in Safepoint{Mutex,Monitor}Locker which can cause a deadlock
While a thread is outside a safepoint it should not perform any
long blocking operation and it must not acquire a Mutex/Monitor which
can be held while being inside a safepoint.

Right now we can have this situation

   GC wants to safepoint
   T1 is in a safepoint, acquires lock L and wants to leave safepoint (waits for GC to finish)
   T2 is not in a safepoint and tries to acquire lock L

With this CL, we ensure to always transition to a safepoint before
performing Lock/Enter/Wait.

Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: I79c55c79bfe828a319f5b035880f578ef62d913a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134323
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-02-05 23:17:59 +00:00
asiva
83fdfde140 [VM/libraries] - Fix signature of waitFor.
This should fix issue 40472.

Bug: 40472
Change-Id: I5cfa7cf25778b6a5430168707dd9370b202d3e6d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134565
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2020-02-05 22:48:50 +00:00
Janice Collins
eba2741166 Use analyzer filesystem implementation.
Change-Id: I071945c0f04c14474758b94f3ca560a2fbf7d2a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134543
Commit-Queue: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-02-05 22:33:19 +00:00
Mayank Patke
8d76edf4a8 [dart2js] Remove type unaliasing.
Now that typedefs are gone, unaliasing is a no-op.

Change-Id: I2fbe4555d06e11c12b1c1149af23a23e09df42b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134503
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-02-05 22:27:49 +00:00
Martin Kustermann
5f42db7441 [vm/concurrency] Make some service tests more robust
This is extracted to make the shared heap cl a bit smaller.

Issue https://github.com/dart-lang/sdk/issues/36097

Change-Id: I2f5b959aefcb2de96f51c39667a18612debd17e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134522
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-02-05 22:02:19 +00:00
Devon Carew
204a70d4bd [nnbd migration] add an initial readme to describe the workflow and tool
Change-Id: I6d1614aafd0b722c633fba0aa128f90acb4ea006
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134560
Reviewed-by: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-02-05 21:48:49 +00:00
Paul Berry
c9b66b222e Migration: propagate non-null intent into function literals.
Previously, if a function literal was used in a context where a
function returning non-null was expected, but the function literal
might return null, the migration tool inserted a cast that was
guaranteed to fail.  Now it propagates non-null intent into the
function literal, so that the appropriate null checks happen inside
the function literal.

Change-Id: Ia62d18bc3b9955e84b09b846ea913607b305677d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134504
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-02-05 21:35:19 +00:00