Commit graph

81386 commits

Author SHA1 Message Date
Alexander Aprelev
455a105c42 [vm/benchmark] Introduce benchmarks that measures event loop latency for regexp processing.
This captures performance issues reported on https://github.com/flutter/flutter/issues/88063

Change-Id: Ie216808a02231be7915c60268718f3e0a0dc3c99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210282
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-08-16 18:41:49 +00:00
Konstantin Shcheglov
9eabbf1bc0 Add macroGeneratedContent, set nameOffset(s) for macro-generated elements.
The idea is that for macro-generated elements navigation point at
a temporary file that contains this generated content, and so name offsets
should be in this file. Elements that were produced from "source" code,
should be in the "source" file, with "source" name offsets.

Change-Id: Iefa105299444fbadfd3d52048c4dfe379b482449
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209480
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-08-16 18:38:39 +00:00
Stephen Adams
55596f4c01 [dart2js] Implement package:meta/dart2js.dart in terms of @pragma
Change-Id: I56777498f3c3b6f910eb8c7e066de4fc254c1708
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209040
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-08-16 18:02:39 +00:00
Paul Berry
a34bf90313 Make ResolverVisitor.flowAnalysis non-nullable.
Previously, the only circumstance in which it was null was during a
few unit tests, and this is easily fixed by creating a
FlowAnalysisHelper object when setting up those tests.

Change-Id: Ida083ec218a2b1ee910bca747a8f5eb320828527
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210280
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-08-16 17:35:04 +00:00
Konstantin Shcheglov
771cbb5328 Issue 46839. Remove UNCHECKED_USE_OF_NULLABLE_VALUE.
Bug: https://github.com/dart-lang/sdk/issues/46839
Change-Id: If214aab6163cd0b88a37bc04952a0cddc2bc5319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210220
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-08-16 16:29:14 +00:00
Lasse R.H. Nielsen
f4ddc8dc6b Deprecate the dart:cli library and waitFor method.
Change-Id: Ia7af0febf17b310de9561eca254f1bd9add079ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210125
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Michael Thomsen <mit@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2021-08-16 13:49:48 +00:00
Tess Strickland
7c55965b76 [vm/compiler] Add initial partial TTSes for implemented types.
Previously, no optimized TTSes were generated for implemented types, and
so they always fell back to the default TTS, which mostly depends on
calling the runtime and cached checks in SubtypeTestCaches. Now,
optimized TTSes are generated that check for certain compatible
implementing classes before falling back on the runtime/STC.

More specifically, the optimized TTSes for implemented types checks for
the following cases:
1) The implemented type is instantiated and the checked class implements
   an instantiated subtype of the implemented type. The only check
   required is a class id match.
2) The instance type arguments of the checked class are compatible with
   the type arguments of the checked type.  That is, given the following
   declarations, where Base, Impl1, and Impl2 have the same number of
   parent type arguments:

```
case Impl1<K, V> implements Base<K, V>
case Impl2<V> implements Base<String, V>
```

   then the generated optimized TTS for Base<S, T>, where S and T are
   either type parameters or instantiated types, checks for instances of
   Base and Impl1, comparing the type arguments of the instance to S and
   T. The generated TTS does not currently check for Impl2, and thus
   when given an instance of Impl2, it falls back to the old runtime
   checking/SubtypeTestCache behavior.

This compatibility restriction allows us to perform the same checks on
the loaded instance type arguments as is done for non-implemented types,
where the checked classes are subclasses and so naturally compatible in
this manner.

Note that two implementing classes whose instance type arguments are
compatible may store their instance type arguments at different field
offsets. Thus, we also split the classes being checked into groups that
share the same instance type arguments field offset, and load the
instance type arguments differently for each checked group.

This CL also removes now-unused code in the HierarchyInfo class.

TEST=vm/cc/TTS_{Generic,}SubtypeRangeCheck

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm_x64-try
Change-Id: I4c3aa23db2e75adbad9c15727b491669b2f3a189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209540
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-08-16 13:02:34 +00:00
Vyacheslav Egorov
6e28f8bb40 [vm] Avoid reserved register error on newer compilers
Don't mark SP as clobbered because newer clang versions
do not like that.

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

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-ffi-android-release-arm-try,vm-ffi-android-product-arm-try
Change-Id: I5b794e7bb02e62576c4c40b8132f9c798cb7639c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209917
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-08-16 11:11:04 +00:00
Alexander Thomas
d2bd43f43e [python3] Migrate PRESUBMIT.py files
* Force depot_tools to use python3 results (USE_PYTHON3=True).
* Fixes the dart format presubmit check.
* Remove broken DOM tools presubmit check.

TEST=Manually provoked errors and ran git cl presubmit -v -f.

Cq-Include-Trybots: luci.dart.try.shared:presubmit-try
Change-Id: I8ba46e2ae1640f1b2f82e18bc8024e0aa4838b2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210123
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-08-16 08:29:54 +00:00
Irina Arkhipets
79be5898b4 [co19] LibTests/typed_data tests skipped for dart2js
[co19_2] LibTests/typed_data tests skipped for dart2js

Change-Id: I2e8a93f7991b36367b84678bbfebda36babaf96f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209915
Reviewed-by: Erik Ernst <eernst@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-08-16 08:07:34 +00:00
Paul Berry
f0f94705a4 In ScopeResolverVisitor, don't visit identifiers to the right of ..
There's no need to visit these identifiers because they aren't looked
up using the current scope.  Previously, we avoided doing these
lookups by doing some `is` and `identical` checks in
visitSimpleIdentifier, but it's more efficient (and more
straightforward) to simply avoid visiting the identifiers altogether.

Change-Id: Ibea28e196b206d88f5ad765d3d64a24c7b0e7d5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209855
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-15 03:25:15 +00:00
Paul Berry
6274633ea1 Merge ScopedVisitor with ScopeResolverVisitor classes.
Now that ResolverVisitor no longer deals with scopes,
ScopeResolverVisitor is the only class that inherits from
ScopedVisitor, so we can combine the two.  This makes the code a lot
easier to read and reason about, since we don't have to bounce between
the two classes with super calls all the time.

Change-Id: I308edd1a7181001724b89ffb04499b9a3df25cb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209852
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-08-15 03:25:15 +00:00
Gabriel Castro
fc4d4144fb Added js_util import to html_dart2js
Change-Id: Ic643e3bbf521fa116984a27f504a2642f2052f36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210100
Commit-Queue: Gabriel Castro <gabrielmcastro@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2021-08-13 23:13:31 +00:00
Ben Konyi
d2855e703e [ CLI ] Default to printing CLI usage message instead of VM usage
--disable-dart-dev disables this behavior.

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

TEST=pkg/dartdev/test/commands/flag_test.dart

Change-Id: I46b91abc89fc3ec5e06fa7e9aad3939573cff545
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209264
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-08-13 23:01:51 +00:00
Alexander Markov
af2ec43d44 [vm/compiler] Fix incorrect assertion in LoadOptimizer
Unreachable code can contain LoadIndex/StoreIndex instructions
which take result of AllocateObject as input. For example:

    v5 <- AllocateObject:18(cls=MapEntry, v4, <not-aliased>) T{MapEntry}
    ...
    v33 <- InstanceOf:14(v5 IS String, instantiator_type_args(v0), function_type_args(v0)) T{bool}
    Branch if StrictCompare:18(===, v33, v3) goto (15, 21)
B15[target]:22
    CheckClass:24(v5 Cids[1: _OneByteString@0150898 etc.  cid 82])
    ...
    v51 <- LoadIndexed(v5, v49) [0, 255] T{_Smi}

This assertion was added recently in
https://dart-review.googlesource.com/c/sdk/+/198406.

TEST=vm/dart/regress_46798_test
Fixes https://github.com/dart-lang/sdk/issues/46798

Change-Id: I9d8627768c9f477b187f2b67d70f0a9fc7d952be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210180
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-08-13 22:18:17 +00:00
Devon Carew
3365b77ac2 use code from package:devtools_shared
Change-Id: Ie16400c7c216fb165fb5c65a0150e37b5512ef69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210161
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-08-13 21:54:01 +00:00
Alexander Markov
16ff4aec0e Revert "[vm] Hide internal implementation List types and expose them as List"
This reverts commit 824bec596f.

Reason for revert: b/196606044

Original change's description:
> [vm] Hide internal implementation List types and expose them as List
>
> When taking a type of an instance with x.runtimeType we can map
> internal classes _List, _ImmutableList and _GrowableList to a
> user-visible List class. This is similar to what we do for
> implementation classes of int, String and Type.
> After that, result of x.runtimeType for built-in lists would be
> compatible with List<T> type literals.
>
> Also, both intrinsic and native implementations of _haveSameRuntimeType
> are updated to agree with new semantic of runtimeType.
>
> TEST=co19/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01
> TEST=runtime/tests/vm/dart/have_same_runtime_type_test
>
> Fixes https://github.com/dart-lang/sdk/issues/46893
> Issue https://github.com/dart-lang/sdk/issues/46231
>
> Change-Id: Ie24a9f527f66a06118427b7a09e49c03dff93d8e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210066
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Tess Strickland <sstrickl@google.com>

TBR=rmacnak@google.com,alexmarkov@google.com,sstrickl@google.com

Change-Id: I4c3dddbc358d6ad3b14081706f7aec110a2e0562
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210200
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-08-13 21:40:53 +00:00
Devon Carew
6465ee4ad8 analyze pkg/nnbd_migration on the bots
Change-Id: I8141ce45531bf5d59d5633400746ffe8af44cbf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210162
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-08-13 20:29:43 +00:00
Tess Strickland
cd6fb67103 [vm] Clean up changes around internal-only class ids.
* IsInternalOnlyId -> IsInternalOnlyClassId

* Removes constexpr predicate ClassComesBeforeOtherInternalOnlyClasses()
  used in only two locations and inlines the returned condition.

* Change IsErrorClassId to check <= kUnwindErrorCid instead of
  <= kLastInternalOnlyCid.

TEST=Refactoring, so existing tests.

Change-Id: Ib7dfc89aba16d52733de05687f0ca7055c16e7a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210126
Auto-Submit: Tess Strickland <sstrickl@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-08-13 20:00:41 +00:00
Joshua Litt
7ac9c46977 [dart2js_info] Fix tests after migration.
Change-Id: Idafa7d2ea308cf480fcbdac21b7ae5d783c81a32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210060
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-08-13 18:47:41 +00:00
asiva
1f405bf163 [VM/Runtime] Added a Dart VM initialization state to prevent racy access
to VM state from Dart API calls.

The state is used to protect the following Dart API calls that exhibit
racy behavior
- Dart_Timeline calls (see
  https://github.com/dart-lang/sdk/issues/44814,
  https://github.com/flutter/flutter/issues/74134)
- Dart Native port creation calls
- Dart VM service invocation call

TEST=new C++ api test have been added.

Change-Id: I26f6cff254366e13daff138041037696b3429f69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209761
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-08-13 18:25:31 +00:00
Alexander Markov
824bec596f [vm] Hide internal implementation List types and expose them as List
When taking a type of an instance with x.runtimeType we can map
internal classes _List, _ImmutableList and _GrowableList to a
user-visible List class. This is similar to what we do for
implementation classes of int, String and Type.
After that, result of x.runtimeType for built-in lists would be
compatible with List<T> type literals.

Also, both intrinsic and native implementations of _haveSameRuntimeType
are updated to agree with new semantic of runtimeType.

TEST=co19/LanguageFeatures/Constructor-tear-offs/type_literal_A01_t01
TEST=runtime/tests/vm/dart/have_same_runtime_type_test

Fixes https://github.com/dart-lang/sdk/issues/46893
Issue https://github.com/dart-lang/sdk/issues/46231

Change-Id: Ie24a9f527f66a06118427b7a09e49c03dff93d8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210066
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-08-13 18:20:51 +00:00
Nicholas Shahan
7760548a4b [ddc] Track more dependencies on runtime library
Migrate member accesses of the ddc runtime library to the
`runtimeCall()` and `runtimeStatement()` methods. These properly
track the use of the library when compiling in the expression
compiler.

This fixes an issue where the `dart` library top level name could be
missing if an expression doesn't happen to trigger a code path that
tracks the use of the library.

Change-Id: I44e99d1b424059c0ce63f6df21fca804dafdb05c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210064
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-08-13 17:27:51 +00:00
Paul Berry
8dc6c5ecb0 Allow is or as to follow type arguments in constructor tearoff disambiguation.
Fixes #46888.

Bug: https://github.com/dart-lang/sdk/issues/46888
Change-Id: I780a53a2d5a45a8630935c9be5c886d96ef1a2ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209881
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-08-13 15:41:31 +00:00
Tess Strickland
e8ddc0219f [vm] Abstract out internal-only cid ordering.
* Adds IsInternalOnlyCid, which replaces the old `cid < kInstanceCid`
  check.

* Adds kFirstInternalOnlyCid and kLastInternalOnlyCid, which should be
  used in places that loop over the internal-only cids.

* Adds ObjectComesBeforeOtherInternalOnlyClasses(), which can be used
  with COMPILE_ASSERT in places that assume kObjectCid immediately
  precedes the other internal-only cids.

* Replaces assumption in IsErrorId() that Instance immediately follows
  the internal-only cids with an assumption that the current last error
  cid is the same as kLastInternalOnlyCid.

* Separates out CLASS_LIST_NO_OBJECT_NOR_STRING_... into two pieces to
  make it clearer where to add new internal-only cids and where to add
  new Instance cids:

    * CLASS_LIST_INTERNAL_ONLY, which contains class ids for real
      classes that are VM internal, except for Object.

    * CLASS_LIST_INSTANCE_SINGLETONS, which contains class ids for
      subclasses of Instance that are not part of a separately handled
      group of cids.

TEST=Refactoring, so existing tests.

Change-Id: I9905d5928a592164d58de1f121b9ce669f2b3ce1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210122
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-08-13 13:27:41 +00:00
Dmitry Stefantsov
8246b01c63 [cfe] Add error on static function tearoffs for instantiated classes
Closes #46889.

Bug: https://github.com/dart-lang/sdk/issues/46889
Change-Id: Ifb9242e3093c7e1ffb9d4e5e755bfb4576fbafb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210020
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-08-13 12:47:51 +00:00
Alexander Thomas
300ea14d85 [release] Update checked-in SDKs to 2.14.0-377.4.beta
This is the first time a native arm64 macOS SDK is used for the
checked-in SDK.

Cq-Include-Trybots: luci.dart.try:dart-sdk-mac-arm64-try,vm-kernel-nnbd-mac-release-arm64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: I1eb58350bdb351e6fbb978e0849ba40bcdf7e724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210120
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-08-13 11:02:31 +00:00
Martin Kustermann
d6807670c0 [gardening] Mark dart/byte_array_optimized_test as slow.
The test is flakily timing out on dartk-win-debug-ia32. In general it is
a quite large test and should just be given more time.

TEST=Give dart/byte_array_optimized_test more time, avoid flaky timeout

Change-Id: Ifeadc5f777b019ca4c04c5c8e6072fae1c00c0a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210121
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2021-08-13 10:33:01 +00:00
William Hesse
8776e15f60 [build] Remove runtime_kernel target from GN build
Remove the runtime_kernel target and all uses of it in scripts or
the test matrix.  This runtime_kernel target is only an alias for
the runtime target, now that kernel is the default.

BUG=https://github.com/dart-lang/sdk/issues/46892

Change-Id: I00c0ecf8adbd7bff3fd3df48023a2976c5172066
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210000
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: William Hesse <whesse@google.com>
2021-08-13 10:09:41 +00:00
Robert Ancell
fb861597e4 Remove workaround for MSAN bug.
This was fixed in MSAN in March 2020.

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

TEST=vm-kernel-msan-linux-release-x64-try

GitOrigin-RevId: 8cb1476c774182181776598d2cc6668fd7435897
Change-Id: I583ccb4782a0f3d6b63ee34b856aa646c6b3f27f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205637
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2021-08-13 09:51:21 +00:00
Michael Thomsen
cfc3a654a5 Update SDK constraint in templates of the dart tool to enable
new languge features in 2.14


Change-Id: I731cebcb394ba17cd3a46ac92ae74cc6bf307de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209916
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-08-13 09:39:01 +00:00
Ahmed Ashour
eae58445e9 Fix typo in test comment
Bug: 46898
Change-Id: I5a62a055fc24af5d55fd163a1783550e11c7ad7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210001
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-08-13 08:39:41 +00:00
asiva
b2b8e59b28 [VM/Runtime] Fix racy closing of sockets between the finalizers/event
handler

Sockets could be closed from multiple threads (finalizers run during
isolate shutdown and the event handler thread). This leads to potential
racy behavior.
(See https://github.com/dart-lang/sdk/issues/45641)

TEST=ci

Change-Id: I87900117a4194a71433680f68ed9b6dd31977403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209849
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2021-08-13 01:08:51 +00:00
Robert Nystrom
67e7924365 Migrate pkg/smith to null safety.
Change-Id: Icac415945e6aec26d646d4cdf5a29a79051a9127
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209848
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-08-12 22:50:50 +00:00
Stephen Adams
66a2caea6a [dart2js_runtime_metrics] Allow exporting internal library
Change-Id: I4447e1f9c806ae28bf56720015f1741199c17281
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210063
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-08-12 22:47:22 +00:00
Ryan Macnak
5cec85d5ce [standalone] Remove use of dart::VirtualMemory from the standalone embedder.
Fixes the standalone embedder's ELF loader using the VM's compressed heap after Dart_Cleanup.

This removes the last non-test layering violation of runtime/bin files including runtime/vm files.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/46810
Bug: https://github.com/dart-lang/sdk/issues/46880
Change-Id: I6c430ae61c057016f7cd56188879a9ccb3699d30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209847
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-08-12 21:30:10 +00:00
Robert Nystrom
61109c447a Bump dart_internal to support Dart 2.15.
Change-Id: I459caf39d812d7c9e799617cf59f38c138b14d32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210062
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
2021-08-12 21:21:01 +00:00
Robert Nystrom
9e4cbbbe78 Migrate pkg/status_file to null safety.
Change-Id: Ic6627a64a3ee72a6f14aadf59ee87e21e64e3664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209781
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-08-12 20:33:30 +00:00
Danny Tuppeny
c010c1d54f [dds] Add support for showing Maps in variablesRequests for DAP
Change-Id: I92379f4f9d300d2cdbd209bb77259acdcad7a089
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209914
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-08-12 20:27:30 +00:00
Danny Tuppeny
57e41b122e [dds] Include evaluateNames in returned variables
Change-Id: I26173d7b618baf431a9fa01d6e8461800427b015
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209912
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-08-12 20:27:30 +00:00
Ryan Macnak
e6b05a7a90 [vm, isolate] Also apply fast copying to an isolate's initial message.
Add missing checks for FFI types disallowed in isolate messages.
Align error messages with the other serializer and test expectations.

TEST=ci
Change-Id: I3813dd8f26e5122524bdf41f9ce6e0785fdd260b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209840
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-08-12 20:25:30 +00:00
Mateus Felipe C. C. Pinto
29419292d5 Fix little typo in introduction
Closes https://github.com/dart-lang/sdk/pull/46382
https://github.com/dart-lang/sdk/pull/46382

GitOrigin-RevId: 33d13aff967bb222dbefb29cfd9a21f0d139c886
Change-Id: I1c4905337ef748c312c960fbb684dee8b8d3011c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203920
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-08-12 18:49:28 +00:00
Alexander Markov
b9cc309467 [vm] Instantiate types of parameters in constructor tear-offs from generic classes
When copying types of parameters from a constructor to a signature of
its tear-off, types should be instantiated to substitute class type
parameters with function type parameters.

For example,

  class A<T> {
    A(T x);
  }

  A.new // Should be 'A<S> Function<S>(S x)'

Without instantiation the parameter type would still reference class
type parameter:

  A<S> Function<S>(T x)

As a result, Closure::GetInstantiatedSignature would replace
class type parameters with dynamic (as tear-off doesn't have
instantiated type arguments) which is not correct:

  A<S> Function<S>(dynamic x)

TEST=co19/LanguageFeatures/Constructor-tear-offs/summary_A01_t01
(after https://github.com/dart-lang/co19/issues/1141 is fixed)

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

Change-Id: I0517c400271e2a59ab0496a8cc39be51022768b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209851
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2021-08-12 17:42:19 +00:00
Alexander Thomas
3674c91224 [co19] Roll co19_2 to 7637bcb24abf21b5e2f8dd24d3fe619f777391f5
2021-08-10 irina.arkhipets@gmail.com Issue 1094: tests corrected, missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1094: I-2-b test corrected.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Int32x4 tests updated to check expectations for web correctly.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Int32x4List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1094: Utils/tests/Expect tests corrected.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Uint32List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Uint16List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Uint8List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Uint9ClampedList tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Int32List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Int16List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Int8List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Float64List tests updated to check expectations for web correctly. Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1094: Missing Issue tag added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Float64List tests updated to check expectations for web correctly.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Float32x4List tests updated to check expectations for web correctly.
2021-08-10 irina.arkhipets@gmail.com Issue 1094: Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Float32List tests updated to check expectations correctly for web.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/ByteData tests updated to check expectations correctly for web.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/ByteBuffer tests updated to check expectations correctly for web.
2021-08-10 sgrekhov@unipro.ru 1134. Read Dart --help from stdout on Windows
2021-08-09 irina.arkhipets@gmail.com Issue 1094: changes in master moved to pre-nnbd branch for LibTests/math tests.
2021-08-09 irina.arkhipets@gmail.com Issue 1094: changes in master moved to pre-nnbd branch for LibTests/Isolate.
2021-08-09 irina.arkhipets@gmail.com Issue 1094: LibTests/io/ZlibDecoder, LibTests/io/ZlibDecoder tests corrected.
2021-08-09 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd branch for LibTests/io/WebSocket/isEmpty_A01_t01.
2021-08-09 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd branch for LibTests/io/SystemEncoding folder.
2021-08-09 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd branch for LibTests/io/stdin folder.
2021-08-09 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd branch for LibTests/io/RawSecureServerSocket folder.
2021-08-09 irina.arkhipets@gmail.com Merge branch 'pre-nnbd' of https://github.com/dart-lang/co19 into pre-nnbd
2021-08-09 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd branch.
2021-08-09 sgrekhov@unipro.ru 1100. Fix Link.watch() test to avoid flakiness
2021-08-06 sgrekhov@unipro.ru 1127. Expect compile-time errors in CFE for cyclic redirecting factories participating in a loop
2021-08-04 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/io/ProcessSignal
2021-08-04 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/io/ProcessResult
2021-08-04 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/io/Process
2021-07-29 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/io/Link
2021-07-29 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/io tests: FileSystemModifyEvent, HttpClient, HttpClientBasicCredentials, HttpClientDigestCredentials, HttpClientRequest, HttpClientResponse, HttpServer, IOSink.
2021-07-29 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/io/Directory, LibTests/io/File, LibTests/io/FileStat folder.
2021-07-29 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/io/Cookie folder.
2021-07-29 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/core/double, LibTests/core/int folders.
2021-07-29 irina.arkhipets@gmail.com Issue 1094: changes from master moved to pre-nnbd for LibTests/core folder.
2021-07-26 irina.arkhipets@gmail.com Issue 1094: changes from master merged, tests corrected in co19_2.
2021-07-23 irina.arkhipets@gmail.com Issue 1094: missing issue tags added, changes frim master merged, tests corrected in co19_2.
2021-07-22 irina.arkhipets@gmail.com Issue 1094: test corrected.
2021-07-22 sgrekhov@unipro.ru Fixes 1123. Expect Syntax errors in multitests and rename these tests to 'syntax*'
2021-07-21 irina.arkhipets@gmail.com Issue 1119: Libraries_and_Scripts test updated in pre-nnbd branch, new tests added.
2021-07-01 irina.arkhipets@gmail.com Issue 1094: tests updated.
2021-06-28 irina.arkhipets@gmail.com Issue 1094: test corrected according to the Issue 42393 evaluation.
2021-06-28 irina.arkhipets@gmail.com Issue 1094: Recent master changes merged into pre-nnbd branch, missing Iuuse tags added,test corrected (Language/Generics).
2021-06-28 irina.arkhipets@gmail.com Issue 1094: Recent master changes merged into pre-nnbd branch, missing Iuuse tags added,test corrected.

Change-Id: I00818cae18d84c3e2e7c628ed4370ff31c52d509
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209919
Reviewed-by: William Hesse <whesse@google.com>
2021-08-12 13:43:55 +00:00
Alexander Thomas
1c06d14fce [co19] Skip broken tests also in co19_2
https://github.com/dart-lang/co19/issues/1137

Change-Id: I32e81daed87ad8943023ad923fddd686b3b2362e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209961
Reviewed-by: William Hesse <whesse@google.com>
2021-08-12 10:55:21 +00:00
Alexander Thomas
8d28c12952 [co19] Roll co19 to 3bbf92369652b6ba0b347516dabd1ed2193eb5c6
2021-08-12 sgrekhov@unipro.ru Fixes 1144. Use Pointer<Int32> on 32-bit platforms
2021-08-12 sgrekhov@unipro.ru Fixes 1142. Fix tests  expectations
2021-08-12 sgrekhov@unipro.ru Fixes 1143. Set called flag to true when constructor called
2021-08-12 sgrekhov@unipro.ru Fixes 1141. Fix typedefs in co19/LanguageFeatures/Constructor-tear-offs/summary_A01_t01 test
2021-08-12 sgrekhov@unipro.ru Fixes 1140. Typo fixed
2021-08-12 sgrekhov@unipro.ru Fixes 1139. Fix typo in test expectations
2021-08-11 sgrekhov@unipro.ru Fixes 1136. Make LanguageFeatures/Constructor-tear-offs/tearing_off_from_typedef_A07_t01 test stronger
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Int32x4 tests updated to check expectations for web correctly.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/Int32x4List tests updated to check expectations for web correctly.
2021-08-10 irina.arkhipets@gmail.com Issue 1094: Missing Issue tags added.
2021-08-10 irina.arkhipets@gmail.com Issue 1135: LibTests/typed_data/ByteBuffer tests updated to check expectations correctly for web.
2021-08-10 sgrekhov@unipro.ru 1134. Read Dart --help from stdout on Windows
2021-08-10 sgrekhov@unipro.ru Fixes 1130. Test rewritten to test what is said in description
2021-08-10 sgrekhov@unipro.ru Fixes 1133. Typo in constructor tear-off test fixed
2021-08-10 sgrekhov@unipro.ru Fixes 1132. Typo in test expectations fixed
2021-08-10 sgrekhov@unipro.ru Fixes 1131. Compare lists using 'listEquals'

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-debug-x64-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-arm64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-win-release-x64-try
Change-Id: I6681b0a5c75aad70498e920b2fe47fe56d257853
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209918
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-08-12 10:31:11 +00:00
Martin Kustermann
0ce43763a2 [vm/concurrency] Check for message deserialization errors in isolate spawning
Fixes https://github.com/dart-lang/sdk/issues/46878

TEST=vm/dart{,_2}/regress_46878_test

Change-Id: Iaf497b0ca6efab4f9982c50f7e55b165c47fd057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209905
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-08-12 09:44:58 +00:00
Danny Tuppeny
659464ac3c [dds] Add support for Log Points to DAP
Change-Id: I74dca1871d3c6b826aafecbb6425604d43b9262f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209704
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-08-12 00:32:27 +00:00
Jake Macdonald
e46f6da720 Update matcher
Note that there was a bug fix to `stringContainsInOrder` which does change the behavior.

Change-Id: I2ee39116f2704e6e196d7ab26d924726d4d801d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209844
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2021-08-11 23:51:07 +00:00
Ben Konyi
83283a553e [ package:dds ] Prevent invalid DDS instance from being returned after
shutdown during initialization

Subtle event queue execution ordering could result in an invalid DDS
instance being returned with the HTTP server instance not yet being
initialized. Calling shutdown() on this instance would cause a
LateInitializationError when trying to cleanup the server.

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

Change-Id: Idf1f271925d244811af4b61b3161ddcbc05c52eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209846
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-08-11 23:36:27 +00:00