OCamlPro / flambda-task-force

13 stars 1 forks source link

Better handling of recursive modules #154

Open chambart opened 8 years ago

chambart commented 8 years ago

Currently the compilation of recursive modules is horrific and cannot be understood at all by inline_and_simplify.

One way to improve that would be to do the 'preallocate then patch' transformation later in the compilation chain. Since making the preallocated blocks requires the size and tag of the value, it would need to propagate some informations on the shape of those values.

The required steps are:

Example that should benefit a lot: