On Thu, May 5, 2016 at 1:05 PM, Brion Vibber <[email protected]> wrote:
> On Thursday, May 5, 2016, Alon Zakai <[email protected]> wrote: > >> Yeah, I don't think this is compatible with the modularize mode. Separate >> files means communication between them using global state, so it can't >> really be fully modular anyhow. We should probably warn or error on this at >> compile time, if we don't already. >> > > The module constructor function is a global symbol, so it ought to work > for the second .js payload to append a function as a property onto it, > which the constructor can call with suitable parameters to append the asm > property onto the internally created object. > > I'll see if I can whip up a patch that works, if it doesn't work I'll whip > one up that errors out at compile time. :) > Filed an issue https://github.com/kripken/emscripten/issues/4296 Here's my proof of concept patch to separate_asm.py: https://github.com/brion/emscripten/commit/db0ee1f2ae7a0f1fe6a8d9d3e33398cb830257a4 If that looks feasible I'll clean up the patch, integrate to the frontend, and add tests . -- brion -- 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.
