Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

refactor compiler's runtime libs #418

Closed
jmesserly opened this issue Jan 21, 2016 · 1 comment
Closed

refactor compiler's runtime libs #418

jmesserly opened this issue Jan 21, 2016 · 1 comment

Comments

@jmesserly
Copy link
Contributor

We inherited the runtime lib from dart2js (mostly, with some async support taken from the VM libs). Then we added some hand written JS. That unfortunately grew into a much larger set of required library code, was split up into JS "modules" and is now merged back into a single dart:_runtime library.

Things we should try and improve:
Restructure helpers libs that came from dart2js. The organization of these doesn't make sense in DDC. e.g. some libraries have very little of their original code left.

Restructure dart:_runtime. It has a somewhat tangled relationship with dart:core, as dart:core defines some important primitives (Object, Type). See #417 for one example, but looking through js_codegen, there are others.

Letting the compiler generate a single JS file for all of the transitive closure of dart:core might be a good start on the path towards sanity.

dart:_runtime is now ostensibly written in Dart, but that's a very shallow property. It doesn't use Dart for the most part. There are things like final fields that are initialized to a JS expression that makes an ES6 class. That should just be a Dart class.

Those are a few ideas to start, but I'm sure we'll find more over time.

@jmesserly
Copy link
Contributor Author

This issue was moved to dart-lang/sdk#27316

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant