mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 17:35:46 +00:00
2be26a709c
Today we make a half-hearted attempt to generate the correct default type arguments for parameter stubs. By the time we create them in the emitter we don't have enough information to fully replace all the type variables that might appear in a type parameter's bound. So instead we erase all type variables to "any". By generating parameter stubs in SSA we can use existing RTI infrastructure to generate the correct recipes/bindings/evals. Instead of directly creating JS we create the appropriate SSA graph and let the normal function compiler do the heavy lifting. There are benefits and drawbacks to this new approach: 1) The stub bodies go through the SSA optimizer so some parameters are abbreviated, some recurring nulls get replaced by a variable, etc. The net result is slightly more compact code. 2) We are now compiling code during the emitter phase. This is relatively fast (adds ~2% duration to the phase) but also requires deserializing some data we weren't previously using. This results in ~200MB more memory being used. I've changed the serialization layout a bit to try to mitigate this but some of it is unavoidable. Change-Id: Ie786da933accc039716e1c8481dbb8a09f3cc9b2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340700 Reviewed-by: Stephen Adams <sra@google.com> Reviewed-by: Kallen Tu <kallentu@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com> |
||
---|---|---|
.. | ||
co19 | ||
corelib | ||
dartdevc | ||
ffi | ||
language | ||
lib | ||
modular | ||
standalone | ||
web | ||
legacy_status_dart2js.csv | ||
OWNERS | ||
README.md |
This directory contains tests of the language and core library implementations. For more information, see https://github.com/dart-lang/sdk/wiki/Testing.