It should not be necessary to ever run `pub get` for a package which is
not published. All packages used in the SDK are controlled by a single
package config, so it's not necessary to declare versions or paths for
any packages.
Remove all dependency overrides.
R=devoncarew@google.com
Change-Id: Icb328813b471f35ee4c99995f4e90aac4d8ed438
Tested: Covered by existing static analysis.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/244767
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
Some JS functionality is only exposed through operators, such as
implicit type conversions and BigInt arithmetic. Other than requiring
some minor additions for the exponentiation (`**`) operator, supporting
these through `dart:js_util` is trivial.
Change-Id: I010674303e4f99b42d43b73095de69b8ddcdeb47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242680
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
These are now enforced in pkg/js_ast so we don't need to worry about
introducing unwanted diffs between the forked versions.
Change-Id: I89efc97f53a433f98e2a06747690ac7a635c388d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239560
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
This will allow more gradual migration of js_ast.
Change-Id: I3e948ad5c79fa9880b7eb3bccd7c15cbf9786e32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238660
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This won't promote for a nullable field `foo`, so use `?.`:
if (foo != null) foo.accept(this);
-->
foo?.accept(this);
Change-Id: I0f3c92803f8756c44a959d17dfe29b12f9db362c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238501
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reduce the number of diffs between pkg/js_ast and
pkg/dev_compiler/lib/src/js_ast
Change-Id: Ic00e1614b23e11118383e954a0ee31365d65ebe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/238388
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
* Add team "groups" in tools/OWNERS_<group name>.
* Add top-level OWNERS as a fallback.
* Add OWNERS for all top-level directories.
* Add OWNERS to all packages.
For additional background information see go/dart-sdk-owners.
TEST=No op until code-owners is enabled.
Bug: b/200915407
Change-Id: I7fe6116cc599c749cd50ca16151d6d6a801d99d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229147
Reviewed-by: Jonas Termansen <sortie@google.com>
`BaseVisitor<R>` has two methods that return `null`, which will not
match the generic return type with NNBD.
The fix is to make the methods abstract, and provide a convenience
specialization `BaseVisitorVoid` with the default methods.
Change-Id: I62cd69c5ed1c912b2804da5044e2cda93d70b878
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/224460
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
At the end of codegen, 'trace' the generated JavaScript to the `.cfg`
file, and 'trace' the JavaScript after the generator rewrite when this
happens. This gives an easy way to see the non-final JavaScript from
before the transform. The 'trace' of the JavaScript is a little bit of
an abuse of the `.cfg` file format, but it is convenient to see the
SSA CFG and JavaScript with the same tool.
For this to work, js_ast printing needs to work for pre-finalized
ASTs. Most of this change is implementing `isFinalized` for every AST
node, and printing something indicative of the non-finalized nodes. For
example, unfinalized holders are printed as `Holder"<something>"`.
Change-Id: I30b3f141a876f1dc3539132d65f3aafc722589e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218883
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
Formatted with `--fix`, followed by some small manual changes:
- Reflowed some comments to 80 columns.
- Replaced Map/Set constructor calls with {} literals.
- Removed type argument when on both sides of initialization.
Change-Id: I3f5d29dd7e144f96a02efa95db8b40bf63484442
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210940
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Also fixes some minor typos from the initial implementation change.
Change-Id: I6c17ff94009298f6ab4e1d9fbdb88db633ae8aca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203285
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
* Adds a couple of arrow function and method tests
* Does not add support for method interpolation (like in DDC).
Change-Id: I73ccbbf2907611dae6f1720f7933e3469d4eb9b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198883
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
- Increase SDK requirements to allow Set literals
- Fix analyzer errors in test
TBR=fishythefish@google.com
Change-Id: I02fa18b6fc280cf74d6f7da7d2d24ff7dca806f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/201082
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
The old way was for the JavaScript string literals to be pre-escaped.
This was cumbersome since each place that creates a JavaScript string
literal needs to make a decision about whether escaping is needed and
the kind of escaping (UTF8 or ASCII).
This change moves the responsibility for escaping into the js_ast printer.
The escaped text exists only while printing, which reduces the heap in a
large modular compile link scenario by 220MB, since the unescaped string
is in memory anyway.
There were three kinds of escaping - ASCII, UTF8, and 'legacy', if not
specified. This has been reduced to ASCII (default) and UTF8, chosen by
a printer option.
Change-Id: Ic57d8fb70a213d3518244f1a152cd33e54103259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/200400
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
- js_ast.Name is no longer Comparable
- _NameReference is used on demand rather than for every occurrence.
This saves 50MB in the big link scenario.
- remove unused asVariableUse() method
Change-Id: I37f55044d394b7e047ca88c527641471bc94c641
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198981
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
LiteralExpression used to be the mechanism for 'interpolating' the
`JS` pseudo-function, but that long ago was reimplemented via the
js_ast template feature.
There are a few vestigial uses of LiteralExpression, but as none of
them use the `inputs`, this field is removed.
Change-Id: I4cd7c64766a7d6d9dd2c196c134bbfcb536fd2f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/178400
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Emphasize that the operation is going away,
and mark constructor as deprecated.
TEST= Refactoring+deprecation only, covered by existing tests.
Change-Id: I82aa044cd2cf7bf347b624371399f44bda8f4a07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173261
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
The serialization/deserialization is performed in test-mode.
Change-Id: I90f31a6a88dbdf2c38beb9b5409ce3c52557e227
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102740
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Apparently V8 will keep the parse tree and this might reduce startup latency in evaluating the deferred parts.
Change-Id: If8662c7efcc855a9e87779baeeb460108283e681
Reviewed-on: https://dart-review.googlesource.com/c/84882
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Also updated the package references in a number of pubspecs to
more closely align with the package versions that are in the SDK
Change-Id: I061951587befa4211ac7455cf1179911eb07efc0
Reviewed-on: https://dart-review.googlesource.com/c/79920
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
- Move more that one assignment into var-list
- Move 'this' to a local variable
- Move repeated large 'fast' constants to local variable
Currently under flag --experiment-code-1
Change-Id: I091cab47f498b4ec3759b9ed358bcc0f2e73fdb1
Reviewed-on: https://dart-review.googlesource.com/c/77025
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>