Commit graph

37207 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
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
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
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
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
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
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
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
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
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
Joshua Litt b735151bbc [dart2js] Restore test coverage for modular analysis.
Change-Id: Iedfc6c1779064db469c209545c361e047ee0318c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221026
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-11-30 01:02:34 +00:00
Konstantin Shcheglov 6091533c6e Issue 47804. Recompute invlaidated libraries after processing all changed files.
The issue has the discussion.

Bug: https://github.com/dart-lang/sdk/issues/47804
Change-Id: I301fe8fe44b0e8e7e3b413df0363fabc44061c7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221564
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-30 00:26:44 +00:00
Sam Rawlins 976cffc4c2 Use strict-casts in js and dev_complier
strict-casts is mostly a drop-in replacement for the deprecated
`implicit-casts: false` option. One big difference, seen in this CL, is that
strict-casts will report a non-Iterable (or non-Stream) in a for-each loop.

Change-Id: Ibc463ae9c870b6a795483c5dea0d2b856e7fd883
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221546
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-11-29 23:22:44 +00:00
Nate Bosch 64ebe56f5f Add utf8 decoded context on ascii decode failures
Previously when a process emits unexpected content on `stdout` during startup
the `FormatException` was not useful, it would look something like:

```
FormatException: Invalid value in input: 226
dart:convert                                                 AsciiCodec.decode
package:dds/src/dap/protocol_stream_transformers.dart 91:28  PacketTransformer._parseHeaders
package:dds/src/dap/protocol_stream_transformers.dart 40:25  PacketTransformer.bind.<fn>.<fn>
```

When the failure comes form the ascii decode, give another attempt at
decoding with utf8 since that is a common character set for tool output.
Use that in the message for the exception to make it more useful for the
reader.

Now the failure will look like:

```
FormatException: Unable to decode headers with ascii. The stream has utf8 content:
Downloading package sky_engine...                                  472ms
Downloading flutter_patched_sdk tools...                           629ms
Downloading flutter_patched_sdk_product tools...                   615ms
Downloading linux-x64 tools...                                   1,782ms
Downloading linux-x64/font-subset tools...                         237ms
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It is being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project. You may also pass the --ignore-deprecation flag to
ignore this check and continue with the deprecated v1 embedding. However,
the v1 Android embedding will be removed in future versions of Flutter.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

Content-Length: 518
Content-Type: application/vscode-jsonrpc; charset=utf-8


package:dds/src/dap/protocol_stream_transformers.dart 95:7   PacketTransformer._parseHeaders
package:dds/src/dap/protocol_stream_transformers.dart 40:25  PacketTransformer.bind.<fn>.<fn>
```

Change-Id: I73dcd2e3de53c4af63ddfa0032a171f311be22d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221221
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-11-29 21:27:04 +00:00
Konstantin Shcheglov 0eb9c34645 Prepare to publish analyzer 2.8.0 and _fe_analyzer_shared 31.0.0
Change-Id: I8abdd6050532b37e3c4d3c187fee61ff9eab8a3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-11-29 20:27:44 +00:00
omerlevran46 35202a3c5f [fuchsia] use the binary tools in the fuchsia SDK
This commit moves from using the bash scripts to using the binary tools.

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

GitOrigin-RevId: 4098a9c5d09e2c4e209edd8ac7490f2aacd1f85e
Change-Id: If4cdcb8472f15c4e8bb202828c4205b8859e9e69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221024
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Liam Appelbe <liama@google.com>
2021-11-29 19:53:14 +00:00
Chloe Stefantsova 8d80fbfa6c [cfe] Create RHS of typedefs in erroneous cases
Closes https://github.com/dart-lang/sdk/issues/47728

Bug: https://github.com/dart-lang/sdk/issues/47728
Change-Id: Iaa12f1e2f260141801b9b8ddafecba508dc6d3ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220008
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-11-26 14:08:22 +00:00
Johnni Winther e1c9640279 [cfe] Rename direct_parser_ast files to parser_ast
Change-Id: I10ef96413f7f91704d0ca29d12ded2b034dc0406
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221326
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-11-26 12:51:46 +00:00
Johnni Winther 9788371d7d [cfe] Rename DirectParserASTContent to ParserAstNode
+ remove DirectParserASTContent prefix from subclasses.

Change-Id: I766a426ae9f9f1d43919abc27728535ba6e71e8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221324
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-26 12:43:04 +00:00
Jens Johansen ad6ffaab95 [CFE] First stab at prototype for textually extracting outlines
Change-Id: Ib84b47f0acb553cee6d891d7bbcf865f4a57a65a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221080
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-11-26 06:14:44 +00:00
Joshua Litt 4f6d813c3c [dart2js] Add '--no-summary' to compute_kernel.
Change-Id: Ie3493137794c95f5061ed7d2918568127c5e15ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221220
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-11-25 23:39:24 +00:00
Johnni Winther 87c953bd0c [cfe] Pass class hierarchy and core types through IncrementalCompilerResult
TEST=existing

Change-Id: I78a61147998a630d88997e0cebccb3e815592822
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221088
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-11-25 11:27:29 +00:00
Michal Terepeta 7d39d2dd51 Revert "[ VM / Service ] Omit private fields from service responses by default"
This reverts commit 75abd86407.

Reason for revert: Breaks internal tests (http://b/207612278)

Original change's description:
> [ VM / Service ] Omit private fields from service responses by default
>
> Service responses and events previously could include "private"
> properties, which have names starting with "_". This change removes
> these properties from service objects unless explicitly requested via a
> private parameter.
>
> See go/smaller-dart-vm-service-responses for response size reduction
> data.
>
> TEST=Existing service suite
>
> Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

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

Change-Id: I0b015baadfcdf4211426efa9a92804b163f88649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221280
Reviewed-by: Michal Terepeta <michalt@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
2021-11-25 10:28:33 +00:00
Johnni Winther e92e60da78 [cfe] Change computeDelta to return a result object
This prepares for returning more that just the component from an
incremental compilation.

TEST=existing

Change-Id: I3ee269083290097f1a92d77d105b607a6a02f1f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221086
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-11-25 10:15:07 +00:00
Johnni Winther c07ca25ca1 [cfe] Make internal members private in IncrementalCompiler
Change-Id: I0789da5a7be487bf0488654126543ed1c308de83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221085
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-25 08:14:53 +00:00
Brian Wilkerson 8f8e6a7ed1 Add tests from a reverted CL for future reference
This is the test from the attempt to allow overlapping edits to be
merged. That work broke some other tests, but I want to record both the
current and ideal behaviors in case I can't get back to fixing it.

Change-Id: Ib41afc37463957ebd710e65847512f91fe47a0f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221180
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-11-24 16:15:02 +00:00
Vyacheslav Egorov 71c9c2cd83 [vm] Remove support for non-bare AOT snapshots
Every AOT user out there has been using bare instructions mode
and continuing to maintaining non-bare instructions mode simply
adds costs (both in terms of time spent making changes to work
in a mode that is not used and CI resources spent on testing it).

This change removes FLAG_use_bare_instructions and changes the code
to assume that FLAG_precompiled_mode implies bare instructions.

TEST=ci

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,app-kernel-linux-release-x64-try,app-kernel-linux-debug-x64-try
Change-Id: I5032b13bfcb613f79865f2cfa139cca8d1b42556
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220964
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-11-24 13:03:52 +00:00
Johnni Winther 450ff2976d [cfe] Migrate (more) CFE tests (part 11)
Change-Id: I905adcd2125ce66d6ba9923d996354657b679cec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220965
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-24 11:15:41 +00:00
Johnni Winther 3e28be5ec6 [cfe] Migrate (more) CFE tests (part 10)
Change-Id: Ic40cf7acdefe86cc0f2324ccdf35c6f80d6bcc39
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220980
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-24 11:09:02 +00:00
Johnni Winther 71a551d512 [cfe] Migrate (more) CFE tests (part 9)
Change-Id: Ia5d8ff24f46b1589d9325c1d20ffab73e64559dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220772
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-11-24 09:54:22 +00:00
Ben Konyi 75abd86407 [ VM / Service ] Omit private fields from service responses by default
Service responses and events previously could include "private"
properties, which have names starting with "_". This change removes
these properties from service objects unless explicitly requested via a
private parameter.

See go/smaller-dart-vm-service-responses for response size reduction
data.

TEST=Existing service suite

Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2021-11-24 00:34:31 +00:00
Stephen Adams 4c31413f1a [dart2js] Insert HNullCheck ahead of HGetLength
HNullCheck is inserted before HGetLength when the receiver might be null.
This makes HGetLength and HFieldGet use the same pattern.
HNullCheck supports strengthening of dominated uses, which allows
specialization of string and array interceptors, leading to better code
in some cases. An example improvement is:

      if (aLocale.length < 2)
        return aLocale;
      return J.substring$2$s(aLocale, 0, 2).toLowerCase();

-->

      if (aLocale.length < 2)
        return aLocale;
      return B.JSString_methods.substring$2(aLocale, 0, 2).toLowerCase();

Here `aLocale` has the type String*, and the explicit null check before
`aLocale.length` strengthens the receiver at the call to `substring`.

There is very little code size change.

The inconsistency between the handling of HFieldGet and HGetlength came
to light when investigating an unexpected difference in Uri.parse between two
apps.

Change-Id: I6e76de2070ab2c0058a109896c738ea2a09b322a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221028
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2021-11-23 21:11:31 +00:00