Commit graph

99443 commits

Author SHA1 Message Date
Martin Kustermann 0bc92a4333 [dart2wasm] Remove usage of type category table
The type category table is a O(number-of-classes) sized byte array that
maps from class-id to either a type category (function, record, ...) or
a masqueraded class-id.

* for flute this table takes up around 1 KB.
* this prevents from making concrete class-ids come before all abstract
  class ids

After recent changes the core RTT implementation no longer involves
masqueraded types (i.e. `<obj> is/as <type>` and `<type> <: <type>`
queries don't trigger masquerading functionality)

This CL removes the type category table, the special casing in the
class-id assignment and the compiler support for building the table.

Instead we move the logic to pure dart code, which can use normal `is`
checks to perform its function.

We add one optimization: The compiler will provide the class-id from
which one only non-masqueraded classes come. This makes the masquerading
function have a fast path.

* We use `Wasm{TypedData,String}Base` marker interfaces i
 `dart:_internal` to check for wasm-backed implementations
* We use `-Ddart.wasm.js_compatibility` to provide JSCM mode

We add a test that actually exercises the 2 modes.

Change-Id: I051c35b17878950402a1336df871a686b649f732
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349641
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-02 19:01:49 +00:00
Parker Lougheed 5b980d6995 [analyzer] Update diagnostic messages to use markdown codeblocks
To prepare for the site dropping prettify.

Change-Id: I90367bd67ae0216572aa9defe6aa180a34942e35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349761
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-02 18:42:28 +00:00
Volodymyr Buberenko 6d3f389e59 Improve sort_pub_dependencies.dart messages
Closes https://github.com/dart-lang/sdk/pull/54812

GitOrigin-RevId: c80e6b2ae2c14ce0d510b26809041aaf3be936e6
Change-Id: I1f6ce709702a5f9b9ee63dd9730bfd8b7f8f7a6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349920
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-02 18:27:50 +00:00
Konstantin Shcheglov f3486f7e3e Legacy. Remove tests for language versions 2.6, 2.7, 2.8
Change-Id: I5dadd2c9a6720125f3bf0cdeaeaa2d8bda411534
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349922
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-02 18:22:49 +00:00
Daco Harkes 28c7f5bd1e [vm/ffi] Refactor dart:ffi generator
Refactor to avoid conflicts later with concurrent work on:
- https://github.com/dart-lang/sdk/issues/45508
- https://github.com/dart-lang/sdk/issues/44589

Change-Id: I7b7ea2e4ec29115da42b0c196a2952c3cd5d3fa6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349901
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-02 18:11:00 +00:00
Konstantin Shcheglov f95441f707 ErrorReporter. Remove empty 'arguments' arguments.
Change-Id: I70251ec7872162f148dc6a4b5feae99faa175890
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349632
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-02 16:55:00 +00:00
Jake Macdonald ec20773558 [macros] output better error messages for unrecognized types in the JSON macro language test
Change-Id: Ib672dcdcff11f376014a58a9b9f7630de8d2539a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349601
Commit-Queue: Morgan :) <davidmorgan@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
2024-02-02 15:53:18 +00:00
Johnni Winther ec6e1065f2 [vm] Remove 'dart:_macros' from extraRequiredLibrariesPlatform
Intended change accidentally left out of
https://dart-review.googlesource.com/c/sdk/+/348680

TEST=existing

Change-Id: Id96d2acda95a5b010c7ff53e03e07dde81a254d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349880
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-02 14:19:38 +00:00
Chloe Stefantsova d337c62c00 [cfe] Allow null representation types in .call tear-offs
Closes https://github.com/dart-lang/sdk/issues/54768

Change-Id: I4624bdc7e02b79c174fa661f4bda7eb633673dea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349502
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-02-02 13:32:22 +00:00
Chloe Stefantsova a5bbbe814f [cfe] Implement the update of "incompatible with await"
This CL implements the udpate to the notion of a type being
"incompatible with await" as found here:
https://github.com/dart-lang/language/pull/3598

Change-Id: I7792564c1854468709d0da3238c02e912df52369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349882
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-02-02 13:29:27 +00:00
Chloe Stefantsova b6d69bd296 [cfe] Remove TypeBuilderConstraintGatherer
The removed class is not used since
https://dart-review.googlesource.com/c/sdk/+/343920

Change-Id: If8e7daf1493feeee2638874b164157aa697c2243
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349881
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2024-02-02 12:09:30 +00:00
Martin Kustermann 32c22da2b6 [dart2wasm] Record type related cleanups
* avoid allocating _RecordType objects for `<obj> is/as <record-type>`
  => Introduce `Record._checkRecordType()`
  => Use `Record._recordRuntimeType` (which is now not masquerading) for
  other purposes (e.g. verification)

* avoid using masqueraded types for `<obj> is/as <record-type>`
  => Introduce `Record._masqueradedRecordRuntimeType`

Although we introduce 2 extra methods on `Record` that are overriden,
it's O(record-shapes-in-program) and therefore not a big overhead.

=> This will enforce the invariant that the actual type check
   implementation (i.e. for `<obj> is/as <type>` or
   for `<type> <: <type>`) *never* calls back into
   masquerading functionality

=> This in return means we can make the masquerading functionality
   using `<obj> is <type>` checks.

Change-Id: I3e3a0411022042a8e735aaeed396cc8f90d8c9c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349800
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-02-02 11:52:23 +00:00
Martin Kustermann 105825dfc4 [vm] Fix memory leak of [AppSnapshot] object
This leak start to happen after [0] landed.

[0] https://dart-review.googlesource.com/c/sdk/+/346060

TEST=Fixes vm/dart/isolates/regress_54528_test in ASAN mode

Change-Id: I0f24c4d997abcb0b0b6d396a505a5498bb633650
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349862
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2024-02-02 10:45:27 +00:00
Johnni Winther fe52b9bfe5 [macros] Add dart:_macros
This adds the dart:_macros library to the SDK and adds support for accessing dart:_macros from package:macros. The library is not used yet.

This change is needed as a prestep to adding the package:macros and using it in the CFE and analyzer, and needs to be rolled in as the checked in sdk before package:macros can be supported.

TEST=ci

Change-Id: Ife3ffd48527e3a196048d2ddf7387b8b7818f3a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348680
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2024-02-02 07:47:59 +00:00
Parker Lougheed 1327a9a71e [analyzer] Expand NULLABLE_TYPE_IN_IMPLEMENTS_CLAUSE for extension types
This is already functional, but I noticed the message needed to be updated. I also added tests for the case, mostly corresponding to the existing ones for classes.

Change-Id: I3529691f640bfbde3d8018b002b9ddf65c4ac4e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349762
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-02 06:55:10 +00:00
Konstantin Shcheglov 2a88162b84 ErrorReporter. Use atNode() instead of reportErrorForNode().
Change-Id: I118fb7623d3effc3bf4bebdeb586196659e8da88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349630
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-02 01:56:59 +00:00
Konstantin Shcheglov 3c78ff1f33 ErrorReporter. Fix merge deprecation.
Change-Id: If490af30b443396b7c01d1ab759a1afbc708ea8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349713
Auto-Submit: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-02 00:19:48 +00:00
Konstantin Shcheglov 14a9782895 Legacy. Remove 2.5 language tests, two error codes.
Change-Id: If29c291d17fbbd74141c08afe55d0c174b303f0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349627
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-01 23:02:38 +00:00
Konstantin Shcheglov 79cd9a6655 ErrorReporter. Add atToken(), atOffset(), atNode(); use atToken()
We discussed this some time ago, and I found another place where
I would like to report at a `SyntacticEntity`. So, if I'm going to
add something, I can just as well make `ErrorReporter` better.

Change-Id: I46d99e8959c7a5fd700cc2cba775114bfefec04d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349709
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 22:32:27 +00:00
Danny Tuppeny c3d80286fe [analysis_server] Add a supportsUris client capability for legacy server to switch into URI mode
This adds support for the legacy server to switch to URIs using a client capability. In this mode, all "FilePaths" will be URI strings over the protocol (in both directions).

It also allows the server to send LSP notifications (wrapped inside an "lsp.notification" notification, matching how requests/responses work). Notifications are automatically enabled if the client uses any LSP methods or sends the new "supportsUris" capability.

Change-Id: I5d2b76e396862129c61de70d57397603c958a02d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349120
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-01 22:19:00 +00:00
Konstantin Shcheglov 33fc944a80 Macro. Use either AstNode or Token for type location.
Change-Id: Idced9134ae82bc315101635a1b29f7aef044246a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349707
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-01 21:45:00 +00:00
Parker Lougheed df7c3197af [docs/api] Minor adjustments and fixes to api.dart.dev homepage
- Since "Futures", "Streams", and "Zones" are plural and not in code syntax, can make them lowercase to be consistent with the `dart:core` entry in the same list.
- Use the full "platform interopability" term when introducing the libraries, as it might be a newer term for readers.
- Replaces "interoping" term as after searching it seems not common and easily mistaken.
- Fixes spelling of "function"

Change-Id: Ia887b427789a50d70cb47228c677fe2fd03499e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349421
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Marya Belanger <mbelanger@google.com>
2024-02-01 21:41:38 +00:00
pq bb9ce9cd2a ensure a defined options file overrides discovered ones
(Note an additional pre-existing test in `context_locatator_test:test_locateRoots_nested_options_overriddenOptions`.)

Fixes https://github.com/dart-lang/sdk/issues/54791

Change-Id: Ie67e9d840bec1caaa3548a8803f3a9b452807249
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349625
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 21:28:40 +00:00
Kallen Tu 1aa0575ef1 [analyzer] Add doc imports to UnlinkedLibraryDirective and report errors.
This CL adds doc import information to UnlinkedLibraryDirective and reports any static errors such as `URI_DOES_NOT_EXIST` from the doc imports.

The doc imports should be treated similarly to actual imports so it uses a lot of the same logic.

Based largely on Sam's WIP work in this CL:
https://dart-review.googlesource.com/c/sdk/+/344340

Bug: https://github.com/dart-lang/sdk/issues/50702
Change-Id: Ic001fd6d4077eea04905288be0424e7b11b2b56c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/345361
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2024-02-01 20:04:59 +00:00
Konstantin Shcheglov 423e769053 Macro. Support for more kinds of TypeAnnotation(s) as diagnostics target.
Change-Id: I67ce3ca386175c0055ceecfdfbd7dcc52c031f4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349781
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 19:59:29 +00:00
Alexander Aprelev baf1e6e904 [gardening] Mark non_utf8_output_test accordingly in status file.
Change-Id: Id497a20951db32130f27ab48b508649ca7d13067
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349780
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-02-01 19:44:50 +00:00
Danny Tuppeny 581686b8fb [analysis_server] Consolidate some more writePackageConfig() methods
+ tidy up some redundant package versions that are inherited from the ConfigurationFiles mixin.

Change-Id: I93329cbf65af3a68ed27284903e7becac01cf5ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-01 19:11:27 +00:00
Danny Tuppeny 19677cb591 [analysis_server] Remove "previewSurveys" flag
Dart-Code has defaulted this flag to true for a while now and this flag was intended to be temporary to allow for our own testing.

Change-Id: Iad679303480151627fa2dead26b4a3a9f625c773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349742
Reviewed-by: Jaime Wren <jwren@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Elias Yishak <eliasyishak@google.com>
2024-02-01 19:10:12 +00:00
Konstantin Shcheglov 8947b7ffc5 Remove TestAnalysisContext.typeSystemLegacy
Change-Id: I1568c8ec0c36ad9ff23bb517f775fa6f9734aee0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349703
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 18:40:21 +00:00
Danny Tuppeny d6211dc141 [analyzer] Increase package:path constraint to 1.9.0
1.9.0 contains a fix for parsing file:// URIs with encoded colons that we can get from VS Code and is the version analyzer_plugin now requires.

Change-Id: I193ce4660116b2847a280516ba33f076f75494aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349741
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2024-02-01 18:36:41 +00:00
Daco Harkes c0c7c1ef49 [vm/ffi] Update inner pointer accesses in IL
FFI loads and stores via structs can have a TypedData as receiver,
so this CL updates those loads to `kMayBeInnerPointer`.

This CL adds an IL test to verify that for `Pointer` loads the untagged
value is treated correctly as `kCannotBeInnerPointer`.
(And adds some prefer-inline pragmas to make some common operations
be inlined to avoid allocating `Pointer` objects.)

This CL updates the load in the FFI closures to use a load-field.
This can also potentially enable not allocating a pointer object when
this closure is inlined.

TEST=tests/ffi/unwrap_typeddata_generated_test.dart
TEST=tests/ffi

CoreLibraryReviewExempt: Only adding some pragmas.
Change-Id: If687e54c676f275cc849b3fed526a13766ab331a
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-aot-win-debug-arm64-try,vm-aot-win-debug-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,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349241
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2024-02-01 18:28:53 +00:00
Daco Harkes bf683bacbb Reland "[vm/ffi] Introduce Struct.create and Union.create"
Analyzer fix https://github.com/dart-lang/sdk/issues/54754 has
landed. A new version of package:analyzer and package:dartdoc have
been released. `pub global activate dartdoc` should now work.

Patchset 1 is identical to the original CL.
The only difference is an extra test testing with negative offsets.

=== Original CL description ===

Structs and unions can now be created from an existing typed data
with the new `create` methods.

The typed data argument to these `create` methods is optional. If
the typed data argument is omitted, a new typed data of the right
size will be allocated.

Compound field reads and writes are unchecked. (These are
TypedDataBase loads and stores, rather than TypedData loads and stores.
And Pointers have no byte length.) Therefore the `create` method taking
existing TypedData objects check whether the length in bytes it at
least the size of the compound.

TEST=pkg/analyzer/test/src/diagnostics/creation_of_struct_or_union_test.dart
TEST=pkg/vm/testcases/transformations/ffi/struct_typed_data.dart
TEST=tests/ffi/structs_typed_data_test.dart
TEST=tests/ffi/vmspecific_static_checks_test.dart

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

Change-Id: Id7f30bcd4a6ae55a8298b39c9eadf4e80bc699a9
CoreLibraryReviewExempt: FFI is a VM and WASM only feature.
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-aot-win-debug-arm64-try,vm-aot-win-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,vm-win-debug-arm64-try,vm-win-debug-x64-try,vm-win-release-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349260
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-01 18:28:03 +00:00
Konstantin Shcheglov 0151574bb0 Increment DATA_VERSION, probably fix integration tests.
Change-Id: I99b1de66fae885b6a2f0da995acc2721dc04e2a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349702
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 17:32:31 +00:00
Brian Wilkerson 394538ebf1 Enhance semantic highlighting for macros
Change-Id: I1d2e26e25f69971ea9a7979290d26c8f63208923
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349363
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-01 17:10:36 +00:00
Konstantin Shcheglov 796d0278a2 Legacy. Remove 'isNonNullableByDefault' from ConstantEvaluationEngine.
Change-Id: If3a439ca8ab0e48b7bfb6a609d2e2a5ab3d04ac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349418
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 16:38:27 +00:00
Alexander Thomas 6c7b3671c2 [dartdoc] Adjust footer to match other Dart sites
Fixes: b/323126451
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try
Change-Id: I6819063fbb02b1b77b3959b96ab3964eb2aaf974
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349500
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2024-02-01 16:19:57 +00:00
Alexander Aprelev 3a3433fd38 [gardening] Skip test that requires aot on ia32.
TEST=vm/dart/isolates/regress_54528_test

Change-Id: I31c26a4f61ed45128dacf94fff46ffc08f010a55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349624
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2024-02-01 16:07:49 +00:00
Brian Wilkerson bdb3996a5d Suggest if when after if at the beginning of a statement
I know there was an issue opened for this, but I can't find it.

Change-Id: I6bdbbdb6d001dea519405e67ead65874c9a234e4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349464
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2024-02-01 16:05:59 +00:00
Martin Kustermann 83b7a57ef3 [dart2wasm] Add --extra-compiler-option to dart compile wasm command
By allowing a pass-through of arbitrary arguments to the dart2wasm
compiler we allow flutter to use options which

* aren't relevant for end-users of `dart compile wasm`
  (e.g. such as providing different platform dill file)

* we may break at any point in time (though in coordination with
  flutter)

Issue https://github.com/dart-lang/sdk/issues/54675

Change-Id: I7da2b69a8c642f8bfaa6546bf9c1a6c3833d55fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349720
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2024-02-01 15:30:39 +00:00
Daco Harkes 24eb977761 [vm] Fix Mac Arm64 AOT
The magic number has the opposite endianness on the arm64 macs.

TEST=locally verified + SDK build

Closes: https://github.com/dart-lang/sdk/issues/54796
Change-Id: I4a66f44e0a32fbc3530bda6ffca177ba14d9dca7
Cq-Include-Trybots: luci.dart.try:vm-aot-mac-release-arm64-try,vm-mac-debug-arm64-try,dart-sdk-mac-arm64-try,pkg-mac-release-arm64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349661
Reviewed-by: Martin Kustermann <kustermann@google.com>
2024-02-01 15:30:08 +00:00
Daco Harkes fe39068928 [tool] Delete unsupported patches system
The old patches system in tools/patches is not supported in the 3H
infra.

Currently, Golem still uses the DEPS updating logic. This should be
deleted when Golem also moves over to the 3H infra.

Change-Id: Id42d8499a0fa42d18061908e9d1a18b687582ba7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349640
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2024-02-01 12:02:08 +00:00
Martin Kustermann 2b396dd95a [dart2wasm] Fix type substitution bug if records are involved
Fixes https://github.com/dart-lang/sdk/issues/54794

Change-Id: I13b4ae619fad7d7e00f4a17e199b85ebea4e6de7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349680
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2024-02-01 11:38:58 +00:00
Daco Harkes 3105c841d4 [tool] find_builders skip flaky builders
Bug: https://github.com/dart-lang/sdk/issues/51170
Change-Id: I5fbc97838b78f8efdab3a16c907976afaac43d4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349660
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2024-02-01 11:20:47 +00:00
Jens Johansen f908dc692f [CFE] Add pkg/front_end/tool/_fasta/generate_messages_failsafe.dart
Often when rebasing I get conflicts in
pkg/_fe_analyzer_shared/lib/src/messages/codes_generated.dart
which is a generated file. This should generally be fine,
because I can just regenerate it.
Except that the code regenerating it uses the very file,
so I can't run it.

Until now I've had to revert the changes in the file and then run the
generate script.

This CL adds a "failsafe" version that doesn't use the file,
but doesn't directly format it either, then calls the original script
which will also format it.

Call with something like

```
out/ReleaseX64/dart pkg/front_end/tool/_fasta/generate_messages_failsafe.dart
```

Change-Id: Ic395c7b378b245b41b6fe194affaa6c64ca482db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349481
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2024-02-01 10:10:54 +00:00
Nate Biggs 7512050101 [dart2js] Fix failing CFE constant eval test.
This test has been fluctuating between flaky and passing for a while now but it recently went to failing.

https://dart-ci.web.app/#showLatestFailures=false&test=pkg/compiler/test/model/cfe_constant_evaluation_test&configurations=web-unittest-asserts-linux

These were flaky due to timeouts and then a recent change changed the status to consistently failing. So I've also split this into multiple tests to fix the timeout issue.

Change-Id: Id09815f70f4bf20caa6fdb3df4433245f4ff1eab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349420
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2024-02-01 04:25:28 +00:00
Konstantin Shcheglov 156fa6880a Legacy. Remove 'isNonNullableByDefault' from InheritanceManager3.
Change-Id: Iffebecebaa09bc4bd79fa9f4ac1f58b6b35345fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349417
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 04:24:32 +00:00
Konstantin Shcheglov 3ea570739d Legacy. Deprecate 'isNonNullableByDefault' in ErrorReporter constructor.
Change-Id: Ia05e113115fb29b47ba12fc9bf46c1d4c04721b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349463
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2024-02-01 01:51:48 +00:00
Konstantin Shcheglov 996a51c9bb Macro. Initial support for TypeAnnotationDiagnosticTarget.
Change-Id: I008203e570e64207f010e5c818b7a2e30c2e1001
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349415
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2024-02-01 01:48:44 +00:00
pq 12841a6e29 enable multi option contexts (behind flag + tests)
Change-Id: I5406a9476b682a5ea065650c3bea19dac1a5bf9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349461
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2024-01-31 23:10:32 +00:00
Kenzie Schmoll 848852a9ae Update DevTools rev to 23f534022870c4ab0f9c40a18191ffe1163e47f9
Change-Id: Ic050910d714033af51d7a035f1eb1f1c89537e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/349414
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Kenzie Davisson <kenzieschmoll@google.com>
2024-01-31 23:04:59 +00:00