-Adds field for type nullability for IDL operations
-Adds field for conversions to reflect input and output type nullability
--based on implementation
-Corrects generic object types to include nullability
-Changes 'any' types to dynamics
-Adds nullability to types in various operations
-Converts finals and non-initialized non-nullable fields to getters and
setters
--TODO: convert these to native instead of JS inline
-Modifies nullability for annotations and removes annotations from
setters
Change-Id: Iab19830fd1d7f37b170a4da8672f922c3f9b0863
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/132967
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This reverts commit 545b80ef0e.
Reason for revert: this is a breaking change for MockSdk users, actually much more serious issue for un-forking SDK. https://github.com/dart-lang/sdk/issues/40500
Original change's description:
> 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>
TBR=paulberry@google.com,scheglov@google.com,brianwilkerson@google.com
Change-Id: If8c3d8322986b01012fa76f9c928f35309c00e3e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134802
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>