Recognize "Instance of C" string and handle it in special way:
apply renaming to class name (C) only.
Fixes https://github.com/dart-lang/sdk/issues/53512
TEST=vm/dart/comparison_canonicalization_il_test in obfuscate configuration
Fixed: 53512
Cq-Include-Trybots: luci.dart.try:vm-aot-obfuscate-linux-release-x64-try
Change-Id: I3fa31ab52aef01417d523a075913a0971158be72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326062
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
Only replace Redefinition with a constant if the
original definition is a constant.
It used to be the case that Redefinition could
be constant only if the origin definition was
however 5c320a108 changed that: we would augment
graph with additional redefinitions after branches
on equlity comparisons. This meant that constant
value would propagate to other already inserted
redefinitions and than these redefinitions started
to be replaced by their constant value. Something
that we wanted to prevent to begin with.
Also fix the comment for InsertRedefinitionsAfterEqualityComparisons
as pointed by @aam
Fixes https://github.com/dart-lang/sdk/issues/53514R=alexmarkov@google.com
TEST=issue found by CI and so covered by existing tests
Fixed: 53514
Change-Id: I5e547d34de3aabc340329da1a43341689bfc58e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326120
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
All the packages that depend on it now have constraints greater or equal to 3.0.0.
The added linter rules are taken from other analyzer packages.
Change-Id: If51f9209dab9c58525a1207534bccb6491a409c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325904
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Revisions updated by `dart tools/rev_sdk_deps.dart`.
ecosystem (e96fbdb..babf5d1):
babf5d1 2023-09-13 Devon Carew add additional lints to dart_flutter_team_lints (#167)
7740bef 2023-09-13 Moritz Write comments on forks for `firehose` (#165)
http (de19214..e19094a):
e19094a 2023-09-14 Brian Quinlan Use efficient operations when copying bytes between Dart and Java (#1019)
d7e4375 2023-09-13 Parker Lougheed Cleanup `package:http` utils (#1011)
eafbbb0 2023-09-12 Brian Quinlan Separate the cronet callbacks from the `send` method (#1017)
2cbb703 2023-09-12 Brian Quinlan Switch `cronet_http` to use jnigen (#1016)
native (bbcbc1f..7faf62c):
7faf62c 2023-09-14 Gabriel Terwesten Add `includes`, `flags`, `std`, `language`, `cppLinkStdLib` options (#125)
shelf (2926f76..e2a02b7):
e2a02b7 2023-09-13 Kevin Moore Move to latest pkg:dart_flutter_team_lints, bump min sdk to Dart 3 (#378)
tools (fa01f9b..1512f3d):
1512f3d 2023-09-13 Elias Yishak Add Fake Analytics instance that uses list to save events sent (#149)
webdev (6b21ecf..501ccc2):
501ccc28 2023-09-12 Elliott Brooks Update DCM triggers to match Dart DevTools (#2230)
Change-Id: Ic3dc1924da48454a28e4c0d8705244ac1565e74a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325967
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Change-Id: I4fc17b992db272d6154a7c58fc1f4229c5368ee4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325620
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
This test uses `dart:cli`s `waitFor` which only works under a flag now.
TEST=ci
Change-Id: I9efe139c868d12c6fa2af1c0d7bfa64a5af5b2a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326100
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This splits visitors for (Tree)Visitor(1) into pure interfaces, mixins,
and a base class with the base implementation. This is a step towards
avoid having an accidental default implementation where a static error
would have been preferable.
This extract a ConstantReferenceVisitor(1) and its corresponding
DefaultMixin from the Visitor(1) interface.
TEST=existing
Change-Id: Ibc55bed9cff76581deaade91a10600c17fafc6dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325704
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Per breaking change request we are now disabling
waitFor by default.
Users can still enable it by passing the flag:
--enabled-deprecated-wait-for
Issue https://github.com/dart-lang/sdk/issues/52121
TEST=standalone/io/wait_for_deprecation_test
CoreLibraryReviewExempt: standalone VM only change
Change-Id: Ied78f91344d15cb77e932514e2b752bb6ac5dc5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/326021
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
This splits visitors for Initializer, Expression, Statement, Member,
and MemberReference into pure interfaces and mixins with the base
implementation. This is a step towards avoid having an accidental
default implementation where a static error would have been preferable.
TEST=existing
Change-Id: I4aa243ce3b3436e05d6164c934df3c44119cd1fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325521
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Rather than build the entire source map as a string in memory, we can use buffered writes to efficiently emit the string as we build it.
In local testing this brought memory consumption down from ~6480MB to ~6330MB (-160MB).
Change-Id: Ic40f819a849f933d8662011647d4775eaa1462e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325941
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
The data within this maps is apparently hanging around in memory longer than it needs to. We only read from each map in a short window and once it's been read we don't use that data again. By clearing the maps ater we use them we end up saving ~700MB (out of ~7.1GB) for phase 3b on a large program.
References to all these maps are being retained by this higher level map:
https://github.com/dart-lang/sdk/blob/main/pkg/compiler/lib/src/io/code_output.dart#L143
This change clears the internal maps while that larger map is being iterated over.
Change-Id: I132dbf469391f257685b05fa69c302f1f1c44e31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325940
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Revert submission 323446
Reason for revert: This breaks flutter web engine unit tests. See https://github.com/dart-lang/sdk/issues/53521
Reverted changes: /q/submissionid:323446
Change-Id: I9095f0791a556d4bc912e29fde274f3cb8824317
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325964
Commit-Queue: Jackson Gardner <jacksongardner@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Timer events and perhaps other events are throttled when a Chrome tab
is in the background or not visible. This may be causing flaky timeouts
in Dart web tests that rely on many timers. In local testing, these
flags completely eliminated the problem.
IntensiveWakeUpThrottling is a web standard feature, and
TimerThrottlingForBackgroundTabs is a Blink-specific feature.
Bug: https://dart-review.googlesource.com/c/sdk/+/324203
Change-Id: I38904015b043768689be3a05bea5a50ad32df434
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325780
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
This updates the generator of experimental flags to only refer to one
location for the current default language version.
Semantically the change does nothing, but it could make CLs that bump a
version smaller and easier to revert/patch.
Change-Id: I1c18c8e8105dfb33a302949ad2cfa159dae2addf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325660
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
This splits ConstantVisitor(1) into a pure interface and a
ConstantVisitor(1)DefaultMixin with the base implementation. This is
a step towards avoid having an accidental default implementation where
a static error would have been preferable.
Also removes BodyVisitor1 which was unused.
TEST=existing
Change-Id: I265754e13e0ebcce5c154b16c7ee36854f4ce9fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325400
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
These are supported but there synthesized names conflicted.
TEST=pkg/front_end/testcases/constructor_tearoffs/lowering/constructor_member_conflict.dart
Change-Id: I952907eb83d7e496eb7d53f5c6b67d8f1e87308b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324680
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
It allows the compiler to propagate this information in TFA - which
may be beneficial for cases when those methods aren't inlined.
TEST=ci
Change-Id: I55711806800e2a56e83a42cd51be705b68c3a4f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324701
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
There was a bug in source map generation introduced by this deferring. A map from JS Nodes to source map info is being shared between these two operations and in order to look up nodes in the map, the Node objects must be the same.
This gives up some but not all of the gains from deferring these function bodies. I'm working on a more long term fix that combines these two passes of the AST.
Bugs: https://github.com/dart-lang/sdk/issues/53466
Change-Id: If25d1b24dd32456155e8802725d480454c71d2b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325600
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nate Biggs <natebiggs@google.com>
There are a couple of small format changes, but they are minimal
enough that we might not need to land a pre-built SDK with this.
Change-Id: I1d258c8a782e5db24c2048f407a8b7cf7b948eef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325580
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Strings are the most likely use case of getting and setting
properties, and therefore we should make that easier to use.
This CL also renames the extensions in dart:js_interop_unsafe
to a more relevant name and to avoid conflicts in dart:js_interop.
CoreLibraryReviewExempt: Backend-specific library.
Change-Id: Ia8ce6593167c648f9710b47cfe27f80c854be407
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/324572
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
This makes elf_loader.cc consistent with the other compilation units containing Dart_* functions. Addresses a Mac linker warning that these functions match the export glob but have hidden visibility.
TEST=build
Change-Id: I868c9940a7027c466c1173aa2db2fbeff6fe8999
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325362
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>