Hacker News new | ask | show | jobs
by davvid 5099 days ago
For the set of features you have, with most calling conventions on most platforms you don't need to synthesize all that. You could simply have your apply function be written in assembly and handle setting up the parameters fetching them from memory.

Like this? https://github.com/davvid/libapply

unittest.c shows how it can be used: https://github.com/davvid/libapply/blob/master/unittest.c