wasm2lua
wasm2lua copied to clipboard
wasm2lua: converting WASM into Lua
Can you show us a demo on how to run #include int main() { puts("Hello World\n"); } ?
It is very unfortunate world of warcraft uses Lua 5.1 which does not provide goto. Although bit is provided, it does not provide all the functions that bitops provide which...
Graph IR
Began work on an IR today. It is locked behind a compiler flag (`--useGraphIR`) to facilitate easy testing + continued development alongside the main branch. It currently does not work...
Override and inline wasm-implementations of frequently used libc functions with lua-implementations
i.e. we roll our own optimised code that plays nice with our custom memory design e.g. (naiive memcpy example that's optimised for luajit) ```lua function __FUNCS__.memcpy(dest, src, len) local fastLen...
I feel like improvements are possible here, but I only have some vague ideas at the moment. At the very least, I suspect it might be possible to flatten our...
This way, jmpstreams can be used for longjmps too
This way virtual registers are confined within a block and the LuaJIT's tracer heuristics can work better with inferring local variable lifespans
Currently the results of comparison operations are always converted to integers, then converted back to bools when testing a conditional branch. We should store the comparison results as bools, and...
Currently memory types are tracked using a (hash)table. Performing a table lookup for every memory operation is probably not the best idea. Type ids only take up 2 bits of...
This aborts a LuaJIT trace. Perhaps put a label at the end of a function where the return is performed there? (only affects loops with `while true do` wrapping it)