In the dartfix-based implementation, the only significant effect of
supplying `--debug` was to enable the analysis server's
instrumentation log. Since we don't have an analysis server layer in
the new CLI, there's no need for this command line option right now.
If we decide we need a `--debug` flag later we can always add it.
Change-Id: Ib729c5793044456ef460cfa7f823c48f5af9e898
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146445
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
We no longer need a clumsy workaround using an extension method.
Change-Id: If443cbe7138f59e66cce0ca613940b67307b637e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146502
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
The previous implementation of the tool (based on dartfix) used
diffing code that was pretty deeply tied into dartfix, and didn't
produce good quality output for migration, so I've replaced it with a
new implementation.
Change-Id: Id3679435bf59c73145eacb6eaee1b6ce16dd61f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146442
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
- Remove collecting private fields from scope calculation
We only need to collect the fields from the evaluated
expression and they are already collected separately.
- Correct private fields calculation
Currently, library names are assumed to be the same as the module,
which creates redefinitions of library variable in produced Javascript
code, and exceptions in chrome for modules that contain more than one
library.
The actual fix will come from making DDC incremental by storing more
information, for now make a best effort to compute correct names for
library variables from the module data that expression compiler
receives from chrome. The following code will be produced to calculate
private symbols _pf1 (from lib1, module1) and _pf2
(from lib2 module1):
let lib1 = require('module1.dart').lib1;
let lib2 = require('module1.dart').lib2;
let _pf1 = dart.privateNames(lib1, '_pf1');
let _pf2 = dart.privateNames(lib2, '_pf2');
Note that this seems to work even if the current breakpoint is inside
the define statement for lib1, and the lib1 symbol is not exported
yet.
Closes: https://github.com/dart-lang/sdk/issues/40272
Closes: https://github.com/dart-lang/sdk/issues/41585
Change-Id: I141719d2d5d5c08dd3c0ef5f0406756dce5575ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145307
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
If an external customer reports an issue with the migration tool using
the links we provide, they won't have the necessary github privileges
to apply labels to the issue, so we want to make sure the default bug
title clarifies that this is a customer-reported issue with NNBD
migration.
Change-Id: I55bf8c16062b1b9e8c25415addc99dd1c378b724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146621
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Snapshots which contain code are compiled with a particular null-safety
mode and it is not possible to change their mode at run time.
When running from such snapshot, VM now reads null-safety mode from
the snapshot if it is not specified at the command line.
This avoids the need for embedders to pass null-safety flag
used during snapshot generation also to the runtime, similarly to
other VM flags listed in VM_GLOBAL_FLAG_LIST (such as use_bare_instructions).
In addition, error for incompatibility of kernel libraries with
current null-safety mode is changed from ReportError (which attempts
to throw an exception) to a FATAL, because throwing an exception
crashes when bootstrapping from a kernel file.
Change-Id: I93a791825c25c2da4e33634f1c71736c17928fea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146460
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Change-Id: I8d41ad649c83cd97253006693a0cf3676de418e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145542
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Our TLAB sizes and maximum new space size constrain the number of
parallel mutator threads we can have. Having too many mutator threads
would cause constant races between threads to acquire TLABs.
In reality we should constrain the number of threads to be at most the
number of cores, since at most that many threads can run in parallel
(i.e. at the same time).
This CL extends the TreadPool implementation to be constrained by a
maximum size. Furthermore it makes each isolate group's have it's own
pool with constrained size and schedule all group member
mutator / message handler tasks on that pool.
Issue https://github.com/dart-lang/sdk/issues/36097
Change-Id: I095c749adad827ab892f33713a32be594d7606d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145382
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Removes the Closure.clone() in sync* by adding an additional closure
around the rewritten sync* function body.
This is a re-worked version of the now reverted:
- https://dart-review.googlesource.com/c/sdk/+/136190
- https://dart-review.googlesource.com/c/sdk/+/144948
This CL includes changes from both the above CLs, in addition to:
- A new 'ShadowRewriter' transformer to do deep rewriting of
shadowed parameters.
Previous versions only rewrote the immediate sync* function, missing
references in nested rewritten functions.
Note: This CL is re-landing largely unchanged since the roll-blocking
issues suspected to be caused by this was later attributed to a
different set of changes.
I have independently re-run all failing external tests to verify
them passing for this CL.
Bug: https://github.com/dart-lang/sdk/issues/37753
Change-Id: Id1670a93961180e8558d7c7eca65fe7e9115f07b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145402
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Currently the VM only accepts an `_InvocationMirror` instance, not a user created `Invocation`.
Fixes#33124
Bug: http://dartbug.com/33124
Change-Id: Ifdc95861cbe632bc317ca8d9fb92cf0d3ae600f0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140100
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
This reverts commit ffbd84d383.
Reason for revert: Failing build on golem and failing test on simarm bot. Will investigate tomorrow.
Original change's description:
> [ dartdev / DDS ] Spawn a Dart Development Service instance when running with --observe via dartdev
>
> Dartdev will now spawn a DDS instance when the --observe flag is
> provided. The stdio streams from the target process are filtered to
> replace any references to the true VM service URI with the DDS URI.
>
> If arguments are provided to --observe to configure the server, the
> arguments will be used when spawning DDS instead of the VM service.
>
> Change-Id: I48888c391135fc9f1e7f92d2a86855071e6b4aaf
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145680
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
> Commit-Queue: Ben Konyi <bkonyi@google.com>
TBR=jwren@google.com,bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I750325b45692ff7a40066b37924b01fa98a692d3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146522
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Change-Id: I4599b9a2bc0a410b977cd95ee75b62557eca8aae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145567
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Dartdev will now spawn a DDS instance when the --observe flag is
provided. The stdio streams from the target process are filtered to
replace any references to the true VM service URI with the DDS URI.
If arguments are provided to --observe to configure the server, the
arguments will be used when spawning DDS instead of the VM service.
Change-Id: I48888c391135fc9f1e7f92d2a86855071e6b4aaf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145680
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>