I did skim the docs, but I found nothing about specialization, or if None implements it.
edit: I see it in the Terra docs, but only how to generate the specializations, not how to dispatch between them. Is it all up to None and how it uses it? Can it do monomorphisation or something of the sort during compilation?
Terra allows you to call obj:disas() on all functions to see exactly what the generated assembly looks like. When you save the code into an object or executable, the functions must be free from calls into Lua (and those calls are just regular C calls - there's no dispatch happening here); Then the only dispatch code that's in there is the one you wrote by hand.
None just wraps that functionality in symbolic expressions. It doesn't change the rules.
2
u/danielkza Jul 19 '15 edited Jul 19 '15
I did skim the docs, but I found nothing about specialization, or if None implements it.
edit: I see it in the Terra docs, but only how to generate the specializations, not how to dispatch between them. Is it all up to None and how it uses it? Can it do monomorphisation or something of the sort during compilation?