Commit graph

10536 commits

Author SHA1 Message Date
Alexander Aprelev 92638bf5d3 [docs] Update Isolate.spawn doc to remove top-level function/static method restriction.
The restriction was lifted in 5f9ec9f52a.

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

TESt=ci

Change-Id: I5a6c063fe558d4dd305ec4c78bf998f4f3750c89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260403
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-09-22 07:45:41 +00:00
asiva 959854769c [VM/Library] - Adjust next probe to be a quadratic probe in _HashBase
Adjust next probe to a quadratic probe so that it matches up with the internal VM hash map implementation.This avoids some issues with hash code clustering and uses the probing strategy in the VM's HashTable.

Change-Id: I6af560b971c2e6fa745e3b3414e2d8a9075e7ff5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239004
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-09-20 23:35:25 +00:00
Oleh Prypin c0b40136e5 Revert "[ddc] Add non-null assertions when setting fields"
This reverts commit c590001ef0.

Reason for revert: Breaks google3 (b/247639927)

Original change's description:
> [ddc] Add non-null assertions when setting fields
>
> Re-land previously reverted change:
> https://dart-review.googlesource.com/c/sdk/+/258780
>
> Adds additional tests and more checks to ensure assertions are only
> added in libraries that have been migrated to null safety.
>
> Issue: https://github.com/dart-lang/sdk/issues/49918
> Change-Id: If0b9bca9fe0d7db5e15023fe03ccac891af568e8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259120
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Nicholas Shahan <nshahan@google.com>

TBR=sigmund@google.com,nshahan@google.com,annagrin@google.com

Change-Id: Iee2d33005cbabfacab7fc5c45046c6eeb8e31b01
Issue: https://github.com/dart-lang/sdk/issues/49918
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260106
Reviewed-by: Oleh Prypin <oprypin@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-09-20 17:19:38 +00:00
Kallen Tu 7578614639 Remove dynamic invocations from custom elements in html_dart2js.
Registering custom elements are already broken -- see: https://github.com/dart-lang/sdk/issues/49536. There are plans on deleting this code at some point. This current change cleans up dynamic invocations in the deprecated code.

Removes cruft on already-deprecated code and doing it now because I assume dynamic clean up will finish before the issue resolves.

Change-Id: Ic6250c139c5d9b08d88650110f55442a7bf5dd42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259247
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-09-20 16:16:06 +00:00
Nicholas Shahan c590001ef0 [ddc] Add non-null assertions when setting fields
Re-land previously reverted change:
https://dart-review.googlesource.com/c/sdk/+/258780

Adds additional tests and more checks to ensure assertions are only
added in libraries that have been migrated to null safety.

Issue: https://github.com/dart-lang/sdk/issues/49918
Change-Id: If0b9bca9fe0d7db5e15023fe03ccac891af568e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259120
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-09-19 23:39:03 +00:00
Brian Quinlan 78bd225ac9 Add a note that sendMessage and readMessage are only available on macOS and Linux.
Change-Id: I74d6a373f914e7c9e9924425df9c87b952ee9c8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257420
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-09-19 22:53:21 +00:00
Alexander Markov ae2cebcee9 [vm] runtimeType for record instances and record type equality
TEST=language/records/simple/runtime_type_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I031dff68241dfc62ebc3b6350b10ba7d352bab37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259621
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-09-19 22:05:04 +00:00
Kallen Tu a3764263d8 Use AssertionError rather than Exceptions for unexpected behaviour in io.
Follow up to https://dart-review.googlesource.com/c/sdk/+/257140/comments/38b33a34_5c1914ff.

Unreachable code in error handling.

Change-Id: I9e8a5b19372d63a604efcdf9856a618e5f7b520f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258513
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-19 16:42:30 +00:00
Chloe Stefantsova f8ef60a868 Revert "Reland "[cfe,corelib] Add class 'Record' to the core library""
This reverts commit 4b6a8f35b9.

Reason for revert: Breakages in google3.

Original change's description:
> Reland "[cfe,corelib] Add class 'Record' to the core library"
>
> Part of https://github.com/dart-lang/sdk/issues/49713
>
> Change-Id: I56bfca49492d14bb561b32993fd9adfe775b7400
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259583
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I61c4db244329615d7d218484cd86601b1c737ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259800
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
2022-09-19 13:52:01 +00:00
Kallen Tu c903b8a3f5 Expose the members of _ProcessImpl to avoid dynamic invocations.
Change-Id: I676f3d5742bffb79bc0815ff55d09d09a5afe305
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258640
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-09-16 21:28:30 +00:00
Srujan Gaddam ed38cc874d [pkg:js] Add proto argument to createStaticInteropMock
Adds optional argument proto to allow users to pass instanceof/is
checks with the generated forwarding mock.

Change-Id: If2dba386fb0e66cbe738105e58d9e5ec1f02d02a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257162
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2022-09-16 20:13:30 +00:00
Srujan Gaddam 8a081b95c6 [pkg:js] Add type/conformance checking for createStaticInteropMock
Bug: https://github.com/dart-lang/sdk/issues/49351

Adds checks for the following cases:
- Type arguments to createStaticInteropMock are correct
- No missing members in implementing class
- Inherited and non-overridden @staticInterop members are implemented
- Dart class can implement through inheritance and mixins
- Implemented members are correct subtypes of @staticInterop members
- Potential extension member conflicts that are attempted to be
resolved through subtyping rules

Change-Id: Iacbe5846040ba7fab41459aa19be77351cf1efca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255761
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2022-09-16 20:13:30 +00:00
Ahmed Ashour 5fe480b788 Fix typos
Fix #49864

TEST=ci

Change-Id: I9a7e06d604cd0b4f56f2ac229ab3fc9f01cb9d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256824
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Liam Appelbe <liama@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-16 19:35:00 +00:00
Chloe Stefantsova 4b6a8f35b9 Reland "[cfe,corelib] Add class 'Record' to the core library"
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: I56bfca49492d14bb561b32993fd9adfe775b7400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259583
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-09-16 11:46:40 +00:00
Emmanuel Pellereau 2189897c1b Docs fix: add missing parentheses in whenComplete method docs (by mohanl@).
Change-Id: Ic67992d268366f313a2ffbf789125cbf39d0b707
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259585
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2022-09-16 11:17:24 +00:00
Kallen Tu af20d93e56 Type RandomAccessFile in io_resource_info to avoid dynamic invocation of path
There's one only one path for creating a _FileResourceInfo which comes from RandomAccessFile. Type the `file` field to avoid a dynamic call to `.path`.

Change-Id: Ia1041d5b221d0496af3dd177562263b31cdf4157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259106
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-15 20:55:39 +00:00
Alexander Aprelev d31c741fbb Revert "[cfe,corelib] Add class 'Record' to the core library"
This reverts commit f553f0aad9

Reason for revert: breaks g3 bot

Original change's description:
> [cfe,corelib] Add class 'Record' to the core library
>
> Part of https://github.com/dart-lang/sdk/issues/49713
>
> Change-Id: Ibb0309f97565c0a623f60e588eefcad6759d5ace
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257066
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

TBR=lrn@google.com,scheglov@google.com,cstefantsova@google.com,johnniwinther@google.com

Change-Id: If386819fc7419a660c692e4187ead4ebf142c68c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259462
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-09-15 17:45:50 +00:00
Chloe Stefantsova f553f0aad9 [cfe,corelib] Add class 'Record' to the core library
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: Ibb0309f97565c0a623f60e588eefcad6759d5ace
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257066
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-15 11:50:33 +00:00
Aske Simon Christensen b6e227e6fa [dart2wasm] Implement typeAcceptsNull
This function is used internally to abstract over null safety modes.
Since dart2wasm is always fully null safe, the function is trivial.

Change-Id: I8d636d4ce146a2a848dde736d8563dcb0028f92a
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258928
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-09-15 10:01:43 +00:00
Joshua Litt 8429f01593 [dart2wasm] Implement optional parameters for JS interop callbacks.
Also added tests of optional parameters for static interop functions.

Change-Id: Id23237b96d0de5a4a4b948b3f23fd1bfe40b218e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259101
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-14 22:33:02 +00:00
Ian Hickson 9e9768c89d Simplify the license situation
There's no LICENSE file that mentions the Go authors in this repository, but since this code is covered by the CLA we can just move the name to the AUTHORS file and rely on the existing statement that references the Dart LICENSE file.

Change-Id: I3e8e04ef39e7ed6de0134cc33bf8a22e3d33389b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250792
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
2022-09-14 21:06:22 +00:00
Kallen Tu 586efdfe59 Add ignores for dynamic calls in html_dart2js sanitizing code.
Avoid removing dynamic invocations in sanitizing code as we don't know what type the element and its attributes may be.

Change-Id: I057d908027befe7fd284bf4ec6c68bd1d0e977f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259108
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-14 20:35:04 +00:00
Brian Quinlan fa53fb66d0 Throw an error if an attempt is made to create more than one resource from a ResourceHandle
Change-Id: I629d2b9cfddd8e5f7fe8ae65a03362c7bcce5e2c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257000
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-09-14 18:17:33 +00:00
Aske Simon Christensen 8ae4802e05 [dart2wasm] Dummy isolate patch
Change-Id: Id748ef2f69c09592513ba6a3cffafc37a8450d00
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258921
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-09-14 13:43:52 +00:00
Kallen Tu aad35b490f Remove dynamic invocations in error handling in directory_impl.
Change-Id: Idb1ac4490efd74a2ff98a3d9f0c57a74299ce413
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258512
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-14 07:24:53 +00:00
Brian Quinlan 2ead86ab9d Implement anonymous pipes and the ability to transmit them between processes using Unix Domain Sockets.
Change-Id: I9c9f4ec0e99075a29c6f4d97c503e759134eb094
TESTED=Unit tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257804
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2022-09-13 21:16:28 +00:00
Lasse R.H. Nielsen e4ae0cf2ce Make Uri treat \ as / in path and authority.
When using `Uri.parse` or `Uri(path:..)`, a `\` is treated as, and converted to, a `/`.
This avoids a particular problematic difference in behavior between Dart and the browser's `URL` functionality. There are still examples where the two differ in interpretation of the same code, but in those cases, the Dart `Uri` will most likely end up without a host name, which should be easily detected.


Change-Id: I798df6c3c27c6d64fb9fc8dc30d90b06ba5a9004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258120
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-13 11:48:19 +00:00
Alexander Markov c94103ae05 [vm] Initial implementation of record instances
TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I82ba571d1935d616fe3d4d6d579e59eb57d65a43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256804
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-12 22:41:57 +00:00
Alexander Markov 9a023aeae9 [vm] Initial implementation of record types
TEST=language/record_type_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: Ib2100c23513395c9fa9c541320eacbb33a2a119e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256802
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-09-12 22:40:57 +00:00
Emmanuel Pellereau 727e792e77 Revert "[ddc] Add non-null assertions when setting fields"
This reverts commit 27099c121c.

Reason for revert: Breaks google3 (b/246251728)
Original change's description:
> [ddc] Add non-null assertions when setting fields
>
> Fixes: https://github.com/dart-lang/sdk/issues/49918
> Change-Id: I6dddda878afa504bebebb00a80855bac636f8efd
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258220
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Nicholas Shahan <nshahan@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I5e3fb1c151a85e11025135b8fc95c65192b33791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258780
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Emmanuel Pellereau <emmanuelp@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-09-12 11:21:06 +00:00
Nicholas Shahan 27099c121c [ddc] Add non-null assertions when setting fields
Fixes: https://github.com/dart-lang/sdk/issues/49918
Change-Id: I6dddda878afa504bebebb00a80855bac636f8efd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258220
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-09-09 21:05:25 +00:00
Joshua Litt 014818bf8e [dart2wasm] Implement js_util.instanceof.
Also fixes performanceNow for Chrome.

Change-Id: I1b70610a8a1a44c0f0e3ce7b166f32f9915324c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258504
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-09 20:40:34 +00:00
Aske Simon Christensen 9af959c167 [dart2wasm] Coerce types on imports/exports to externref or funcref
Change-Id: Id7fe0775e14b7ed16c925819ffc9c41dea863e4d
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258001
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-09 18:10:34 +00:00
Kallen Tu 7055da30a7 Remove dynamic invocations from io file classes.
Change-Id: Iaf556ca462b9d962557b627c59220101f384ae51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258380
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-09-09 17:45:45 +00:00
Aske Simon Christensen cded056cf1 Move cast and toSet on immutable sets to implementation classes
These methods create new sets, whose implementation must match the
target platform. Thus, they should be specialized for the VM and
dart2wasm instead of being implemented in the shared mixin.

Change-Id: I102a45686e3eb373463f2fcdf84ee861e202ecc0
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258362
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-09 14:04:34 +00:00
Aske Simon Christensen f2bc59738c Rename the VM's internal hash set classes
Rename `_CompactLinkedHashSet` to `_InternalLinkedHashSet` and
`_CompactImmutableLinkedHashSet` to `_InternalImmutableLinkedHashSet`
to make the names consistent with the corresponding `Map` class names
and to distinguish them from the non-VM-specific hash maps and sets,
which are generally named starting with `_Compact`.

Tested: ci
Change-Id: Ic1ebc44ba8beba34ceab382a4edddc6624fe3fb3
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258002
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-09-09 14:04:34 +00:00
Aske Simon Christensen bab5cfbe74 Add more types to the VM's internal compact hash structures.
This gets rid of some occurrences of `dynamic` and makes the
associated implicit conversions explicit.

Based on https://dart-review.googlesource.com/c/sdk/+/237582

Tested: ci
Change-Id: I7faeffab395c916800b29ea7e56bd3f7d15aac54
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258242
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-09 08:38:36 +00:00
Ryan Macnak e5fc6d652b [vm] Don't pass and copy unused category string when recording timeline events.
TEST=ci
Change-Id: I53b60a977c2b33d29a0ca685120044ba208d3ae4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258321
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-08 22:02:46 +00:00
Kallen Tu 7e13c388fe Clean up - unused typedef and lint ignore for html.
Change-Id: I50f89a2d59478c8e2a63a81d106e0943b496ad46
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257427
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-09-08 20:59:24 +00:00
Kallen Tu 10a1ac18ab Eliminate dynamic [] calls from common, directory_impl and link.
Change-Id: I91be3303d957d5c746e33099b6238b51243ba60f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257140
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-08 17:17:03 +00:00
Daco Harkes 2cd6fdd100 [doc] Update Uri.queryParameters type
Because the value type is dynamic, I noticed use sites passing in
`Map<String, String?>`. After inspecting the implementation, it looks
like this is by design: `writeParameter` in `_makeQuery` takes a
nullable value.

This CL updates the documented type to reflect this.

Change-Id: I7b6f1c4a59ec44282e5e8b4ada86becafb308d30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258240
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-08 14:32:03 +00:00
Joshua Litt 708264289d [dart2wasm] Use WasmExternRef for JS interop.
Change-Id: I01138d48ba9cc67954ef086968af90dae173fda9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257880
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-07 20:55:27 +00:00
Joshua Litt eb540194ad [dart2wasm] Implement promiseToFuture.
Change-Id: I265441c5c78933f8bdace53f956d22677442d7fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257803
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-07 17:56:17 +00:00
Joshua Litt 2b85e02c5d [dart2wasm] Implement == for JSValue.
Change-Id: I45af5bdabfb0dfa12b6b39094843b9394f4fe510
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257923
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-07 16:37:17 +00:00
Kallen Tu 8264bd94d1 Revert "Eliminate dynamic call() in html_dart2js in _EventStreamSubscription."
This reverts commit f630a7c07d.

Reason for revert: Remove the `is` check since it's more costly than removing a dynamic call for web.

Original change's description:
> Eliminate dynamic call() in html_dart2js in _EventStreamSubscription.
>
> Change-Id: Ia4a300c210bc505f71cc3bfb1a1b911c96c1aa53
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256703
> Commit-Queue: Kallen Tu <kallentu@google.com>
> Reviewed-by: Leaf Petersen <leafp@google.com>
> Reviewed-by: Lasse Nielsen <lrn@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I36b2f8cedc5f8b5235832ea29ea5eb40e2e8dc92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257421
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2022-09-02 18:44:53 +00:00
Kallen Tu f630a7c07d Eliminate dynamic call() in html_dart2js in _EventStreamSubscription.
Change-Id: Ia4a300c210bc505f71cc3bfb1a1b911c96c1aa53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256703
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-01 00:27:29 +00:00
Ivan Inozemtsev 12d1e58cbc Revert "Make addStream events be delivered synchronously."
This reverts commit 9292afa710.

Reason for revert: b/244407576

Original change's description:
> Make `addStream` events be delivered synchronously.
>
> The asynchronous stream controllers were forwarding stream events
> from an `addStream` stream through the same path as user-added event,
> which added an extra asynchronous delay that is unnecessary for forwarding existing events.
>
> Change-Id: I8edd1936d0d155d051d3cb8f7f82c577334d5f8e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256560
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I0e4791f4d32616fee9772a2ab7015bac4e117312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257080
Auto-Submit: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
2022-08-31 15:59:18 +00:00
Ivan Inozemtsev 212d5e3a31 Revert "Fix bug in Completer.complete."
This reverts commit 3688a4723c.

Reason for revert: b/244409289

Original change's description:
> Fix bug in Completer.complete.
>
> When given a completed `_Future`, it would complete its own future synchronously.
>
> Fixes #48493.
>
> Bug: https://github.com/dart-lang/sdk/issues/48493
> Change-Id: Ic4a68389b5a009ef52b3875bf03a3bafb493f79a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234981
> Reviewed-by: Nate Bosch <nbosch@google.com>
> Commit-Queue: Lasse Nielsen <lrn@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: https://github.com/dart-lang/sdk/issues/48493
Change-Id: I5ed360bebe160868f6152c72c82070c93188858e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257100
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Commit-Queue: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-08-31 15:04:08 +00:00
Kallen Tu e0884c91f1 Eliminate dynamic call of .createElement in html_dart2js.
Change-Id: I76ab0063eee4213f20483172c16f86e651536945
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256740
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2022-08-30 15:48:40 +00:00
Lasse R.H. Nielsen 3688a4723c Fix bug in Completer.complete.
When given a completed `_Future`, it would complete its own future synchronously.

Fixes #48493.

Bug: https://github.com/dart-lang/sdk/issues/48493
Change-Id: Ic4a68389b5a009ef52b3875bf03a3bafb493f79a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234981
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-30 10:52:27 +00:00