Commit graph

79855 commits

Author SHA1 Message Date
Zach Anderson 5dc1f8db8c Trim abstract unix socket path length
Fixes https://github.com/dart-lang/sdk/issues/46149

TEST=unix_socket_test
Change-Id: Icc5273941f880f581cc2621431b5cecb7782c71e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201441
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-27 21:50:24 +00:00
Alexander Aprelev f827c53315 [vm/transferable] Adjust the test so it throws OOM on bionic.
Bug: https://github.com/dart-lang/sdk/issues/46167
Change-Id: I99d4d4584605414ef1438a5b2cd1d9666b654a8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201641
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-05-27 21:35:24 +00:00
Joshua Litt 6a4bd42396 [dart2js] Create set of uppercase reserved symbols.
Change-Id: I07958be1832041a80db9c9dc6281270460d530a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201360
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2021-05-27 19:29:14 +00:00
Sam Rawlins 9f85dc07a7 Improve quality of @protected doc comment
Fixes https://github.com/dart-lang/sdk/issues/29804

Start doc comment with a single-sentence summary.
https://dart.dev/guides/language/effective-dart/documentation#do-start-doc-comments-with-a-single-sentence-summary

Separate the first sentence of a doc comment into its own paragraph.
https://dart.dev/guides/language/effective-dart/documentation#do-separate-the-first-sentence-of-a-doc-comment-into-its-own-paragraph

Replace text which refers to "using" an "invocation" of a member with text which refers to "referencing" a member.

Explicitly call out mixins and superclass constraints.

Improve language around using "this" as a receiver.

Attempt to use more straightfoward sentences.

Change-Id: Ib465b640c217d3759455611116aef0545b5665fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201445
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-05-27 18:41:24 +00:00
Ben Konyi 71238faee8 [ benchmark ] Use '.' instead of '_' to represent sub-benchmarks in SDKArtifactSizes
Change-Id: Ia47f9565025b79440aa179a215db2d7a95b744e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201582
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-27 18:14:14 +00:00
Brian Wilkerson f09b484cca Fix a couple of bugs in DocumentationCache
Change-Id: I66a890a1aebc39d9cf11acd82d285b2328574102
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201581
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-27 17:55:54 +00:00
Alexander Aprelev 39dead4394 [io] Ensure bcrypt.lib is declared as a lib dependency for downnstream users.
Follow-up to 1731050b29

TEST=ci

Change-Id: Ic9119069bc58af71787e225b0efbc1d79155f0c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201580
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2021-05-27 17:26:54 +00:00
Konstantin Shcheglov e021d0c171 Prepare for keeping elements created during linking.
Mostly set informative data that was previously omited because we
were setting it during loading from bytes.

Change-Id: I68a527a21628ee57ad0e574b34b7415d866159a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201500
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-27 17:12:54 +00:00
Ryan Macnak 266ad2a568 [vm, service] Include mapped files in GetProcessMemoryUsage.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/46166
Change-Id: I66322c70e066bb89c1d568848e17f2ec4f8552d3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201444
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-05-27 17:10:05 +00:00
Jens Johansen 33aac34b02 [CFE] Reproduce crash Class.superclassConstraints RangeError
```
Crash when compiling null,
at character offset null:
RangeError (index): Invalid value: Valid value range is empty: 1
#0      List.[] (dart:core-patch/growable_array.dart:254:60)
#1      Class.superclassConstraints (package:kernel/ast.dart:1090:73)
#2      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#3      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#4      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#5      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#6      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#7      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#8      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>
```

or with assertions enabled:

```
'package:kernel/ast.dart': Failed assertion: line 1087 pos 14: 'currentClass.implementedTypes.length == 2': is not true.
#0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:46:39)
#1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:36:5)
#2      Class.superclassConstraints (package:kernel/ast.dart:1087:14)
#3      ClassBuilderImpl.checkMixinApplication (package:front_end/src/fasta/builder/class_builder.dart:801:51)
#4      SourceLoader.checkMixins (package:front_end/src/fasta/source/source_loader.dart:1165:19)
#5      KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:339:14)
<asynchronous suspension>
#6      withCrashReporting (package:front_end/src/fasta/crash.dart:121:12)
<asynchronous suspension>
#7      Outline.run.<anonymous closure> (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1850:21)
<asynchronous suspension>
#8      Outline.run (file:///usr/local/google/home/jensj/code/dart-sdk/sdk/pkg/front_end/test/fasta/testing/suite.dart:1837:12)
<asynchronous suspension>
#9      ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>
```

Bug: https://github.com/dart-lang/sdk/issues/46161

Change-Id: I452729ae4b3d0a14528ea2dda51de14185bb965b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201562
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-27 13:23:24 +00:00
Jens Johansen db6f72212b [CFE] Crash on recompile: TypeBuilderComputer.visitInvalidType 'Not implemented'
```
Crash when compiling null,
at character offset null:
Not implemented
#0      TypeBuilderComputer.visitInvalidType (package:front_end/src/fasta/kernel/type_builder_computer.dart:42:5)
#1      InvalidType.accept (package:kernel/ast.dart:10619:42)
#2      TypeBuilderComputer.visitInterfaceType (package:front_end/src/fasta/kernel/type_builder_computer.dart:102:43)
#3      InterfaceType.accept (package:kernel/ast.dart:10896:42)
#4      DillLoader.computeTypeBuilder (package:front_end/src/fasta/dill/dill_loader.dart:117:17)
#5      computeTypeBuilder (package:front_end/src/fasta/dill/dill_class_builder.dart:188:24)
#6      DillClassBuilder.interfaceBuilders (package:front_end/src/fasta/dill/dill_class_builder.dart:156:21)
#7      ClassHierarchyNodeBuilder.build (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:1490:39)
#8      ClassHierarchyBuilder.getNodeFromClassBuilder (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:603:10)
#9      ClassHierarchyBuilder.getNodeFromTypeBuilder (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:608:33)
#10     ClassHierarchyNodeBuilder.build (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:1524:25)
#11     ClassHierarchyBuilder.build (package:front_end/src/fasta/kernel/class_hierarchy_builder.dart:742:14)
#12     SourceLoader.buildClassHierarchy (package:front_end/src/fasta/source/source_loader.dart:1213:46)
#13     KernelTarget.buildOutlines.<anonymous closure> (package:front_end/src/fasta/kernel/kernel_target.dart:332:14)
```

Bug: https://github.com/dart-lang/sdk/issues/46160

Change-Id: Ic9198da47dde1a9c1653bcfa98c55e738ca93e64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201561
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-27 08:39:34 +00:00
Jens Johansen 4f26789bf2 [CFE] Reproduction of type change on recompile
Bug: https://github.com/dart-lang/sdk/issues/46159

Change-Id: I2d628eb803e6b29c40ddb666e496f8fc98727960
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201560
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-27 08:16:24 +00:00
Sergey G. Grekhov a7273673a4 [co19] co19_2 status file cleanup
Change-Id: I69c7d0daf01dca4b84dfc84286d1bb2fa067a4a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201480
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2021-05-27 08:15:04 +00:00
Johnni Winther 8453731dfd [cfe] Migrate wave 8+9
Change-Id: I6d95247fa088dba2f887e799c1cac6acd8456402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201403
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-05-27 07:59:54 +00:00
Daco Harkes b0bfee6627 [benchmarks/vm] Add benchmarks for #45908
The implementation of const map literals is based on linear lookups in
an array containing key/value pairs instead of a hash table.

Bug: https://github.com/dart-lang/sdk/issues/45908

Golem CL:
https://chrome-internal-review.googlesource.com/c/golem/+/3852562

Change-Id: If0a980339ee1342c41f9388e0bd7b3615a4ef4e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200188
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-05-27 07:54:14 +00:00
pq f00dc3d056 @useResult verification
See: https://github.com/dart-lang/linter/issues/1888

Change-Id: I3d5ed31f3a1dd0d69da5f47ae38496a4fe6051c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201160
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-05-27 00:26:54 +00:00
Sam Rawlins fd8607c8f4 Implement inference_failure_on_function_invocation checks
The "inference failure" checks implemented here are long overdue. They
are part of the strict-inference spec [1]. I think I caught most function
invocation cases. All of the work done to determine which error to report
and whether @optionalTypeArgs is annotated is done _after_ the check
for whether strict-inference is enabled, so this should have no effect
on code which does not opt in to that mode.

[1] https://github.com/dart-lang/language/blob/master/resources/type-system/strict-inference.md#function-call

Bug: https://github.com/dart-lang/sdk/issues/33749 and
Change-Id: Ic1d4321fb289acb118e0dbddd48ff917ad39d69a
https://github.com/dart-lang/sdk/issues/45371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201321
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-05-26 21:02:42 +00:00
Brian Wilkerson 6de639b71f Move TargetKind.displayString from analyzer to meta
Change-Id: Ifa24fb96c97c6b7a2f27794e671672796c56331e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201460
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-26 19:37:40 +00:00
Dmitry Stefantsov f81de15da7 [cfe] Add first portion of tests for constructor tearoffs feature
Change-Id: I868849ce96d2bfcbc05e7afc131a9fe43a83949c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201261
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-26 18:12:00 +00:00
Ryan Macnak 26f50368d2 [build] Check that a second Ninja invocation does nothing.
Not checking Windows, where the set of linker outputs is not constant.

Change-Id: I1241aa4108f7feebc2638ca762743464fcb48a52
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201165
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-05-26 17:48:30 +00:00
Danny Tuppeny f9b6901baf [dds] Add a basic DAP server that can run simple Dart scripts
Change-Id: I0f10b81b0b9ad3875727f606dd1a5a44798486b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201263
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-05-26 17:22:00 +00:00
JustWe 3422467426 [analyzer] bugfix: never's type should be an type-type, but not neverType or dynamicType.
try to fix: https://github.com/dart-lang/sdk/issues/45399

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

GitOrigin-RevId: 96c3ba69635c310f5352ae7eb6a6344ef5f1495a
Change-Id: I25cce181070f8e097721ab6e3f08071ea7162360
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196641
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-26 16:29:50 +00:00
Alexander Markov a3767f7db8 [vm/compiler] Generate non-speculative Unbox instructions for Phis
TEST=runtime/tests/vm/dart/regress_flutter83094_test.dart
Issue https://github.com/flutter/flutter/issues/83094

Change-Id: Ib4eebc993e06f6925f11bd18e5f29f22ba3c6322
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201363
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2021-05-26 16:02:10 +00:00
Alexander Aprelev ee0952d8f5 [vm/concurrency] Grab read isolates_lock when iterating over isolates.
When iterating over isolates in IsolateGroup::RegisterStaticField we need to grab read isolates_lock
to prevent data races as isolates_ list might be being updated.

TEST=generated_stress_test

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

Change-Id: I46b9826a268d38d07b1aeec9362de3e5945642fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201342
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-05-26 15:55:19 +00:00
Daco Harkes 939960ca0c [cfe/ffi] Remove dead code
TEST=tests/ffi

Change-Id: Idf2a81d186393aa507ef66c162cd9f080b9b534d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201404
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-05-26 15:29:00 +00:00
Paul Berry 784812418c Fix error recovery for : super.<keyword>() / : this.<keyword>()
Previously, if a keyword was used in place of a constructor name in a
constructor initializer list, it caused an analyzer crash, because as
part of error recovery, the AST builder would try to create a
SuperConstructorInvocation or a RedirectingConstructorInvocation using
a null argument list.  This CL fixes the problem by creating a
synthetic argument list.  It re-uses logic that previously existed for
creating a synthetic argument list.

To avoid a crash happening later in analysis, it was also necessary to
modify the AST cloner so that when it encounters the `(` and `)`
tokens in the synthetic argument list, it is able to clone them even
though they are not in the token stream.  (Note that this is not an
ideal solution; I would have rather inserted the `(` and `)` into the
token stream, but with the current parser architecture there's no good
way to do this without the parser then trying to interpret those
tokens).

Change-Id: Ibbdcdd956d80c16d427ba1ba7a9cd7ce374e941b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201282
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-05-26 13:50:12 +00:00
Daco Harkes 50640bdb81 [vm/ffi] Fix ia32 struct by value return with no arguments
On IA32 arguments are passed in registers. When a struct is returned
by value, a pointer is passed in on the stack containing the address to
which the return value is written. We did not account for this pointer
in the stack-height calculation.

This problem only surfaced when there are no arguments to the function.
Because if an argument is passed it has a higher stack height than the
pointer for the result being passed in.

Fix in: runtime/vm/compiler/ffi/native_calling_convention.cc

TEST=runtime/vm/compiler/ffi/native_calling_convention_test.cc
TEST=tests/ffi/regress_46127_test.dart

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

Change-Id: Ia78fe07cc7e3a3c8625143d491935a959b4a7895
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201269
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-05-26 13:37:32 +00:00
Tess Strickland 45b51f9ab6 [vm/tests] Fix vm/dart/disassemble_aot_test.
Bug: https://github.com/dart-lang/sdk/issues/46143

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-mac-release-simarm64-try,vm-kernel-precomp-win-release-x64-try
Change-Id: I2fa01046030471266c04b233adbd0016ec67ea82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201270
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-05-26 13:25:32 +00:00
Jens Johansen 57e467b6ee [CFE] Speedup test_generator_test by not verifying platform for every compile
Fixes https://github.com/dart-lang/sdk/issues/46088

Change-Id: Id46b06c90f68fa93300cbfbd8f4e0914e11abb35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201400
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-05-26 12:33:52 +00:00
Daco Harkes 1d38c98b69 [vm/ffi] Fix CFE crash on missing Array sizes
Closes: https://github.com/dart-lang/sdk/issues/46085

TEST=tests/ffi/regress_46085_test.dart

Change-Id: I04e05baccb6eb490ef32702677e3d5c1bb815560
Cq-Include-Trybots: luci.dart.try:vm-kernel-nnbd-linux-debug-x64-try
Fixed: 46085
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201264
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-05-26 11:02:22 +00:00
Johnni Winther e817b2d05a [cfe] Migrate kernel/collections.dart
Change-Id: I2cfb17e8afd75e966688d8c3a142378efdf29025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201265
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-05-26 10:28:52 +00:00
Daco Harkes cd0f6aed25 [vm] Replace KernelConstantsMap with array
This CL replaces the KernelConstantsMap (backed by an Array that got
replaced on growing) by an Array that is allocated to be the required
size.

Does not cache the start of the constants table in the constructor
as proposed in [1], because the constants table is null when the
ConstantReader constructor is called in the KernelLoader constructor.

[1] https://dart-review.googlesource.com/c/sdk/+/196925/6..10/runtime/vm/compiler/frontend/constant_reader.cc#b116

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

TEST=vm test suite, including GC tests.

Change-Id: Ie111bedc7eb7fcd627ab700a9906245bc7dd14ce
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try
Fixed: 45903
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200871
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-05-26 09:41:42 +00:00
Tess Strickland 1d0bac85bc [vm/compiler] Create AllocateObjectABI struct in constants.
Also make all other Allocate*ABI structs explicitly use the same result
register as AllocateObjectABI for consistency.

TEST=Refactoring, so existing tests.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-linux-debug-simarm64c-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-x64-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-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try
Change-Id: Iede8ff499ae3e7741e57090c36bc6b5dcc9217b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201184
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2021-05-26 09:39:22 +00:00
Tess Strickland 619f46cd19 [vm/compiler] Various cleanups involving CreateArrayInstr.
* Rename values and methods like kElementTypePos or element_type() to
  corresponding names like kTypeArgumentsPos or type_arguments() (since
  the input to CreateArrayInstr is the type arguments vector for the
  array, not just the type of the element.)

* Create a AllocateArrayABI struct for the input and output registers of
  the AllocateArray stub and use those where applicable.

* Explicitly list what registers are clobbered in the AllocateArray
  stubs in their documentation comment.

* Avoid clobbering the type arguments input register in the arm64
  version of AllocateArrayInstr, so all input registers are preserved
  across all architectures.

TEST=Refactoring, so existing tests.

Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-linux-debug-simarm64c-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-linux-debug-x64-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-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try
Change-Id: I3a7c2b6afdd307c26f8d4f97a4c8bd7684e7b242
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201183
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-05-26 09:39:22 +00:00
Johnni Winther 10cabb4d08 [cfe] Emit deprecation info for dartext: in 2.14
Closes #45758

Change-Id: I05384487ef1ef9f718a3123f8217c9aa3d4d8f32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200879
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-05-26 08:50:32 +00:00
Konstantin Shcheglov 9aa7e922f2 Add more data to debug no elements in libraryUnit.units
Change-Id: I66c1283924a9003069cfcd9625cb965cb131188c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201380
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-26 06:32:32 +00:00
asiva 4dea737439 [VM/tests] issue/45618 - Avoid large outputs from tests
Change-Id: I382541458eb618fa9e02b19fee0781ddcc8a2e55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201169
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2021-05-26 06:04:01 +00:00
Konstantin Shcheglov aa426380b9 Remove deprecated reportConstEvaluationErrors.
Change-Id: I855478bde75cfd674ec64eec8b98debda2ed6bf3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-26 05:09:41 +00:00
Brian Wilkerson 9556697681 Suggest functions returning void as tearoffs where a void returning function is expected
Closes: https://github.com/dart-lang/sdk/issues/23984
Change-Id: I8291687d962a5d2885e5fa811167ca7e12aedc1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201286
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-05-26 04:23:11 +00:00
Konstantin Shcheglov c9e78967d3 Add StringInterpolation.firstString and lastString.
There are several places in linter where we cast unconditionally.

Potentially we could also have `firstExpression` because there is
always at least one.

Change-Id: I9c3e754de6c8872941c1f1a47e36a6cbd3714b4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201362
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-05-26 02:31:11 +00:00
bdbai 1731050b29 Use BCryptGenRandom for Crypto::GetRandomBytes on Windows
The current implementation of Crypto::GetRandomBytes on Windows calls
`rand_s` repeatedly until the buffer is completely filled. However,
`BCryptGenRandom` already provides the similar functionality to fill the
whole buffer at once and thus there is no need to maintain a handcrafted
implementation any more.

TEST=ci

Change-Id: I52d990b01b59be872d825f2aa0e30b500a6d3e36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200160
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-05-26 01:55:11 +00:00
Konstantin Shcheglov 987ab6a815 Remove astBytes from linker and bundles.
Change-Id: If7adbe45379acf397a58e8915afb54bfbe72d491
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201340
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-26 01:47:11 +00:00
Alexander Markov 7e76ac60b2 [vm] Generate new invocation node is FFI transformers
This change replaces generation of old invocation AST nodes
(such as PropertyGet, PropertySet and MethodInvocation) in FFI
transformers with new nodes (InstanceGet, InstanceSet,
InstanceInvocation). The old nodes will be deleted eventually.

TEST=existing tests

Issue: https://github.com/dart-lang/sdk/issues/45340
Change-Id: I7c01cc23c257514b4c89295a31ce63c947c18e23
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201222
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-05-26 01:21:12 +00:00
Konstantin Shcheglov d2682070f4 Use explicit FileContentCache instance for AnalysisContextCollectionImpl.
Previously we cached file contents implicitly, using Expando on top
of ResourceProvider. This is somewhat dangerous, and does not allow
us to decide when to cache, and when to invalidate.

Change-Id: I5c93ac22f217bb2baba6b7f6e73fc05f1c674e75
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201233
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-26 00:54:01 +00:00
Konstantin Shcheglov d97bd97957 Prepare to publish analyzer 1.7.0
Bug: https://github.com/dart-lang/sdk/issues/46136

Change-Id: I020cdf79b6ae55b93fe14b22c0365cb2deb34b3c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201344
Reviewed-by: Janice Collins <jcollins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-26 00:32:51 +00:00
Bob Nystrom 43260485de Revert "Rename a regression test so that the test runner runs it."
This reverts commit c362bc085c.

Reason for revert: Causes out-of-memory on CI.

Original change's description:
> Rename a regression test so that the test runner runs it.
>
> Change-Id: I5effc1641b08e4249da9945e638e3b2cb4f0024c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201226
> Auto-Submit: Bob Nystrom <rnystrom@google.com>
> Commit-Queue: Bob Nystrom <rnystrom@google.com>
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>

TBR=lrn@google.com,rnystrom@google.com

Change-Id: Ic0c234a4b48cd51b500224d12acd7605928aa405
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201381
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
2021-05-25 23:38:02 +00:00
Konstantin Shcheglov e2756ed50a Prepare to publish meta 1.4.0
Change-Id: I299ab2d6427a732447d1f0f2586a75055960b0d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201343
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Janice Collins <jcollins@google.com>
2021-05-25 23:35:01 +00:00
Robert Nystrom c362bc085c Rename a regression test so that the test runner runs it.
Change-Id: I5effc1641b08e4249da9945e638e3b2cb4f0024c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201226
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-05-25 21:31:31 +00:00
Konstantin Shcheglov d696ca2f2b Prepare to publish analyzer 1.6.0 and _fe_analyzer_shared 22.0.0
Change-Id: Ib0ffcccad4284c9200a20576221ba1485b5cdf6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201341
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-05-25 21:27:01 +00:00
Regis Crelier 481a28d6af [VM/runtime] Fix compile-time subtype test involving type parameters with bounds referring to themselves.
Fixes issue https://github.com/flutter/flutter/issues/82890

TEST=added regression test

Change-Id: I69ed52e877b058ae57881c1b0af7e928f6d4f838
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201232
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2021-05-25 19:45:31 +00:00