At 8:16 PM +0200 3/29/04, Leopold Toetsch wrote:Did you consider ussng PMCs as instead of plain function pointers. As outlined a NCI, C, and PASM Sub PMC would be equally just invoke()d.
Yeah, I did. You end up with a twofold problem there--not only do you have extra indirection but you've also got relatively fat entries in the table.
Indirection yes. But the entry is of course a pointer to a sub-like PMC. I think such PMCs (CSub, NCI, PASM-Sub) would be rather long-lived, so they could be constructed in the constant PMC pool. The overhead is only at construction time (at module load or such). The indirection remains (which is about one if () ). But this scheme needs just one table.
Second is symmetry: Currently only C code can register a C MMD function. If the function pointer is a PMC*, PASM code can register a C function (via NCI) or a PASM function too.
For right now I'd like to keep it simple, and the two table approach is simple. We can poke around and optimize it later, after it's properly working.
Ack
leo