Enables separation of concerns since no single function table is required by nanojit.
Created attachment 343911 [details] [diff] [review] Updated to build & pass tests Original work by jorendorrf, updated to redux by Graydon. Changes insCall() to use a CallInfo* and saves the CallInfo* in the LIR instruction stream, eliminating the need for a single shared table. This is a bump in LIR code size but worth it, for the cleaner separation of concerns. (if LIR code size increase is a problem, it can be mitigated by sharing callInfo struct pointers, thus shrinking the size of each reference closer to 1 byte). This also enables >256 unique functions to be used in a single LirBuffer
Comment on attachment 343911 [details] [diff] [review] Updated to build & pass tests looks good.
Created attachment 344413 [details] [diff] [review] More cleanup; eliminate k_functions array and int fid entirely. This is more cleanup, inspired by actually using the new decoupled callinfo in the armjit work.
Comment on attachment 344413 [details] [diff] [review] More cleanup; eliminate k_functions array and int fid entirely. Not an important point, but just curious if there was any space savings (loss?) with using non-table CallInfo entries.
Yes, space loss of 4 (x64 needs 8) bytes per LIR_call. The argc field is now redundant since you can get it from the CallInfo w/out knowing the table pointer, and the fid field is now unused. So we could pack the first 2 arg references into those fields. calls of 0,1,2 args are probably a majority, so we'd net out to zero if that was done. Also, robarnold may modify the format to make the CallInfo* be in a separate LIR_int (const) instruction, which could then be shared, saving some space. So i'm not that worried about the space increase for now.
fixed a long time ago