-
Notifications
You must be signed in to change notification settings - Fork 69
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
feat: Baseline JIT implementation #29
Conversation
65416fd
to
d950c73
Compare
d950c73
to
797dfbf
Compare
For
|
Yeah this would work(and we can actually just submodule LuaJIT this way as well), but my question is: is it common practice to require a Makefile and gcc(yeah I think it's better for us to require gcc and compile Lua as needed instead of requiring system Lua) for a Rust crate? Also that means we won't be able to compile this crate with cargo alone, is that gonna be a concern? Also, should we choose to go forward with it, this new Makefile-based process is gonna affect CKB as well. |
No, the compilation does not depend on GCC and Lua, just keep |
This is a very neat idea 👍 , already added Makefile rules and CI target. |
|
||
fn reset(&mut self) { | ||
self.asm_data = AsmData::default(); | ||
self.rust_data.memory = SparseMemory::<u64>::default(); |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
NOTE: this PR is quite huge but there are certain files(which contribute to more than half the changes here) we don't need to review:
dynasm
folder are pulled directly from official LuaJIT, there's no modification by us.src/jit/asm.x64.compiled.c
is translated fromsrc/jit/asm.x64.c
. Ideally, we might want to exclude this file and only generate it in build steps. But the problem is the translator here is written in Lua, and requires a real Lua binary to run it. As of now, there's no easy way to build a binary, then execute it inbuild.rs
. Hence for simplicity reason, I just includedsrc/jit/asm.x64.compiled.c
here, in the future we might want to build a separate crate packaging Lua binary and dynasm translator here to handle this task.Closes #20