This involves a few main pieces:
- Add code to the GN scripts to generate DDC's patched SDK and then
compile it to summaries and JS in the build output directory.
- Add support to the underlying DDC build scripts to support controlling
which files are built where.
- Update test.dart to use the DDC SDK from the build directory.
- Update create_sdk to use the built SDK instead of the checked in one.
- Fix various internal DDC tools to build their own copy of the SDK
(since they can't easily find the one in the build directory because
it's path if config-specific) and use those.
- Delete the checked DDC SDK JS and summaries.
I think I got everything working. The built Dart SDK looks fine -- it's
identical to one built using the old build scripts.
The various tools and DDC's little test runner I *think* work, but there
may be a bug or two in there. I tried the various things I could and it
seems like they work but it's hard to tell since they may be kind of
broken right now anyway.
Bug:
Change-Id: Iea77915a5c1cc8450f60ebfbdf8c725c7ea2f32c
Reviewed-on: https://dart-review.googlesource.com/18144
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Zach Anderson <zra@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Eliminate uses of the comment syntax in lib/async. This is mostly
done simply by turning explicit (but commented) casts into implicit
casts to avoid regressing dart2js performance.
Bug:
Change-Id: I286c7bffbf609b5e2fa24b9d48b90876c2c45a9b
Reviewed-on: https://dart-review.googlesource.com/21566
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Casts for function types got moved off of the generic path, and hence
are missing the memo cache. Added a second function type cast cache.
Fixes#31392
Bug:
Change-Id: Ie1b87adf630f5059b57d01956778f5adde0533fc
Reviewed-on: https://dart-review.googlesource.com/21525
Reviewed-by: Vijay Menon <vsm@google.com>
For ObjectFormatter right now we just show the class name. Some objects,
e.g. Int64, have descriptive toString() operations that are much more
informative than their internal structure.
This changes the default header to be
Instance of 'Thing'
rather than just
Thing
which is a little worse, but it's much better for these kinds of classes.
For Int64 we will now show
12345 (Int64)
We also clip the toString() if it's too long.
Bug:
Change-Id: Iae6a8e66fdbe1d9f5c157ecdb983a833e26d00f4
Reviewed-on: https://dart-review.googlesource.com/21522
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
The new front end doesn't support generic comment syntax yet, so it's
getting the wrong type for LineSplitter in strong mode. Since we no
longer to preserve legacy mode semantics for LineSplitter, we can just
use the correct strong mode types without generic comment syntax.
Change-Id: If2dcb2fb3fae9eb49685838e4e84958e545650c7
Reviewed-on: https://dart-review.googlesource.com/21286
Reviewed-by: Florian Loitsch <floitsch@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is for compatibility with Kernel, as well as fixing several bugs,
and generally being a more robust architecture.
This may also perform better than the current design.
Notable fixes include several issues around deferred classes.
Change-Id: I1b6f44ebdf6304b10b47d19026156a25e04146ef
Reviewed-on: https://dart-review.googlesource.com/16337
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Other improvements:
* avoids an extra intermediate future in `async`, and unnecessary type tests
* uses optimized type tests instead of older isSubtypeOf
* avoids an extra closure for async/async*
* avoids Function.apply for async/async*/sync*
* avoids an extra cosure for sync* if the arguments are not modified
Change-Id: I897708387fce59a97696f05b01cc668f1043fe5c
Reviewed-on: https://dart-review.googlesource.com/16332
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This ports a fairly large part of DDC's Analyzer-based code generator,
however most nodes are not supported yet.
The goal is to preserve all functionality of code that was ported,
except for deprecated features (e.g. mirrors, fuzzy arrows, libraryRoot).
Change-Id: I3b10d5773c7c10a740fa336720243b03c6b82529
Reviewed-on: https://dart-review.googlesource.com/10705
Reviewed-by: Vijay Menon <vsm@google.com>
This change fixes bugs that users see when we mark declaration code,
while also reducing the source map size (improving startup & reducing
the load on devtools). The SDK source map is reduced by 41%.
Stack traces and stepping should be more accurate after this change, but
if we identify any node(s) that need different marking, we now have
the tools to refine it further.
Change-Id: Ie50c6aca873be7b7c0f7c238a9db2001acbceb5c
Reviewed-on: https://dart-review.googlesource.com/10210
Commit-Queue: Jennifer Messerly <jmesserly@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Alan Knight <alanknight@google.com>
- string/int keys use identity maps
- construct the correct type rather than relying on factory constructors when possible
- checks if key has identity semantics and use that when possible
- avoid helper calls/casts/etc in implementations
- use native ES6 Map/Set key order tracking
- optimized constructor for map literals
- fixes#30466, const maps are now canonicalized correctly
Change-Id: Id44acf3d9bf8cb153a4755aa28df08fe91bfc633
Reviewed-on: https://dart-review.googlesource.com/8167
Reviewed-by: Vijay Menon <vsm@google.com>
This appears to improve Gabriel's is-check benchmark by 2x and
DeltaBlue by about 30% (DDC on d8-tip).
I suspect this is improving inlining of top-level accesses on library
objects (including helpers like dart.is).
Change-Id: I1629d821b481194075a80dd6858334c1f678dd12
Reviewed-on: https://dart-review.googlesource.com/7446
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
In particular, some types like the base/mixin classes for Map in dart:collection did not work correctly.
This also has cleanups/optimizations to how DDC registers signatures, partially addressing #30499
Also fixes#29897, const maps are now immutable in DDC.
Change-Id: Icfdc7921d255a58a9e13908cf800832f787314ee
Reviewed-on: https://dart-review.googlesource.com/7442
Reviewed-by: Jennifer Messerly <jmesserly@google.com>