-
Notifications
You must be signed in to change notification settings - Fork 126
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
WIP: Add jit_compile/1, very basic JIT2 #2424
base: master
Are you sure you want to change the base?
Conversation
Just a naive question: Have you the possibility to abolish a definition (even if it is static)? The systems that do this correctly are rare (like 1, id est SICStus) |
Right now, that's not possible and it is indeed a somewhat difficult problem. Compiled predicates that call other compiled predicates don't check if the later has been abolished. I'll give it some thought |
Within ISO, there is only The most important use case is indeed to reload some code. |
And the most important current use case of this would indeed be exhaustive testing. Currently, this does not work for |
I updated the PR, I removed the JIT1, now all the focus is on JIT2, which can only do very basic predicates right now (like |
@aarroyoc: Thank you a lot for working on this extremely impressive feature! In order to merge this with minimal chance for conflicts with other PRs and existing ongoing developments in other branches, do you think it would be good to reduce the changes to exactly those that should actually be kept, by rebasing the PR and removing features that were only present intermittently, if any? |
I open this PR as I think it's good to have some code merged to not diverge a lot from the master branch.
All the JIT code is under the
jit
feature which is not enabled by default, so you shouldn't expect any change if you don't enable it (apart from an extra predicate,jit_compile/1
, that does nothing).There are two JITs right now:Only one is in this PRJIT1 was my first attempt. It tries to share all the data structures with the interpreter. I saw some problems with this approach so I stopped it.I also added a JIT CI test (right now, it fails because JIT1 did support more kinds of predicates).