Commit Graph

77026 Commits

Author SHA1 Message Date
Daco Harkes 4adebc6d2a [vm] remove unecessary store of x18 to Thread
Related issue: https://github.com/dart-lang/sdk/issues/44435

TEST=Unfortunately we have no tests set up for shadow call stack.

Change-Id: Ibea3662ba2ef563702288b7a52f816df3217aa41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175367
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-12-09 20:08:00 +00:00
Konstantin Shcheglov 81d3244a8c Remove invalid factory constructors redirecting to abstract class.
According to the specification:
Otherwise, it is a compile-time error if R
denotes a generative constructor and D is abstract.

Not sure why we have these constructors at al.

Change-Id: I0ec671245c9b482c6455f7f5725b83db63b3c9db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175361
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-12-09 19:41:30 +00:00
Ryan Macnak b957f09c6b [infra] Expand TSAN coverage.
Bug: https://github.com/dart-lang/sdk/issues/39611
Change-Id: I060403da4b5daff91b60805bad1e83865e021133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139496
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-12-09 19:31:50 +00:00
Devon Carew 55496c8a06 [dartdev] make the 'dart fix' command visible
Change-Id: I545242f2dbb0092f3d2e31b9cfbecbb2705df69f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175400
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2020-12-09 17:41:25 +00:00
Alexander Aprelev e45e4cad50 [vm/service] Fix calculation of heap size numbers for isolate groups
TEST=benchmarks/IsolateSpawnMemory with/without --enable-isolate-groups

Change-Id: Id8349839248323b84cbc743217cd4a380504c8b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175520
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2020-12-09 17:36:20 +00:00
Johnni Winther 8103c90dbf [cfe] Use combined member signature in override inference in legacy code
+ emit only one message per method given that it now always has the
same root cause, namely that the combined member signature does not
exist.

Closes #31797

Change-Id: Id89a5557c5fdda1db087c20cbe92847dd08216a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175305
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-12-09 17:33:20 +00:00
Lasse R.H. Nielsen b62ad8247f Switch order of socket tests to avoid timing issue.
Also fix one more place where ??= was appropriate.

Bug: https://github.com/dart-lang/sdk/issues/44414
Change-Id: I323bd0b82a1070a7e1341bee3a917564af45cafa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175360
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2020-12-09 16:19:00 +00:00
Sam Rawlins 88de6b438e dart migrate: Implement incremental migration in backend
This is still hiding behind a flag pending final review.

Bug: https://github.com/dart-lang/sdk/issues/44101 and
Change-Id: I01b7cb07b3fde7ac67105034b0c4057cb8a69771
     https://github.com/dart-lang/sdk/issues/44124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175402
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-12-09 15:21:50 +00:00
Paul Berry a7ee05f27d Reland "Flow analysis: Track expression variables separately from promotion info."
This is a reland of fd2a6c6815

Original change's description:
> Flow analysis: Track expression variables separately from promotion info.
>
> Previously, we used a single class hierarchy, ExpressionInfo, to store
> all the information that flow analysis needs to know about a variable,
> including:
>
> 1. What is known about the program state if the expression evaluates
>    to true/false
>
> 2. Whether the expression is a `null` literal
>
> 3. Whether the expression is a reference to a variable.
>
> However, in order to address
> https://github.com/dart-lang/language/issues/1274 (Infer
> non-nullability from local boolean variables), we'll need #3 to be
> tracked orthogonally from #1, so that when a local boolean is referred
> to later, we can track information of type #1 and #3 simultaneously.
>
> However, it makes sense to keep #1 and #2 in the same data structure,
> because future work is planned to represent them in a more uniform
> way, as part of addressing
> https://github.com/dart-lang/language/issues/1224 (Using `if (foo?.bar
> == somethingNotNull)` should promote `foo`).
>
> Change-Id: I432f6e2e80543bb1d565b49403180c520eef66a5
> Bug: https://github.com/dart-lang/language/issues/1274
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175008
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Commit-Queue: Paul Berry <paulberry@google.com>

Bug: https://github.com/dart-lang/language/issues/1274
Change-Id: I002adbde782887def50dc80ab6673411b321c341
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175362
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2020-12-09 14:36:50 +00:00
Jens Johansen c60398400e [parser] Recover better from 'required' parameter declaration in non-nnbd
Natural follow-up to https://github.com/dart-lang/sdk/issues/44379.

Change-Id: Idf73df0c9e8ce1f477d05aa73caf8975d2ffb9f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175307
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-09 13:47:19 +00:00
Jens Johansen a8b372057e [parser] Recover better from 'late' field/variable declaration in non-nnbd
Fixes #44379
(https://github.com/dart-lang/sdk/issues/44379)

Change-Id: If97d0d57b1fe16777f6208b49a8b472420ac526a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175306
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-09 13:01:39 +00:00
Jens Johansen 869d75550d [CFE] Add comments and todos in crash test minimizer
Comments/todos the came to light in
https://dart-review.googlesource.com/c/sdk/+/174643

Change-Id: I29841862cc63325e1da052299c9c617bf651d5ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175364
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-12-09 11:43:09 +00:00
Martin Kustermann 425780f410 [vm/concurrency] Share program structure and JITed code with --enable-isolate-groups
This removes our temporary scaffolding support for JIT isolate groups
(which was implemented by creating a new isolate group, loading the
application kernel into it and then merging the heap into the original
isolate group - maintaining a different object store)

It makes all isolates within a group share the same object store, same
libraries and JITed code. It will be conservative to start with, only
allow running unoptimized code, etc.

We will gradually remove the restrictions imposed by this CL:
  https://dart-review.googlesource.com/c/sdk/+/173970

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Tests using --enable-isolate-groups with JIT sharing.

Change-Id: I2bf69a6fe3c905067c4cec2e81613f731c52e5ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175302
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2020-12-09 09:39:59 +00:00
Michal Terepeta 97093b2594 Watch Bazel generated files for changes
This introduces a way to see what paths have been searched for by
the `BazelWorkspace` and adds a polling-based watcher to detect
when files generated by Bazel appear (or have changed). This allows
us to re-analyze things automatically instead of, e.g., restarting
the server.

Change-Id: I60eae29b0e4fcc3a91d8d2275c6898e45548ea03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168649
Commit-Queue: Michal Terepeta <michalt@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2020-12-09 09:39:19 +00:00
Sigurd Meldgaard bf26eb3c94 Reland "Roll pub"
This is a reland of 41381e9598

Contains one more fix:
8ea96121d fix tryGitCommand

Original change's description:
> Roll pub
>
> a7e448b2 pub upgrade --major-versions (#2784)
> 06bcff09 pub upgrade foo, only unlocks foo from pubspec.lock (#2781)
> aa20a4bd Usage exceptions no stacktrace (#2776)
> 14e12bf6 Clarify error message when spawning a subprocess fails (#2763)
> 5ef0a0e7 Added a pub upgrade --nullsafety mode (#2741)
> 9cde2406 Fix pub remove --dry-run (#2774)
> 7426be94 Remove hack now issue has been fixed (#2773)
> 90a1f776 Limit retries in test to avoid timeout (#2765)
> 3aa327c7 Stop depending on .packages (#2764)
>
> Change-Id: Ifd8a8402c4628e7278b6fedfd2ca7902004fa6e8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175241
> Auto-Submit: Jonas Jensen <jonasfj@google.com>
> Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

Change-Id: Id50e6eca0372860f7087882a5c67141def07031c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175309
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2020-12-09 09:06:59 +00:00
Nate Bosch d99629f8e0 Update to latest package:http_multi_server
Fixes a test for compatibility with google3.

Change-Id: Id85c531b6768b6a59f2f63e991de96dd92ab3232
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175446
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
Reviewed-by: David Morgan <davidmorgan@google.com>
2020-12-09 07:49:38 +00:00
Konstantin Shcheglov 2c7de33476 Report TYPE_ALIAS_CANNOT_REFERENCE_ITSELF for non-function type aliases.
Change-Id: I9ebcae63f4a5b708f25f9f41c5733ea701350a42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175384
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-09 06:02:48 +00:00
Stephen Adams 35c7ebba1f [js_runtime] Specialize JSArray.addAll for JSArray input
Change-Id: I80b648a1a7c1cafb871618ccf57901047a374c19
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175344
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-12-09 05:23:08 +00:00
Konstantin Shcheglov a2d488123c Implement support for accessing static member when aliased type is InterfaceType.
Change-Id: Ia86338b409e0ee6f812924966a0d0eebf29597c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175421
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-09 02:19:08 +00:00
Nate Bosch de8b2fbf6b Update to latest package:shelf
Change-Id: I4aa907e14358d631c5d895eed4da54330fe3cb8a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175460
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-12-09 01:45:38 +00:00
Nicholas Shahan 4c2edfd5b9 [html] Make cancel() always return synchronously
Before Null Safety, `_EventStreamSubscription.cancel()` used a trick
to run with synchronous timing even though it was typed to return a
`Future`. During the migration of the SDK to support Null Safety it
kept the synchronous timing in weak mode, but was changed to
asynchronous in sound mode so that the behavior matched the method
signature. In hindsight, changing the timing when opting into Null
Safety is problematic:

* A shared package has no control over what mode it runs in. Libraries
  may be opted in and run their tests with sound null safety but the
  apps they are used in could still be running in weak mode. This
  results in library unit tests that behave differently than the
  production app that deploys the code.

* This codepath can be triggered by EventTarget.dispatchEvent() from
  dart:html which should have synchronous timings for the event
  listeners before returning to the calling code. The asynchronous
  timing when running with sound null safety is inconsistent with the
  browser API.

This change reverses that migration decision and keeps the synchronous
timing in both modes. To support this in sound mode it returns a
special future value that is internal to the SDK and known to be used
for synchronous timing.

This change also removes the workaround introduced in DDC to avoid
warning/failing when `_EventStreamSubscription.cancel()` returned
null and the extra warnings/errors features were enabled in weak
null safety mode.

Change-Id: I6b08a2ada5b10120bea787ad59d1d58e6e181de5
Fixes: https://github.com/dart-lang/sdk/issues/44157
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175323
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-12-09 01:44:38 +00:00
Nate Bosch 87d5894a5a Update to latest package:http_multi_server
Change-Id: I1ba60a85020e11e0a1153f225793b9e3ae87e337
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175440
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-12-09 01:28:58 +00:00
Nate Bosch 2346d26253 Update to latest package:shelf_static
Change-Id: I49cf0ba2021a9eac848b299be8a94ae23f2a99f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175441
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
2020-12-09 01:28:50 +00:00
Ryan Macnak 1b160f79fe [vm] Gracefully handle loads not solicited by prefix.loadLibrary().
TEST=flutter
Bug: https://github.com/dart-lang/sdk/issues/41974
Change-Id: Ia0e99c5e84cdff8736c44e4e82ce40b045ed0207
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174563
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2020-12-08 22:14:25 +00:00
Joshua Litt 7d64e39572 [dart2js] Add flag to specify maximum number of deferred code fragments.
Change-Id: Ifd85eb01c0be9de9ebbb157df616ef8765a4d5b5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158366
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-12-08 21:21:40 +00:00
Jacob MacDonald be09d34ff6 update mime to the null safe version
Change-Id: Ie411f2a236642a28513d59d619ed32c07693bd08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175401
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
2020-12-08 21:14:35 +00:00
Konstantin Shcheglov 2cf24e3b57 Evaluate TypeAliasElement in ConstantVisitor.
R=brianwilkerson@google.com

Change-Id: I53ce1ed1b838c0c2a3c977f9be930733b951547a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175383
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 21:13:35 +00:00
pq 60bec731a0 @doNoStore fixes for function expressions
Fixes: https://github.com/dart-lang/sdk/issues/44425

Change-Id: I5bac77d9a2961750b0037cd1d464ae059bcbe886
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2020-12-08 21:01:55 +00:00
Danny Tuppeny 0fa6674ea9 [Analyzer] Include required-named params in defaultArgumentListString and LSP complete-function-calls
Change-Id: I8b4c09305df6e868e7447c538be4a3b540aa7e57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/174802
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2020-12-08 20:47:04 +00:00
Konstantin Shcheglov dbe003f6af Update AstRewriter to support non-function type aliases.
R=brianwilkerson@google.com

Change-Id: Id2bca0b3c8603fceea18628286412fea5a4598de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175382
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 20:46:25 +00:00
Janice Collins 3040659aed Update dartdoc to 0.38.0.
Release notes:  https://github.com/dart-lang/dartdoc/releases/tag/v0.38.0


Change-Id: Idac8b626e279df5fae5f8837a5327a2c7b54395d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175381
Reviewed-by: Devon Carew <devoncarew@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Auto-Submit: Janice Collins <jcollins@google.com>
2020-12-08 20:35:05 +00:00
pq 9cc78dce1f tweak description/disclaimer
Removes API migration from the description and ensures the disclaimer appears when run in a help context.

Sample output:


```
$ dart bin/dartdev.dart fix
Fix Dart source code.

This tool looks for and fixes analysis issues that have associated automated fixes.

To use the tool, run either 'dart fix --dry-run' for a preview of the proposed changes for a project, or
'dart fix --apply' to apply the changes.

Note: The `fix` command is provisional and subject to change or removal in future releases. Feedback is
welcome!

Usage: dart fix [arguments]
-h, --help       Print this usage information.
-n, --dry-run    Preview the proposed changes but make no changes.
    --apply      Apply the proposed changes.

Run "dart help" to see global options.

$ dart bin/dartdev.dart fix -n

Note: The `fix` command is provisional and subject to change or removal in future releases. Feedback is welcome!

Computing fixes in dartdev (dry run)... 15.2s
Nothing to fix!


$ dart bin/dartdev.dart fix --help
Fix Dart source code.

This tool looks for and fixes analysis issues that have associated automated fixes.

To use the tool, run either 'dart fix --dry-run' for a preview of the proposed changes for a project, or
'dart fix --apply' to apply the changes.

Note: The `fix` command is provisional and subject to change or removal in future releases. Feedback is
welcome!

Usage: dart fix [arguments]
-h, --help       Print this usage information.
-n, --dry-run    Preview the proposed changes but make no changes.
    --apply      Apply the proposed changes.

Run "dart help" to see global options.
```




Change-Id: I2fc03651d8a1605a9729bb4d62e382f533509d99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175343
Commit-Queue: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2020-12-08 19:39:05 +00:00
Joshua Litt 86e598808f [dart2js] Support reading closed world during codegen.
Change-Id: I6dd82cb7744b7053eac2afc2ef5206d176c2da26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175320
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-12-08 17:49:54 +00:00
Konstantin Shcheglov 993bd8a380 Fix NPE in AddAsync when implicit return type.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: Id684a3c5d93aa353b0ad5a89407378bd3c9522e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175328
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 17:43:04 +00:00
Jody Sankey 1c4e0d8dbd [fuchsia] Migrate off zx_clock_get.
zx_clock_get is a deprecated syscall that we're in the process of removing.
This CL replaces the only remaining usage with the modern equivalent.

Ref:
https://fuchsia.dev/fuchsia-src/contribute/governance/rfcs/0008_remove_zx_clock_get_and_adjust

TEST=existing tests on vm-fuchsia-release-x64-try

Bug: fuchsia:60521
Change-Id: Ic48563a09d7585af52027470f8202605da4ba70e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175324
Commit-Queue: Zach Anderson <zra@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
2020-12-08 17:41:50 +00:00
Konstantin Shcheglov ce9e064680 Drop 'summary2' import prefix build_mode.
Change-Id: Ibb0218becc58d8d24298bd77e316727a8bf57bd1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175327
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 17:34:59 +00:00
Konstantin Shcheglov ef09410def Remove ElementImpl.getChild()
It is not used internally or externally (and not API).

Change-Id: Ia35bfe2ea83e1da5ae4b7945220e2b1a31c88da8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175326
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 17:33:45 +00:00
Konstantin Shcheglov 1c864b1bc7 Fix for StackOverflow in FileState.library
Change-Id: I6dd9ceefbfa8d5f457d69ae20838290b8a208c98
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175329
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 17:26:54 +00:00
Konstantin Shcheglov b3bcf36a8e Fix for crash in EncapsulateField when in extension.
R=brianwilkerson@google.com, pquitslund@google.com

Change-Id: Ie8b06ad2eea1c4976ca119a39c086cd15faab013
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175330
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-12-08 17:25:40 +00:00
sgrekhov 40c4b98503 [co19] Enable html/HttpRequest tests
Change-Id: I51fd765498eaa7c1970b71b846194771d967bd14
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175252
Reviewed-by: Alexander Thomas <athom@google.com>
2020-12-08 14:56:18 +00:00
Martin Kustermann a97b43f4ec [vm/concurrency] Allow concurrent evaluation (and caching) of metadata
If multiple threads want to obtain metadata they might both evaluate and
possibly cache the result of evaluation. Since the kernel loader
initialy adds metadata mappings (the value being kernel offsets) we use
the existing `IG->program_lock()` which the kernel loader already holds.

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Tests using --enable-isolate-groups with JIT sharing.

Change-Id: I3b618f196abe9f7b584e4135a72a0017399ff2d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175301
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2020-12-08 14:56:04 +00:00
Johnni Winther 3d19493f2d [cfe] Add flag to identify lowered locals
+ add predicate helpers to identify these and extract their
original names.

TEST=pkg/front_end/test/predicates/predicate_test.dart

Change-Id: I4d94c575d010b6b01c985eaf5392b9e0e979d044
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175250
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-12-08 14:53:14 +00:00
Martin Kustermann c549ecf1e6 [vm/concurrency] Allow code to be already installed when arriving in CompileFunction runtime entry
Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Tests using --enable-isolate-groups with JIT sharing.

Change-Id: I155eef4731312f55f6c14a81aa0333cb84b70131
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175300
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-12-08 13:52:44 +00:00
Jens Johansen f03d4bc198 [CFE] Refactor and improve crash test minimizer
Change-Id: I15f36ed980f07f37b77e3b8df471e8fbca714c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175244
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-12-08 13:38:34 +00:00
Martin Kustermann fdd19ee3dc [vm/concurrency] Unify instance call miss handling across JIT/AOT
This unifies handling of instance call miss handling on
{JIT,AOT}x{ICOneArgMiss,ICTwoArgMiss,SwitchableCallMiss}.

It changes the [PatchCallHandler] to work in 3 independent steps:

  * Resolve target function
  * Under IG->patchable_call_lock():
    * Update type feedback
    * Possibly cause call site transition
  * Return data to miss handler to finish the call

This is a pre-requisite for sharing JITed code across lightweight
isolates, since in such a scenario any number of threads can go out to
any miss handler. The call site could then be transitioned several times
before they even return (which is currently not handled correctly).

Issue https://github.com/dart-lang/sdk/issues/36097

TEST=Tests using --enable-isolate-groups with JIT sharing.

Change-Id: I673a6cdc21040fe7577e1d658c300e560cc04b7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175142
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2020-12-08 13:28:24 +00:00
Jens Johansen 6c19a8fc81 [VM] Read and report constant constructor coverage from dill (2nd try)
This CL makes use of the now included constant constructor coverage
in the dill file.

It works like this:
* When the CFE evaluates constants, every constant constructor
  invocation evaluated saves the reference to the constructor in the
  `Source` (from the Components uri to source table) for the callers
  Library.
* This data is loaded into the VM in a "raw" format.
* When a request for coverage comes in, the VM - on top of the normal
  coverage processing - goes through all scripts to find constant
  constructor coverage for the requested script and offset. Note that
  all scripts must be checked because library A can have evaluated a
  constructor from library B - so even if only coverage for library B
  was requested, library A has to be checked.
  For all constructors found the start and end position is reported as
  covered. Note that this does not mark any initializes and there are
  (at least currently) no good way of marking which initializes were
  evaluated (because it has to be stable across edits even when the
  `advanced invalidation feature` is enabled).
* Note that the reason for the coverage to work on references - as
  hinted above - is because we want it to be stable across hot reloads
  even if/when advanced invalidation is enabled. This means, that
  library A cannot record "positional coverage" for library B because
  library B might get (for instance) new comments that will make any old
  offsets invalid. By using references we always lookup in the current
  world and use the correct offsets.

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

TEST=Existing test suite, new tests for the new coverage added.

Change-Id: I29531247a4b91a99d9a459cfdefbb9798e9c948f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175246
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-12-08 10:47:43 +00:00
Johnni Winther c19225224b [cfe] Handle lowered Map/Set/List constants in constant evaluation
Change-Id: Ib3b3a39478fe0927fc0168a9916684fd9ac09f77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175247
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-12-08 10:42:43 +00:00
Johnni Winther 30252ed0f8 [cfe] Handle legacy operator == in combinedMemberSignatureType
Previously, the special casing was only performed when creating
a new member. In a follow up, the combined member signature type
will be used for override inference also for legacy libraries and
thus need in [combinedMemberSignatureType].

Change-Id: I23036c0282cdcd633ffe2e9c524e9554cb9dc5ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175249
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-12-08 09:49:23 +00:00
David Morgan c0e13c1ce4 Revert "Roll pub"
This reverts commit 41381e9598.

Reason for revert: pub fails on startup if git is not installed; b/175080640

Original change's description:
> Roll pub
>
> a7e448b2 pub upgrade --major-versions (#2784)
> 06bcff09 pub upgrade foo, only unlocks foo from pubspec.lock (#2781)
> aa20a4bd Usage exceptions no stacktrace (#2776)
> 14e12bf6 Clarify error message when spawning a subprocess fails (#2763)
> 5ef0a0e7 Added a pub upgrade --nullsafety mode (#2741)
> 9cde2406 Fix pub remove --dry-run (#2774)
> 7426be94 Remove hack now issue has been fixed (#2773)
> 90a1f776 Limit retries in test to avoid timeout (#2765)
> 3aa327c7 Stop depending on .packages (#2764)
>
> Change-Id: Ifd8a8402c4628e7278b6fedfd2ca7902004fa6e8
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175241
> Auto-Submit: Jonas Jensen <jonasfj@google.com>
> Reviewed-by: Sigurd Meldgaard <sigurdm@google.com>
> Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>

TBR=sigurdm@google.com,jonasfj@google.com

Change-Id: I29b20b4a2dc037146dd27c8fe6e6ecce6833e7b6
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175303
Reviewed-by: David Morgan <davidmorgan@google.com>
Commit-Queue: David Morgan <davidmorgan@google.com>
2020-12-08 08:41:17 +00:00
Alexander Thomas 794d56405c [co19] Roll co19 to d8e25398102add0ac1e732850928bd44c78f2447
2020-12-06 sgrekhov@unipro.ru Fixes #972. Remove nnbd-strong flag from static Subtyping tests
2020-12-04 irina.arkhipets@gmail.com Fixes #973: `SharedOptions=--enable-experiment=triple-shift` tag removed from the tests.
2020-12-04 irina.arkhipets@gmail.com Issue #972: needless `Requirements=nnbd-strong` tag removed.
2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags removed from the following LanguageFeatures/nnbd tests: tripple-shift, type-aliases, type-normalization.
2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags removed from LanguageFeatures/nnbd/ovrriding tests.
2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags remoed from LanguqgeFeatures/nnbd/Least-greatest-closure/nonfunction_typedef tests. Duplicated nonfunction)typedef tests removed.
2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags remoed from LanguqgeFeatures/nnbd/Least-greatest-closure/class, LanguqgeFeatures/nnbd/Least-greatest-closure/nonfunction_typedef tests.
2020-12-04 irina.arkhipets@gmail.com Issue #972: `Requirements=nnbd-strong` tags remoed from LanguqgeFeatures/nnbd/flow-analysis tests.
2020-12-04 irina.arkhipets@gmail.com Issue #463: Missing Requirements=nnbd-strong tags added.
2020-12-03 irina.arkhipets@gmail.com Fix for the Issue #972: `Requirements=nnbd-strong` removed from LanguageFeatures/nnbd tests (without subdirectories)
2020-12-02 sgrekhov@unipro.ru Cross Origin Error for HttpRequest tests fixed
2020-12-02 irina.arkhipets@gmail.com Typo corrected.
2020-12-01 sgrekhov@unipro.ru Test that use tripple shift operation moved to tripple-shift directory

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I5f19e8ddc738713b2339cae22d1d1925e35b1da2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175242
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2020-12-08 07:45:07 +00:00