You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when moving the operator to something like an Utils module, the inlining never happens, which makes the output unnecessarily large. Explicitly annotating it with [@inline] also doesn't seem to do anything.
Is this a limitation with the build system working file-by-file? If so, is there any workaround?
The text was updated successfully, but these errors were encountered:
I added a fairly comprehensive test for this in #1291. We could make a few improvements:
perform compiler optimizations after inlining the cross-module function (would likely eliminate some of the calls to Curry
store the relevant information in the .cmj even if --mel-cross-module-opt isn't passed in, such that libraries don't need to explicitly pass that flag (and optimizations can still be had in melange.emit without changing upstream libraries)
As an example, here's a function composition operator:
Using it from the same file as it is defined always gets the function inlined --
But when moving the operator to something like an
Utils
module, the inlining never happens, which makes the output unnecessarily large. Explicitly annotating it with[@inline]
also doesn't seem to do anything.Is this a limitation with the build system working file-by-file? If so, is there any workaround?
The text was updated successfully, but these errors were encountered: