These were found using the unnecessary-null-checks lint. It has a bug
that prevents us from enabling it at the moment, but we should consider
enabling it once the bug has been fixed.
Change-Id: Ice250b5a6a8723c5f08dec5b07ae738e17c842cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196550
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
As per our earlier conversation, I looked for places where a local
variable was introduced to overcome field promotion and has the same
name as the field. Where possible I made them final; where not possible
I changed the name.
Change-Id: Iad3d2139693ca66f1eb22a3926c3b84a4115f13d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196552
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This paves the way for allowing analyzer and analysis server clients
to format diagnostic message URLs in a special way (e.g. to make them
clickable).
Note that DiagnosticMessage is part of the public API of the analyzer,
so I've retained the old behavior in a deprecated fashion to avoid
breaking clients that don't yet handle diagnostic messages containing
URLs.
See
https://dart-review.googlesource.com/c/sdk/+/193749/comment/86d1ce4b_77a60b1e/
for additional discussion.
Change-Id: Iae9d43a2be7dbc67cb7cb82afe0a7824043d6113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196101
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Due to third_party dependencies, this script can't use python3 yet.
Note that this means if we can't use python2.7 in the future, we
either need to update our copy of the IDL scripts to use python3,
update the dependency so that we use the latest IDL scripts, or
we stop using these scripts to generate dart:html.
Change-Id: I42eb7d1fc769644e358dbf26344b6c66265ce10c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196582
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The WebSql was dropped 5+ years ago and this library is unsupported.
This change adds the `@deprecated` annotation on the library and APIs in
dart:html that expose it (`window.openDatabase`). It also indicates to dartdoc
to skip it for the api.dart.dev site.
I run a `pub_crawl` process to verify that this is not in use. I checked 15K
packages, and only found 2 occurrances of an import to this library:
* One in a package marked as discontinued (used for migrating constants back
in Dart 2)
* Another in an example mock test (generated by mockito for mocking dart:html)
Also no library uses `window.openDatabase` either.
We will send a breaking change announcement soon and plan to delete this in a
future Dart release (possibly 2.15).
Fixes https://github.com/dart-lang/sdk/issues/45687
Fixes https://github.com/dart-lang/sdk/issues/45688
Change-Id: I8cd2bfa0ce64892c3f108bd6e24b8a0a3ec7c6ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196461
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Right now the vm/cc/CodeRelocator_* tests are written in a strange way
to work around the conservative assumptions the relocator makes.
A future CL will make the relocator insert tramppolines precisely when
they are needed (not conservatively), which will allow writing precise
tests.
TEST=Fixes ARM64 vm/cc/CodeRelocator_* tests
Change-Id: I68f9bcce29f42a2264608f867f177e8f557804fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196666
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
TEST=Fixes arm build.
Change-Id: I4f90ab1994d13484c8b30ce8d8386f8acec59b8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196663
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
The tests generate & run relocated instructions. On ARM64 our macro
assembler uses X15 as stack pointer instead of the normal sp.
-> There was a missing RestoreCSP() in the generation of the call
instructions.
-> It's not an issue for running the test in simulator if CSP is wrong
when returning, though it is for HW.
Adding RestoreCSP() would require the code to be larger, so instead we
use lower level assembly instructions that operate on the normal ARM64
stack.
Closes https://github.com/dart-lang/sdk/issues/45807
TEST=Fixes vm/cc/RelocatinoTest_* on arm64 hw
Change-Id: I0c65e3d22897f536e39f0cf7e9af2be871051b0d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196498
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Locally this test doesn't seem to fail though it did so on a nightly builder.
If the test fails again we'll have more information on what goes wrong.
TEST=Adding more information to test.
Change-Id: Id5ca71d42322c813ba3cfd56e9dfe335160e2e7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196497
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
This reduces the number of variable-length integer encodings in our
database from 2 to 1, and chooses the more standard one.
TEST=Existing tests, in particular any that involve snapshots.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-ubsan-linux-release-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try
Change-Id: Ia700158ac873ad32ac28c1027a669895961bc715
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196321
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
It now captures and prints the minimum and maximum values for several
characteristics. It also now allows the flag controlling whether the
available suggestion sets are used to be set for each experiment rather
than globally (which allows us to now compare the results with and
without the flag set).
Change-Id: I5b5930216ff2f448de35f6dbf3ccd9de712179d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196564
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
The following fields in Class objects
target_instance_size_in_words_
target_type_arguments_field_offset_in_words_
target_next_field_offset_in_words_
are only useful when cross-compiling.
This change removes these fields if DART_PRECOMPILER is not defined.
TEST=ci
Change-Id: I45e6e60ad6d0a738e2ac3afd45328209167393ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196222
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Previously, compiler::target::Foo::InstanceSize(intptr_t length)
definitions were hand-written and compiler::target::Foo::InstanceSize()
were often defined using the size of UntaggedFoo for array-like objects.
This results in an unnecessary code duplication and discrepancy
between Foo::InstanceSize() which returns 0 and
compiler::target::Foo::InstanceSize() which returns size of the header.
This change adds ARRAY_SIZEOF variant to runtime_offsets_list.h
and switches array-like objects to auto-generated InstanceSize methods.
Also, this change strengthens assertions around host and target
values of InstanceSize() and NextFieldOffset() being the same
unless DART_PRECOMPILER is defined (which may do cross-compilation).
Stronger assertions flushed out a few discrepancies between
runtime_api.h and object.h, which are also fixed in this change.
TEST=ci
Change-Id: I9f67c6a71b9300af5e656fdc70f6a3e341c1d029
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196345
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Instead of depending on all canonical clusters being written first,
followed by all non-canonical clusters, mark whether a cluster is
canonical or not in its written form. This allows future changes to
interleave canonical and non-canonical clusters as needed.
TEST=Existing tests, as this is purely a refactoring.
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-debug-x64c-try,vm-kernel-precomp-nnbd-linux-debug-x64-try
Change-Id: I0ab835c262e061ffd3dd93be0c8f5358c9b51fc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195994
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Fixes the case where the Image name and type was not written
to the v8 snapshot profile in non-precompiled mode.
Adds core-jit snapshot tests to the v8 snapshot profile writer test.
In core-jit and app-aot-elf modes, verify that all bytes in the
snapshot sections are accounted for in the profile.
Bug: https://github.com/dart-lang/sdk/issues/45787
TEST=vm/dart{,_2}/v8_snapshot_profile_writer_test
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-x64-try
Change-Id: I88be309cdea6293d768e2fa458492387d70fde22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196323
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Change-Id: Ia22499d5681213017b09eac818f4f57e1fba2885
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196485
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Change-Id: Id44d372ed90c54523c9dde4659b4776923dfcadf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196488
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
Change-Id: I8c54082c937b28a74500740a0576f4b29c8989f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196325
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This reverts commit 853597a978.
Reason for revert: Breaks google3 (b/186088197)
Original change's description:
> Optimize js_util setProperty calls for non-function value types.
>
> No change in the generated JavaScript for dart2js base on a sample
> foo.dart file and tests/lib/js/js_util/properties_test.dart
>
> Bug: #44533
> Change-Id: Ib6866fa7fca1f13b03c75dd4f1eac904b18811e3
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193838
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Riley Porter <rileyporter@google.com>
TBR=sigmund@google.com,srujzs@google.com,rileyporter@google.com
Change-Id: I3f08d29e2d6a1a7846b8d67fadc314ad947f54cf
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: #44533
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196484
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
* Use cipd for jsshell.
* Add script to update jsshell.
* Add new CIPD namespace, with access rights for some web team members.
* Add a copy of the new package to the old location (b/186078239).
Change-Id: I0169d077af6b0d5119fe8545272ca1df1596558f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196324
Auto-Submit: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
For a long time now this is used only to put types on JSArray.
Change-Id: I31f15d313d7e131eecac76697a8938c197f83e7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195940
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>