开发者

What free JIT compilers are there today, and which is easier to use? [closed]

开发者 https://www.devze.com 2023-04-06 22:15 出处:网络
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references,or expertise, but this question will likely solicit debate, a
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 10 years ago.

I will start writing a JIT/interpreter for a small language, and would like to use some of the free JIT tools/libraries available today. What are my options (I only know of libjit, LLVM and GNU lightning), and which would be the easier to use (but not too slow)?

The requiremens would be:

  • Compiling time is not important
  • Execution time is important, but so long as using the JIT compiler isn't too hard
  • Ease of use is important
  • No garbage collection necessary.
  • A开发者_如何学编程ctually, no run-time environment necessary (I'd really just want the JIT: compile into a memory region, then take the pointer and start executing the generated code)
  • Development will be done in plain standard C (no C++, no platform-specific features), with pthreads.


Plain standard C with good execution time? you must be looking for LuaJIT(actually dynasm which is the backend, but thats still part of LuaJIT), which is a tracing JIT compiler (where as most of those mentioned are static). It does have garbage collection, but it can easy be taken out or modified (there is a planned overhaul of it soonish), and it has a native FFI, so it can easily do external binding (from a C level, so you don't always have to get into the nitty gritty).

Best part, its totally public domain code, and the code is the documentation (which is nice as its well structured).

0

精彩评论

暂无评论...
验证码 换一张
取 消