introduces a memoized function that produces the generic type instance
generic type parameters are closed over, making it easy to get them and ensure they flow correctly through base class/mixins.
also implements the unimplemented features in _typeName.
R=leafp@google.com, vsm@google.com
Review URL: https://chromereviews.googleplex.com/157627013
Import/export directives are preserved, and new ones are generated using package syntax using Vijay's logic. This is not yet robust for relative URIs, but is sufficient for our purposes.
Wrapper hoisting is disabled, and various wrapper generation bugs are fixed.
Type name qualification is done more selectively, and more correctly.
Casting is disabled in const contexts, with a severe warning.
Coercions and wrappers now both call into the dart logging runtime, and pass various useful information (currently mostly ignored).
This also adds some preliminary dart codegen tests, and hence includes a number of expected output files in the test/dart_codegen/expect directory.
BUG=
R=jmesserly@google.com, vsm@google.com
Review URL: https://chromereviews.googleplex.com/141427014
Still need to investigate the assert I commented out, but much closer now.
John: This also affects the path passed in the js backend. If the package-paths env is not set, it'll fall back to the old behavior.
R=jmesserly@google.com
Review URL: https://chromereviews.googleplex.com/147977013
Translate as expressions in to the appropriate calls into the dart runtime. When I have span information, I emit a key with the location of the cast from the original code. For wrappers, I currently don't have the span information plumbed through, so leave the key off. We can probably get this information plumbed through if needed.
BUG=
R=vsm@google.com
Review URL: https://chromereviews.googleplex.com/148627013
As part of this change I made codegen synchronous. Technically is not necessary,
but I think it reduces complexity a lot. For example, keeping it async would
have required more changes to the testing infrastructure. Let me know if you
want to keep that change separate though.
With this change, I'm removing one more use of element.node, which is necessary
to achileve our goal. There is only one more use of this API, for which John has
a CL out.
BUG=
R=jmesserly@google.com
Review URL: https://chromereviews.googleplex.com/145167013
also correctly exports the values of top-level fields, and ensures it uses the most up-to-date value for mutable top-level fields
we can likely improve this further once we have ES6 modules, but it seems like an okay start
R=sigmund@google.com
Review URL: https://chromereviews.googleplex.com/147927013
This CL fixes a bug in the coercion reifier in which a null value would get wrapped by the reifier, turning it into a non-null value.
There are also some small fixes for some types from the DownCastBase refactoring which weren't quite right.
BUG=
R=vsm@google.com
Review URL: https://chromereviews.googleplex.com/140327013
A couple places remain:
* how codegen is driven (we should change the pipeline for this)
* how js-codegen determines whether an top-level expression is a constant field
(this might require tracking additional information in our checker)
R=leafp@google.com
Review URL: https://chromereviews.googleplex.com/143177014