问题
I've been searching for a while now, but I could not find any engine that emits LLVM bytecode. But somehow I cannot belief there is no such engine :)
回答1:
JXcore will be your best bet going forward IMHO - when they convert from V8 to LLVM, which is an objective of theirs when they reach version 2 (according to their roadmap), it will then compile your javascript sources into native code.
You can get more info on JXcore here.
This part of the answer is in a response to Albert's answer:
According to ktrzeciaknubisa's post they will publish the source as soon as they are out of the beta stages and have clean code...this might take some time.
回答2:
There doesn't seem to be any.
In the list of projects build with LLVM there is nothing about Javascript.
回答3:
It appears Webkit now includes this functionality as of May 2014:
... the WebKit project has unified its existing JavaScript compilation infrastructure with the state-of-the-art LLVM optimizer.
https://webkit.org/blog/3362/introducing-the-webkit-ftl-jit/
The code for this seems to be here:
http://www.opensource.apple.com/source/JavaScriptCore/JavaScriptCore-7600.1.4.17.5/ftl/FTLLowerDFGToLLVM.cpp
回答4:
JXCore (a fork of Nodejs) claims to have implemented that. Since Feb 2015, it is open source, the code is here on GitHub.
来源:https://stackoverflow.com/questions/8466824/is-there-any-javascript-engine-that-emits-llvm-bytecode