Dan Sugalski <[EMAIL PROTECTED]> wrote: > 1) Mark the overload subs as special and change their calling conventions
Different calling conventions are not really pleasant for the compiler(s). But doable. > 2) Wrap the overload subs in some bytecode that Does The Right > Thing--takes a continuation, pushes the registers to the stack, then > calls the overload sub--when we add them to the MMD table. That has the same cost + overhead as the current scheme, which is just that wrapper in C. 3) Inspect the delegated method or MMD sub and save only the needed register range. E.g. if a MMD sub doesn't use I and N registers, only S[0]..P[31] needs saving. That reduces memcpy cost by 3/5. Doesn't work, when the sub calls another sub of course. But for simple functions it'll work. leo