Not efficiently. JavaScript is dynamically typed, so at compile time we
don't know the types of values. And LLVM is typed, so the problem is that
we don't know what types to emit.

On the other hand, asm.js is a typed subset of JavaScript, and can
therefore be compiled into LLVM (and there was an experiment doing that, by
compiling asm.js into C, then using clang to compile that to LLVM).

On Sun, Sep 13, 2015 at 8:56 AM, Felicia Halim <[email protected]>
wrote:

> Hi,
>
> Is it possible to compile JavaScript code directly into LLVM byte code?
>
> Thank you
>
> --
> 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