The emterpreter doesn't do that yet, but it could definitely be extended to allow that. If there is nothing below that on the stack, then you could run just that in the emterpreter, and run all the rest of the code normally, so the project overall wouldn't be slow. And in the emterpreter we would pause and resume it across browser event loops.
Good to know this would be useful, I'll try to get to it soon. - Alon On Mon, Oct 20, 2014 at 11:51 PM, caiiiycuk <[email protected]> wrote: > Hi Alon. Can i use emterpreter to avoid problems related to infinite > loops. For example i have game that mostly emscripten ready, but some > functions contains infinite loops that can't be easily rewritten. > > void infinite() { > while (true) { > // ... > while (true) { > // .. > if (something) break; > } > if (something2) break; > } > } > > Can i use emterpreter only for function infinite and after that it will > work fine in browser? > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
