lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 22 February 2017 at 09:19, Javier Guerra Giraldez <> wrote:
> On 21 February 2017 at 23:52, Dibyendu Majumdar <> wrote:
>> Specialise a Lua function by observing the types during execution.
>> JIT compile the specialised version.
> that's what LuaJIT does, it leaves guards (conditional branches out of
> the trace) as assertions about types, ranges, and a few other stuff
> that allows it to emit much simpler code.

Yes the approach is similar. I am thinking of function specialization
rather than specializing fragments of code, in the hope that most
functions typically could be converted to statically typed versions as
developers tend to write code that way.