Commit graph

10307 commits

Author SHA1 Message Date
Fritz Ammon ca52d23a58 fix typo in zone documentation
fixing a typo; should be "or" as opposed to "of"

Closes https://github.com/dart-lang/sdk/pull/48743
https://github.com/dart-lang/sdk/pull/48743

GitOrigin-RevId: 72b612a080475c6280f9c4926bb330fb157cf54f
Change-Id: I048b416f1484e6390b71cab12a2d62307d3e8b8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242782
Reviewed-by: Alexander Thomas <athom@google.com>
2022-04-28 11:28:17 +00:00
Aaron Clarke 904303f8a1 Made HashMap.update faster by reducing it to one lookup.
fixes https://github.com/dart-lang/sdk/issues/48866

Test=ci and golem

Change-Id: Ia56bd5b5de83dc8f7263eeda27e7abd3af42851e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242120
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-04-27 18:30:14 +00:00
Martin Kustermann efdffab8b7 Reland "[vm] Fix some async* semantics issues: Only run generator if there's active subscription (not paused/cancelled)"
This fixes an issue where VM would run the async* generator after a
`yield` / `yield*` even though the subscription may be paused or
cancelled.

Furthermore this fixes an issue where `StackTrace.current` used
in async* generator crashes VM and/or produces truncated stack
trace.

This fixes the following existing tests that were failing before:

  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t08
  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t09
  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t10
  * language/async_star/async_star_cancel_test
  * language/async_star/pause_test

New in reland: Allow the generator to to cause cancelling it's own consumer.
This addresses the issue of original revert
  -> see https://github.com/flutter/flutter/issues/101514

Issue https://github.com/flutter/flutter/issues/100441
Issue https://github.com/dart-lang/sdk/issues/48695
Issue https://github.com/dart-lang/sdk/issues/34775

TEST=vm/dart{,_2}/causal_stacks/flutter_regress_100441_test

Change-Id: I091b7159d59ea15fc31162b4b6b17260d523d7cb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242400
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-26 12:01:34 +00:00
Dan Field fe30c3f235 [vm] Expose whether extension stream has listeners, guard postEvent
This avoids json encoding that was otherwise happening even in product mode. JSON encoding shows up CPU profiling as taking significant time, particularly on low end devices.

TEST=runtime/observatory/tests/service/developer_extension_test.dart

Bug: https://github.com/dart-lang/sdk/issues/48860
Change-Id: I2cf4d949e85c0b23de01ec2033b04527d40c76fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242081
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Dan Field <dnfield@google.com>
2022-04-26 07:53:43 +00:00
Aaron Clarke cd8ceb0a99 Updated the DynamicLibrary docstring to specifically call out static
libraries and to avoid confusion between "DynamicLibrary" and "dynamic
library".

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

Change-Id: I7aab94e94b4e31ccffea047dcaaffc6fb6447662
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242242
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-04-25 18:19:52 +00:00
Devon Carew eec99f4f0b [core libs] add dart:developer, dart:js_util, and dart:wasm to the set of validated libraries
Change-Id: Id54af09f7b7559c5eb751db822aba8cd6b413559
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241160
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-04-25 15:53:32 +00:00
Lasse R.H. Nielsen 0f0f045128 Fix bug in Duration.toString.
The `toString` used the sign of `hours` to get a leading `-`
when the duration is negative. However, a negative duration of
less than one hour would therefore miss out on the sign,
because `-0` is not an integer.
Now handles sign explicitly.

Fixes #48841.

Change-Id: I0ab6d451faf1c76b838fc35a692f07c5b035d2a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241748
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-04-25 14:37:42 +00:00
Sigmund Cherem e5f4b85066 [dart2js] Fix deferred load URI when baseUrl has a single path segment
This fixes https://github.com/dart-lang/sdk/issues/48848

When the base URI is just a filename, then base was empty, and we accidentally
added a / in the first position.  This made the deferred URI absolute by
mistake.

Change-Id: I4d6a773f6ef8bfefbbf61417bfe7c005aa5e63ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241990
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2022-04-22 21:33:10 +00:00
Mayank Patke 091559359e Reland "[dart2js] Lower late field checks during SSA."
This reverts commit 45c1e51bb3.

Reason for revert: Reland

Original change's description:
> Revert "[dart2js] Lower late field checks during SSA."
>
> This reverts commit 7187b2efe9.
>
> Reason for revert: Broke flutter roll
>
> Original change's description:
> > [dart2js] Lower late field checks during SSA.
> >
> > Change-Id: I80e7a30c6f2a461e46b4f52ebf7eb7a13fbc6227
> > Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240501
> > Reviewed-by: Stephen Adams <sra@google.com>
> > Commit-Queue: Mayank Patke <fishythefish@google.com>
>
> TBR=sra@google.com,fishythefish@google.com
>
> Change-Id: Idf4eff95425db4d770137d589d4bb5484fc6e187
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241806
> Reviewed-by: Mayank Patke <fishythefish@google.com>
> Reviewed-by: Nate Biggs <natebiggs@google.com>
> Commit-Queue: Mayank Patke <fishythefish@google.com>


Change-Id: Iccba8947a5778f5310e194d814b398dc46465fbb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241807
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2022-04-21 21:10:58 +00:00
Joshua Litt 8e6fa91711 [dart2wasm] Add support for calling Dart functions from JS.
Change-Id: I83cb295ce61b266b86e9efa194dcbc61fc2c8d31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239200
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-21 16:30:18 +00:00
Mayank Patke 45c1e51bb3 Revert "[dart2js] Lower late field checks during SSA."
This reverts commit 7187b2efe9.

Reason for revert: Broke flutter roll

Original change's description:
> [dart2js] Lower late field checks during SSA.
>
> Change-Id: I80e7a30c6f2a461e46b4f52ebf7eb7a13fbc6227
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240501
> Reviewed-by: Stephen Adams <sra@google.com>
> Commit-Queue: Mayank Patke <fishythefish@google.com>

TBR=sra@google.com,fishythefish@google.com

Change-Id: Idf4eff95425db4d770137d589d4bb5484fc6e187
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241806
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-04-20 18:37:18 +00:00
Joshua Litt 84497e41ca [package:js] Add @trustTypes annotation.
Adds an experimental `@trustTypes` annotation which can be used during
migration to static interop to preserve the older semantics for JS interop.

Change-Id: Ic00a6c968b15f8c8f5d0840b82db5a6670eaf0eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241362
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-20 15:24:18 +00:00
Mayank Patke 7187b2efe9 [dart2js] Lower late field checks during SSA.
Change-Id: I80e7a30c6f2a461e46b4f52ebf7eb7a13fbc6227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240501
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-04-19 19:01:27 +00:00
Aske Simon Christensen fec466e3fe [dart2wasm] Add Wasm function references and more Wasm ref conversions
Having first-class Wasm function references makes it possible to call
JS function objects directly from Dart, and to call some Dart functions
(static functions with no optional parameters and no type parameters)
from JS as function objects.

Change-Id: I1c788338d418c8857493ec76560d74fdd17d5dd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241001
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Jackson Gardner <jacksongardner@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-04-19 09:40:17 +00:00
Lasse R.H. Nielsen af39b6b9ca Fix error in DartDoc, add missing Since annotation.
Apaprently the landing of the previous DartDoc introduced an error
in the DartDoc process.
Removing the entire comment doesn't change that, so I'm not sure
where the actual error is.
Anyway, this fixes the links that weren't working,
and it adds a missing `Since` annotation at the same time.

Change-Id: I92ac23a32ccc9ddbaf9a708b21fe3521c4103513
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241011
Commit-Queue: Lasse Nielsen <lrn@google.com>
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-04-13 17:44:33 +00:00
Halil İbrahim Durmuş 0b2b5aaa9a Fix documentation for operators << and >>.
I couldn't understand what `shiftIndex` is referring to while reading the docs for operators `<<` and `>>`.
I think `shiftIndex` should be replaced with `shiftAmount`.

Closes https://github.com/dart-lang/sdk/pull/48798
https://github.com/dart-lang/sdk/pull/48798

GitOrigin-RevId: b2dcaf22f5a3db8a19ffabafe772d4a0971cb810
Change-Id: I0e5c1e183df90cf0bc36920e8dc27b01947384b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241045
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-04-13 09:15:55 +00:00
Lasse R.H. Nielsen 0ee6ee405c Improve documentation of Error.stackTrace.
It's been described as "thoroughly incomprehensible".
Hopefully the incomprehensivity is now mostly superficial.

Change-Id: Id46fa20934ad340db8f485f138fb895b9dee176a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241003
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-04-13 07:55:32 +00:00
Joshua Litt bdbecf318e [dart2wasm] Add support for anonymous JS interop classes.
Change-Id: Ib0645b4e3b0bd410188be9e39755be5e4c02bb44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240323
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-12 22:51:02 +00:00
Joshua Litt d06fd8d081 [js_util] Add globalThis getter.
Change-Id: I325f3ea7f5aad84dff9e08c6a958b478d6926cb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240962
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-12 20:12:02 +00:00
Joshua Litt f6af76eaf8 [dart2wasm] Basic support for js interop annotations.
Change-Id: Ibb66415ec77a45e436d4058c5d9873c5918b68a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239009
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-12 18:26:02 +00:00
Parker Lougheed 03fd724529 Minor fixes to file_system_entity docs
Bug: https://github.com/dart-lang/site-www/issues/3946
Change-Id: I1e706abad40846e90b0ddc092e72f788d9e5d7ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239180
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-04-12 16:01:16 +00:00
Daco Harkes 5ca6eec782 [vm/ffi] Add Since annotations to dart:ffi
Closes: https://github.com/dart-lang/sdk/issues/48711

Change-Id: Iac0bcecdf81b02bcb2feb746aa94a1bef6caf600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240045
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-04-12 11:06:21 +00:00
Siva Annamalai 94bc01240c Revert "[vm] Fix some async* semantics issues: Only run generator if there's active subscription (not paused/cancelled)"
This reverts commit 837ee17b43.

Reason for revert: Please see https://github.com/flutter/flutter/issues/101514

Original change's description:
> [vm] Fix some async* semantics issues: Only run generator if there's active subscription (not paused/cancelled)
>
> This fixes an issue where VM would run the async* generator after a
> `yield` / `yield*` even though the subscription may be paused or
> cancelled.
>
> Furthermore this fixes an issue where `StackTrace.current` used
> in async* generator crashes VM and/or produces truncated stack
> trace.
>
> This fixes the following existing tests that were failing before:
>
>   * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t08
>   * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t09
>   * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t10
>   * language/async_star/async_star_cancel_test
>   * language/async_star/pause_test
>
> Issue https://github.com/flutter/flutter/issues/100441
> Issue https://github.com/dart-lang/sdk/issues/48695
> Issue https://github.com/dart-lang/sdk/issues/34775
>
> TEST=vm/dart{,_2}/causal_stacks/flutter_regress_100441_test
>
> Change-Id: I73f7d0b70937a3e3766b992740fa6fe6e6d57cec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239421
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Commit-Queue: Martin Kustermann <kustermann@google.com>

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

Change-Id: Ic3d9c0508310a33a2aaee67860c0bb2ec83bab4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240506
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-04-07 21:46:38 +00:00
Aske Simon Christensen d162c637d6 [dart2wasm] Support casting to and calling Function
Also fix parameter type of ClassID.getID

These changes are necessary to support the hash implementation changes
in https://dart-review.googlesource.com/c/sdk/+/237582

Change-Id: Ic7448fae647be57a55f9e1d08b3ece780e60fd3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240402
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-04-07 10:46:01 +00:00
Chris Terefinko ecbf11b8d8 [dart2js] Add missing connectionState and onConnectionStateChange to RTCPeerConnection.
Closes https://github.com/dart-lang/sdk/issues/48735

Change-Id: I04f263afa4dee1b868ad254cb54ad7c398435e03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240240
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-04-06 22:34:07 +00:00
Martin Kustermann 837ee17b43 [vm] Fix some async* semantics issues: Only run generator if there's active subscription (not paused/cancelled)
This fixes an issue where VM would run the async* generator after a
`yield` / `yield*` even though the subscription may be paused or
cancelled.

Furthermore this fixes an issue where `StackTrace.current` used
in async* generator crashes VM and/or produces truncated stack
trace.

This fixes the following existing tests that were failing before:

  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t08
  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t09
  * co19/Language/Statements/Yield_and_Yield_Each/Yield_Each/execution_async_t10
  * language/async_star/async_star_cancel_test
  * language/async_star/pause_test

Issue https://github.com/flutter/flutter/issues/100441
Issue https://github.com/dart-lang/sdk/issues/48695
Issue https://github.com/dart-lang/sdk/issues/34775

TEST=vm/dart{,_2}/causal_stacks/flutter_regress_100441_test

Change-Id: I73f7d0b70937a3e3766b992740fa6fe6e6d57cec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239421
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-04-06 10:44:34 +00:00
Emmanuel Pellereau 23c7f68fd9 Allow null in assertInterop().
Change-Id: I806767e85edb8cb11183602ac7db55cdbaffc1c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240040
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Emmanuel Pellereau <emmanuelp@google.com>
2022-04-06 06:50:24 +00:00
Ben Konyi eb92439a80 [ Service ] Fix cast error in _decodeAssets return value
Change-Id: I03da2a2e37582e3ec2cd4c2233d5e7cbca0071f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240303
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-06 00:24:13 +00:00
Joshua Litt 8a7d75b6ee [dart2js] Go directly to WorldImpact from Kernel.
Removes the ResolutionImpact, this should be significantly more
efficient in addition to making it much clearer how `ImpactData`
is actually used.

Change-Id: I8f12508469c784ec480ea351a34cf1477d33cf74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235481
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-05 16:46:43 +00:00
Siva Annamalai ac6f72205a Revert "[VM/io] - Set correct file type for files backing unix domain sockets"
This reverts commit dbe6d1d574.

Reason for revert: One of the new tests spawns a process and runs the script from source and so this test will fail on all AOT configurations, In addition it is failing on mac builds and needs investigation.

Original change's description:
> [VM/io] - Set correct file type for files backing unix domain sockets
>
> The file type of file backing unix domain sockets was being incorrectly
> set as kDoesNotExist resulting in errors when operations like delete
> on the file was done. File::Exists on the other hand returned true.
> File rename and copyfile functionality have been fixed too.
>
> TEST=new tests added
>
> Please see https://github.com/dart-lang/sdk/issues/48569 for the original issue.
> Change-Id: Ie9c716c84b1d818c906ecdb622ba930125f9ee30
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237745
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: I517896fb90b013af1ce9a6754442a922e2b7cda5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240149
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-04-04 23:30:02 +00:00
asiva dbe6d1d574 [VM/io] - Set correct file type for files backing unix domain sockets
The file type of file backing unix domain sockets was being incorrectly
set as kDoesNotExist resulting in errors when operations like delete
on the file was done. File::Exists on the other hand returned true.
File rename and copyfile functionality have been fixed too.

TEST=new tests added

Please see https://github.com/dart-lang/sdk/issues/48569 for the original issue.
Change-Id: Ie9c716c84b1d818c906ecdb622ba930125f9ee30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237745
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-04-04 22:17:42 +00:00
asiva 4f76b9535d [VM / IO] Assert When a socket exception is being thrown with an error code of 0.
TEST=ci

Change-Id: Ie0ea5329dfe0307f47fc04db693dae4e352d0f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239846
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-04-04 21:34:21 +00:00
Joshua Litt df512fefe9 [dart2wasm] Implement as check.
Change-Id: Iadf187ccc4d243a1b46491fbf99c2f740db9c6fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239920
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-04-04 19:17:52 +00:00
Ben Konyi d94de5895f [ Service ] Fix assets getter being non-nullable when null is a valid
result

Fixes https://github.com/flutter/flutter/issues/101242

Change-Id: I13f24b96a36af607aa0273f17177722a730edc2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240120
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-04 17:58:31 +00:00
Stephen Adams 6155b8459c [dart2js] JSArray.clear does not need to check length
Calls to non-inlined method are slightly more compact.
The error message is better, citing the'clear' method.
The argument for `length` does not need to be checked.

Change-Id: Ic6341675eba9d851e8003411093a8a90d37baafa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/235485
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-04-04 01:17:51 +00:00
Mark Zhou 471fcee079 [ddc] Adding support for static setters of const fields
Fixes #48717

Change-Id: I45145bc992bb129d54962b1ed9cfebbdbac41f92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239730
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-01 23:51:15 +00:00
Ben Konyi 23ea9f3da4 [ VM Service ] Remove dynamic callsites from VM service
Fixes https://github.com/dart-lang/sdk/issues/48405

TEST=N/A

Change-Id: I975d713d27fac6221e3a06dce0cddaf1f5019b7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239583
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-04-01 17:54:46 +00:00
Mark Zhou db513ecc8f Moving ReleaseARM64 earlier in candidate search order
Fixes some issues with resolving SDK build dirs on M1 Macs, as some of our tooling implicitly builds DebugX64.

Change-Id: Ia890bbe2b552be5eaa6207fc5f930c0b0e7c4ffa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239731
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2022-04-01 15:56:56 +00:00
Slava Egorov 4c0387461c Revert "[VM / IO] - Reland : Assert when an OSError exception is reported with no error"
This reverts commit dc8002cc42.

Reason for revert: crashes internally (b/227727791) and externally (dartbug.com/48721)

Original change's description:
> [VM / IO] - Reland : Assert when an OSError exception is reported with no error
>
> 1. Add a Fatal assert when an OSError is reported with no error code (0).
> This is to ensure we get a coredum pwhen this happens so we can analyze
> it. (Please see https://github.com/flutter/flutter/issues/90921 for more
> details)
>
> TEST=ci
>
> Change-Id: I7146ac69ef8b1833f28bed8a23f0c27a2ece4bbf
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239726
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=aam@google.com,asiva@google.com

Change-Id: Ic9302e7922b0ce2ea5ab81357804c3cd822a8052
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239664
Reviewed-by: Slava Egorov <vegorov@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-04-01 10:14:37 +00:00
asiva dc8002cc42 [VM / IO] - Reland : Assert when an OSError exception is reported with no error
1. Add a Fatal assert when an OSError is reported with no error code (0).
This is to ensure we get a coredum pwhen this happens so we can analyze
it. (Please see https://github.com/flutter/flutter/issues/90921 for more
details)

TEST=ci

Change-Id: I7146ac69ef8b1833f28bed8a23f0c27a2ece4bbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239726
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-03-31 22:18:15 +00:00
Lasse R.H. Nielsen d063ac3233 Revert Isolate.run.
The current VM closure serialization makes this function a foot-gun.
Revert until the supporting features are improved, so as to not give
users a bad experience.

Change-Id: I83b6b453ce5ab00d49ffbf36a5763119a6435352
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237940
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-03-31 09:42:34 +00:00
Brian Quinlan c286b76c2d Allow sockets to enable TLS renegotiation.
TESTED=unit + manually tested user issue.
Bug: https://github.com/dart-lang/sdk/issues/47841
Change-Id: Iad13899135fd34f15abba3a499132d88e7f597dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234821
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-03-31 06:40:51 +00:00
Alexander Aprelev 3a4adb776e Revert "[VM / IO] - Assert when an OSError exception is reported with no error"
This reverts commit 9038f5e1f7.

Reason for revert: broke g3 bot blocking dart->engine roll

Original change's description:
> [VM / IO] - Assert when an OSError exception is reported with no error
>
> Add a Fatal assert when an OSError is reported with no error code (0).
> This is to ensure we get a coredum pwhen this happens so we can analyze
> it. (Please see https://github.com/flutter/flutter/issues/90921 for more
> details)
>
> TEST=ci
>
> Change-Id: I7f4609c2431e6ddc4eacc753356c807d7338b0a9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239541
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Siva Annamalai <asiva@google.com>

TBR=rmacnak@google.com,asiva@google.com

Change-Id: I87df53a7d81802ad1a88f54a90a49f88db44108b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239602
Reviewed-by: Alexander Aprelev <aam@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Auto-Submit: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-03-31 03:09:42 +00:00
asiva 9038f5e1f7 [VM / IO] - Assert when an OSError exception is reported with no error
Add a Fatal assert when an OSError is reported with no error code (0).
This is to ensure we get a coredum pwhen this happens so we can analyze
it. (Please see https://github.com/flutter/flutter/issues/90921 for more
details)

TEST=ci

Change-Id: I7f4609c2431e6ddc4eacc753356c807d7338b0a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239541
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2022-03-31 01:24:43 +00:00
Joshua Litt 856fcb9c8c [dart2wasm] Add experimental JS interop API for dart2wasm.
This is a fork of `js_util` to support the needs of Wasm. It is very
much a WIP. We're landing this now to facilitate prototyping, and so we
can get a sense of what the right JS interop API might look like for
Wasm.

Change-Id: I8b2ddda07e906f1938d4cd5fe0e63203e9cdd6d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230120
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-03-30 17:00:20 +00:00
Martin Kustermann 46e7d54050 [vm] Be more lenient when assumptions about _StreamIterator._stateData field is not a Future
Issue https://github.com/flutter/flutter/issues/100441
Issue https://github.com/dart-lang/sdk/issues/48695

TEST=vm/dart{,_2}/flutter_regress_100441_test

Change-Id: Ifdd331dc3b0a2b825a938132808b4021c0af5f71
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239311
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-03-30 15:35:22 +00:00
Aske Simon Christensen 0797fe6dbc [dart2wasm] Add unsafeCast function that is opaque to the TFA
This is necessary to cast to and from the special Wasm types.

Change-Id: I1d672c4ccf417901e70dd9af7534ad78f56c18b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239029
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-03-29 09:29:05 +00:00
Aske Simon Christensen 2b1be5d6f6 [dart2wasm] Remove unneeded patch file for native finalizers
This unbreaks dart2wasm after it broke as a result of
https://dart-review.googlesource.com/c/sdk/+/236320

Change-Id: Icc5e8ab7fa16e36009b0a2cf53bc503f101b8c95
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239028
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-03-29 09:29:05 +00:00
Ryan Macnak 401aff3850 [vm, ffi] Fix sign of char on various platforms.
Cf. 90f118484f

TEST=ffi_2/c_types_test
Change-Id: I1b44bd07fec9c690f4c0290a18cf0dd7e1c24499
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239202
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-03-28 22:31:17 +00:00
Daco Harkes 90f118484f [vm/ffi] Add Char C type
The diff from
https://dart-review.googlesource.com/c/sdk/+/229156/1..3

This was blocked by https://github.com/timsneath/win32/issues/349
earlier. Now that that has been resolved, we should be able to land
this.

We should land this to make package:ffigen be able to bind to `char` in
Dart 2.17.
https://github.com/dart-lang/ffigen/pull/287#discussion_r835734993

TEST=tests/ffi/c_types_test.dart

Change-Id: Ia3bc3785a3d5c0c9f7475106eb77f944f2d0a838
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-ia32-try,vm-kernel-win-debug-ia32-try,vm-kernel-nnbd-mac-debug-arm64-try,vm-kernel-nnbd-mac-debug-x64-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64c-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-precomp-ffi-qemu-linux-release-riscv64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239020
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-03-28 09:46:56 +00:00