The only remaining use of the macro was to do a string concat
which might as well be done directly.
TEST=CQ
Change-Id: Idbf2eb823c74afbd249a60649f185397caf8a32e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202680
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This change makes sense to me for a couple of reasons. First, when
editing a correction producer the information about whether it can be
bulk applied will be easier to find. Second, the information doesn't
need to be duplicated when the producer can be applied to multiple
error codes. And third, because the information is in one place we can't
enable a producer in one place and miss enabling it in other places.
This does have the unfortunate consequence that an extra producer needs
to be created for bulk application in order to determine whether it
should be applied at all, and can't be re-used because producers
maintain state. We could consider storing a 'generator' object rather
than a generator function in the map and have the `newInstance` methods
produce those objects, but I'm not convinced that it's worthwhile given
how short lived the extra producer is.
There was also one subtle change that you probably won't see by looking
at the changes, which is that one of the producers was enabled for bulk
application for a lint but not enabled for several non-lint cases. It is
now enabled everywhere. I remember thinking at the time that it should
be fine, but I've forgotten which producer it was, so I can't easily
tell you. If you want to confirm that change I'll be happy to do the
work of figuring out which producer it is and which error codes were
impacted by the change.
Change-Id: I2010d777f727472c0d307a6948b84d37491e2b17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202600
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
I plan to work some more on this in subsequent CLs.
More tests, probably more details element models dumps, more nodes.
It somewhat helps for the following.
We miss ListLiteral support though.
https://buganizer.corp.google.com/issues/180549869
Change-Id: I5f92ffc01129417c3f539432d1791de350fe2773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202580
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Fixes https://github.com/dart-lang/sdk/issues/46261
File watching was partially disabled on android despite working as expected with
minor detail that [read] from inotify returns -1 at the end of the stream.
TEST=file_system_watcher_large_set
Change-Id: I4ce7a89ab1e531d91b62d0363ebc36f919d5b8a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202500
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
- Added documentation to many members. Cleaned up existing documentation to
follow standards.
- Made many more fields final.
- Hide (made private) constructors that a user cannot reasonably invoke.
- WasmFunction, WasmInstance, WasmExportDescriptor, WasmImportDescriptor
- Added, exported, and use new WasmError class.
- Remove the fluent API in builder
See https://dart.dev/guides/language/effective-dart/design#avoid-returning-this-from-methods-just-to-enable-a-fluent-interface
Change-Id: I4222f7a95a9b20e89728d71de56b02ec91601e25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202360
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
In 64-bit with compressed pointers enabled, we still store identity
hashes in the object header, but the Smi range is reduced.
The 0xffffffff is a Smi in 64-bit architectures, but not if
compressed-pointers are enabled.
This updates the test to use the same maximum value as the corelibraries
could use when setting the identity hash code.
TEST=Fixes vm/cc/AsmIntrinsifier_SetHashIfNotSetYet in compressed-pointers mode
Change-Id: I285a28127767a6a0b606354f3e3f994a15b372b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202480
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
This fixes idle GCs never running for the service and kernel isolates.
TEST=--verbose-gc
Change-Id: Iea0b0aa808c757a527724e3d2599c170cb383574
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202362
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This is follow-up to ed82bb6f4c
TEST=tests/standalone/io/file_system_watcher_large_set_test.dart
Change-Id: If02c922eafe1371c6e67196158896b9cb786bfd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202312
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
this is under consideration for core lint inclusion: https://github.com/dart-lang/lints/issues/42
(also undoubtably nice to get the early warning.)
Change-Id: I3ea204444f48d3b4bde3ff65b4ce85a2cf2a7b11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202301
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Also makes the following minor improvements:
- Standardizes the file on single quotes to make the file more uniform and match elsewhere.
- Switches the ESCAPE_MAPPING declaration to const
- Corrects method spelling in doc comment
Change-Id: Ic271cd28d287f321b9b3719250b053df548ba194
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202061
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
...not to the directory that currently contains pkg:wasm
Also DRY'd up some values and helpers
Change-Id: I71292dacf089e285dd5080e9830e8a6e520c1491
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202302
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
This reverts commit 92bfa5acfb.
Reason for revert: Breaks for no holders in an output unit.
Original change's description:
> Reland "[dart2js] Only emit holders into a part file if they are used."
>
> This is a reland of 7af28d8274
>
> Original change's description:
> > [dart2js] Only emit holders into a part file if they are used.
> >
> > Change-Id: Ie1eb4dcf71e30002e3030603f201e2b6a97d4182
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200483
> > Commit-Queue: Joshua Litt <joshualitt@google.com>
> > Reviewed-by: Stephen Adams <sra@google.com>
>
> Change-Id: I06966217925a7d17615c80a5534d58f5095e579b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201985
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Joshua Litt <joshualitt@google.com>
TBR=sra@google.com,joshualitt@google.com
Change-Id: I918f3f7b496d3051046ac13dde37a8f1fbd9e892
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202304
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
Previously, the migration tool had a small amount of special case
logic in `EdgeBuilder._dispatch` to ensure that if an `as`
expression's type was annotated with `/*!*/`, that `/*!*/` wouldn't be
misinterpreted as also applying to the `as` expression itself (causing
a `!` operator to be inserted). This logic wasn't sufficiently
general; it failed to handle `is` expressions (which can run into the
same issue), and it failed to handle situations where the `is` or `as`
expression was at the end of a larger expression (e.g. `y = x as
T/*!*/;`).
This change removes the special case logic and replaces it with a more
general-purpose mechanism: when visiting any type name, if it ends in
a `/*!*/`, the edge builder stores information about it in the
`_nullCheckHints` field. This ensures that when visiting an
expression ending in that type name, the `/*!*/` will be ignored
(since `EdgeBuilder._handleNullCheckHint` skips any hints that are
already stored in that field). This ensures that we properly handle
both `is` and `as` expressions, as well as larger expressions that
contain them.
Change-Id: I2b902ef809b4cc5eb8b493fa4405c0f0c8c10a96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202261
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Usually the identity hashcode is implemented by returning if present and
otherwise generating a random number, setting the hash code and
returning it.
This works fine in single-mutator environments, though when multiple
mutators might race to install identity hash codes we should ensure only
one of them wins and all others will obtain whatever hash code has been
set by the winner.
This will matter once we start sharing more objects across isolates.
Issue https://github.com/dart-lang/sdk/issues/36097
TEST=vm/cc/AsmIntrinsifier_SetHashIfNotSetYet
Change-Id: Ie760ca9658e6ec0640255361544d6822b07574e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201827
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
In function entry, there are redundant register assignings for constant.
This removes the register assignings.
TEST=Existing test coverage.
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try
Change-Id: I08e75118a60f01b0d1a010ef4e2eaa3f5760a4ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202180
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
JSON_JSONStream_DartObject used to elide a JSON string longer
than 1024 into a buffer of 1024 bytes, which was causing memory
issues, including tripping ASAN.
This is fixed by doubling the buffer.
This CL also adds ASSERTs to ensure all buffers used with
`ElideJSONSubstring(..)` are big enough.
TEST=Existing, updated tests.
Bug: https://github.com/dart-lang/sdk/issues/46246
Change-Id: I7ce86429efecd91e768be413fd86f7d3c53c5d52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202244
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Change-Id: Ia41537d3a4c5951841de92507c62711d1f2d8fd5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202240
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
This is the next step to rename these constructors.
After updating google3 to unnamed constructors we will remove `tmp1`.
Change-Id: Ib010ad6c2de6918dc9daceaa7d27449618ebd9b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202200
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>