Commit graph

79741 commits

Author SHA1 Message Date
Vyacheslav Egorov
f364c8bf7b [infra] Fix vs_toolchain.py
Pass shell=True when invoking python, without
this flag Windows own python.exe is selected
even though it is shadowed in the PATH by
depot_tools' python.bat.

Change-Id: Ia581853ff5819f97f872761ff7557ba9d6028beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200875
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-05-21 11:04:22 +00:00
Alexander Thomas
d9f03e9580 [release] Add release notes for 2.13.1
Change-Id: I896d729e1b6a1b38acc90235ed110ab5f906d6de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200874
Reviewed-by: Michael Thomsen <mit@google.com>
2021-05-21 10:42:11 +00:00
Johnni Winther
d8bbd356a9 [cfe] Migrate constant evaluator
Change-Id: I6e8496886257bd1361a004c8672064542427928e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200867
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-05-21 08:39:01 +00:00
Dong-Heon Jung
2d0edded6f [vm/compiler] Update operations to use immediate on ARM
This updates RelationalOp and EqualityCompare to use Mint as immediate on ARM.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm-try
Change-Id: I2ea68ed4d54ba1dc04953a629ad57e0bc439cec5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200960
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2021-05-21 08:12:21 +00:00
Tess Strickland
58b68c9b06 [vm/compiler] Use isolate version of AllocateContext stub.
When building method extractors in a given isolate group, the copy of
the AllocateContext stub in the isolate group should be used. Otherwise,
calls to that stub cannot be turned into PC relative calls when
appropriate.

Also retrieve the closure allocation stub from the object store directly
instead of going through GetAllocationStubForClass, now that closure
allocation is handled via a distinct stub.

Be more specific about the types of the stub objects passed to
GenerateBuildMethodExtractorStub, as they're guaranteed to be Code
objects.

TEST=Existing test cases.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-product-x64-try
Change-Id: I05bc5e8a133834e66af3e1003d8a6597ee11c312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200868
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-21 07:35:50 +00:00
Jens Johansen
915d0f4601 [CFE] Single test for generated files up-to-date checking
Before this CL we had 2 tests:
* One for messages (not checked in presubmit)
* One for experimental features (checked in presubmit)

And had nothing for:
* direct parser ast helper
* parser test listener
* parser test parser

These are now replaced by a single tool that checks all five and is
run in presubmit.

Change-Id: I885f74cc26dd75722804366e1f8bfc4616ad03ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200187
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-21 07:11:36 +00:00
Clement Skau
cb2a625d7c [vm] Removes FLAG_enable_testing_pragmas from native_api_impl
This removes the need for passing the flag to use
Dart_ExecuteInternalCommand, which is done in several tests
that otherwise have nothing to do with testing pragmas.

Also adds status file skips for precomp-win targets that currently
crash due to https://github.com/dart-lang/sdk/issues/40579.

TEST=CQ

Bug: https://github.com/dart-lang/sdk/issues/46059, https://github.com/dart-lang/sdk/issues/46061
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-win-release-x64-try,vm-kernel-precomp-nnbd-win-release-x64-try,vm-kernel-win-debug-x64-try
Change-Id: I3024ad9bedb7a74abaaaa1020b7525e5d8b1bd47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200461
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-21 07:04:37 +00:00
Dan Field
195c163d7f Revert "[build] Use an absolute path for the snapshot."
This reverts commit 269828ed34.

Reason for revert: This causes subsequent builds to be dirty no matter what.

Original change's description:
> [build] Use an absolute path for the snapshot.
>
> When constructing the command line for creating the kernel service
> snapshot, the variable `abs_output` actually contains a relative
> path, which means that copy/pasting the generated command line fails
> if not within the root build directory. This CL fixes that.
>
> Change-Id: I0d9fcafac489a6bd4771de1d6db1a2aa3623dcf8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200861
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

TBR=dacoharkes@google.com,sstrickl@google.com

Change-Id: I601d3c878d65ad6294d8f20c8b53d119b251ff43
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200940
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-21 06:15:38 +00:00
Sam Rawlins
5d4032282b Warn about deprecated native extensions
Fixes https://github.com/dart-lang/sdk/issues/45759

Change-Id: I0162708a33aebec59edf6e7d3eb14b08e639e0af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200924
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-21 01:29:55 +00:00
Konstantin Shcheglov
2b507fb850 Stop using linked nodes for type parameters.
Change-Id: I5565bf6b0ec0b16da481abaaf5ffb1e3eb6343ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200927
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-20 23:59:15 +00:00
Regis Crelier
3d2093ad39 [VM/runtime] Use signature instead of function in type test cache for closure.
The same signature (canonical function type) may be shared between different closure functions.
Clean up asserts verifying that members are canonical when updating type test cache.

TEST=existing ones

Change-Id: Ic206409e56d34dfd02d6705af93065fd3b83b8fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199561
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-05-20 23:46:45 +00:00
Devon Carew
077c24b4f7 also analyze flutter samples in doc comments
Change-Id: I9b4b71a4dee64bb80517c1962ef4922c822b876b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200904
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-05-20 22:09:55 +00:00
Konstantin Shcheglov
d9a4d74c54 Stop using linked nodes for type aliases.
Change-Id: I838f34c74794bbec103da2fe088c6eda18a763fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200925
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-20 22:00:25 +00:00
Liam Appelbe
96bb78a5ec [wasm] Prepare for release
- Update pubspec and readme.
- Copy the setup.dart output directory logic from package:webcrypto
- Work around NPE in IsFfiCompound (see https://dart-review.googlesource.com/c/sdk/+/199602)
- Move all the wasm tests into the pkg/wasm directory

Bug: https://github.com/dart-lang/sdk/issues/45967
Change-Id: I467eb5401c9dfc94c2c6771e79a3da24459c9691
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199368
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-20 20:40:15 +00:00
Konstantin Shcheglov
3b8a22e4ae Stop using linked nodes for extensions.
Change-Id: I2fb17acc0bc0de333248c8e8f87053096b975078
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200905
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-20 20:38:35 +00:00
Alexander Markov
88021fd67a [vm] Enable new kernel AST invocation nodes for the VM, take 2
This change was already reviewed at
https://dart-review.googlesource.com/c/sdk/+/197586.

Bugfix is in the separate change:
https://dart-review.googlesource.com/c/sdk/+/199365.

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/45340
Change-Id: I4311909e4893af53e88895512f03d3ef84c6bc5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199366
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-20 18:53:45 +00:00
Ryan Macnak
dfcb88f4c9 [vm, compiler] Remove compaction of canonical type tables from precompiler.
Canonical tables are now rebuilt during serialization.

TEST=ci
Change-Id: I4666ca1ed73a6f84b3546d35b394395623bf5854
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200923
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2021-05-20 18:43:05 +00:00
Konstantin Shcheglov
2c67367396 Stop using linked nodes for classes and mixins.
Change-Id: Ic5ada3caf268aa2b18b390428399dedd3860475d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200705
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-20 18:07:45 +00:00
Jacob MacDonald
0cbadee344 add the frontend_server_client package to the sdk
unblocks https://github.com/dart-lang/pub/pull/3008

Change-Id: I14ed70371001b0ca709469172afd2b97679a1e2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200920
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
2021-05-20 17:44:35 +00:00
Alexander Markov
2b3713b217 [cfe] Fix types in spreads with new invocation nodes
Fixes https://github.com/dart-lang/sdk/issues/46076
Issue https://github.com/dart-lang/sdk/issues/45340

Change-Id: If6f83d4e74944f1220f8372a0aa73857a6289596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200704
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-05-20 17:13:50 +00:00
Paul Berry
64b2a1b2e8 Initialize ScopedVisitor.nameScope in a constructor initializer
Change-Id: I1ca06ce421e48be3ef743589276cc039cef5eddc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200880
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-05-20 17:08:35 +00:00
Devon Carew
29f69657e5 update the links to analyzer diagnostics
Change-Id: I293ee9bfe0e7c148a59d0cbb1b927c1edbbd15ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200901
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-05-20 17:05:45 +00:00
MrBirb
5051d4b991 Convert private widget to Stateful without extra underscore.
Bug: https://github.com/Dart-Code/Dart-Code/issues/3343

Change-Id: Ica188ab06e24b4d0708bdc1e23aefeebb53bcab2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-20 16:17:56 +00:00
Konstantin Shcheglov
b85a4bd383 Include hasImplicitType for formal parameters of aliased element.
This is necessary to make linter tests green with this analyzer.

Change-Id: I3ca9358f292df59a37c24f3a9c5053b4591d8add
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200701
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-20 15:59:02 +00:00
Konstantin Shcheglov
097a953cae Stop using linked nodes for formal parameters.
Change-Id: I6e60e1a70b3eeaf42a9b718f4a296d5915c1a2c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200702
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-20 15:58:53 +00:00
Danny Tuppeny
590284e0f7 [analyzer] Add semantic token type/modifier for interpolated expressions
This allows https://github.com/Dart-Code/Dart-Code/issues/3318 to be fixed by giving clients something they can use to reset coloring and preventing inheriting from other highlighting they may apply.

Change-Id: I3f1ba2c15d64634b203064d1451fb4fef040eb60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200863
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-20 15:38:52 +00:00
Alexander Aprelev
8d54a30825 [io/http] Introduce callback that embedder can override to provide custom HTTPClient connection validation.
For example, this can be used to ban insecure http connections, force use of https ones - see https://github.com/flutter/engine/pull/26226.

Issue https://github.com/flutter/flutter/issues/69685
Issue https://github.com/flutter/flutter/issues/54448

Change-Id: Id81aeae9aff0d469ac6f911e4e502b39ce9558bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200524
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-05-20 15:17:52 +00:00
pq
aa30fc8825 topLevelVariable target annotation verification
Change-Id: Id44759572c19bc34348344fda184c09bebf763ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200900
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-05-20 15:02:33 +00:00
Alexander Thomas
a4e2c88b0c Revert "[infra] Update to a clang with libc++.a for Mac ARM64."
This reverts commit 660e63136c.

Reason for revert: Breaks FFI builds: as: unrecognized option '-EL'

Original change's description:
> [infra] Update to a clang with libc++.a for Mac ARM64.
>
> Bug: https://github.com/dart-lang/sdk/issues/42773
> Change-Id: I24e3e842ffc7b3ac28e3236b1b4ef393762f9c8a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193823
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: William Hesse <whesse@google.com>
> Commit-Queue: Alexander Thomas <athom@google.com>

TBR=whesse@google.com,athom@google.com,rmacnak@google.com

Change-Id: Ib444653411c9053bd2eb81c2bf54dbbd9f3686b8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/42773
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200870
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-05-20 14:07:33 +00:00
Daco Harkes
413abf0d82 [sdk] Recover folder structure in include folder 2
Such that runtime/include/internal/dart_api_dl_impl.h ends up in
include/internal/dart_api_dl_impl.h in the sdk release.

Long explanation:

https://dart-review.googlesource.com/c/sdk/+/164320 tried to recover the
folder structure but failed to do so correctly. It put
runtime/include/internal/dart_api_dl_impl.h in
include/runtime/dart_api_dl_impl.h rather than
include/internal/dart_api_dl_impl.h.

The gn copy action only supports a single `outputs` string.
https://gn.googlesource.com/gn/+/HEAD/docs/reference.md#var_outputs

This string can have 'placeholders'.
https://gn.googlesource.com/gn/+/HEAD/docs/reference.md#placeholders

The only placeholder that preserves the original folder structure,
without also nesting deeply inside folders is `source_target_relative`.

If `source_target_relative` inside sdk/BUILD.gn it starts including
`runtime/include/` in its path. So the only way to achieve the correct
copy is by doing it in runtime/include/BUILD.gn.

TEST=Manual testing, we don't have tests verifying the SDK structure.

Change-Id: I9d503626266edcdd8417f5cafb0f8ff9746f89f7
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200866
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-05-20 13:54:42 +00:00
Lasse R.H. Nielsen
cf627eb01c Change signature of HttpClient.authenticate{,Proxy}.
Allow the `realm` argument to callbacks to be `null`.
This is a breaking change, but it only affects null-safe code.

Also fix a bug in http_impl.dart where an error function with
an *optional* stack trace parameter would be called without a stack trace.

Bug: https://github.com/dart-lang/sdk/issues/44039
Change-Id: I4b38382328e26478661bf45f46cd3017631f4ebd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170094
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-05-20 13:13:42 +00:00
Daco Harkes
f18c1bfb84 [cfe/ffi] Fix user-defined getters
https://dart-review.googlesource.com/c/sdk/+/198281 introduced support
for incremental compilation to the FfiTransform. This included reading
fields from already transformed structs and unions.

However, fields which already had been transformed are indistinguishable
from user-defined getters.

So instead of re-reading the information from the fields, for already
transformed structs, we read the information from the
`vm:ffi:struct-fields` pragma on the struct class.

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

TEST=tests/ffi/regress_46004_test.dart
TEST=pkg/front_end/testcases/incremental/regress_46004.yaml

Change-Id: Iebffda037913e71349bba9685dc16e2f478a0e7b
Cq-Include-Trybots: luci.dart.try:vm-kernel-win-debug-x64-try,front-end-nnbd-linux-release-x64-try,front-end-linux-release-x64-try,vm-ffi-android-debug-arm64-try,vm-precomp-ffi-qemu-linux-release-arm-try
Fixed: 46004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200640
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-05-20 13:12:22 +00:00
Clement Skau
14d5ca1721 [tools] Change CoreDumpArchiver to not default throw
This prevents missing core dumps from crashing bots a la:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8846992204042276416/+/u/vm_tests_shard_1/task_stdout_stderr:_vm_tests_shard_1

Bug: https://github.com/dart-lang/sdk/issues/36469
Change-Id: If66e40d8cb2df7ece7c1274fbbdcbffda445056d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200865
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-05-20 11:49:16 +00:00
Clement Skau
67f097a161 [tools] Update all iteritems -> items
This migrates old python2 dict.iteritems() to python3 dict.items().
iteritems was removed in python3 meaning these script will otherwise not
run.
Note that this remains backwards compatible since dict.items() also
existed in python2, though the implementation was more memory intensive
for large dicts (which these likely aren't).

This is similar to https://dart-review.googlesource.com/c/sdk/+/200184

Change-Id: I4fe5c90d21de97d0ecceb27fa6efa7d7deb14098
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200864
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-05-20 11:36:52 +00:00
Jens Johansen
d8f5e0ad86 [CFE] Update direct-from-parser-ast helper and creator
Make both helper and creator nnbd.

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

Change-Id: Ia7f5feda7c1d3b3a8d0400a34fd32f1407f283b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200186
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-20 11:22:52 +00:00
Martin Kustermann
e674aa456f [vm/compiler] Make deopt env mandatory for FGC metadata emitting methods.
Slightly related to https://github.com/dart-lang/sdk/issues/45213

TEST=Existing test suite.

Change-Id: I63572d4fda838984ebb6010ef39c2cf3bd2b2958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200643
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-05-20 11:20:52 +00:00
Alexander Thomas
8a305dd067 [co19] Roll co19 to 26019f5b2efb294eacddfef6ce443083979feff5
2021-05-20 sgrekhov@unipro.ru 1086. @compile-errors replaced by static errors in multitests
2021-05-18 sgrekhov@unipro.ru 1086. @compile-errors replaced by static errors
2021-05-16 irina.arkhipets@gmail.com Issue 1087: Tests for Named Constructors Tear-offs added
2021-05-13 sgrekhov@unipro.ru 1086. @compile-errors replaced by static errors
2021-05-12 sgrekhov@unipro.ru 1086. @compile-errors replaced by static errors (LanguageFeatures/Super-mixins)
2021-05-12 sgrekhov@unipro.ru 1086. compilation_txx tests moved from LibTest/mirrors back to Language/Metadata. They don't use mirrors any longer
2021-05-11 sgrekhov@unipro.ru Fix Process.kill() expecting exit code on Windows
2021-05-11 sgrekhov@unipro.ru 1082. Removed excessive copyrights from Subtyping generated tests
2021-05-11 sgrekhov@unipro.ru 1088. Missing copyrights added
2021-05-11 sgrekhov@unipro.ru 1088. Header comment fixed
2021-05-11 sgrekhov@unipro.ru 1088. Generated Subtyping tests fixed
2021-05-11 sgrekhov@unipro.ru 1082. Header comments changed to documentation-style ones
2021-05-11 irina.arkhipets@gmail.com Issue 1086: Get rid of @compile-error tags in Language/Classes/Getters tests.
2021-05-10 irina.arkhipets@gmail.com Issue 1086: Get rid of @compile-error tags in Language/Classes/Constructors, Language/Classes/Constructors/GenerativeConstructors tests.
2021-05-10 irina.arkhipets@gmail.com Issue 1086: Return incorrect merge changes back.
2021-05-07 irina.arkhipets@gmail.com Issue 1086: Get rid of @compile-error tags in Language/Classes/Constructors/Factories tests.
2021-05-07 irina.arkhipets@gmail.com Merge remote-tracking branch 'remotes/origin/master'
2021-05-07 sgrekhov@unipro.ru 1088. Fix static errors tests with specified line number
2021-05-06 sgrekhov@unipro.ru 1082. Copyright changed to use single-line comments
2021-05-06 irina.arkhipets@gmail.com Issue 1086: Get rid of @compile-error tags in Language/Classes/Abstract_instance_Members, Language/Classes/Class_Member_conflicts, Language/Classes/Constructors/Constunt_Constructors tests.
2021-05-06 sgrekhov@unipro.ru 1083. Timeout reduced, diagnostic improved
2021-05-05 sgrekhov@unipro.ru 1083. Error expectations fixed
2021-05-04 irina.arkhipets@gmail.com Issue 1085: Test corrected: typedef declaration should be imported from the opted-out library here.

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-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-release-x64-try
Change-Id: I78402828a80ee1803537e9ba6d78bf15165c7df6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200862
Reviewed-by: William Hesse <whesse@google.com>
2021-05-20 10:54:15 +00:00
Ryan Macnak
660e63136c [infra] Update to a clang with libc++.a for Mac ARM64.
Bug: https://github.com/dart-lang/sdk/issues/42773
Change-Id: I24e3e842ffc7b3ac28e3236b1b4ef393762f9c8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193823
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-05-20 10:42:06 +00:00
Tess Strickland
269828ed34 [build] Use an absolute path for the snapshot.
When constructing the command line for creating the kernel service
snapshot, the variable `abs_output` actually contains a relative
path, which means that copy/pasting the generated command line fails
if not within the root build directory. This CL fixes that.

Change-Id: I0d9fcafac489a6bd4771de1d6db1a2aa3623dcf8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200861
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-20 09:43:30 +00:00
Alexander Thomas
554c34ce27 [co19] Roll co19_2 to 1c2e425f461bfae7de6db7014fc44a58fc72b4a8
2021-05-11 sgrekhov@unipro.ru Fixes 1089. Fix flaky Process.kill tests
2021-05-06 sgrekhov@unipro.ru 1082. Generator for dynamic generated tests fixed
2021-05-06 sgrekhov@unipro.ru 1082. Update copyright and comments in Subtyping generated tests
2021-05-05 sgrekhov@unipro.ru 1082. Language version added to all co19_2 tests
2021-05-05 sgrekhov@unipro.ru 1082. Missing Copyrights added and documentation fixed to use single-line comments
2021-05-05 sgrekhov@unipro.ru 1082. Copyright and documentation  changed to use single-line comments

Change-Id: I47b4af1cde69ea8f1aa9164c8df045f1120550f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200860
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-05-20 09:23:45 +00:00
Alexander Thomas
1cabd7d941 [dartdev] Apply updates from official image examples
Official image docs: https://hub.docker.com/_/dart

Change-Id: I9629c33db812039dad67a082e3a6c6793bad272c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200462
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-05-20 09:17:00 +00:00
Tess Strickland
e6968f6d64 [vm/compiler] Cache entry point in closure in bare instructions mode.
This avoids the extra redirection through the closure function, which
does not need to be loaded otherwise during closure calls in this mode,
and thus removes another runtime dependency on the closure function in
bare instructions mode.

In non-bare mode, CODE_REG is populated with the code object for the
function, so caching wouldn't change the number of loads there.

This does not increase the size of closure objects, as there was
already a free word in them due to object alignment.

TEST=Existing tests.

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm64c-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-x64-try,vm-kernel-linux-debug-x64c-try
Change-Id: Ida6e0d277919259a8c0e8dcbfaa101379fd22ff1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195920
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-20 09:05:40 +00:00
Clement Skau
c3ba9ac204 [lint] Fix il_arm.cc.
TEST=CQ
Change-Id: I94c3ac70e7595ec6191dbba9b3502cefe57a04d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200821
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
2021-05-20 07:35:50 +00:00
Stephen Adams
7817468526 Redo "[dart2js/js_ast] Escape strings in the printer"
Fix analyzer diagnostics in js_ast.

- remove unused import
- bump SDK requirements to allow Set literal
- remove unused compareTo method

TBR=fishythefish@google.com

Change-Id: Iabf8d9aeea1d6ceeda1bf85ff7e80914c67c9d63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200780
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-05-20 05:55:37 +00:00
Alexander Markov
b9a0c0dfba Add --delete-tostring-package-uri option to kernel compilers
This change adds toString transformation to gen_kernel and
frontend_server tools in Dart SDK.

The implementation and tests are derived from
pkg/frontend_server/lib/src/to_string_transformer.dart and
https://github.com/flutter/engine/tree/master/flutter_frontend_server/test.

In addition to _KeepToString in dart:ui, toString transformation
now supports @pragma('flutter:keep-to-string') to exclude
certain toString methods from the transformation without depending
on dart:ui.

pkg/frontend_server/lib/src/to_string_transformer.dart is not
cleaned up in this change yet as it is still used by Flutter
engine. Cleanup will be done after Flutter engine is cleaned up,
after it is switched to the implementation of toString transformer
added in this change.

This is also a step towards a unified kernel compiler
(https://github.com/dart-lang/sdk/issues/39126).

TEST=pkg/vm/test/transformations/to_string_transformer_test.dart

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

Change-Id: Icbfd3fa193d54f1fc6b2d7fa0bace82b3704f91f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200525
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-05-20 00:50:07 +00:00
Nicholas Shahan
37902c8c6d [ddc] Add the prefix '__t$' to the names of types
This is a temporary fix to give debug tools a recognizable string so
they can hide the type variables from the current scope.

The prefix is only applied when the type appears outside of the
top level type table.

This will require a change in dwds to filter variables with names that
begin with this string.

Change-Id: I2942f462280195d81a7de2b710e6b958770d152a
Issue: https://github.com/dart-lang/sdk/issues/45649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199581
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-05-19 23:52:12 +00:00
Stephen Adams
8564caf29a Revert "[dart2js/js_ast] Escape strings in the printer"
Revert while I fix the cbuild errors.

This reverts commit dc92f126e2.

TBR=fishythefish@google.com

Change-Id: I4e3afa19d62bdeecc344bf1a413a2fd3e3a7aca2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200760
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-05-19 23:51:22 +00:00
Liam Appelbe
677122a516 Make v8_snapshot_profile_writer_test slightly more lenient
Currently the test is just barely failing:
https://dart-ci.appspot.com/log/vm-kernel-precomp-linux-product-x64/dartkp-linux-product-x64/10800/vm/dart_2/v8_snapshot_profile_writer_test

Change-Id: Ifdbfcd946ffb6693203599dd36cea238a68e29b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200700
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-05-19 22:42:42 +00:00
Sam Rawlins
cf00cad458 analysis_server: Check for prefer_relative_imports when fixing with new imports
If the `prefer_relative_imports` lint is enabled, then suggest relative
import URIs before absolute ones.

Also bring the relevant code in line with Effective Dart:
* DO capitalize acronyms and abbreviations longer than two letters like words. ("Uri" vs "URI")
* AVOID lines longer than 80 characters. (in doc comments)
* DO separate the first sentence of a doc comment into its own paragraph.
* PREFER starting function or method comments with third-person verbs.

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

Change-Id: I2e235cc84bd93e5593a96456eb9b0c615811e268
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200660
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-19 22:07:42 +00:00
Stephen Adams
dc92f126e2 [dart2js/js_ast] Escape strings in the printer
The old way was for the JavaScript string literals to be pre-escaped.
This was cumbersome since each place that creates a JavaScript string
literal needs to make a decision about whether escaping is needed and
the kind of escaping (UTF8 or ASCII).

This change moves the responsibility for escaping into the js_ast printer.
The escaped text exists only while printing, which reduces the heap in a
large modular compile link scenario by 220MB, since the unescaped string
is in memory anyway.

There were three kinds of escaping - ASCII, UTF8, and 'legacy', if not
specified. This has been reduced to ASCII (default) and UTF8, chosen by
a printer option.


Change-Id: Ic57d8fb70a213d3518244f1a152cd33e54103259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200400
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2021-05-19 21:32:52 +00:00