Commit graph

80266 commits

Author SHA1 Message Date
Devon Carew dc1804fff4 [pkg/dart2native] switch to use package:lints
Change-Id: I81f2b25cc57fc89138638eb0b98f6d5489146473
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204641
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2021-06-23 00:51:17 +00:00
Devon Carew 4f5d4731c5 [analysis server] update the text for an error message
Change-Id: Ia7d6aded597409f1c5afabb06dc7c479ff9b4f44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204624
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-23 00:01:57 +00:00
Nate Bosch 1948bd6109 Add fixes for HttpStatus constants
Add rename migrations for all the screaming snake case constants that
were renamed to lower camel case during the Dart 2 migraiton.

Rename the test from `file.dart` to `io.dart` so that we can test all
deprecations for the same import together. Add a test for the same
deprecations when imported through `dart:html`.

Change-Id: Iee91d88b1b11648e8c65cfcc8d2fcfabac3954ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203820
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2021-06-22 23:39:57 +00:00
Ryan Macnak addf391d5b Revert "[vm] Avoid race between profiler and stub code initialization."
This reverts commit 613d8cd88e.

Reason for revert: order of initialization seems to affect core-jit

Original change's description:
> [vm] Avoid race between profiler and stub code initialization.
>
> TEST=ci
> Bug: https://github.com/flutter/flutter/issues/83939
> Change-Id: I1b1e5e759fbdb766bac5a89328d05389a712aa98
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204441
> Commit-Queue: Ryan Macnak <rmacnak@google.com>
> Reviewed-by: Ben Konyi <bkonyi@google.com>

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

Bug: https://github.com/flutter/flutter/issues/83939
Change-Id: I7221e0ac1d9c9ab967c2068af8997ba8609a4784
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204623
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-22 23:38:59 +00:00
pq b2ed96fef3 fix ranges for unused_result diagnostic reporting
Fixes: https://github.com/dart-lang/sdk/issues/46441

Change-Id: If25772319ee639c6458b143ddcf3a9397a245548
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-06-22 23:00:35 +00:00
Brian Wilkerson 56bf5230ca Enhance the AddTypeAnnotation fix to support prefer_typing_uninitialized_variables
When a local variable doesn't have an initializer we now look for
assignments to find a reasonable type. This will not only allow this
lint to be fixed but will increase the number of places the assist is
offered.

Change-Id: Ib278477d277557aff7d2ddbcca3230f2a0a144b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204521
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
2021-06-22 22:50:37 +00:00
Sam Rawlins 64211b6fe5 Verify that function reference type arguments match bounds
Bug: https://github.com/dart-lang/sdk/issues/46233
Change-Id: Id83a1fbbb058ed04c4433a380ed08799b047c11e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204520
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-06-22 22:35:56 +00:00
pq 35b94197ea fix result-use checking for cascades
Fixes: https://github.com/dart-lang/sdk/issues/46432

Change-Id: I8b03fa690bd3f58ca32f8fe0ad8c5fcef70405e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204522
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-06-22 21:55:25 +00:00
Brian Wilkerson e95c0b403a Code complete the type in a DeclaredIdentifier even if the name is already present
Change-Id: Ic48f2213b2e5cf3f13c2b0d881781a5eab0cd965
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204560
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 21:47:13 +00:00
Regis Crelier 8b7870bc62 Reland "[VM/runtime] Handle generic types in intrinsics for type equality and runtimeType comparison."
This is a reland of 09d2025685

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

Intrinsics for sameRuntimeType wrongly assumed that types with unequal type arguments are unequal, which is not true:
1) nullability of individual type arguments may be different
2) one vector may be a prefix of the other vector

Note that the intrinsic for type equality did not make this assumption.

Case 2 above was not handled properly in the runtime.

TEST=added regression test

Original change's description:
> [VM/runtime] Handle generic types in intrinsics for type equality and runtimeType comparison.
>
> Generic types with equal class ids and equal type arguments are now considered equal by the intrinsics and a runtime call is avoided.
>
> Fixes https://github.com/dart-lang/sdk/issues/23746
>
> TEST=existing ones
>
> Change-Id: I668db119ac6d2525eac3a4f17a44f36c53b9dbf5
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203143
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Régis Crelier <regis@google.com>

Change-Id: I53fc00d856ecd9d9b8d66b8da95285e6e0bd508e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204363
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2021-06-22 20:35:53 +00:00
Lasse R.H. Nielsen 902f149e2c Add unawaited function and ignore extensions member.
The `unawaited` function in `dart:async` is intended for use with the `unawaited_futures` lint which is hopefully going to be part of the Dart recommended set of lints.

The `ignore` extension method is there to provide an alternative if you even want to ignore errors from a future. By having both, it makes the distinction clearer and makes it easier to not think one can be used for everything.

Change-Id: Ib96ed5ff64ead4b228721e5210efa82f76119c9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200428
Reviewed-by: Jacob Richman <jacobr@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-22 20:03:13 +00:00
Paul Berry 8aec705f69 Sort declarations in dartdev.dart
Change-Id: I07f8898f125f0b8bb3eb7e15dfba0b6ebbb6105f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204541
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-22 19:39:04 +00:00
Danny Tuppeny c073fb6257 [analysis_server] Switch to checking isSynthetic for argument lists in LSP completions
Change-Id: Ie57717baff1b20b6c9a9c17dd12723eecf4bfc6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204405
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 19:02:22 +00:00
pq 5f21e93f51 deprecated field pubspec diagnostic
Corresponding analysis in the pub client: https://github.com/dart-lang/pub/blob/master/lib/src/validator/deprecated_fields.dart

Downstream Flutter repo fixes: https://github.com/flutter/flutter/pull/84997


Change-Id: If453abcce3a24468e6fbcd2402e196000226fb4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204420
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 17:26:09 +00:00
Konstantin Shcheglov 9ba51289ca Issue 46284. Fix defaultValueCode for DefaultFieldFormalParameterElementImpl.
Bug: https://github.com/dart-lang/sdk/issues/46284
Change-Id: Ic485bda45a0ca83b5f1f497446f709b625ae3406
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204485
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-22 15:38:19 +00:00
Danny Tuppeny ad6c732663 [analysis_server] Support LSP SignatureHelp for type argument lists
See https://github.com/Dart-Code/Dart-Code/issues/2834.

Change-Id: Idce0d0b133b1f40c1953e5f1c5f4531701a68c56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 14:56:44 +00:00
Sam Rawlins e1620d6a27 Use multiplyDefinedElementMatcher in prefix_test
multiplyDefinedElementMatcher was used exactly one time, in
assignment_test; I almost removed it before finding this other use.

Change-Id: Iebcc04d897cc1337f97edbcfaa9f13385247ec35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204364
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-06-22 14:42:09 +00:00
Alexander Thomas b687e7e757 [infra] Fix pub integration test on arm64 macs
Cq-Include-Trybots: luci.dart.try:pkg-linux-release-try,pkg-mac-release-arm64-try,pkg-linux-debug-try,pkg-mac-release-try,pkg-win-release-try
Change-Id: Iccd49bf2ef18250e4b1c755594d3382eff38cee5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204504
Reviewed-by: Jonas Termansen <sortie@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-06-22 13:48:33 +00:00
Sam Rawlins 5b6b750c0d Implement first taste of "function references" in analyzer.
This feature is also known as "explicit function tear-off type
instantiations."

This first change adds the merest support for function references, only
those with explicit type arguments.

This change also bumps all PubPackageResolutionTest tests to opt-in to
constructor tear-offs.

We support:

* top-level functions, static and instance methods, local functions and
  local variables
* prefixed top-level functions

We error on:
* Wrong number of type arguments
* unknown identifier

Not included:
* static methods with explicit receiver
* prefixed static methods
* extension methods
* erroring on the validity of each type argument
* anything to do with implicit type arguments
* anything to do with constructor tear-offs
* anything to do with type literals

https://github.com/dart-lang/sdk/issues/46233

Change-Id: I8437f494f1c3d98cef667f675bb18e79a91c78c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203801
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-22 12:57:19 +00:00
Alexander Thomas 09fbf1ce60 [infra] Add more arm64 configurations to the test matrix
Change-Id: I2a2030edb08ef32c4e33806df8ed029bab682496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204142
Reviewed-by: Jonas Termansen <sortie@google.com>
2021-06-22 09:18:12 +00:00
Jens Johansen 5b5956bd4e [CFE] First pass at internal test utility
This is a first pass at running inlined tests
(seemingly called doctests in for instance python) on internal CFE code.

This is not useful for testing the entire compiler for instance, but
could be useful for utility methods that take simple inputs and provide
simple outputs.

I've added tests to a few tings to try it out.

The syntax for it here is probably overly verbose but we could iterate
on that if need be.

The way it's done is that the test-code is extracted from the comments
and (virtually) "injected" in a weirdly named top level method of the
same file, which is then called from a "fake" main; the whole thing is
compiled to dill and run in an isolate.
(This is an application where making advanced invalidation support
adding top level methods would be great).

Change-Id: I7927822bca0ba68780458c40fe585882330e3b60
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203242
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-06-22 08:12:58 +00:00
Ryan Macnak fb5465c624 [vm] Remove unused compilation and type-feedback traces.
Reduces VM code size by about 33k.

TEST=ci
Change-Id: Ifc74284fa69fe209ebf12566ca81bda765f19057
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/202863
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-21 23:47:50 +00:00
Paul Berry 02e82dae37 Migration: fix formatting in nullability_node.dart
Change-Id: If81aa896e9774001a0c3a2d1d661bc58c41b9cdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204425
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-21 22:32:00 +00:00
Nicholas Shahan a076fc2ad0 [ddc] Add variable symbol information
- Collects `VariableSymbols` for global variables and class fields.
- Add test cases.

Change-Id: Id79d60d01f84948c4c7b0bf9e54fbdd232da63da
Issue: https://github.com/dart-lang/sdk/issues/40273
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204086
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2021-06-21 22:15:10 +00:00
Alexander Aprelev 8665f05909 [vm] Fix longjump tests so that counters are volatile.
When switching to updated clang https://dart-review.googlesource.com/c/sdk/+/201862 the tests that use setjmp/longjmp started to fail with counters not being properly incremented(https://ci.chromium.org/ui/p/dart/builders/try/vm-kernel-linux-release-x64-try/50984/overview).
Marking counters as volatile fixes the problem.

TEST=SafepointMutexLockerWithLongJmp with updated clang

Change-Id: I8a6a40ceb962933705293317906840a88fb05f53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204460
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2021-06-21 21:49:50 +00:00
Ryan Macnak 613d8cd88e [vm] Avoid race between profiler and stub code initialization.
TEST=ci
Bug: https://github.com/flutter/flutter/issues/83939
Change-Id: I1b1e5e759fbdb766bac5a89328d05389a712aa98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204441
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
2021-06-21 21:49:00 +00:00
Danny Tuppeny 1563d3fdd3 [dds] Add support for DAP threadsRequest
Change-Id: I8dc128f0fc4dae16c53bc9deaf3b866d7198110f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203902
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-21 20:44:40 +00:00
Danny Tuppeny 97f013773c [dds] Support custom requests in DAP and verify DDS is available
Change-Id: I41be607668feaab30ae10b4fe725ad3f89e4a8ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203861
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2021-06-21 20:40:20 +00:00
Paul Berry ff058cffa6 Migration: Migrate generated file resources.g.dart to null safety.
Change-Id: Ia7db1e886c66601c47f251fa160001e743302f09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204423
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-21 19:18:10 +00:00
Paul Berry 1641a4bcfb Remove unused import
This import was accidentally included in
https://dart-review.googlesource.com/c/sdk/+/204180 but it wasn't
needed.

Change-Id: I11d70c49aba784e907bb3d2d235bedb7570489c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204422
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-21 18:32:00 +00:00
Sigmund Cherem 10819f6e21 [dart-cli]: delegate arg parsing to the underlying dart2js command
Since we anyways delegate all work to the same snapshot, this allows us
to maintain the argument parsing in a single location and makes it easier to
migrate existing usages of `dart2js ...` to `dart compile js ...`.


Change-Id: I24172fc87c040128d552cf68b98094e1c2f2c22f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204421
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2021-06-21 17:44:00 +00:00
Ryan Macnak 4a20a8dba9 [vm] Treat LinkedHashMap as a regular Instance in clustered serialization.
The rehash-on-null-index code has been dead since 84dbb6e0b6.

TEST=ci
Change-Id: I4eec641ca412b6b254360a049f20e67b2c9e9718
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204061
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2021-06-21 16:48:50 +00:00
Joshua Litt 889659e876 [dart2js] Use library as key for some holder properties.
Change-Id: I24d21dd6239191ab0242387d97d6b47cdf9582b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203826
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2021-06-21 16:40:29 +00:00
Konstantin Shcheglov 882b2d580c FunctionType.element should be null for aliasedType.
This used to be the case when we read element model from bytes.
But we started (accidentally) providing it when keeping linking elements.
This caused https://dart-review.googlesource.com/c/sdk/+/201661 to be
reverted.

There is a work around in dartdoc, to be pulled into SDK.
https://github.com/dart-lang/dartdoc/pull/2687

This CL hopefully fixes the issue.

Change-Id: Ib1a952085a80c4673baab01a6c4e4a30c1a8ea73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-21 16:40:09 +00:00
pq 2d6ed34c16 migrate tests from validators to diagnostics
Change-Id: I8da5fd98a5dd045ef1174f8f96fed2d8c30ff38e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2021-06-21 16:20:40 +00:00
Konstantin Shcheglov c1cb554696 Move tests for comment reference resolution.
Implementation was done in:
https://dart-review.googlesource.com/c/sdk/+/204040

Change-Id: I433f0c9586ae57342d628d26ec60027a3d91fdb1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2021-06-21 16:08:30 +00:00
Brian Wilkerson 430709cd1d Improve the highlight range for type_parameter_supertype_of_its_bound
Change-Id: I6184d09bac93a634a08441b3fcee8c4dcf816387
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204361
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2021-06-21 15:35:15 +00:00
Paul Berry 497f1020a8 Migration: fully delete the postmortem tool.
I removed the postmortem functionality in
203d0ed789 but instead of removing the
postmortem tool itself, I merely removed the body of its `main`
method.  This CL finishes the removal.

Change-Id: I525afe40ab3b69b81edc28b0fdded06fed5710c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204320
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-21 14:29:09 +00:00
Lasse R.H. Nielsen 19252d5786 Fix behavior for -infinity width/height of rectangles.
Fixes #30186
BUG= dartbug.com/30186

Change-Id: I2994d180a4dc4d4e4bba7edec67bc2bcc2e8fc0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201568
Auto-Submit: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2021-06-21 13:29:39 +00:00
Alexander Thomas d3ae296953 [co19] Roll co19_2 to d6e96f6d922b17fcf2e021e0f2b28835c861eb17
2021-06-15 sgrekhov@unipro.ru Fixes 1100. Modify link's directory not link itself to fire an event
2021-06-15 sgrekhov@unipro.ru 1098. Fixed co19_2 roll failures
2021-06-08 sgrekhov@unipro.ru 1097. Fix roll failures
2021-05-28 irina.arkhipets@gmail.com Issue 1092: Missing Issue tag added.
2021-05-28 irina.arkhipets@gmail.com Issue 1092: co19_2 test updated.
2021-05-27 sgrekhov@unipro.ru 1086. Replace @compile-error by static errors

Change-Id: I0dcb051cbd5dcaa38296d2e919a47877385b5fd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204402
Reviewed-by: Karl Klose <karlklose@google.com>
2021-06-21 11:37:06 +00:00
Clement Skau 97cf1d0e45 [VM] Initialises AllocateHandleInstr handles.
AllocateHandleInstr returned a pointer to uninitialised memory.
This CL initialises the handle to sentinel.

This addresses the MSAN issue in
https://github.com/dart-lang/sdk/issues/46367.

TEST=dartk-msan-linux-release-x64 vm/cc/Dart_SetFfiNativeResolver

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try
Bug: https://github.com/dart-lang/sdk/issues/46367
Change-Id: I90b731dcb25ccdca77364fb0e97d040c954942d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203768
Auto-Submit: Clement Skau <cskau@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2021-06-21 10:12:09 +00:00
Alexander Thomas 9bcebce220 [infra] Upgrade Chrome to 91
* Sort command line options passed to chrome.
* Add --disable-component-updates to reduce flakiness from self-updates.
* Add --use-mock-keychain to avoid modal permissions dialog on macOS.

Change-Id: I63bf4895c219efe691af683dab527a036a8e018b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203520
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2021-06-21 06:30:27 +00:00
pq b929c66393 modularize pubspec validation
Some refactoring in preparation for adding a bunch of additional pubspec validation to analyzer.


Change-Id: Iacda7fd098aeab01d3ed2bafc314f018a2eb6504
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204340
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 22:33:24 +00:00
Brian Wilkerson 9da9768992 Use the context type to determine whether to suggest functions returning void
Change-Id: I78dac1852cb08f01927ef7fc2603d7de0b3dd891
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204220
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 20:46:24 +00:00
Brian Wilkerson 2afc8161f4 Add a fix for exhaustive_cases that adds cases for the missing constants
Closes: https://github.com/dart-lang/sdk/issues/45923
Change-Id: I641c016dc73153d521f43c9ce4d333b50b4a702c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204261
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 20:17:03 +00:00
Konstantin Shcheglov bcf6350b15 Fix pre-existing HintCode.UNNECESSARY_TYPE_CHECK_TRUE in a test.
TEST=pkg/vm_service/test/async_generator_breakpoint_test.dart

Change-Id: Icbd372ea180bbf3f828bb09e1cbec0467572f4c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204083
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2021-06-19 18:53:23 +00:00
Paul Berry 62f72311ae Migration: make API tests fail if there's an unexpected error.
I've recently wasted a lot of time tracking down strange behaviors
that resulted from inadvertenly writing a migration API test
containing a static error.  Failing the test early if there's an error
should avoid that problem in the future.

Change-Id: Idc9d84901a517ce9555fa3180f5c669aea449ea5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204180
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-06-19 16:58:04 +00:00
Jason Simmons 2f9f746d83 Fix a typo in the Object docs (exception -> except)
Change-Id: Ie160e4b7daa2f989e23edf9f5248b612681d285e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204262
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-06-19 11:19:13 +00:00
Vyacheslav Egorov c3880f466f [vm/aot] Fix issues with .eh_frame
* Make sure to emit .eh_frame before .dynamic section to satisfy
a single non-writable segment requirement (see Elf::WriteProgramTable)
* Use compiler::target::kWordSize instead of kWordSize when aligning
CIE/FDE and for data alignment factor.

TBR=aam@google.com
TEST=dartkp-linux-debug-simarm-crossword

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

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-linux-debug-simarm_x64-try
Change-Id: Ieb73b7b90edcce91709201dc92caf0bb74ac1189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204201
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
2021-06-19 04:56:16 +00:00
Janice Collins b3a688a9c6 Revert "Keep libraries after linking, don't reload from bytes."
This reverts commit fa303ebc31.

Reason for revert: This breaks dartdoc until https://github.com/dart-lang/dartdoc/pull/2687 can roll to analyzer.

Original change's description:
> Keep libraries after linking, don't reload from bytes.
>
> Presubmit in google3 looks green.
> https://test.corp.google.com/ui#id=OCL:376412203:BASE:379875911:1623903883365:2a59d852
>
> Change-Id: I344d49fa12e2f07aa00623ea08e7530872ca2eec
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201661
> Reviewed-by: Samuel Rawlins <srawlins@google.com>
> Commit-Queue: Konstantin Shcheglov <scheglov@google.com>

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

Change-Id: I6eeee8b6f480a6ac5c2665e5844f04788c1174a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/204263
Commit-Queue: Janice Collins <jcollins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-06-18 23:06:46 +00:00