-
-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This involves compiling namespaces to .cpp files within the class path and then loading them up again. Namespaces are written to their own file, with a special `__init` file also written. The `__init` file needs to be loaded prior to the namespace file being loaded, since it contains all of the dependencies. Any functions created within the namespace are nested modules, using the same `foo.bar$spam` syntax as the JVM. They're all written to individual files, same as with Clojure, and they're loaded using the `__init` module. Having this allows us to load `clojure.core` from pre-compiled .cpp files, rather than from jank source. The startup time of the compiler, when loading `clojure.core` this way, drops from 8.7s to 3.7s, which means it's more than twice as fast now. We can drop this further by compiling the .cpp files to LLVM IR files, or, even further, to object files or pre-compiled modules (PCMs). The framework for this is present, but Cling doesn't actually have an interface to load either of those, so some more intricate work will be needed. I'm going to stick with the .cpp files for now and flesh out the rest of the module loading. This bout of work is not primarily focused on performance gains.
- Loading branch information
Showing
19 changed files
with
681 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.