Commit graph

87561 commits

Author SHA1 Message Date
Paul Berry
f388946354 Fix test to account for obfuscation
This change generalizes no_such_method_restriction_stack_trace_test so
that it recognizes all circumstances where there is stack obfuscation
(not just Javascript builds).

Fixes test failures on `vm-kernel-precomp-obfuscate-linux-release-x64` bot.
Fixes #50074

Bug: https://github.com/dart-lang/sdk/issues/50074
Change-Id: I53f3eaa6ae3cf3585b3d4c492d80dd1e72ca216b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261621
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-28 19:24:26 +00:00
Alexander Markov
9c3e52aaf3 [vm] Support record types in special cases of type testing stubs for generic types
TEST=language/records/simple/type_checks2_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I9117331d8e985675a8adba1aaa4d50a6b17758f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261182
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-09-28 19:01:11 +00:00
Lasse R.H. Nielsen
72f574507e Update the documentation of Function to mention function types.
And all the other things it didn't mention.
And update the `==` documentation too.

Change-Id: Iccd4b046b0632db788e44b02799d1f8d5541d766
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260881
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-09-28 17:36:56 +00:00
Danny Tuppeny
d97c3e8702 [analysis_server] Fix updating of selections in change builder when additional edits are made
This fixes a few minor issues:

- Setting a new selection position did not remove a previously set selection range (which could result in a mismatched offset/length due to how the resulting change merges the position/range)
- Setting a new selection range did not update a previously set selection position
- Inserting new changes before a change that sets a selection range only updated the selection position, not selection range
- Setting a selection range/position after another change that inserts only updated the selection position to compensate and not the selection range

These issues led to cases where selection ranges could be incorrect, or even overlap with linked edit groups that could cause errors that caused code action requests to fail.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4184

Change-Id: I43e2a8361c97b2eccb2d6b426a75eda5cc811e06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261682
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 17:32:24 +00:00
Danny Tuppeny
9c0b575fa5 [analysis_server] Include filters in saveUri parameters, rename type -> kind
Change-Id: I815a86a57fbb15d4d851d368a3b4eeffefa39ed8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261605
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 17:25:56 +00:00
Danny Tuppeny
67e1f3f527 [analysis_server] Fix refactor test on Windows
Change-Id: I182596db3f7446879579a47de5aa60956aee0f2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261601
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 17:22:49 +00:00
Aske Simon Christensen
985c0ccc46 [dart2wasm] Throw UnimplementedError instead of constructor tear-offs
Change-Id: Icff981119ba0d0f3c5a7c498a16d7a22074105d3
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261680
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
2022-09-28 17:17:12 +00:00
Danny Tuppeny
55004eaa80 [analyzer] Improve findNode.formalParameterList for NodeLocator changes
Change-Id: I8b79330c86115a0952f6a31444a9efd0a8c8b728
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 17:14:46 +00:00
Devon Carew
7c81ac07fd Bump intl to 5464b3b95635e97f67e29d71bdbe85a5d4126971
Changes:
```
> git log --format="%C(auto) %h %s" 6806ab0..5464b3b
 https://dart.googlesource.com/intl.git/+/5464b3b Remove an unnecessary sort (#496)

```

Diff: https://dart.googlesource.com/intl.git/+/6806ab06fa6145f30dbcd5cbfeb3aeaadd21ea8e~..5464b3b95635e97f67e29d71bdbe85a5d4126971/
Change-Id: Ic32c31be41deb11a60b2d0fd8de38117ad248ab1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261201
Reviewed-by: Moritz Sümmermann <mosum@google.com>
Commit-Queue: Moritz Sümmermann <mosum@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-09-28 17:09:06 +00:00
Alexander Markov
b860d9ee36 [vm] Support record types and record constants in IL serialization
TEST=language/records/simple/constants_and_field_access_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I47b1c300195249d0e07e2adfdeeba0c4e44f5de7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261480
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-28 16:41:56 +00:00
Greg Spencer
ae7e3517c8 Add a test for examples/api navigation, and fix it
This adds a test for the dartdoc "See code in examples/api..." navigation in the analysis_plugin, and changes things so that it doesn't walk the directory tree to find the examples directory more than once per compilation unit.

Change-Id: I1938396b160ca2d21b08214f79fb1c7ddbf6a388
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261281
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Auto-Submit: Greg Spencer <gspencer@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 16:31:26 +00:00
Konstantin Shcheglov
12b75222ab Resolve CastPattern and ConstantPattern.
Change-Id: Iff025fb1f1f07a06f62d99a5a8667dabcc91776f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261580
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-28 15:54:27 +00:00
Brian Wilkerson
bf1797e450 Add a test to show that split_variable_declaration works with record types
Change-Id: I30cc2a9910b590b66c2e02575bfc3b3bc0ec5de0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261501
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-28 15:49:46 +00:00
Aske Simon Christensen
e08c94a651 [dart2wasm] Partially lazy constants
Make a constant lazy if it involves creating a list that is too long
for the `array.new_fixed` instruction, or, for composite constants, if
one or more of its sub-constants are lazy.

Also read lazy string constants directly from a data segment instead
of writing them to linear memory first.

Change-Id: Iea26460580e6134cd3e26eaaa84cb0dde09016dd
Cq-Include-Trybots: luci.dart.try:dart2wasm-linux-x64-d8-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261402
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-09-28 15:20:46 +00:00
Brian Wilkerson
ffe7d55ea8 Implement more ToSourceVisitor tests
Change-Id: Ie63f18fec8754a342eee3c93401d9319d2d12421
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261500
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-28 15:17:46 +00:00
Ömer Sinan Ağacan
6cf5999c32 [vm] Fix IL/disassembly output generation with -v
https://dart-review.googlesource.com/c/sdk/+/261360 had a typo and
checked kernel result instead of snapshot result.

Example invocation:

    dart compile exe \
        --extra-gen-snapshot-options=--disassemble,--print-flow-graph,--print-flow-graph-filter=<function name> \
        -v <Dart file>

Change-Id: Ic5e540825874f44105579382b2b05dd710791206
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261643
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2022-09-28 14:17:30 +00:00
Danny Tuppeny
e2d63974a7 [dds/dap] Fix flaky test
We shouldn't fail ("Future already completed") if the timing allows multiple errors from the bad input to arrive during the test run.

Change-Id: I358b8401b865c22d5808c22e463dea0e6416f6ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261602
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2022-09-28 13:47:46 +00:00
Jens Johansen
59f895b4ed [parser] Don't pretend like record types doesn't exist in on clause parsing
Fixes https://github.com/dart-lang/sdk/issues/49980

Change-Id: I74c734a64f4c0d4bd6ad79f231411352f6b170c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261362
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-09-28 13:41:56 +00:00
Tess Strickland
be4bb8ec4b [vm/test] Skip heap_snapshot_referrers_test on reload bots.
Change-Id: Ia9719f4009a02e26d134fcfbfba9823719fb8484
Fixed: 50072
Cq-Include-Trybots: luci.dart.try:vm-kernel-reload-linux-release-x64-try,vm-kernel-reload-rollback-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261641
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-09-28 13:37:06 +00:00
Tess Strickland
a54a21b230 [vm/test] Don't attempt assembly tests on simulated archs.
TEST=vm/dart{,_2}/use_add_readonly_data_symbols_flag

Bug: https://github.com/dart-lang/sdk/issues/50071
Change-Id: Ia20b3d781f87ca902555d5d54fa6f42855cace49
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-linux-release-simarm64-try,vm-kernel-precomp-nnbd-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-release-simarm_x64-try,vm-kernel-precomp-linux-debug-simriscv64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261640
Commit-Queue: Tess Strickland <sstrickl@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-09-28 13:01:13 +00:00
Paul Berry
9eb5544ec1 Parser: split some pattern/expression parsing logic.
This change restores `parseParenthesizedExpressionOrRecordLiteral`,
`parseArguments`, and `parseArgumentsRest` to the way they looked
prior to adding parser support, and instead adds new methods
`parseParenthesizedPatternOrRecordPattern` and
`parseExtractorPatternRest` that are specialized for patterns parsing.

Bug: https://github.com/dart-lang/sdk/issues/50035
Change-Id: I104e031a796ef7f217cd427e1a9ae94a04dafa7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261620
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-09-28 12:50:56 +00:00
Vyacheslav Egorov
9158353b5d [vm] Make it easier to get IL / disassembly out
Make `dart compile exe -v` forward gen_snapshot output in
verbose mode.

Fix --write_code_comments_as_synthetic_source_to=... flag. There
was a change to Dwarf writer API which broke it.

Motivated by https://github.com/dart-lang/sdk/issues/50059

TEST=manually

Change-Id: I0431925f724a9b24e938bdb9d7ae1019143da83a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261360
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Tess Strickland <sstrickl@google.com>
2022-09-28 12:21:36 +00:00
Vyacheslav Egorov
7fd49802db [vm] Default timeline recorder to nop in PRODUCT
Using ring (or other similar types) of recorders in PRODUCT
does not make sense because you can't extract the information
they record without vm-service. Additionally "ring" (default
recorder type) preallocates ~4Mb of memory to store the data.

This CL adds a "none" recorder which simply drops all data
and has no memory overhead and makes this default recorder
in PRODUCT.

We also change code to only allow none, callback, systrace
and file recorders in PRODUCT.

TEST=manually

Bug: b/237989929
Change-Id: I52d6ff8bf766e8fa0969eab0bf2adc45dd9a57c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261320
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-28 12:17:46 +00:00
Nate Biggs
0ec921e8c3 [dart2js] Fix node tracer migration
Change-Id: Id49719ca21471370e9428224a231d285d3c84551
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261560
Commit-Queue: Nate Biggs <natebiggs@google.com>
Auto-Submit: Nate Biggs <natebiggs@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-28 00:46:35 +00:00
Konstantin Shcheglov
1ad9306ad2 Extract pattern tests into resolution tests.
Change-Id: Ia4b61dc5e8dae0a4f4fb3afebff88b74c3fd867c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261443
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 23:35:25 +00:00
DEPS Autoroller
ba822cbda4 Roll Dart Documentation Generator from ce5bd271eda9 to 691fa9640aae (1 revision)
https://dart.googlesource.com/dartdoc/+log/ce5bd271eda9..691fa9640aae

2022-09-27 srawlins@google.com Make two regular expressions static (#3194)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I3c6ed921c2919d5fc224ed1ebd05710dcfaf49f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261462
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2022-09-27 22:47:18 +00:00
Ryan Macnak
efbf68f306 [vm, gc] Common page structure for both generations.
- Prep work for non-moving promotion.
 - The generations still have different alignment offsets.
 - Old-space pages now participate in the page cache.
 - Fix boolean/null bit tricks to assert the right requirements on the alignment of a page's first object.

TEST=ci
Change-Id: I4369d8c6af73228e162c226d411914868bafed33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260401
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-27 21:34:05 +00:00
Brian Wilkerson
3616bd5992 Enable the patterns feature in parser-based tests
Change-Id: I0c2db4540d1868af02d4b1a067d027dad93f92b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261444
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-27 21:33:55 +00:00
Paul Berry
54906759b9 Don't delegate foreign private names to noSuchMethod.
If a concrete class implements an interface containing a name that's
private to a different library, any attempt to invoke that name will
result in an exception getting thrown.  Previously, such attempts
would result in the call being diverted to noSuchMethod.

This change closes a loophole in Dart's privacy system, and paves the way for
a future implementation of promotion for private final fields (see
https://github.com/dart-lang/language/issues/2020).

Bug: https://github.com/dart-lang/sdk/issues/49687
Change-Id: Ie55805e0fc77dc39713761a80a42c28bd0504722
Tested: language tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255640
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-27 21:20:35 +00:00
DEPS Autoroller
1ab0414a42 Roll Dart Documentation Generator from 6b8b1c46da9a to ce5bd271eda9 (3 revisions)
https://dart.googlesource.com/dartdoc/+log/6b8b1c46da9a..ce5bd271eda9

2022-09-27 srawlins@google.com Fix generic typedef pointing to typedef (#3193)
2022-09-27 srawlins@google.com Unnamed libraries (#3189)
2022-09-27 srawlins@google.com Make InheritingContainer._inheritedElements late final (#3191)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I371d173b9225721274f4faf652b56ee4f9fa8082
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261461
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2022-09-27 20:56:05 +00:00
Joshua Litt
203344cf5d [dart2wasm] Add support for runtime types for function types.
Change-Id: I3c446b8ef7dd9b1edc612b9e27893870a25c54d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261160
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-09-27 20:44:35 +00:00
DEPS Autoroller
0e2483cf64 Roll Dart Documentation Generator from a6676ee58628 to 6b8b1c46da9a (2 revisions)
https://dart.googlesource.com/dartdoc/+log/a6676ee58628..6b8b1c46da9a

2022-09-27 srawlins@google.com Simplify _buildFullyQualifiedName (#3190)
2022-09-27 srawlins@google.com Simplify Library.dirName (#3192)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/dart-doc-dart-sdk
Please CC dart-ecosystem-gardener@grotations.appspotmail.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dart Documentation Generator: https://github.com/dart-lang/dartdoc/issues
To file a bug in Dart SDK: https://github.com/dart-lang/sdk/issues

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Tbr: dart-ecosystem-gardener@grotations.appspotmail.com
Change-Id: I5809e94dc7da449a2606414b24785d4ff8b70110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261460
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: DEPS Autoroller <dart-autoroll@skia-public.iam.gserviceaccount.com>
2022-09-27 19:41:45 +00:00
Nate Biggs
8939d1e0f0 [dart2js] Migrate iterable tracers in inferrer.
Change-Id: I0a9eba5a65cb6dd1b8db5aef53c3a2caed9530b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260803
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2022-09-27 19:19:25 +00:00
Konstantin Shcheglov
dd63e54e2c Remove fluent check().
Change-Id: I6f41efb2432ebd4a6a03638d5db0937f20386200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261440
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 19:15:55 +00:00
Brian Wilkerson
798c57bef9 Capture some conventions around writing tests
Change-Id: Idf23690d944eddfbd575bcb608d6949c10e7d1f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261442
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-27 19:07:45 +00:00
Danny Tuppeny
813aa69dff [analysis_server] Fix Inline Method refactor for methods with type args
Change-Id: I0bac7bbdb4f2ef8560d2948927527512fb468b31
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-09-27 18:48:35 +00:00
Danny Tuppeny
63b6239f79 [analysis_server] Tweaks to new server refactorings
Change-Id: If2dc19b724a4fd617288466003a8d35e599d5950
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261403
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 18:22:05 +00:00
Devon Carew
a5b9594e20 Bump http to 738a55b20e391c5a526b86bf4b02af6b7745b494
Changes:
```
> git log --format="%C(auto) %h %s" d6a4bf1..738a55b
 https://dart.googlesource.com/http.git/+/738a55b Increment cronet_http version (#803)
 https://dart.googlesource.com/http.git/+/eb4d457 Fix a bug where cronet_http did not set content-length correctly (#800)

```

Diff: https://dart.googlesource.com/http.git/+/d6a4bf1e8f9d6e8f372958387cea32b0a6a62cfa~..738a55b20e391c5a526b86bf4b02af6b7745b494/
Change-Id: Ic2713b83e140a3a3a25c7565baf27e063c32910e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261200
Auto-Submit: Devon Carew <devoncarew@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-09-27 18:19:16 +00:00
Alexander Markov
d592882f49 [vm] Unify nullability and type state among all types
This change moves 'nullability' and 'type_state' from all kinds of
types to AbstractType base class. This removes a lot of code
duplication and allows uniform access to nullability and type state
for all kinds of types.

TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/47034

Change-Id: I1f0dc7fda78426db83fec6a20ebebcd632ad6d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260662
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-27 17:30:03 +00:00
Ryan Macnak
f04984b432 [vm] Mark assembly produced by the VM as not requiring an executable stack.
Cf. 32715d1d5b

TEST=readelf
Change-Id: I27e2404f49e500adf82329e3a969e91d8c0dc51f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260963
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-09-27 17:28:16 +00:00
Danny Tuppeny
d83cb4e621 [analysis_server] Fix some issues with requests made at an offset between name and type/parameter lists
Removal AstNodes for names in declarations left some of these places getting FormalParameterList/TypeParameterLists when an offset was between the name and parameter list. This is a fairly common case if you double-click to select a name in VS Code (it sends the end of the name as the offset).

This only changes the case where a single offset is provided (not a range), and it is both the start of the parameter list and the end of the name.

Fixes https://github.com/Dart-Code/Dart-Code/issues/4157.

Change-Id: I1219fa70b0795b61c60f31ad61ff9a34954c8b43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260381
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 17:13:53 +00:00
Devon Carew
9d55d52640 Bump stream_channel to a5129ca44322a7024074ca38fb98e343dcb638c7
Changes:
```
> git log --format="%C(auto) %h %s" 63831cb..a5129ca
 https://dart.googlesource.com/stream_channel.git/+/a5129ca Prepare to publish (#81)

```

Diff: https://dart.googlesource.com/stream_channel.git/+/63831cb74c5a413da893bda0fa4a80b5cb567076~..a5129ca44322a7024074ca38fb98e343dcb638c7/
Change-Id: I15ff8707bd6f04f3169442247a70fd9e4b8d231e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261204
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-09-27 17:00:33 +00:00
Martin Kustermann
05cf1c3218 [gardening] Disable heap snapshot referrers test on simulators
The test takes long time to run and is too slow on simulators. So we
disable it there.

We also rename the test to reflect that an object's users are called now
`referrers` and not `referencees`.

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

TEST=ci

Change-Id: Ic092db05a4930c33a9e6e4e0b2bbdb817936f97f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261363
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-09-27 17:00:23 +00:00
Tess Strickland
1d081c8bdd [vm] Add symbol size and type information to the assembly output.
Add symbol size and type information to the assembly output when
compiling for Linux-based platforms, so that the symbol tables in the
assembled output include that information.

Since symbol tables in Mach-O files do not include symbol size
information, we don't output either currently for MacOS or iOS targets.

TEST=vm/dart{,_2}/use_add_readonly_data_symbols_flag

Change-Id: I4219b898249153dc84214565e85ac9d3cf802538
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-gcc-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260820
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
2022-09-27 16:45:53 +00:00
Tess Strickland
823934f1c5 Reland "[vm/compiler] Add symbols for read-only data when requested."
This is a reland of commit 286326f834

Checking into https://github.com/flutter/flutter/issues/108378, it
looks like the stripped snapshot indeed is unchanged, but the .ipa
being benchmarked includes .dSYMs, which is why there was a size
regression in adding this extra debugging information.

If that changes, we can remove the flag, but for now, I've added the
flag back so these symbols are not added by default.

TEST=vm/dart{,_2}/readonly_data_symbols

Original change's description:
> [vm/compiler] Add symbols for read-only data when requested.
>
> Symbols for non-clustered objects in the read-only data section are
now added to the static symbol tables for unstripped snapshots and
separate debugging information.
>
> In DEBUG mode, the name for a non-String read-only data object also
includes the name of the parent object.
>
> TEST=vm/dart{,_2}/readonly_data_symbols
>
> Change-Id: I623b023138aeca0580bc76392882eac5686f8f50
> Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251104
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Tess Strickland <sstrickl@google.com>

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try,vm-kernel-precomp-nnbd-mac-release-arm64-try
Change-Id: I41be1c494c4324f1f3fae648d9832772c45bfbaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260522
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-09-27 16:45:53 +00:00
Daco Harkes
8a78aaf463 [analyzer/ffi] Fix FfiNative Pointer params
TEST=pkg/analyzer/test/src/diagnostics/ffi_native_test.dart
TEST=tests/ffi/regress_49684_test.dart

Closes: https://github.com/dart-lang/sdk/issues/49684
Change-Id: I756635c0a34aa18f3a3a2cbdcc0657b08cb5050e
Cq-Include-Trybots: luci.dart.try:analyzer-linux-release-try,analyzer-mac-release-try,analyzer-win-release-try,analyzer-analysis-server-linux-try,vm-ffi-android-debug-arm64c-try,vm-precomp-ffi-qemu-linux-release-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261400
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 15:58:16 +00:00
Konstantin Shcheglov
95d559921d Replace check() with textual dumps in CompletionDomainHandlerGetSuggestionDetails2Test.
Change-Id: I8ca1bfb8af93b09e8190c1dc1f7354e52a691ea9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261285
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2022-09-27 15:54:13 +00:00
Danny Tuppeny
17bd00df50 [dds/dap] Attempt to fix flaky tests on Linux during shutdown while debugger is initializing
Fixes https://github.com/dart-lang/sdk/issues/50058.

Change-Id: Ia0b498a4f1c943bc1f21f940c533584837ba5311
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261401
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-09-27 15:43:13 +00:00
Devon Carew
74b7248773 Bump mockito to 02ad6c793d9ea970b5cc892f45a55d12d8ebf4e8
Changes:
```
> git log --format="%C(auto) %h %s" ef37e87..02ad6c7
 https://dart.googlesource.com/mockito.git/+/02ad6c7 Bump analyzer to support 5.0.0

```

Diff: https://dart.googlesource.com/mockito.git/+/ef37e871d2673a66ca57303253901748622f04ca~..02ad6c793d9ea970b5cc892f45a55d12d8ebf4e8/
Change-Id: I460fef009a9a2819e654e3d41a2513c99b5bfa8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261202
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Auto-Submit: Devon Carew <devoncarew@google.com>
2022-09-27 15:17:43 +00:00
Erik Ernst
263be7413b Update spec_parser to handle new features (super, anywhere, records)
This CL updates Dart.g and hence the spec parser to handle new features
added to Dart in 2.17.

Change-Id: I42d6534d933df9a30453f12643dcc90e4d86fa80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260821
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2022-09-27 14:10:53 +00:00