Commit graph

82894 commits

Author SHA1 Message Date
Konstantin Shcheglov c41c6590cd Test index / search for named parameters anywhere.
Change-Id: I471191085a19a63f9def45062b173a473d50c29a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 18:31:57 +00:00
Konstantin Shcheglov 7f01b5fbc7 Feature constant_update_2018 is always enabled, remove checks in tests.
Change-Id: Ic66363fea7d4f550799bd2b509dd618c072196e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221981
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 18:31:47 +00:00
Ryan Macnak 2368c21216 Roll boringssl to 87f316d7748268eb56f2dc147bd593254ae93198.
Includes RISC-V and Windows ARM64 support.

Bug: https://github.com/dart-lang/sdk/issues/38587
Bug: https://github.com/dart-lang/sdk/issues/47824
Change-Id: Ibcc9f9f756f72a0dce257673d431d4a2f2de1d18
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221883
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-12-02 18:21:39 +00:00
Brian Wilkerson 7cee0b97c5 Add support for a replacedBy change in data-driven fixes
The change is somewhat limited (for example, it doesn't allow the
replacement to be in a different library than the original), but I
believe that it's sufficient for the known use cases and can be extended
in future CLs.

Change-Id: Ic9b2ae42244134f63c36c88f3dc790e3655a7037
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221900
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 18:21:37 +00:00
Danny Tuppeny ebe06b7ccd [dds] Add support for additional VM args in DAP
Change-Id: Ib5c17e4f1881b3ca2c0fec72cc93178aaada3f60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221800
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-02 17:16:07 +00:00
Danny Tuppeny 167f83a46b [dds] Add support for passing environment variables to DAP launches
Change-Id: Ie8f9e00d14cb04719b39238a669d86e9540d8189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221941
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-02 17:14:07 +00:00
Konstantin Shcheglov 493afd5c92 Implement Search.declarations() using elements, switch workspace symbols to it.
So, stop using DeclarationsTracker for it.

Change-Id: Ia53c0729e71ddbc4c9bc19902b21b9d621b2235c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221864
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-12-02 16:44:28 +00:00
Lasse R.H. Nielsen 44baaf13b6 Allow code samples to *continue* a prior sample.
We have added more examples, and some of them uses the structure of:
````dart
/// ```dart
/// var x = something;
/// ```
/// and then you can also floo the thing
/// ```
/// x.floo(...);
/// ```
````

The following chunks of the same example can now be written as:

````dart
/// ```dart continued
/// x.floo(...);
/// ```
````

Change handling of imports,
and introduce a `top` template different from `none`.

The `none` template gets nothing for free.
The sample must be completely self-contained.
Is triggered by the sample containing a `library` declaration,
because we can't add anything before that.

The `top` template allows top-level declarations,
but does introduce automatic imports and "samples can expect"
code if the sample doesn't contain `import`s.
Is triggered by top-level declarations other than `library`.

Also some restructuring of the code to make this feature easier
to implement.

Change-Id: If2288147face01efad2ad656aa52183cb4c8b3bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221343
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-12-02 16:37:57 +00:00
Jukka-Pekka Siitonen 65a3e2eb4c Documentation update for Set class
New examples added, small updates to existing documentation

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

GitOrigin-RevId: 599777c3e6d53daef19f4af58161fb79b8db36f9
Change-Id: I905cf6a9249db553a5ec9b8657726589da66d888
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221403
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2021-12-02 15:58:49 +00:00
Johnni Winther 27068ba96b [cfe] Extract _ComponentProblems and InitializationStrategy from IncrementalCompiler
This CL extracts part of the IncrementalCompiler into subcomponents.
This is part of an effort to make the state and state changes of the
incremental compiler more explicit.

Change-Id: I59cbb30558082f4db392d925bb704d03c31ccb90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221940
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-12-02 15:58:47 +00:00
Jukka-Pekka Siitonen 922d2d8d7b Documentation update for Stopwatch
Added example for Stopwatch

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

GitOrigin-RevId: 51fd1a9567090f22b42f59114330b3ce1f1e7a10
Change-Id: I6a497b6b9cf7ab9c120572b6bfd7a551a2016f59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221402
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-12-02 15:41:32 +00:00
Johnni Winther 6b4b1a0fef [cfe] Reimplement topological sort
This replaces the previous implementation (and the topological sort of
classes, on which it was based) which was O(|vertices|*|edges|). The new
implementation is O(|vertices|+|edges|).

Change-Id: I4f5f1e63b4c7dd67d6f17c087724c20d4d33bf83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221820
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-12-02 15:31:37 +00:00
William Hesse bc9f2bdc88 [infra] Remove old pub/sub processing of results
The results are now updated by the builder, so the builder status
does not need to poll the database for the results to finish processing.

The script is also migrated to null safety.

Change-Id: I7913f7fb0a8eedc074a4b79eb75c1c2813525c17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221780
Commit-Queue: William Hesse <whesse@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-12-02 13:14:27 +00:00
Daco Harkes aa27868c84 [vm/ffi] Support missing info in marshaller
When ABI-specific integers are introduced, their mappings can be
partial. We need to account for this in the marshaller.

This CL refactors the marshaller API to take an char** error return
parameter and changes the return type to a pointer (nullable) rather
than a reference.

Note that with only this CL we can not generate errors yet, because all
native types are still complete.

TEST=runtime/vm/compiler/ffi/native_type_vm_test.cc
TEST=tests/ffi*

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

Change-Id: Id97e73795c357e129e6280e8c5b528d18072c14d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221632
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-12-02 12:10:27 +00:00
Daco Harkes cda2289ecf [vm/ffi] clean up kernel_il_cc formatting
In https://dart-review.googlesource.com/c/sdk/+/221360 I requested using
macros for repetitive cases in switch statements.

Turns out that this is harder to read than just the list of cases.

Also, it forces an extra level indentation by the formatter because the
braces cannot be part of case statement, which again makes it harder to
read the code.

TEST=This is just a formatting change.

Change-Id: I0b2d8c6b1e73da371dba215c2e0c1ad28fd0903f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221822
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-12-02 12:10:27 +00:00
Daco Harkes c3b50826dd [analyzer/ffi] ABI-specific type support in analyzer
TEST=pkg/analyzer/test/src/diagnostics/abi_specific_integer_mapping_test.dart

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

Change-Id: I7ae6e05073e6f28a42b5f8f7d06c9b5b91c510a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221821
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-12-02 12:10:27 +00:00
Daco Harkes 734eb8e891 [cfe/ffi] Support missing Abis in NativeTypeCfe
When ABI-specific integers are introduced, their mappings can be
partial. We need to account for this in the transformation and the code
we generate.

In the transformation, all sizes and offsets become nullable.
In the generated code we add `null` constants and a call to check
whether the value is not-null at runtime.

Note that with only this CL we can not generate nulls yet, because all
size and offset mappings are still complete.

TEST=pkg/front_end/testcases/nnbd/ffi*
TEST=tests/ffi*

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

Change-Id: I80d45f3f52001670bc0679a033f7daa22198d55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221631
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-12-02 12:10:27 +00:00
Daco Harkes eea0e48f6b [cfe/ffi] Move NativeTypeCfe to its own file
We're going to extend this logic in subsequent CLs, so lets give this
abstraction its own place to live.

TEST=just moving file contents

Change-Id: Ie6b267e77dd3a772bb3bbf0b79b33946ee767b0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221630
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-12-02 12:10:27 +00:00
Marc Plano-Lesay 9d68fe751d Fix a typo
Closes https://github.com/dart-lang/sdk/pull/47817
https://github.com/dart-lang/sdk/pull/47817

GitOrigin-RevId: a7bbf4d895136b4c304cc11dd2e83aa4f208be51
Change-Id: Ib60bfc53d77532ff782ba732a282f4c2a61d293a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221746
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2021-12-02 11:37:31 +00:00
Paul Berry e729bdab37 Migration: add support for implicit .call tearoffs.
Fixes #47733.

Bug: https://github.com/dart-lang/sdk/issues/47733
Change-Id: I8f972c01c315166c64f9fa0d5f9ec3d6e263c37f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221680
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-12-02 04:09:36 +00:00
Ryan Macnak 6da3725698 [vm] Remove unused failure delivery port mechanism.
TEST=ci
Change-Id: If8cf1c484b79b8a8410315c28b7c3f8b7f98a5a8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221880
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-12-01 23:40:06 +00:00
Ryan Macnak 08fc11c44c Revert "[vm] Emit timeline events around virtual memory allocation / deallocation."
This reverts commit ab0d8dc3b1.

Reason for revert: Speculating this is the cause for hangs in Flutter's `test/integration.shard/timeline_test.dart: Can connect to the timeline without getting ANR from the application`.

Original change's description:
> [vm] Emit timeline events around virtual memory allocation / deallocation.
>
> TEST=ci
> Change-Id: I0b29e2e6f7f530e29af0962f1243d708a1ca2225
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220804
> Reviewed-by: Dan Field <dnfield@google.com>
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ia8af447babd7291df4be746e8b8010242cbccc63
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221861
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Dan Field <dnfield@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-12-01 23:21:46 +00:00
Ryan Macnak 560dafc767 Revert "Update double-conversion to 162356679e310566c8c36cb76703d9cfabe4cee8."
This reverts commit fc585377a9.

Reason for revert: causes failures on Mac FFI tests?

Original change's description:
> Update double-conversion to 162356679e310566c8c36cb76703d9cfabe4cee8.
>
> Includes RISC-V support.
>
> TEST=ci
> Change-Id: Id499c9a7aa60f31ae58a080754d55a143b0074df
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221841
> Reviewed-by: Alexander Aprelev <aam@google.com>
> Commit-Queue: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I8e587108637a0b9229b572e92d088eb49b95e917
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221862
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-12-01 22:59:28 +00:00
Sam Rawlins 609d31b212 Bump dartdoc to include --resources-dir option
Bug: https://github.com/dart-lang/sdk/issues/44610
Change-Id: Ieb17c588f66354c0af31cb510bc9cd8c9a4e3f61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221762
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-01 22:02:13 +00:00
Ryan Macnak fc585377a9 Update double-conversion to 162356679e310566c8c36cb76703d9cfabe4cee8.
Includes RISC-V support.

TEST=ci
Change-Id: Id499c9a7aa60f31ae58a080754d55a143b0074df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221841
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-12-01 21:41:47 +00:00
Sam Rawlins ed086ad778 dart fix: report when --compare-to-golden has unchanged files
I was pretty confused about what was being compared until this change
was able to highlight that no edits were made.

Bug: https://github.com/dart-lang/sdk/issues/47678
Change-Id: I1d37070437658063d4b84f2fb5f4a33923bf5d92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221840
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-12-01 20:44:06 +00:00
Jonas Finnemann Jensen 780bc26e1b Bump pub to dcb6abac2d7d43258c03b348be42bf4aab9529b1
Changes:
```
> git log --format="%C(auto) %h %s" b9edfa5..dcb6aba
 https://dart.googlesource.com/pub.git/+/dcb6abac Merge remote-tracking branch 'origin/cherry-pick2-for-2.15.0'
 https://dart.googlesource.com/pub.git/+/dc857523 Remove duplicated lines in testdata (#3234)
 https://dart.googlesource.com/pub.git/+/acc8ab09 Refactor the test package-server (#3230)
 https://dart.googlesource.com/pub.git/+/1e78c688 Better error messages round 2 (#3223)
 https://dart.googlesource.com/pub.git/+/eaf36513 More links in the repository specification (#3220)
 https://dart.googlesource.com/pub.git/+/c888b018 Remove pedantic and cleanup a few lints (#3224)
 https://dart.googlesource.com/pub.git/+/a4d44c7e Global package server null safety (#3225)
 https://dart.googlesource.com/pub.git/+/ff941887 Merge branch 'cherry-pick-for-2.15.0'
 https://dart.googlesource.com/pub.git/+/efd24e64 Fix hanging event handler for `stdin`. (#3218)
 https://dart.googlesource.com/pub.git/+/d77c14e8 Gitignore validator should not follow symlink dirs (#3209)
 https://dart.googlesource.com/pub.git/+/7c190789 migrate rest of test/ to null-safety (#3207)
 https://dart.googlesource.com/pub.git/+/f24adb64 migrate test/oath2/ test/outdated/ test/token test/validator/ to null-safety (#3206)
 https://dart.googlesource.com/pub.git/+/e7d77a57 migrate test/add, test/cache, test/embedding plus a bit more to null-safety (#3205)
 https://dart.googlesource.com/pub.git/+/a6a73ad2 migrate test/lish/, test/run/, test/upgrade/ and golden_file.dart to null-safety (#3204)
 https://dart.googlesource.com/pub.git/+/b90efc1f Add test that `pub get` works with no $HOME in environment. (#3173)
 https://dart.googlesource.com/pub.git/+/c2fe3966 migrate test/get/ to null-safety (#3203)
 https://dart.googlesource.com/pub.git/+/1d106898 migrate test/hosted/ to null-safety (#3200)
 https://dart.googlesource.com/pub.git/+/afa9932b migrate test/cache and test/downgrade/ to null-safety (#3201)
 https://dart.googlesource.com/pub.git/+/352ca989 migrate test/global/ to null-safety (#3202)
 https://dart.googlesource.com/pub.git/+/64f20ca4 migrate test/descriptor/ and couple more files in test/ to null-safety (#3192)

```

Diff: https://dart.googlesource.com/pub.git/+/b9edfa5e288ea3d1a57d1db054ef844ae7b27d99~..dcb6abac2d7d43258c03b348be42bf4aab9529b1/
Change-Id: I30d33b0b8c3c19097a16543db15c6ae633f0afc2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221633
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Jensen <jonasfj@google.com>
2021-12-01 20:15:56 +00:00
Liam Appelbe 4dfeaad097 [vm] Ignore late error calls in coverage
Sets and gets to late variables count as uncovered even when they are
covered, because they have internal branches that throw exceptions.
These exceptions should not be hit in well formed code, so they
shouldn't count towards coverage totals.

These exceptions are all thrown using static functions on the internal
LateError class, so we can just ignore any calls that target a function
on this class.

Bug: https://github.com/dart-lang/coverage/issues/341
Fixes: https://github.com/dart-lang/coverage/issues/341
Change-Id: I1dfa5d64b7a2030121d84d7aad7c7a1649b900a8
TEST=Added a unit test
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221740
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-12-01 20:04:41 +00:00
Stephen Adams fd4fd54c9d [dart2js] Replace recursion with loop
This does not fix #42641, but removes a recursion that can make #42641
look different.

Change-Id: Id070cea0eb10501f1750b2719ed710a938170038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221480
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-12-01 20:04:36 +00:00
Daco Harkes 663357209c [vm/ffi] Introduce Abi
This introduces the application binary interface (ABI) concept to
`dart:ffi` as a class with opaque instances.

We will use this for providing mappings for ABI-specific types.
Bug: https://github.com/dart-lang/sdk/issues/42563
Bug: https://github.com/dart-lang/sdk/issues/42816
Closes: https://github.com/dart-lang/sdk/issues/45254

Later, we might open up the contents of `Abi` if need be.

Some API design discussion notes:
https://github.com/dart-lang/sdk/issues/42563#issuecomment-981774001

TEST=tests/ffi/abi_test.dart

Change-Id: Iebf290fc12f37d6f4236432ddf27ab3e12bde06d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221627
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2021-12-01 19:19:37 +00:00
Danny Tuppeny 66d2bbab07 [dds] Add a "customTool" option to DAP to allow overriding the dart tool
Change-Id: I5842b85d34af288ad48f4c019bd3cd5cef498487
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221625
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-12-01 17:27:16 +00:00
Sam Rawlins 3f65029f09 Switch nnbd_migration package to use strict-casts
Note that changes to code are required because strict-casts also ensures
that Iterables are used in for-each loops.

Bug: https://github.com/dart-lang/sdk/issues/41651
Change-Id: I05a403d2ecb282fce44f8c8d24247182725c24c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221545
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2021-12-01 16:49:16 +00:00
Johnni Winther 28e8f04f8e [cfe] Export tear-off lowering predicates in api_prototype
Change-Id: Iba3d68af13f866500015bf755dfca27add8c59cd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221628
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-12-01 14:21:38 +00:00
Johnni Winther 6e52e4817a [cfe] Store firstUri instead of first in SourceLoader
Change-Id: Ibd129897b16dffc39a5090c4d02f07e70ace7ced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221623
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-12-01 13:49:06 +00:00
Tess Strickland 37d45743e1 [vm] Avoid calling runtime when lazily initializing late static fields.
This CL changes the handling of late static fields to be similar to the
handling of late instance fields. That is, if the field does not need a
load guard and has an initializer, the new InitLateStaticField and
InitLateFinalStaticField stubs are used, which directly call the
initializer function instead of going to the runtime. Thus, the only
runtime call left in these cases is when a late final static field is
modified by the initializer function, in which case an appropiate
exception is thrown.

In the case where a late static field might call the initializer
function but no initializer exists, a LateInitializationErrorSlowPath is
generated to be called if the field value is the sentinel, also similar
to the late instance field case.

TEST=Refactoring, so existing tests.

Change-Id: I95887022d8ece1164a8f7c34b77d9de8c53aa898
Bug: https://github.com/dart-lang/sdk/issues/45138
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-release-simarm-try,vm-kernel-linux-release-simarm64-try,vm-kernel-linux-release-ia32-try,vm-kernel-linux-release-x64-try,vm-kernel-nnbd-linux-release-ia32-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-nnbd-linux-release-simarm64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-precomp-linux-release-simarm-try,vm-kernel-precomp-linux-release-simarm64-try,vm-kernel-precomp-linux-release-simarm_x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220009
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-12-01 08:51:49 +00:00
Ryan Macnak ae5def7b0d [test] Account for new locale string returned on macOS.
TEST=ci
Change-Id: I29bf54c8a75c016a11921ce78c60076009d347ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221720
Reviewed-by: Brian Quinlan <bquinlan@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-12-01 00:22:45 +00:00
Brian Quinlan db9d61f3af Fix a bug where no error message was set for peer disconnects.
TEST=Manual. AFAIK, the cause of this error is the socket receiving a TCP RST from it's peer and, AFAIK, I can't do that from Dart.
Bug:  https://github.com/dart-lang/sdk/issues/47766
Change-Id: Ia423ee951b96bdb140c321fbc87b6bd59e39d84d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221222
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
2021-11-30 23:20:16 +00:00
Jonas Finnemann Jensen e12a81d776 Fix support for publishing to 3rd-party pub repository with path in the hosted-url
This adds the following commits:
b9edfa5e28

Change-Id: Ia52dd2b6aa797006ddb3e686cfccf4d382dc9355
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221626
Auto-Submit: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2021-11-30 22:23:15 +00:00
Alexander Aprelev b7a0edbf05 Reland "[vm/concurrency] When generating Store/Load instructions use guard information that is kept on a slot."
This reverts commit fd31242f2b as the
issue that caused revert should be fixed by removal of boxing heuristic
removed in 8159c38d65.

Fixes https://github.com/dart-lang/sdk/issues/47314
TEST=ci,g3

Change-Id: I42f3f0c6d25639fb326e74d96a51c4c6c0f88f78
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221601
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-11-30 21:45:55 +00:00
Ryan Macnak 20f1a954fe [tsan] Force early ICU initialization to avoid spurious data race warnings.
TEST=isolate-stress
Bug: https://github.com/dart-lang/sdk/issues/46699
Bug: https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=83298
Change-Id: I0f3c9f5e2ffde7eb84638f52e7af9e285f5316f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221661
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-11-30 19:28:05 +00:00
Joshua Litt bebc692e93 [dart2js] Add 'shipped' state to feature options.
Change-Id: I2be91636f0e32d00c9dbc92cf7b514454040754f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221020
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2021-11-30 18:03:39 +00:00
Danny Tuppeny 08db718290 [dds] Resolve dart: URIs to SDK file paths and back again in DAP
This fixes two issues:

1. When a user navigates into SDK sources using the analyzer (Go-to-Definition) and sets a breakpoint, we map it to a URI that the VM understands
2. When the VM breaks inside an SDK source, we map it back to a local file path (so that the user doesn't end up with two versions of the same file - one downloaded, and one the analyzer sent them to)

Change-Id: Ic1bdbed29196f98e612d81c383ad31ce241446b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221082
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-11-30 16:46:55 +00:00
Ben Konyi c39b243435 [ CLI ] Avoid awaiting on join() calls in test harness
Fixes #47750

Change-Id: I179a9e987cea157257d40d6e840e9f4ff5539877
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221543
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-11-30 16:39:25 +00:00
Johnni Winther 1926ff8c67 [cfe] Add conditional import tests
Change-Id: If309f74ab7420e933c0942388780b57e8c3d63dc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221622
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-30 13:06:45 +00:00
Johnni Winther aa5c2b3da6 [cfe] Handle field/getter/setter in ReferenceName equality
ReferenceName is used in equivalence testing to match reference
reguardless of whether the reference have associated nodes or
canonical names. The implementation didn't previously account for
fields, getters and setters with the same simple name, and would
wrongfully equate them.

Change-Id: Iacc8e0eb2c5c04a3cf11c3b5104a8f0441cf3ab6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221621
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-30 12:37:55 +00:00
Clement Skau 7344e5e619 [test] Skip regress_47594_test in Product
Bug: https://github.com/dart-lang/sdk/issues/47811
Change-Id: I16af738c8d01c1b82052d6f1aaf55d1650143f11
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-product-arm-try,app-kernel-linux-product-x64-try,vm-ffi-android-product-arm64c-try,vm-kernel-linux-product-x64-try,vm-kernel-mac-product-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-win-product-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221620
Auto-Submit: Clement Skau <cskau@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-11-30 11:11:04 +00:00
Johnni Winther 39533c285b [cfe] Pass tracked dill libraries through incremental compiler result
This avoids have tracked dill libraries as part of the incremental
compiler state, and avoids the need for public mutable state on the
incremental compiler.

Change-Id: Ia61f22499f619d7ead4eed23d3d1eb24b8caec9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221464
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-11-30 11:07:34 +00:00
Johnni Winther f060f58c6e [cfe] Remove non-test access to targets on IncrementalCompiler
This is a move towards fully encapsulating the state of the incremental
compiler from outside usage.

Change-Id: I1243602aa6c4bcc3e6fbf8450bd8cdf7fa5ad5d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221327
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-11-30 08:19:35 +00:00
Alexander Aprelev 8159c38d65 [vm/jit/unboxed] Remove heuristic that transitions unboxed fields back to boxed.
The heuristic was introduced in b870dafa4f, but gets in the way of maintaining Slot(extended with field guard information) immutable during compilation.

Existing set of benchmarks doesn't seem to show any reasonable regression with this heuristic removed.

Bug: https://github.com/dart-lang/sdk/issues/47722
Change-Id: Ie94050d96852b7ffef2dc81248cda23e84d41f4b
TEST=ci
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221544
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-11-30 08:10:25 +00:00
Sam Rawlins bd57f9a837 analyzer: Explicitly return null in nullable return functions
Related to: https://github.com/dart-lang/sdk/issues/46656

Change-Id: I5c015e9827cc7b7ac26f198371709c124b6c28ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221565
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-11-30 05:20:05 +00:00