-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile MLton with MLKit #103
Comments
@MatthewFluet: any comments? |
@melsman Nice! That looks correct. The executable built in the |
Here is the status now (with -no_gc):
|
And here is with GC enabled (
|
Nice! Is the "Hi there: 28" the correct/expected output? The GC behavior during a run of the MLKit compiled MLton looks fairly similar to that during a run of a MLton compiled MLton, with the same GC heavy parseAndElaborate, closureConvert.convert, and amd64Codegen passes; the MLton compiled MLton also has a few other places where GCs happen through some of the optimization passes. |
Thanks for the info! Yes, the "Hi there: 28" is the expected output... ;) I haven't tried to bootstrap yet...
|
This issue tracks overall problems with compiling MLton with MLKit.
Related issues:
Until #101 is solved, we need to pass
--no_gc
tomlkit
, which is done by changing the target$(MLTON_OUTPUT)-mlkit
inMakefile
. I have forked the mlton github repository, made some changes, and have successfully compiled MLton with MLKit, which took about 44 minutes on my Macbook Pro (2016 version), achieved usingmlkit
's `-j' feature for parallel compilation.(You probably need to alter the
Makefile.config
file to refer to a proper new version (> 4.6.1) of the MLKit)For the compilation to succeed, I had to modify the sources slightly; in particular, I have hand-unfolded the functor applications in the
main/compile.fun
source file, so that the different parts of the compiler are compiled in isolation (this change also benefits the parallel compilation scheme).The file mlkit-mlton-mael.mlb makes use of basis identifiers to structure the compilation and to specify the dependency graph - a more tight specification would benefit compilation time (decreased serialisation and deserialisation time) and parallel compilation.
Here is part of the output from the compilation (the pretty printing is slightly ugly due to the parallel compilation):
But how should I use the generated executable? Does it operate as expected?
The text was updated successfully, but these errors were encountered: