Optionally link functions at compile-time
Opened this issue · 0 comments
PhilipRoman commented
There should be an option to bypass hash-table lookup for the standard library. Sample code:
local x = tonumber(io.read()) + 1
Currently would generate this:
Object x = add(call(getglobal("tonumber"), call(index(getglobal("io"), "read"))), 1);
If the user is willing to sacrifice the ability to dynamically replace these functions, we could instead generate code like this:
int x = __tonumber(_ioread()) + 1
A similar mechanism could be used in implementing FFI (#18)