kerneis / cpc

Continuation Passing C

Home Page:http://www.pps.univ-paris-diderot.fr/~kerneis/software/cpc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement cpc_longjmp()

OCTAGRAM opened this issue · comments

CPC runtime has its own cpc_condvar, so it should have CPC-specific longjmp as well.

Desired use case: replace broken Asincify in EmScripten. It's stated that:

ASYNCIFY has a bad worst-case of large code size: If it needs to modify many methods, it can grow code size very significantly (even 10x more was seen).

I don't understand what's wrong with it, but CPC is not growing code size that much, is it?

A good test case would be to replace emterpreter in em-dosbox. Currently most of dosbox code is being compiled as usual, but 40 functions are whitelisted to be executed on emterpreter. I believe, CPC would do better than emterpreter.

For this to work best, CPC should be able to accept blacklists or whitelists like emcc and not require altering of source code. No need to put "cpc" marks.