Commit Graph

21307 Commits

Author SHA1 Message Date
Martin Kustermann 9722d3bb1e [gardening] Mark ffi test as slow in debug mode
TEST=Fixes flaky (turned into consistent) timeout of ffi test

Change-Id: Ic2444c797621e1f09153a68282c075fb874c2921
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194683
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-04-09 09:39:51 +00:00
Joshua Litt 28aa79ddd7 Reland "[dart2js] Add support for bundling fragments."
This is a reland of d0f55d0e42

Original change's description:
> [dart2js] Add support for bundling fragments.
>
> Also changes the default to bundling rather than interleaving fragments.
>
> Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

Change-Id: I0347ddb6dd93eb57f0abc259fc477ec3a9d7231b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194323
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-04-08 17:46:50 +00:00
Lasse R.H. Nielsen 6af4987dc6 Change VM DateTime to-local-time computation to not fail for <1h changes.
The DateTime conversion to local time amounts to solving an
equation, finding an offset where the current local time is that offset.

The current approach doesn't actually do that, it just tries to simulate
the JS approach, with a tweak to avoid DST change issues, but that tweak
assumes that all time zone adjustments are one hour changes.

This CL should work correctly for time zone changes of up to one hour,
but might still fail for changes of more than one hour.
It works by trying more offsets, which obviously has a performance cost,
which depends on how efficient the operation system is at providing
the local time zone for a specific milliseconds-since-epoch.

Change-Id: I80dc6e62e0639d9966d3c5a06430787d8acc4ff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/182041
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-04-08 16:51:00 +00:00
Kallen Tu 6f90c5531e [cfe] Closures and environment changes for const functions.
Change-Id: If844a28192c1eef4dcbb62075ae07e86297f2c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193920
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-08 15:09:39 +00:00
Joshua Litt 05a0e79a76 Revert "[dart2js] Add support for bundling fragments."
This reverts commit d0f55d0e42.

Reason for revert: Investigating 5% spike in memory usage

Original change's description:
> [dart2js] Add support for bundling fragments.
>
> Also changes the default to bundling rather than interleaving fragments.
>
> Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
> Commit-Queue: Joshua Litt <joshualitt@google.com>
> Reviewed-by: Stephen Adams <sra@google.com>
> Reviewed-by: Sigmund Cherem <sigmund@google.com>

TBR=sra@google.com,sigmund@google.com,joshualitt@google.com

Change-Id: I3d61f14981d9314163974c6a38d5a5e0d76b5a98
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194322
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-04-07 23:53:20 +00:00
Robert Nystrom 9b8584b3ad Don't truncate command output in the test runner.
I'm not sure if the output truncation was ever practically useful. But
it causes problems now that we have a CFE test that wants to validate
that the CFE can produce many errors in one go.

I thought about allowing a test to extend the truncation size, but I
figured the simplest fix was to just not truncate at all and make the
test runner a little simpler. Also did a little clean up on this
ancient code while I was at it.

Fix #44493.

Change-Id: Ie678c80e7114e0fb7f68931335075e3d319fb53a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178940
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-04-07 23:42:38 +00:00
Kallen Tu 5bcaf448af [cfe] Try-catch, try-finally, throw for const functions.
Change-Id: Id25f78bba9c65e702bcd5051c776782a146e0605
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-07 21:40:38 +00:00
Mayank Patke 8f832e2c6b [dart2js] Implement Cell lowering for uninitialized locals.
Change-Id: I7233e1484cc19e5f24d215bfd2c1e34c8f12961b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193588
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-07 19:43:07 +00:00
Joshua Litt d0f55d0e42 [dart2js] Add support for bundling fragments.
Also changes the default to bundling rather than interleaving fragments.

Change-Id: Id79d03a8a8b5be7465b8535f6c9c47dfad120c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/191484
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-04-07 18:30:47 +00:00
Paul Berry 363da90385 Fix "why not promoted" functionality for compound indexed assignment.
Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I40c6087a0db2c67106f9ce138b79a8a5769b37de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193834
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-04-07 11:39:12 +00:00
Leaf Petersen 0fa7878d56 Second batch of private name tests.
Additional tests for private classes exported via a public typedef.

Change-Id: I443b1e32efa6140f319e9acc8c498bb9f5e3d27d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193828
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2021-04-07 01:09:09 +00:00
Alexander Markov 707cd928af [vm/ffi] Fix representation of value for 8-bit and 16-bit FFI loads and stores
Previously, FFI store could use kUnboxedUint32 for value being stored
via 8-bit or 16-bit StoreIndexed instruction. However, such
StoreIndexed instructions require kUnboxedIntPtr representation.
Due to the mismatch in the representations, SelectRepresentations
pass inserts a speculative (deoptimizing) IntConverter instruction,
which cases crash in AOT mode. Similar problem exists for FFI loads.

This change corrects representation when unboxing value in the body
of FFI store intrinsics and when boxing the value in FFI loads,
so representation of the value matches representation required by
StoreIndexed / returned by LoadIndexed.

TEST=ffi/regress_flutter79441_test
Fixes https://github.com/flutter/flutter/issues/79441

Change-Id: Ida144e8d2e7a69d6767c9d4447bb20e79d847d48
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193824
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-04-06 21:11:23 +00:00
Kallen Tu b5d4d26abe [cfe] Const factories when const functions enabled.
Change-Id: Ifd24678c0ac191c5cc6f1d60443ab96f56cbba7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192400
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-04-06 19:46:32 +00:00
Alexander Markov a38a2dd343 [vm/aot] Fix retaining of targets of FFI callbacks in precompiler
Account for the fact that a Function could be only reachable via
FfiTrampolineData in the FFI trampoline function.

TEST=ffi_2/function_callbacks_test
Fixes https://github.com/dart-lang/sdk/issues/45510

Change-Id: I2db81c7730ae48d1f1355aa236339e54562ee6c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193893
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-04-06 18:33:17 +00:00
Paul Berry c739b324a6 Make language tests for issue #45551
Previously, the "why not promoted" test cases sort of exercised this
bug, but in an unclear way that wasn't really related to the "why not
promoted" functionality.  Better to have a separate test for it.

Bug: https://github.com/dart-lang/sdk/issues/45551
Change-Id: Idd44596f021eb91679a019f9f56da1661363d0d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193829
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-06 13:01:47 +00:00
Paul Berry 61747ae4d3 Update "why not promoted" language tests with analyzer expectations.
This is possible now that the test runner uses the analyzer's new JSON
output format.

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: Ib38e52e0c6a8f73074ef702b8a8b18bd9b128743
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194014
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-04-05 21:50:06 +00:00
Nicholas Shahan 7f009e528d [ddc] Fix private class exposed by typedef
- Ensure public fields of private classes exposed by typedef are
  properly treated as virtual.
- Add modular test that exercises the errors fixed by this change.

Change-Id: If97f66de5b0742612024a2f727d83ca9dc73389c
Fixes: https://github.com/dart-lang/sdk/issues/45512
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193899
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-04-05 18:54:56 +00:00
Paul Berry 1cffb93ad7 Improve error message for non-promotion due to assignment.
This is clearer because:

- The use of "could not be promoted" is consistent with the other "why
  not promoted" messages.

- We avoid speculating about whether the variable might be assigned a
  null value; this should help avoid confusion in cases where the user
  can see that assigning a null value is impossible, but promotion
  still fails.

- We avoid the phrase "intervening write", which is a little too
  erudite.

Bug: https://github.com/dart-lang/sdk/issues/44898
Change-Id: I0b8a2132dc99dd06769677f98e6257e9b55ad9d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193820
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-04-03 13:43:36 +00:00
Leaf Petersen 39a2e69ea4 Enable non-function type aliases by default in 2.13.
TEST=language/nonfunction-type-aliases

Change-Id: Ifff4e838fbfc4f71e2d990e1f1f8a67b987adf91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192948
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-04-03 01:31:42 +00:00
Sam Rawlins 5e040a20f8 analyzer: Improve span of use_of_nullable_value errors
This changes the span reported from the _receiver_ to
the _use_ (method name, property name, operator token).

I think this change is overall an improvement.
Specifically, its a great improvement for cmdline
output, where the receiver and the "use" are on
different lines.

One possibly weird change is that if the operator is `[]`,
then I only highlight the `[` character. I don't know if
there is a better place, and I think this is fine.

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

Change-Id: Ie66ddf04b4904a367575193106385dd63ee39985
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188680
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-04-02 02:43:48 +00:00
Alexander Markov 38d05280e5 [vm/compiler] Fix materialization of Float32List
Before value is stored into Float32List, it is converted to 32-bit
float using DoubleToFloat instruction. If allocation sinking
eliminated the allocation of Float32List but we need to deoptimize,
the list is materialized and elements are filled. In such case,
we shouldn't perform double->float conversion as it already happened.

This change also updates the assertion in DoubleToFloatInstr::Canonicalize
which verifies that DoubleToFloat instruction can be used only
in certain cases.

TEST=tests/language/vm/allocation_sinking_arrays_test.dart
Fixes https://github.com/dart-lang/sdk/issues/45547

Change-Id: I9a1bd28a9fc09bccad6aa3c91a7880abd002f7c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193831
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-04-02 01:36:28 +00:00
Ryan Macnak b888aeba16 [vm, compiler] Compute narrow types for unboxed fields even when their static types are wider than the unboxed type.
Fixes range analysis for loads of such fields.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/45524
Change-Id: I3d0bf8b3d988b74efadabcb52d06212745bb1ec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193745
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-01 18:29:12 +00:00
Ryan Macnak 76e41bc4c5 [vm, compiler] Use correct size of Smi when truncating during constant folding.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/45525
Change-Id: I048a90eade678f610f0fd4451b099711a1faa957
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193750
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-04-01 16:19:42 +00:00
Paul Berry 66635c3ed6 Add language tests for "why not promoted" functionality.
These tests just cover the CFE functionality.  Once
https://github.com/dart-lang/sdk/issues/44905 is addressed, I'll add
test expectations for the analyzer.

Note: these tests uncovered two unreelated bugs: #45551 and #45552.

Bug: https://github.com/dart-lang/sdk/issues/44897
Change-Id: I465b157afc2cc15bcc5ce083aaa74614313a38a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193581
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2021-04-01 13:44:03 +00:00
Regis Crelier d0ee565bf8 [VM/runtime] Fix optimization for reusing instantiator type argument vector.
The bit vector representing the nullability of the types of a type argument vector was stored in reverse order.
This caused a problem when a longer instantiated vector is reused for a shorter uninstantiated vector.

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

TEST=added regression test

Change-Id: I0e936e45d51fa896d7562f4f03c8878437eb464f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193751
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-04-01 01:31:33 +00:00
Alexander Aprelev bddded13aa [io/lookup] Ensure public type InternetAddress is used in lookup methods.
Use of private _InternetAddress class in method declarations results
in errors when user attempts to for example provide timeout handler.

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

Change-Id: Ied83479d7ce6319d0a82985c667ad29ef58cf6de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193720
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-03-31 19:43:42 +00:00
Joshua Litt 5ca3b45541 [dart2js] Remove unused 'classesOnlyNeededForRti' field.
Change-Id: I424fd9fcf6c7f8a9d0f724b5599fc96242bb9042
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192943
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2021-03-31 17:30:29 +00:00
Alexander Markov 6239c434fb [vm,cfe] Avoid elimination of 'x as Function' type casts
Elimination of redundant type cast 'x as Function' where x is
a function type (such as 'void Function(int)') is not correct because
it changes semantics of a function call if such expression is
used as a receiver.

"Function" static type of receiver allows arbitrary function calls,
while known function type of the receiver means the call doesn't
need to check parameter types. Static type of receiver is currently
not stored in kernel AST but calculated from the receiver node,
so replacing 'x as Function' with 'x' changes static type of
the receiver from "Function" to function type.

TEST=tests/language/regress/regress45428_test.dart
Fixes https://github.com/dart-lang/sdk/issues/45428

Change-Id: If7148450526703daa63a442adf67a9e7a2dcea54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193524
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-03-31 15:57:29 +00:00
Johnni Winther 1eda15854d [cfe] Allow experiments only in current sdk version
Experiments that have not be enabled by default should only be allowed
in the current version of the sdk.

Closes #45460

Change-Id: I159f390ac85fe37943920717ce11a4c817d5b4a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193480
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-03-31 15:20:08 +00:00
Leaf Petersen 4162c560f0 Initial batch of private name tests.
Tests for using a private class from another library exposed via a
public typedef name.

Change-Id: I1b40958d73bc7b4c16bd013eca721b52ee4d4503
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193642
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-03-31 10:42:03 +00:00
Sergey G. Grekhov 3a75bac8dd [co19] Obsolete entries removed from co19_2-kernel.status file according to co19 issue #1041
Change-Id: I4a8f91383e7743bbac61862fdc47de3fcdebbbab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193302
Commit-Queue: Leaf Petersen <leafp@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2021-03-31 04:14:42 +00:00
Erik Ernst 295c0619be [co19] remove skips is a status files motivated by language issue 115
Change-Id: I825985e5cdbf25b144a9dc6adcee376799b4c064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193402
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-03-30 16:37:41 +00:00
Kallen Tu 5b3a5acf01 [cfe] Switch statements for const functions.
Change-Id: I1194f9091b74ba3e288d5e7bd386c204fa25c837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193360
Commit-Queue: Kallen Tu <kallentu@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2021-03-30 03:56:58 +00:00
Leaf Petersen 5caf594a40 Remove a large number of nonfunction type alias test skips.
The co19 status file was unskipping a large number of tests on all
platforms except fasta.  Now that this is shipping, I believe these
should be run.

Change-Id: I2f4eef15cfac0b9e5fb662376e533f6f39877378
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193095
Auto-Submit: Leaf Petersen <leafp@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-03-30 00:31:55 +00:00
Daco Harkes 4ba4fd3f1d [analyzer/ffi] Inline array annotation const dimensions
Moves the Array forwarding constructors and _ArraySize class out of
the patch files so that the analyzer can reason about them.
(The analyzer does not include patch files, because it does not know
whether it's analyzing for VM or JS backend.)

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

Change-Id: Ia0eb4bbca40b906a1e636714f53c5c73dcfc3cad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193403
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-03-30 00:28:57 +00:00
Daco Harkes 93a187e6c8 [analyzer/ffi] Error on sizeOf<Handle>()
Test covers both analyzer and CFE throwing an error. (But does not
test what error.)

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

Change-Id: I8b820347945d88304d3f03d7d03f156b7111db42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193405
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-03-30 00:20:52 +00:00
Daco Harkes 38d5c5e444 [vm/ffi] Array range error message
Closes: https://github.com/dart-lang/sdk/issues/45189

Change-Id: I225a092fd05efe8a6eed7749375ea4c842547fb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193404
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-03-30 00:12:49 +00:00
Regis Crelier e35ba5b9e3 [VM/runtime] Consider trail when comparing type parameter and bounds of function types.
Fixes https://github.com/dart-lang/sdk/issues/45443

TEST=added regression test

Change-Id: I82c581d9627d9eb1cf31d108a534fd4f5d6bb0a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192947
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2021-03-29 16:49:47 +00:00
Sergey G. Grekhov 79f6f64836 [co19] Removed obsolete entries from co19-kernel.status
Cq-Include-Trybots: dart/try:dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I426cdcb95cb726b52d4510d92d67be49b364accd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192931
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-03-29 12:04:27 +00:00
Konstantin Shcheglov 2c02737d7a Support for bounds of generic function types for raw-depends / not simply bounded.
Change-Id: I568f4ebb922b3ce40debff1f4ce20a9ac580f29d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193141
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-27 21:08:06 +00:00
Sergey G. Grekhov 0e8bc12b51 [co19] status files of co19_2 tests clean up. Tests that use modern experimental flags deleted
Change-Id: I9f13bacdbd68053905900e0441d043ed9b44d554
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192930
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-03-27 12:28:15 +00:00
Kallen Tu 51b0832516 Language tests for erroneous conditions in control flow statements.
Conditions which are not bools. The error checking should be handled by the compiler so asserts added just in case.

Change-Id: Ia53c7aa017300f5afbfe636604855e4183e1d0a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192580
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
2021-03-25 23:21:34 +00:00
Srujan Gaddam 20f7013455 [pkg:js] Filter promise_reject_null_test from CSP
Test uses `eval` which is disallowed by CSP.

Change-Id: I9d1b094487226d6c7ec728d400d2c35fc6aa5c58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193063
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-03-25 22:00:19 +00:00
Konstantin Shcheglov 4af81e2a5b Issue 45459. Report EXPERIMENT_NOT_ENABLED instead of INVALID_GENERIC_FUNCTION_TYPE when nonfunction_type_aliases is not enabled.
Bug: https://github.com/dart-lang/sdk/issues/45459
Change-Id: I0773f15e4697620427f4449622a592e40b5a5de4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193100
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-03-25 21:43:04 +00:00
Ryan Macnak 2c371ff74e [vm, compiler] Respect --use_slow_path in CheckedSmiOp/Comparison.
TEST=ci
Change-Id: Ib2b1a9b067beb1cbeea2b12355e62a45396697f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192726
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-03-25 17:39:24 +00:00
Erik Ernst 6db2f7a2f6 Correct implementation of expand-to-type-variable error check
Bug: #45351
Change-Id: I0f7a813c8da8ce2f60cdcd3d81d854e75556130f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192743
Commit-Queue: Erik Ernst <eernst@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-03-25 16:28:34 +00:00
Tess Strickland bf74cad477 [vm/compiler] Change when parents of local functions are retained.
Now they are only retained if one of the following is true:

* The parent is Future.wait or Future.timeout.
* The local function is a generated body of an async/async*/sync*
  function.
* Symbolic stack traces are enabled.

When a local closure's parent is dropped, the parent name will
be printed as `<optimized out>` in places like exceptions.

Changes in Flutter gallery in release-sizeopt mode:

* ARM7: ROData -1.41%, Isolate snapshot -2.35%, Total snapshot -0.54%,
        Isolate heap -1.38%, Total heap -1.38%
* ARM8: ROData -1.55%, Isolate snapshot -2.34%, Total snapshot -0.65%,
        Isolate heap -1.41%, Total heap -1.41%

TEST=Existing tests on CI.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try, vm-kernel-precomp-dwarf-linux-product-x64-try
Change-Id: I9d05f9e0e30e9f428eff16a15b0f1eeb974419c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190023
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-03-25 13:47:03 +00:00
Jens Johansen ac9b4aab8d [parser] More specific error messages when recovering new/const/Map/Set/List with said literals
Follow-up to https://dart-review.googlesource.com/c/sdk/+/190022

Change-Id: Id42336216267dcbf481ae6e111177e6296ea6779
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/190881
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-03-25 13:27:03 +00:00
Srujan Gaddam 6929718456 [pkg:js] Handle null value in promise rejection
Closes https://github.com/dart-lang/sdk/issues/44602

Creates an exception to signal a `null`/`undefined` value when a
converted promise is rejected with `null`/`undefined`.

Change-Id: Ic7f14e23c6c1d51d6dbcc5831ffa8491418a4267
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192046
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-03-25 01:30:23 +00:00
Ben Konyi c4bfca9b6a [ dart:io / package:vm_service ] Add HTTP request profiling service
extensions

This change adds HTTP request profiling support to the dart:io service
extensions and removes HTTP request/response body logging to the
timeline due to memory constraints.

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

TEST=pkg/vm_service/test/get_http_profile_test.dart

Change-Id: I85642296c3d6595197f3365022477c7685c452bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/189881
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Schmoll <kenzieschmoll@google.com>
2021-03-24 23:01:03 +00:00