Already before JITting, you will probably face the problem of dynamically
crafting new JS code to execute. However these methods look very different
compared to native C/C++ methods of generating code on the fly, so the
backends will most likely look very different. It is possible to
dynamically add new JavaScript functions by eval()ing or with new
Function(), or dynamically adding <script> elements and so on, so in that
sense, crafting code at runtime is viable. New asm.js code can only be
added in the form of new modules, it is not possible to add new functions
to an already loaded asm.js module.

Any JIT architecture typically does have a fallback/initial non JIT path to
use. That is probably a good first stepping stone for initial review to see
how feasible it is, and how fast without a JIT it could be.

If your 3D engine as a fixed set of shaders controlled by the engine,
perhaps you can cheat here and instead provide a compile time preoptimized
set of shading functions for llvmpipe to use?

2015-05-31 11:23 GMT+03:00 Jean-Marc Le Roux <[email protected]>:

> Hello,
>
> we're building Minko (http://github.com/aerys/minko), a C++11 x-platform
> 3D engine targeting WebGL thanks to Emscripten.
> Some of our customers have legacy web browsers that don't support WebGL.
> We're evaluating options.
>
> One of them is to use a software renderer: osmesa using llvmpipe is the
> best option performance wise.
> How hard would it be to compile osmesa using Emscripten?
>
> I understand the goal of llvmpipe is to bring some native JIT-like
> optimization.
> Thus, it would have to be somehow adapted to JIT compile JS code using
> Emscripten. Correct?
>
> Thank you for your help,
>
> --
> 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.

Reply via email to