I\'m aware of Emscripten and LLVM, but neither are written in JavaScript intended for a browser.
As far as I can tell, the tools exist, but they haven\'t been put togeth
In theory, it may be possible to develop a self-hosting version of Emscripten that runs in a browser, though this hasn't been done yet.
Alternatively, it is possible to run a C++ compiler (or even an entire operating system) using an x86 emulator in JavaScript.