Commit graph

83886 commits

Author SHA1 Message Date
Chloe Stefantsova ab84be0a88 [cfe] Fix _name field resolution for toString body generation
Part of https://github.com/dart-lang/sdk/issues/47453

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

Change-Id: Ib2934779fc7295c066c1c1580609c933be76b618
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232381
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-11 13:10:16 +00:00
Chloe Stefantsova 0ef68f8ca5 [cfe] Check enum elements against all other members for diplication
Part of https://github.com/dart-lang/sdk/issues/47453

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

Change-Id: Iea4b147eaed19681e227d84a9afc6a1069b1e3fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232380
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-11 12:54:37 +00:00
Johnni Winther 49990c3e69 [cfe] Allow (inferred) void in for loop variables
Closes https://github.com/dart-lang/sdk/issues/48347

Change-Id: Idc8c4c81dac66574c5d24d41c4a81b66fcf34597
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232601
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-11 12:39:27 +00:00
Johnni Winther 2e6d7bf6ec [cfe] Report error on instantiation of enums from .dill
Closes https://github.com/dart-lang/sdk/issues/48350

Change-Id: I0cedf8a5a12e1a8dee546eec73e012519a054e13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232384
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-11 11:24:16 +00:00
Chloe Stefantsova 7263b35932 [cfe] Infer constness in enum element initializers
Part of https://github.com/dart-lang/sdk/issues/47453

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

Change-Id: Iaa75ccac6622e874da5f6e5feb053fc19a220936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232382
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-11 10:09:26 +00:00
Brian Quinlan 98634512f2 Surface errors returned by SSL_read.
TEST=repro in bug & unit test
Bug: https://github.com/dart-lang/sdk/issues/48311
Change-Id: Ib13d0e3c2b98be85533a65532119874ca504f196
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226607
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-02-11 02:07:43 +00:00
Nicholas Shahan 4c1143a048 [ddc] Reset static fields on first get or set
Fixes a memory leak issue where statics that are set but never
read before a hot restart are never reset and the functions to
set them are never garbage collected.

Update and add more tests for this specific scenario that inspect
the number of fields that will be reset during a hot restart.

Change-Id: Id5a56625279c84a37f53253a5ee667758bc22f87
Issue: https://github.com/dart-lang/sdk/issues/48349
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232230
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-11 01:18:01 +00:00
Ryan Macnak 2829bfdf25 [vm] Avoid repeating parameters from prematurely destructuring Dart_InitializeParams.
TEST=ci
Change-Id: I39288fc4d79c5933d5c8b274c0a66bdd25f6bf29
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231529
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-11 00:55:11 +00:00
Devon Carew 7f026d6e46 [dev_compiler] remove the dep on package:cli_util
Change-Id: I34c17dc76a0c608ac3536bfdf2c0e39bb8daa6c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232424
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2022-02-11 00:50:31 +00:00
Elliott Brooks a6c96a4707 Allow Dart DevTools to be embedded in Chrome DevTools.
Change-Id: Iff97f9dbc432ed926d668ac8339c32b679e316ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232482
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
2022-02-10 23:52:41 +00:00
Brian Quinlan 20401b32ec Tests for _HttpClient.shouldCopyHeadersOnRedirect.
TESTED=test change
Change-Id: I3fb27e21eaab05fc812b2b888dfea3b29e0c5648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230600
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2022-02-10 22:34:11 +00:00
Johnni Winther 2a1224f3b5 [cfe] Check primitive equals in legacy libraries
This enables the check for primitive equals in switch cases in
legacy libraries.

Change-Id: Iddc464f39525d5167a5c6e8c40c95acc3c245d76
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231701
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-10 22:13:14 +00:00
Daco Harkes 828dcd00e8 [vm] Implement WeakReference in the VM
This CL implements `WeakReference` in the VM.

* This reduces the size of weak references from 2 objects using 8 words
  to 1 object using 4 words.
* This makes loads of weak reference targets a single load instead of
  two.
* This avoids the fix-point in the GC and message object copying for
  weak references. (N.b. Weak references need to be processed _after_
  the fix-point for weak properties.)

The semantics of weak references in messages is that their target gets
set to `null` if the target is not included in the message by a strong
reference.

The tests take particular care to exercise the case where a weak
reference's target is only kept alive because a weak property key is
alive and it refers to the target in its value. This exercises the fact
that weak references need to be processed last.

Does not add support for weak references in the app snapshot. It would
be dead code until we start using weak references in for example the
CFE.

This CL does not try to unify weak references and weak properties in
the GC or messaging (as proposed in go/dart-vm-weakreference), because
their semantics differ enough.

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

TEST=runtime/tests/vm/dart/finalizer/weak_reference_run_gc_test.dart
TEST=runtime/tests/vm/dart/isolates/fast_object_copy_test.dart
TEST=runtime/vm/object_test.cc
TEST=tests/lib/isolate/weak_reference_message_1_test.dart
TEST=tests/lib/isolate/weak_reference_message_2_test.dart

Change-Id: I3810e919a5866f3ae8a95bd9aa23a880a0b0921c
Cq-Include-Trybots: luci.dart.try:app-kernel-linux-debug-x64-try,dart-sdk-mac-arm64-try,vm-canary-linux-debug-try,vm-fuchsia-release-x64-try,vm-kernel-gcc-linux-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-simriscv64-try,vm-kernel-mac-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-mac-debug-arm64-try,vm-kernel-nnbd-mac-debug-x64-try,vm-kernel-nnbd-win-release-ia32-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-win-debug-x64c-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-kernel-win-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232087
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-02-10 21:59:41 +00:00
Daco Harkes fac4d23799 [vm] Fix serial scavenge asserts in object copy
The serial scavenger was expecting the typed_data field of views.
Fast object copy leaves a null there temporarily.

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

TEST=runtime/tests/vm/dart/isolates/fast_object_copy_test.dart

Change-Id: I72a2785cd9708e72593d35179536a831193d2a44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232260
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-02-10 21:59:41 +00:00
Sam Rawlins e363375777 Bump csslib to remove dynamic calls
Change-Id: Ic524bf0342884411e6b5c87da3a4a94df4e37f28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232300
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-02-10 21:44:01 +00:00
Devon Carew 1a72a4ca8f [analysis server] remove the dep on package:cli_util
Change-Id: I9a3b7b8c23dc324ad62f0d9b456e608d365133c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232423
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 21:27:34 +00:00
Konstantin Shcheglov 4a122c0b5a Add completion tests inside enum declaration.
As we discussed some time ago, it is not clear to me where some
tests should go. Here, I put it into "location" tests, and checked
locations that seem strongly associated with the enum - its header,
its body; including the `WithClause` on the enum.

It is less clear where tests for completion inside the header or
the body of a method inside of an enum should go. I initially
planned to put them into `declaration/enum_test.dart`, but now
starting to doubt. The tests there are currently for using an
enum from outside.

Change-Id: Ife091f82bbb0ad1f26df984be42aa93a78595816
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232421
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 20:26:01 +00:00
Ryan Macnak 50b2a4f32e [vm, compiler] Fix allocate mint stub clobbering registers not blocked by BoxInt64Instr.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/48333
Change-Id: If8e97e34c0e43a0d4cae2a6b88fba2f15ac07e37
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232232
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-10 20:10:01 +00:00
Danny Tuppeny 70d25c7ce7 [analysis_server] Make docs more explicit about positions in LinkedEditGroups
Change-Id: Ifcc8935ac7c72d42fcc0462fd2f6ad3eb8ecd3b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232460
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-10 19:51:13 +00:00
Danny Tuppeny 74248dc6db [analysis_server] Use ConvertToPackageImport fix for always_use_package_imports lint
Fixes https://github.com/Dart-Code/Dart-Code/issues/3823.

Change-Id: I33d1448b36de1927e3e3cc5628d0d822d4f21786
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232265
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-10 19:45:31 +00:00
Nate Bosch d5dd8f2dcf Update to the latest package:mime
R=kevmoo@google.com

Change-Id: I895465864ef658b81907595d5fb0c3f225b07bd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232480
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
2022-02-10 19:43:11 +00:00
Paul Berry 8d84fa5485 Migration: fix handling of annotations that refer to named constructors.
Annotations that refer to named constructors are represented a little
strangely in the AST, with Annotation.name being bound to a
PrefixedIdentifier and Annotation.constructorName being bound to
`null`.  This was confusing the EdgeBuilder, causing it to visit the
class name as though it were an expression, and then crashing because
there was no associated expression type.

The solution is to simply not visit Annotation.name at all, because
there's no way it can have any effect on null safety.

Bug: https://buganizer.corp.google.com/issues/217386404
Change-Id: I2baf0a9e8d63a4a5bbff1b2c5ee2aeec52b2844a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232031
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-10 19:35:51 +00:00
Devon Carew 554b001ad9 [dartdev] adjust the behavior of several 'dart doc' cli flags
Change-Id: I9efdd71da948b87b0fcbcd2b3e242647131462b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232120
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-10 18:55:41 +00:00
Stephen Adams bb2d193aaf Add system list polymorphism cases in Iterators benchmark
Change-Id: Iee3d126370d314609cd25c8ac015fc360c9ae16f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232202
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-02-10 18:38:41 +00:00
Paul Berry 8652944f72 Clean up how negated integer literals are type inferred.
Previously, when upon reaching the integer literal, we would check if
the parent was a PrefixExpression with an operator of `-`, and if so,
use the context type of the PrefixExpression to decide whether to do
an int->double conversion.  This CL moves the logic to the
PrefixExpressionResolver; we now pass down the appropriate context
when visiting the integer literal.

This makes the context handling for negated integer literals less of
an odd exception.

This is part of a larger effort to elimiate the use of
InferenceContext.getContext and InferenceContext.setType entirely.

Change-Id: I6ca63df1adcb706011c146c80c2576814a73926d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231326
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2022-02-10 18:36:51 +00:00
Konstantin Shcheglov 9098b5d12e Increment DATA_VERSION.
Change-Id: Id84b42f083a581a2d391b400ff6868c782a73d4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232420
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-02-10 16:57:11 +00:00
Konstantin Shcheglov 1150b1c2dc Don't build synthetic toString() for enums.
The specification now says that `class Enum` is extended, and
has `external` impelementations of `index` and `toString()`.

Change-Id: I6cb138013722006d570766b87c46ac1c12273dee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232233
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 16:35:31 +00:00
Konstantin Shcheglov 3e4c396b6b Add EnumDeclaration.semicolon
Change-Id: Ib502217f31090c49d1561538b72ef5d98087d569
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232323
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 16:35:21 +00:00
Joshua Litt 4ce081c99b [dart2js] Remove old compiler interface.
Change-Id: If4f98f4d32a42ce8c2aabd98116997934b13b557
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232001
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-10 16:27:25 +00:00
Johnni Winther 1a0e9f941d [cfe] Add macro api test
This adds an initial test for implementation of the macro api that
can be shared between implementations.

The test consists of a set of macros and a library of declarations that
apply these macros. When applied the macros work as unittest tests that
check that the macro api give the expected results for the various
declarations.

Change-Id: Id4183e8ac90fa96ef1ebc01b1c9f15cc413b6443
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232383
Auto-Submit: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-02-10 16:08:00 +00:00
Nate Bosch d2e7094290 Use void return for main in code example
R=lrn@google.com

Change-Id: I4b90edc57532844f4081ddd4eb79541fb1265262
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232200
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-02-10 14:50:51 +00:00
Lasse R.H. Nielsen f9d59cfc24 Documentation update for Future
Example codes added.

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

GitOrigin-RevId: c3d35cd6bb8674fe020c540d07f389aa02845a27
Change-Id: I0fa90d3bb50261dbb5ae05f3b520ac00f8c9bf1c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225161
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-02-10 14:22:52 +00:00
Aske Simon Christensen 8047d623ca Revert "[vm,dart2wasm] Move hash factory code to enable sharing of patch files"
This reverts commit 04372ade5e.

Reason for revert: Flutter PR not rolled into g3 yet.

Original change's description:
> [vm,dart2wasm] Move hash factory code to enable sharing of patch files
>
> By moving the hash map/set factories into their own file, the
> collection_patch and compact_hash patch files can be shared between the
> VM and dart2wasm.
>
> This builds on the preparations from the creation of the file in
> https://dart-review.googlesource.com/c/sdk/+/229905 and listing it in
> the Flutter file lists in https://github.com/flutter/engine/pull/31133.
>
> Change-Id: Ia8f07229af056e59b119008714deecc0c96dd742
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231947
> Reviewed-by: Daco Harkes <dacoharkes@google.com>
> Commit-Queue: Aske Simon Christensen <askesc@google.com>

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

Change-Id: I6342ef0250cc24b36c4c32e86a4769dbaeffafa4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232400
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-10 14:21:52 +00:00
Aske Simon Christensen 04372ade5e [vm,dart2wasm] Move hash factory code to enable sharing of patch files
By moving the hash map/set factories into their own file, the
collection_patch and compact_hash patch files can be shared between the
VM and dart2wasm.

This builds on the preparations from the creation of the file in
https://dart-review.googlesource.com/c/sdk/+/229905 and listing it in
the Flutter file lists in https://github.com/flutter/engine/pull/31133.

Change-Id: Ia8f07229af056e59b119008714deecc0c96dd742
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231947
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-10 12:32:14 +00:00
Chloe Stefantsova 6939628621 [cfe] Pass pre-parsed initializers to resolve super-initizer target
Closes https://github.com/dart-lang/sdk/issues/48286

Part of https://github.com/dart-lang/sdk/issues/47525

Change-Id: Ie8816c407b7ab1b6510e5cf139b88c33728f55a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231948
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-10 10:14:21 +00:00
Jake Macdonald 0c7bf4ba86 add ResolvedIdentifier class, return that instead of a Uri when building augmentation libraries, and use it to determine how to qualify identifiers
The main goal here is to be able to distinguish between instance members and static members, so we know what to prefix and with what.

Change-Id: I5189979cd218f1eba8b30cc39a95632edeaf9579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231981
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-10 09:57:00 +00:00
Sai Sandeep Mutyala 7605a36ab3 Add fix for sort_constructors_first lint.
Bug: https://github.com/dart-lang/sdk/issues/47953
Change-Id: I0c927714f55eddd30d0c3770a3315118f64a160b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232141
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-10 06:03:59 +00:00
Konstantin Shcheglov 6c494313d7 Remove duplicate of toLegacyTypeIfOptOut() in TypeSystemImpl.
Change-Id: I2d58f82a1cf9fa754713288665587e8ee2e296a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232235
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 04:29:17 +00:00
Konstantin Shcheglov 09d3beb5ab Rename analyzer/ tests to WithoutNullSafety.
Change-Id: Id9d500b4970ec84ebaad6c2e4000464f95896d1f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232234
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 04:21:59 +00:00
Konstantin Shcheglov 119eed6f93 Make top-level accessors static.
Change-Id: I28449a218b7613e920c38de57d7eb6d18f8c6176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232231
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-10 04:21:11 +00:00
Alexander Aprelev 4fb3d2afcf Revert "Simplify json parser and eliminate dynamic calls."
This reverts commit e77ea8a17b.

Reason for revert: broke g3 builder, blocking dart->engine rolls

Original change's description:
> Simplify json parser and eliminate dynamic calls.
>
> Tighten types to eliminate some dynamic calls from the core libraries.
> Also remove some unnecessary abstraction from the json parser.
>
> TEST=Existing tests for the library.
> Change-Id: Ieb4cdec5b8c26709b5f70774c392bd373a203113
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231800
> Reviewed-by: Lasse Nielsen <lrn@google.com>
> Reviewed-by: Alexander Markov <alexmarkov@google.com>
> Commit-Queue: Leaf Petersen <leafp@google.com>

TBR=lrn@google.com,leafp@google.com,alexmarkov@google.com

Change-Id: Iec15058734d07c1966d43c1559a35313f59f8009
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232322
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-02-10 03:16:20 +00:00
Sam Rawlins efe0af4cae Add functionality and tests for super-parameters in fixes for Hints and Errors
Change-Id: I8e2c9754f65368ee5d1a243160e844b742506509
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232229
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2022-02-10 02:53:19 +00:00
Ryan Macnak 598fb44709 [vm, ffi] More support for RISC-V.
Fixes cases with passing floats, passing aggregates by value, passing scalars requiring alignment.

The remaining failing tests look like some kind of corruption or register reuse when passing very large numbers of arguments.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/48164
Change-Id: Ibac32d4f291255e1c2eb8fd1b196b3e2f006f610
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231282
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-10 02:05:28 +00:00
Leaf Petersen e77ea8a17b Simplify json parser and eliminate dynamic calls.
Tighten types to eliminate some dynamic calls from the core libraries.
Also remove some unnecessary abstraction from the json parser.

TEST=Existing tests for the library.
Change-Id: Ieb4cdec5b8c26709b5f70774c392bd373a203113
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231800
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Leaf Petersen <leafp@google.com>
2022-02-10 00:07:49 +00:00
Konstantin Shcheglov b66ea5276f Use elements in GetterSetterTypesVerifier, support fields.
Change-Id: I92376ace55845385e69742e0eaadcae407a71a53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232228
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-09 22:36:48 +00:00
Ryan Macnak f64fc409c7 [vm, ffi] Extend calling convention unit tests to consider large numbers of floating point arguments.
Interesting things happen after the 8th and 16th arguments in RV.

TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/48164
Change-Id: I9e068af8a2e6de99541f8e2e9b5c407df42b4197
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232140
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-09 22:07:38 +00:00
Alexander Aprelev d6a4edaf04 Revert "Add the ability to customize socket creation."
This reverts commit a0aeed9faa.

Reason for revert: flutter and g3 buildbot regressions.

Original change's description:
> Add the ability to customize socket creation.
>
> Bug: https://github.com/dart-lang/sdk/issues/42716
> Change-Id: I9e854007f15ed54cc2d85a372bc145e1b90f5967
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231530
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Brian Quinlan <bquinlan@google.com>

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

Change-Id: I55eede1b26e02b215c21339dacaf2a52857bdebd
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/dart-lang/sdk/issues/42716
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232280
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-02-09 21:48:34 +00:00
Konstantin Shcheglov e8c25a56b7 Include enum type parameters into the namespace when resolving identifiers.
Change-Id: I2804e3ace95313b5e2a99bcc679d8965dfff26c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232224
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-09 21:48:31 +00:00
Konstantin Shcheglov 9d11380582 Skip 'values' when checking for CONST_CONSTRUCTOR_WITH_FIELD_INITIALIZED_BY_NON_CONST in enum.
Change-Id: Ie528eff182a7ff176ec339da78de5d47cd0c24aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232226
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-09 21:40:28 +00:00
Konstantin Shcheglov f204bf5ead Navigation for enum constants.
Change-Id: I47c420d29b857dc57d14854255c62e4db5458179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232223
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-09 21:40:19 +00:00