Commit graph

100124 commits

Author SHA1 Message Date
Martin Kustermann
3e66388000 [vm] Make mixin deduplication transformation work for generic classes.
This is especially effective for collection / iterators / ...
in our corelib code. It may also benefit more devirtualization
opportunities.

class Foo<T> extends Bar with A<T>, B<T> ... {}

This results in around

* -0.99% in flutter_gallery_app_so_size armv8 flutter-release-sizeopt
* -0.35% in flute complex in wasm-O4


TEST=pkg/vm/test/transformations/mixin_deduplication_test

Change-Id: I8a48b8dc46d94240b79000b2b16797b4044ba330
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356400
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-03-08 09:29:29 +00:00
Sigmund Cherem
8103f36f34 [ddc] cluster e2e tests together.
Ideally we would write each source next to each test to make tests more
readable, but clustering all tests to use a common test file really
helps boost the runtime of the end2end tests now that we reuse the same
page between tests that share the same code.

This CL refactos the tests to mostly use one shared test file. Doing so
speeds up tests between 2x-4x depending on the test.

Change-Id: I9afd00c6a42226899969e3f605ac18e0d2b1a906
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356285
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-03-08 02:11:10 +00:00
Sigmund Cherem
866ed84158 [ddc] reuse the same page/script if possible on e2e tests.
Since we changed how the test driver sets up breakpoints, we now we
have the ability to reuse a page for multiple tests.

Before, the test harness would follow this sequence:
* on each group of tests, it would call `_initSource`, which sets up
  a boostraper and code to execute on the browser. This code was
  reused by all tests in the group.
* on each test, it would indirectly call `_loadScript`, which
  navigated to brand new page for each test. If there were multiple
  tests in a group, this would load the boostraper and code once per
  test.

This CL keeps the sequence of operations the same, except, that
`_loadScript` will reuse the existing page if it already loaded the
boostraper and DDC code needed by the next test.

This greatly reduces the total running time of some of the
expresison compiler shards. On my local machine one such test took
24s before both this and the parent CL, but now takes about 5s.

Change-Id: I7774df9e83142b42efc4ad523f589758a2a4660c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356301
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2024-03-08 02:11:10 +00:00
Sigmund Cherem
c8d6acbfd0 [ddc] remove the preemptive breakpoint from e2e tests.
Instead of pausing the application while loading, this
changes the bootstrap logic to not invoke main immediately.

Later the test harness uses an expression evaluation to
trigger the start of the application when it is ready for
it.

This change will enable the ability to reuse the same page
and script across multiple tests, which will save a lot of
test execution time (see related child CL).

Change-Id: Ifa1050ac777aabb3e21b69953e85c6578b3e0cc0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356281
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-03-08 02:11:10 +00:00
Konstantin Shcheglov
5281b9c0f8 Legacy. Remove star types from more type operations.
Change-Id: I0bad6f5d7fa9e843224b1948f55ea5dcefc7026c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-03-07 22:59:51 +00:00
Konstantin Shcheglov
6b9e8cd47b Completion. Issue 53016. Suggestion CompletionSuggestionKind.IDENTIFIER when factory redirect.
Replaces NamedConstructorContributor with new style implementation.

Bug: https://github.com/dart-lang/sdk/issues/53016
Change-Id: I254c139a0c08eae8a256e9589b09481997f40e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-07 22:25:34 +00:00
Konstantin Shcheglov
8705a06e21 Completion. Remove localVariableDistance(), and usage in RelevanceDataCollector.
Change-Id: I4ad00d1820fa996dac0abdb13649418a2fa97ed4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356121
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-07 22:04:18 +00:00
Dan Chevalier
68c74e2a97 Add obfuscation token to DTD uri
Adding this token adds a small layer of security since the caller needs to have gathered the uri in some way rather than just stumbling on the DTD port.

Change-Id: I0665f4718d162daf94cb49fa1c6f4206c83d77cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355220
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Dan Chevalier <danchevalier@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2024-03-07 19:33:19 +00:00
Ben Konyi
9d043ce763 Fix flaky tests that require an isolate to be runnable
These tests became flaky after 3786c5e5ee
landed as DDS initialization became faster, making it more likely that
an isolate used in the test was not yet runnable.

Partly fixes https://github.com/dart-lang/sdk/issues/55133

Change-Id: Ic919cfa6c8bf2b8274efecfa2a78bc056f7e181e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356340
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
2024-03-07 19:32:34 +00:00
Nate Biggs
52f996b5bc [dart2js] Use impacts from codegen results for dump info.
Currently, serialized dump info metadata (output of emitter phase) contains all the impacts created during codegen in a Map<MemberEntity, WorldImpact>. These impacts are already serialized in the output of the codegen phase. This is bad for two reasons: 1) The serialized bytes are duplicated. 2) The impacts cannot be GCed right after the emitter uses them, the dump info registry maintains a reference to them.

To mitigate this I've updated the registry to only store impacts for entities where the impacts are generated during the emitter phase (today only parameter stubs). Rather than try to re-generate those impacts during the dump info phase, we serialize them with the dump info metadata. However, most impacts are generated during the codegen phase and for these we deserialize them from the codegen results at the beginning of the dump info phase.

Change-Id: I1302b4ab759bca3d492bc6b40194d7a7720ed6f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354580
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-03-07 19:25:15 +00:00
Daco Harkes
8de00e2137 [vm] Introduce pragma vm:deeply-immutable
This CL introduces a way to mark all instances of a class as deeply
immutable.

In order to statically verify that all instances of a deeply immutable
class are immutable, a deeply immutable classes must have the following
properties:

1. All instance fields must
   1. have a deeply immutable type,
   2. be final, and
   3. be non-late.
2. The class must be `final` or `sealed`. This ensures no
   non-deeply-immutable subtypes are added by external code.
3. All subtypes must be deeply immutable. This ensures 1.1 can be
   trusted.
4. The super type must be deeply immutable (except for Object).

Note that instances of some classes in the VM are deeply immutable
while their class cannot be marked immutable.

* SendPort, Capability, RegExp, and StackTrace are not `final` and
  can be implemented by external code.
* UnmodifiableTypedDataViews do not have a public type. (It was
  recently deprecated.)

See runtime/docs/deeply_immutable.md for more details.

Use case:

This enables attaching a `Dart_FinalizableHandle` to a deeply immutable
object and the deeply immutable object with other isolates in the same
isolate group.

(Note that `NativeFinalizer`s live in an isolate, and not an isolate
group. So this should currently _not_ be used with `NativeFinalizer`s.
See https://github.com/dart-lang/sdk/issues/55062 for making a
`NativeFinalizer.shared(` that would live in an isolate group instead
of in an isolate.)

Implementation details:

Before this CL, the `ImmutableBit` in the object header was only ever
set to true for predefined class ids (and for const objects). After
this CL, the bit can also be set to true for non const instances of
user-defined classes. The object allocation and initialization code has
been changed to deal with this new case. The immutability of a class is
saved in the class state bits. On object allocation and initialization
the immutability bit is read from the class for non-predefined class
ids.

TEST=runtime/tests/vm/dart/isolates/fast_object_copy2_test.dart
TEST=runtime/vm/isolate_reload_test.cc
TEST=tests/lib/isolate/deeply_immutable_*

Bug: https://github.com/dart-lang/sdk/issues/55120
Bug: https://github.com/dart-lang/sdk/issues/54885
Change-Id: Ib97fe589cb4f81673cb928c93e3093838d82132d
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try
Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354902
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-03-07 18:33:58 +00:00
Zijie He
094202bb91 [Fuchsia] Remove the legacy gn build rules for fuchsia
The updated test-scripts contains https://crrev.com/c/5341620 which
allows to generate fidl apis with an env var controlled location
rather than a hard-coded one. So the existing fuchsia gn build rules
in dart/sdk become obsolete and can be fully removed in favor of the
one in //third_party/fuchsia/gn-sdk/.

Meanwhile the gn-sdk has been updated with
https://crrev.com/c/5325282 to use api-level version'ed idk but not
the ones in arch/.

Cq-Include-Trybots: luci.dart.try:vm-fuchsia-release-arm64-try,vm-fuchsia-release-x64-try
Tested: ^^^^^
Bug: 40935282
Change-Id: I2ce958e6db1ff8221beef7b7ff953c32bb4525ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355283
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Zijie He <zijiehe@google.com>
2024-03-07 18:26:59 +00:00
Devon Carew
cea23ff072 [deps] rev dartdoc, http, markdown, package_config, shelf, vector_math, web, webdriver, webkit_inspection_protocol
Revisions updated by `dart tools/rev_sdk_deps.dart`.

dartdoc (cec45fb..0de8aff):
  0de8aff3  2024-03-06  Sam Rawlins  Generate docs for enum static methods. (dart-lang/dartdoc#3697)
  9eafdc64  2024-03-06  Sam Rawlins  Rewrite Library.allOriginalModelElementNames. (dart-lang/dartdoc#3698)
  e8f36333  2024-03-06  Sam Rawlins  Fix SDK GitHub action with some stub headers and footers (dart-lang/dartdoc#3704)
  58c065d4  2024-03-05  Sam Rawlins  Bump snippets activated to 0.4.3 (dart-lang/dartdoc#3702)

http (470d2c3..8d3c647):
  8d3c647  2024-03-06  Brian Quinlan  Add support for negotiating a subprotocol (dart-lang/http#1150)
  e71e739  2024-03-05  Brian Quinlan  Add `WebSocket.connect` as a cross-platform connection method (dart-lang/http#1149)
  f14b5aa  2024-03-04  Brian Quinlan  Include a description and version number in web_socket pubspec (dart-lang/http#1148)
  5b656a9  2024-03-04  Brian Quinlan  Add a LICENSE file to package:web_socket (dart-lang/http#1147)
  557c420  2024-03-04  Brian Quinlan  Implement WebSocket for the browser (dart-lang/http#1142)

markdown (dd47c5d..1ca5166):
  1ca5166  2024-03-06  Devon Carew  fix a crash when parsing alert block syntax (dart-lang/markdown#593)

package_config (4a7042b..3d90e69):
  3d90e69  2024-03-05  Michael Thomsen  Fix typo (dart-lang/package_config#149)

shelf (da6a69b..1acbc67):
  1acbc67  2024-03-06  Andy  Add shelf_router middleware examples (dart-lang/shelf#417)

vector_math (3706feb..7e705f7):
  7e705f7  2024-03-06  6y  Fix quaternion negate (google/vector_math.dart#316)
  1ed8ac6  2024-03-06  6y  Resolve Inconsistency in Matrix3 and Matrix4 `rotateY` Implementations (google/vector_math.dart#317)

web (8870d04..51e594b):
  51e594b  2024-03-05  Srujan Gaddam  Fix dictionary constructors to accept supertype members and create an empty object when there are no fields (dart-lang/web#197)
  4af904f  2024-03-05  Srujan Gaddam  Publish 0.5.1 (dart-lang/web#196)
  c72ec1a  2024-03-04  Devon Carew  add instructions for re-generating the package (dart-lang/web#195)

webdriver (2c1b6f8..73a7ac8):
  73a7ac8  2024-03-04  dependabot[bot]  Bump nanasess/setup-chromedriver from 2.2.1 to 2.2.2 (google/webdriver.dart#294)

webkit_inspection_protocol (07295b9..153fea4):
  153fea4  2024-03-04  dependabot[bot]  Bump nanasess/setup-chromedriver (google/webkit_inspection_protocol.dart#120)

Change-Id: Ic213677a1e2430a6de56a94e0bfaa1f33e2fc7d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356300
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-07 18:22:48 +00:00
Jake Macdonald
f2e8464b98 add newline after doc comments, add tests for doc comments
Bug: https://github.com/dart-lang/sdk/issues/55128
Change-Id: I6897e33ad291093d460e28a0b0f374d6504418e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356260
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-07 16:58:00 +00:00
Johnni Winther
0f1adddec3 [cfe] Remove CompilerTask in favor of generateKernelInternal
Change-Id: I19c8eecae2e64392fc268144057f6090af23098a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356081
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2024-03-07 14:49:49 +00:00
David Morgan
ffe61b76d8 [macros] Tests find SDK out instead of hard coding it.
R=whesse@google.com

Change-Id: I0ecdf8ef53e79234f8d2957ac680e8ec103e496a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356042
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-07 14:32:47 +00:00
Chloe Stefantsova
7e2679df05 [cfe] Add function to check sufficiency of type shape checks
Part of https://github.com/dart-lang/sdk/issues/54998

Change-Id: Ib60e8fbce0ca3bef9b12b6a1950b1943ab86bd99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354861
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-03-07 11:58:45 +00:00
Ömer Sinan Ağacan
511bffedca [dart2wasm] Allow giving names to globals in the module globals section
Currently no globals are named, so the subsection will be empty. Three
extra bytes will be generated in the names section for the empty
subsection.

When debugging we can now name globals with the optional positional
argument:

    // "my global" is new:
    m.globals.define(w.GlobalType(type), "my global")

wasm-opt and v8 (d8, wami) support the subsection, so the global will
now appear as "my global" in the debugger and Wast outputs.

Change-Id: I5988ab792209c5c82593b85c48fead65ad536031
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355120
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2024-03-07 11:51:57 +00:00
David Morgan
a85689758e [macros] Fix flake: use the SDK that was actually built.
Currently these two tests only passes by chance, if a `release` build
happens to be available.

R=whesse@google.com

Change-Id: I6048c6ed8ea2f299c88eaf9a6c6b2add8a03dfa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356083
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-07 11:50:41 +00:00
David Morgan
ebcae76d0d [macros] Replace hardcoded skip with status file skip.
R=whesse@google.com

Change-Id: I50a41ebadd71b65761613e2ac2259152d1433ddd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355923
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-07 10:33:08 +00:00
Johnni Winther
9293d2fc33 [cfe] Report errors on macro declaration/annotation in the same library cycle
Change-Id: Ia8b7b572f8947e7b82f3468331cd33e430ef8376
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356060
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-03-07 09:10:07 +00:00
Zach Anderson
170e014e67 [gn] Add an option to specify the sdk_hash
For https://github.com/flutter/flutter/issues/144430

Would it work for the flutter engine build to just use
a prefix of the dart-lang/sdk git hash for this?

Change-Id: I086d5484652ef7486cbe052519d3a0fd3159ce44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356122
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Zach Anderson <zra@google.com>
2024-03-07 04:11:48 +00:00
pq
06eea7c263 multi-option context support for nested excludes
See: https://github.com/dart-lang/sdk/issues/54858

Should address failures seen in https://dart-review.googlesource.com/c/sdk/+/350342



Change-Id: Iedff9a0a4d44f96424a173f6a6bc655900ec8446
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351521
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-03-07 04:05:19 +00:00
Jake Macdonald
fde222277a update to the latest bazel_worker
Change-Id: I640e97d68c47409123c6f4aa8ee6cc2404810f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356180
Reviewed-by: Nate Bosch <nbosch@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2024-03-07 01:23:32 +00:00
Liam Appelbe
6f677df11a [test] Disable regress_53519_test in obfuscated/dwarf mode
Also reverts https://dart-review.googlesource.com/c/sdk/+/354840,
which attempted the same thing. The vmOptions are not parsed
correctly on the bots.

Fixes: https://github.com/dart-lang/sdk/issues/550599
Change-Id: I05c7184ffb6d303309714a667d209d3621dcc348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355960
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2024-03-07 00:56:33 +00:00
Keerti Parthasarathy
c38055844d Completion: Issue 55014: Add named constructors to suggestions for enum values.
Fixes https://github.com/dart-lang/sdk/issues/55014

Change-Id: I6635c76fd84d0fe364febf6264cd38f0c17c2f19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356120
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-03-07 00:46:38 +00:00
Konstantin Shcheglov
692624bd65 Completion. More tests in LocalityTest.
Change-Id: Ic055fa5dedf6fea352f71724c1d8f9f51dcb0de5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356142
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-07 00:25:23 +00:00
Alexander Aprelev
ce6bec3bc2 [vm/win] Remove 'explicit' modifier from copy constructor.
This is to fix msvc ide warning.

Fixes dartbug.com/55108
TEST=ci

Change-Id: I7430786b6abf255487e99fa878894647594a6a6f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356140
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-03-06 23:26:07 +00:00
Konstantin Shcheglov
000d8fdc8b Completion. Add 'distance' to FormalParameterSuggestion.
More tests, but all nodes yet, not full test coverage.

Change-Id: I66f2949ccba0e5d2c1e8bccffeca46d6ca6c1ca6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355888
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-03-06 22:08:39 +00:00
Ben Konyi
3786c5e5ee [ DDS ] Don't await getIsolate calls in DDS initialization
Fix an issue where DDS would fail to initialize when an isolate in the target process was unable to handle service requests (e.g., when executing FFI code or blocked on a system call).

Fixes b/323386606

Change-Id: I659ebaf750e2c800e9819809d1104e024cb059da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354681
Reviewed-by: Derek Xu <derekx@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2024-03-06 21:15:36 +00:00
Konstantin Shcheglov
3775357116 Completion. Issue 55049. Fix for completion inside AsExpression expression.
Bug: https://github.com/dart-lang/sdk/issues/55049
Change-Id: I5ea3e2997218dcbbf0af8140387102c6ccf58d11
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355890
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-03-06 20:14:09 +00:00
Sam Rawlins
c2a9026ef2 analyzer: add Effective Dart to our style guide
I tidy up a few other bits.

In particular, I wasn't sure about the word "adjective" to describe the word "file" in the variable name `filePath`. I looked it up and found "noun adjunct." https://en.wikipedia.org/wiki/Noun_adjunct#:~:text=Noun%20adjuncts%20can%20also%20be,and%20%22chicken%20soup%22%20modifies%20%22. Never heard of it! It looks like "qualifying noun" is also a common term, and I think it's not too hard to figure out what that means. But, open to suggestions as always.

Change-Id: If204c67078532fb5130fda08f6777761c87ba8eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355891
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2024-03-06 19:29:58 +00:00
Keerti Parthasarathy
393286c11c Completion: Issue 55010: Add missing suggestions for invocation.
Fixes https://github.com/dart-lang/sdk/issues/55010

Change-Id: Id7054243a60b9a873a08e0e8a3e7a4a02779cf1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355882
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
2024-03-06 19:20:48 +00:00
Sigmund Cherem
376f9dcf6b [ddc] increase timeout of steps in e2e suite.
The data shows a lot of variation by machine. The slowest test samples
bring the p90 above 4s, which explains that we often hit the limit.

I expect that we'll continue seeing flakes, but less often as a result
of this change. That said, some of the e2e test are taking close to 4
minutes, so we may need additional sharding or switch our approach if
that ocurrs more often.

Change-Id: I47c0dbce6f766edf7c2845d26f11ae7c6372a7bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355980
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2024-03-06 18:07:03 +00:00
Srujan Gaddam
55df0ca4d6 [dart:js_interop] Fix operator precedence in determining constructor type
Fixes https://github.com/dart-lang/sdk/issues/55107

The lack of parentheses around the ternary operator made the check
invalid when there are members that aren't constructors in the
extension type.

Change-Id: I87ce918c478113f682d3df28f148b7f59d4fd075
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355883
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2024-03-06 17:39:29 +00:00
Nate Bosch
b6957a94f4 Bump test to 7724aabe8cd40b376573330f5227a6ec0a47f28e
Changes:
```
> git log --format="%C(auto) %h %s" 525f77b..7724aab
 https://dart.googlesource.com/test.git/+/7724aabe Add failure only reporter (2190)

```

Diff: https://dart.googlesource.com/test.git/+/525f77b2e0459f76b088ae65b71b2e948dd04224..7724aabe8cd40b376573330f5227a6ec0a47f28e/
Change-Id: I7b02e4e9434bcf9e7911a52d5e57f3adf1434f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355887
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2024-03-06 16:52:37 +00:00
David Morgan
1c3bd1d0f9 [macros] Increase timeout for test flakiness.
Example flake

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8754695045701063905/+/u/test_results/ignored_flaky_test_failure_logs

R=nshahan@google.com

Change-Id: I78c3ef26bf635dd8bb9e0d7c28c05e68a5ce9a18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355700
Commit-Queue: Morgan :) <davidmorgan@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2024-03-06 16:14:19 +00:00
Martin Kustermann
8cdeafe647 [dart2wasm] Add --delete-tostring-package-uri option to dart2wasm
This is adding the same option and behavior that the frontend server
already has.

Closes https://github.com/dart-lang/sdk/issues/54280

Change-Id: I6d5c23baf171267eaf71eb9bf5993dcd9648c948
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356080
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
2024-03-06 15:55:31 +00:00
Oleh Prypin
fc5f82c244 [tool] Use new builder name syntax for tools/find_builders.dart
See mentions of migrating from legacy syntax from back when it was ongoing: https://g-issues.chromium.org/issues/40170614#comment36

Change-Id: If592c5bcf40b2e56f9b18fcf27f74d767f97375a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356041
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Oleh Prypin <oprypin@google.com>
2024-03-06 15:49:54 +00:00
Daco Harkes
86c41c9c77 [tool] tools/find_builders.dart cbuild opt in
Opt in to CBuild being green.

Remove denylisted bots now that issue is resolved.

Change-Id: I89c23720eaed78b317067bbdb065fe0cef8ecd75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356022
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-03-06 14:03:19 +00:00
David Morgan
c2004efd47 [macros] Add macro build tests.
These are a new type of test that runs with the SDK under test against what
looks like an external package; they start by running "pub get" then run SDK
build commands to build the package, and check that macros applied correctly.

Add tests for various builds that already pass, plus one that doesn't:
cfe_sdk_cli_test fails because it was switched to run from an AOT snapshot
and that doesn't support macros yet.

Change-Id: Ic801cb61bd414d4876566452e01dd8c8203e9013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353100
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
2024-03-06 12:31:37 +00:00
Daco Harkes
20441060a6 [vm/ffi] Fix CBuild
https://dart-review.googlesource.com/c/sdk/+/353261 caused the CBuild
to fail. (And CBuild doesn't prevent landing CLs.)

new Name.byReference (package:kernel/ast.dart:10940:48)
new Name (package:kernel/ast.dart:10933:11)
_FfiDefinitionTransformer._createAddOffsetOfGetter (package:vm/modular/transformations/ffi/definitions.dart:975:22)

TEST=g3-cbuild-try

Change-Id: Ie7b148fb72f6fe862052b70da46b6c34fa693364
Cq-Include-Trybots: dart-internal/g3.dart-internal.try:g3-cbuild-try
Cq-Include-Trybots: luci.dart.try:vm-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/356021
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2024-03-06 12:10:37 +00:00
Daco Harkes
513aac0ce3 [vm/ffi] #offsetOf getters for struct fields
And use these new getters inside field reads/writes.
This outlines this currently inlined code into calls to a helper
methods. This may make the kernel a little smaller and easier to
read. Also, it removes the need to compute the (now outlined)
expression on arbitrary call sites in the FFI transformer

TEST=test/ffi
TEST=all the expect files

Bug: https://github.com/dart-lang/sdk/issues/44589
Bug: https://github.com/dart-lang/sdk/issues/41237
Change-Id: I53d69778ee50186944229550f89f10c22452e13f
Cq-Include-Trybots: luci.dart.try:vm-aot-android-release-arm64c-try,vm-aot-android-release-arm_x64-try,vm-aot-linux-debug-x64-try,vm-aot-linux-debug-x64c-try,vm-aot-mac-release-arm64-try,vm-aot-mac-release-x64-try,vm-aot-obfuscate-linux-release-x64-try,vm-aot-optimization-level-linux-release-x64-try,vm-appjit-linux-debug-x64-try,vm-asan-linux-release-x64-try,vm-checked-mac-release-arm64-try,vm-eager-optimization-linux-release-ia32-try,vm-eager-optimization-linux-release-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-qemu-linux-release-arm-try,vm-ffi-qemu-linux-release-riscv64-try,vm-fuchsia-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-linux-debug-ia32-try,vm-linux-debug-x64-try,vm-linux-debug-x64c-try,vm-mac-debug-arm64-try,vm-mac-debug-x64-try,vm-msan-linux-release-x64-try,vm-reload-linux-debug-x64-try,vm-reload-rollback-linux-debug-x64-try,vm-ubsan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353261
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-03-06 10:10:55 +00:00
Sam Rawlins
59035021cf Bump dartdoc to cec45fbedf85b938670314e5bcdac3fbdde94f99
Fixes https://github.com/dart-lang/dartdoc/issues/3701

Change-Id: Ibcd7a17ada8a0ce9575a4d693bab090dc5675444
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355825
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Kallen Tu <kallentu@google.com>
2024-03-06 01:30:11 +00:00
Nicholas Shahan
5e03c497e9 [ddc] Cleanup dynamic calls in native_typed_data
Change-Id: I6a3b709addf59fbde09d829efed43028d71ef7d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355620
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2024-03-06 00:51:15 +00:00
Konstantin Shcheglov
be5a06874e Update flutter_elements.xml baseline.
Change-Id: I41135bfd747808da09073c99f065495297d91096
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355886
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-03-06 00:40:18 +00:00
Konstantin Shcheglov
d042edfea0 Revert "Issue 54468. Use (int, int) as backing storage for EnumSet, up to 60 elements."
This reverts commit 492e40713d.

Reason for revert: too expensive

Original change's description:
> Issue 54468. Use (int, int) as backing storage for EnumSet, up to 60 elements.
>
> Bug: https://github.com/dart-lang/sdk/issues/54468
> Change-Id: I04a221526dcc7e380e7e9c84f8bb8b2fed52f4eb
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355823
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

Bug: https://github.com/dart-lang/sdk/issues/54468
Change-Id: I9f8b6755c8f8fce4e23dcb8533ef680eb8516dba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355885
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-03-05 23:52:39 +00:00
Brian Wilkerson
3389dfe409 Add documentation for some of the recommended lints
Change-Id: Ia9d9bf169c1ffc62e8960e373453ae7da7f2ee4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345747
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-03-05 23:50:37 +00:00
Konstantin Shcheglov
888941c499 Completion. When fail, ensure that actual is printed without indentation.
So, it can be easily copy / pasted, without shifting manually afterwards.

Change-Id: I7da463226e2c276d41b1eb01226ade620c59d77b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355826
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
2024-03-05 23:26:42 +00:00
Konstantin Shcheglov
e29057a973 Completion. Issue 40616. Don't insert lambdas automatically.
Bug: https://github.com/dart-lang/sdk/issues/40616
Change-Id: Ib34d889f8615c43769d104c265d3f8ee183dc38e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-03-05 23:24:23 +00:00