Fixes VM crash in object-copy implementation where non-canonicalized,
non-constant types are sent across `SendPort`s.
We were already sharing
* `TypeArgument`s and anything they refer to
* `Type`s that from type literals that are constant
What was missing was
* `Type`s coming from type literals that had to be instantiated
TEST=vm/dart/isolates/fast_object_copy2_test
Change-Id: I06d85d9849519cd185394efb5aec6a316a763f16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355440
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
The hot reload runner currently only supports d8, but I plan to add support for Chrome and VM execution.
Notable changes:
* Creates `package:reload_test` with helpers for running this suite.
* Updates the module loader with D8-specific branches and hooks for hot reload/restart.
* Exposes DDC runtime variables via a `HotReloadTestRuntime` API.
* Ports constant equality hot restart tests from webdev/dwds (validated to fail if either cache-clearing mechanism fails).
* Partially rolls DDC's d8 preamble forward (towards dart2js's).
* Wraps D8's timer implementation with custom timeout logic to better match Chrome's timing semantics when executing with native JS async.
Tests for the framework and matrix updates will be added in an upcoming change.
Change-Id: I2773b29f464cfd0330e4c653c05e117ae150b4a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350021
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
+ add asserts to prevent using generic builders for Dart + YAML files.
When edits are mixed from multiple sources (such as multiple fixes via "dart fix") they must use the same kind of builders. The only way to ensure this is to force the specific kinds to be used.
Fixes https://github.com/dart-lang/sdk/issues/55092
Change-Id: Ia41b9cadd2b79ed9eabdc4f976c8071021d2e060
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355441
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Fixes https://github.com/dart-lang/sdk/issues/55024
The patch files for these operators return a bool, whereas
the public API returns a JSBoolean. Since there's only one
possible return type, we should make them return bool for
convenience. Boolean conversion is also inexpensive on
dart2wasm, so that shouldn't be an issue.
Also adds helpers to operator_test to make sure any JS values
are converted before they're compared, adding additional type
checking through the conversion.
CoreLibraryReviewExempt: Fixes type mismatch in backend-specific library.
Change-Id: I7ff2e334e817e6e7d7d8d5091a4e5d570a496b03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354702
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Less internal, and more consistent to search for feature references.
Change-Id: I9f74d12bc2e22317443f7ba5867369266334373f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355504
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
The constant has to be boxed value, can't be unboxed.
Fixes=dartbug.com/55003
TEST=regress_55003_test
Change-Id: Ia4d61364f54f8a08a0fe621cc1b4fb5597b1836e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355304
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Revisions updated by `dart tools/rev_sdk_deps.dart`.
dartdoc (eed92d3..cec45fb):
cec45fbe 2024-02-29 Kallen Tu Deprecate --resources-dir option. (dart-lang/dartdoc#3696)
40fef4c2 2024-02-29 Sam Rawlins In PackageBuilder._discoverLibraries, initialize newFiles outside loop. (dart-lang/dartdoc#3695)
2760d254 2024-02-28 Sam Rawlins Deprecate the 'include-externals' option. (dart-lang/dartdoc#3694)
c1c0854d 2024-02-28 Sam Rawlins Improve support for package-with-macro-application (dart-lang/dartdoc#3687)
b28ee1f8 2024-02-28 Sam Rawlins Deprecate the `--nodoc` Option (dart-lang/dartdoc#3690)
7988d91f 2024-02-28 Sam Rawlins Improve some exception messaging and comments (dart-lang/dartdoc#3691)
a1610aa6 2024-02-28 Sam Rawlins Bump to 8.0.6 (dart-lang/dartdoc#3692)
ecosystem (3e4f286..49a3cbb):
49a3cbb 2024-03-01 dependabot[bot] Bump peter-evans/find-comment (dart-lang/ecosystem#241)
9dd8384 2024-03-01 dependabot[bot] Bump subosito/flutter-action from 2.12.0 to 2.13.0 (dart-lang/ecosystem#240)
7acf3bc 2024-03-01 dependabot[bot] Bump actions/download-artifact from 4.1.1 to 4.1.3 (dart-lang/ecosystem#242)
5d6a0c0 2024-03-01 dependabot[bot] Bump peter-evans/create-or-update-comment (dart-lang/ecosystem#238)
91fcd1d 2024-03-01 dependabot[bot] Bump actions/upload-artifact from 4.0.0 to 4.3.1 (dart-lang/ecosystem#239)
glob (ef5f065..379d60c):
379d60c 2024-02-28 Kevin Moore Require Dart 3.3 (dart-lang/glob#88)
http (6e0a46f..470d2c3):
470d2c3 2024-03-01 dependabot[bot] Bump actions/cache from 4.0.0 to 4.0.1 (dart-lang/http#1145)
a5b17e0 2024-03-01 dependabot[bot] Bump actions/setup-java from 4.0.0 to 4.1.0 (dart-lang/http#1144)
c1d3481 2024-02-29 Brian Quinlan Split package:http_profile into multiple files (dart-lang/http#1143)
69332d3 2024-02-29 Brian Quinlan API adjustments based on cupertino_http usage experience (dart-lang/http#1141)
199f9fa 2024-02-28 Brian Quinlan Add a dart:io WebSocket implementation (dart-lang/http#1139)
37fceb8 2024-02-28 Brian Quinlan Fix incorrect documentation that used the old `isOwned` name (dart-lang/http#1140)
markdown (62e3349..dd47c5d):
dd47c5d 2024-02-28 Kevin Moore WIP: v0.31.2 spec updates (dart-lang/markdown#591)
pool (782da82..c118f69):
c118f69 2024-02-28 Kevin Moore Latest lints, test wasm on dev channel (dart-lang/pool#81)
protobuf (ef0ab7d..b761358):
b761358 2024-03-04 Nate Biggs Support unknown json data and add internal set/clear field methods for generated accessors. (dart-lang/protobuf#918)
1822b81 2024-03-01 dependabot[bot] Bump dart-lang/setup-dart from 1.5.0 to 1.6.2 (dart-lang/protobuf#917)
adab58c 2024-03-01 dependabot[bot] Bump actions/cache from 3.3.1 to 4.0.1 (dart-lang/protobuf#916)
c283db5 2024-03-01 Ömer Sinan Ağacan Ignore the UnmodifiableUint8ListView deprecation warning (dart-lang/protobuf#915)
shelf (b432620..da6a69b):
da6a69b 2024-03-01 dependabot[bot] Bump actions/cache from 4.0.0 to 4.0.1 (dart-lang/shelf#415)
sse (13ec752..b53ba14):
b53ba14 2024-02-29 Kevin Moore Prepare release of v4.1.5 (dart-lang/sse#105)
test (26953ba..525f77b):
525f77b2 2024-03-01 dependabot[bot] Bump actions/cache from 4.0.0 to 4.0.1 (dart-lang/test#2191)
b1041775 2024-03-01 dependabot[bot] Bump github/codeql-action from 3.23.2 to 3.24.6 (dart-lang/test#2193)
web (fa4280c..8870d04):
8870d04 2024-02-29 Devon Carew update the format of the web idl versions file (dart-lang/web#194)
641a8df 2024-02-29 Srujan Gaddam Add generated element constructors (dart-lang/web#185)
5e5adc8 2024-02-28 Srujan Gaddam Use URI instead of library name (dart-lang/web#191)
2f00226 2024-02-28 Kevin Moore Move IDL version details (dart-lang/web#189)
23475c0 2024-02-28 Devon Carew Include MDN API documentation as class and member dartdoc comments (dart-lang/web#143)
Change-Id: Ia08bf4a304a1073473d6abddb64275cca84dea13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355521
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
As much as I don't like the scale of changes, there is no valid variable in these cases. So, we express this explicitly, without trying to pretend that there is on. Or crashing as we did without this CL.
Change-Id: I74cef1d3d9d3cba6985d83b98be361cca09170f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355300
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Stop when see 'X & B', just check `B`, do not continue.
Bug: https://github.com/dart-lang/sdk/issues/54648
Change-Id: Ic447b9facd00efac309695f505df603764d8c096
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355500
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
This fixes part of https://github.com/dart-lang/sdk/issues/55013 (which is that we'd display full file URIs as the imported library on completions when they're not a package URI).
There's still some other parts to this issue (such as picking this completion up as an importing completion when it's in the same file) but I'll do that in another change.
Change-Id: Id14f7797bfd98621ac6bbb71addd52f928c6c0ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Switch to file-based serializer if needed because running from AOT.
Add `kernel_executor` that switches to launching a separate Dart process if
needed because running from AOT.
Add macro executor that picks how to run kernel.
R=jakemac@google.com, johnniwinther@google.com
Change-Id: I19f90969269c38f96d64652b41171a12d83d8a7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353263
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Noticed while testing highlighting for augment/augmented - apparently we weren't producing any tokens for super expressions (but did for super constructor and super formal params). It wasn't noticable in VS Code because a completely uncoloured token uses the TextMate grammar token.
Change-Id: I32c782db0c7771cad52ed49912c215313a64c055
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355422
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
In the following expression types, the static type is computed using
the least upper bound ("LUB") of their subexpressions (adjusted as
appropriate to account for the null-shorting behaviors of `??` and
`??=`):
- Conditional expressions (`a ? b : c`)
- If-null expressions (`a ?? b`)
- If-null assignments (`a ??= b`)
- Switch expressions (`switch (s) { p0 => e0, ... }`)
This can lead to problems since the LUB computation sometimes produces
a greater bound than is strictly necessary (for example if there are
multiple candidate bounds at the same level of the class hierarchy,
the LUB algorithm will walk up the class hierarchy until it finds a
level at which there is a unique result). For a discussion of the kind
of problems that can arise, see
https://github.com/dart-lang/language/issues/1618.
This change improves the situation by changing the analysis of these
four expression types so that after computing a candidate static type
using LUB, if that static type does not satisfy the expression's
context, but the static types of all the subexpressions *do* satisfy
the expression's context, then the greatest closure of the context is
used as the static type instead of the LUB. This is the algorithm
proposed in
https://github.com/dart-lang/language/issues/1618#issuecomment-1507241494.
This is theoretically a breaking change (since it can change code that
demotes a local variable into code that doesn't, and then the demotion
or lack of demotion can have follow-on effects in later code). So it
is implemented behind the `inference-update-3` experiment
flag. However, in practice it is minimally breaking; a test over all
of google3 found no test failures from turning the feature on.
Since one of these expression types (switch expressions) is
implemented in `package:_fe_analyzer_shared`, but the other three are
implemented separately in the `package:analyzer` and
`package:front_end`, this change required modifications to all three
packages. I've included tests for the new functionality, following the
testing style of each package. I've also included a comprehensive set
of language tests that fully exercises the feature regardless of how
it's implemented.
Since `package:front_end` has many different implementations of `??=`
depending on the form of the left hand side, I've tried to be quite
comprehensive in the language tests, covering each type of assignable
expression that might appear to the left of `??=`.
Change-Id: I13a6168b6edf6eac1e52ecdb3532985af19dbcdf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353440
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Automatically detect the appropriate configuration file if RBE=1 is
set to request RBE on all projects, or if DART_RBE=1 is set to request
RBE for Dart only, or otherwise respect the explicit configuration file.
Automatically set the server_address location to the build directory
if it has not already been set. This is unfortunately not supported on
Windows due to the environment variable being set during build but it
needed to be set during gn.
Retain the older configuration files during the transitory period.
Bug: b/296994239
Fixes: b/320876546
Change-Id: I62d1fbfed35248477731cceda3f7267c605c4969
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355400
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Before this CL the FFI external transformation set a wrong file uri on
the created procedure when the field it came from was in a part.
Possibly this is what caused
https://github.com/flutter/flutter/issues/144176
Adding a CFE test it also surfaced there not being passed a reference.
As I recall we technically disable 'advanced invaclidation' for ffi
stuff so maybe it doesn't matter, but it was easy to add and now the
test is happy.
Tested: Existing test + CFE test added.
Change-Id: I67391654677fe103d7bc22829871db2119d251dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355420
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
We were missing a `_getLocationInEnclosingFile` implementation on
`FileUriConstantExpression`.
Change-Id: I3e8e65645f8ce4a6d9936aa079340e5853cccacc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355380
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This adds a helper library to help us try out small hot reload behaviors
easily on the VM.
Change-Id: I01c76d3c4be8a77e5efe5b934e8c26de09a3a771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355260
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Modifies a test to check that object literals that are
assumed to not contain a parameter actually don't
contain that parameter.
Change-Id: I2e7952c696ed22cd2d8e59d72cb1a537a61c6b6e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355202
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
DDS relies on a new class `DartInitializeRequestArguments` added to `package:dap`.
Change-Id: I25b61a3a710c6867c55a545a6f6c4646dc4ba3f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/355180
Reviewed-by: Helin Shiah <helinx@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Helin Shiah <helinx@google.com>
Also, riscv64 now works with Clang.
Change-Id: I26ba91994f8769d63ba5af6662b31f5cdd007394
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/354062
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>