描述
It is possible to get native jitted code for web assembly(wasm) out of javascript engines like SpiderMonkey and V8. Here is an example.
I think it makes sense to add wat(wasm text)-to-x86 explorer in the future to study optimization opportunities. One could use CE to generate wat and then copy-paste that wat in the second window and get native assembly.
One way to get native assembly is to run v8 with --print-wasm-code option. There's also a way using v8's internals to get custom output.
Adding that would involve installing wasm tools for (wat -> wasm) conversion and one of the javasctipt engines. I personally tried using v8 and it wasn't difficult in terms of installing/compiling from source compared to llvm/clang. Although that would also involve pulling some google internal tools like depot_tools.
Thanks, Anton