Is there any LLVM backend for javascript? If not, other tools that convert dynamic language(similar to javascript) to LLVM IR will also be okay. Because I am writing a dynamic language compiler and such tools can help me find out how some features are implemented.
Asked
Active
Viewed 8,041 times
11
-
For which programming language is the compiler being written? – Anderson Green Dec 17 '15 at 05:15
-
related: http://stackoverflow.com/questions/8466824/is-there-any-javascript-engine-that-emits-llvm-bytecode – box Dec 17 '15 at 09:24
-
@AndersonGreen It is just a toy language created by myself, similar to javascript. – AllenLin Dec 17 '15 at 13:34
-
there are few projects on github about it. One of them is TypeScript Native Compiler (https://github.com/ASDAlexander77/TypeScriptCompiler) – Alexander77 Sep 29 '21 at 18:25
1 Answers
4
FTL JIT (JavaScriptCore) uses LLVM as a backend.
Other VMs for dynamic languages using LLVM MCJIT:

Vladislav Ivanishin
- 2,092
- 16
- 22
-
4As of Feb 2016, FTL JIT (Webkit) no longer uses LLVM; they use B3 (Bare Bones Backend) JIT: https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/ – dubek Oct 15 '17 at 12:49