vnmakarov / mir

A lightweight JIT compiler based on MIR (Medium Internal Representation) and C11 JIT compiler and interpreter based on MIR
MIT License
2.24k stars 146 forks source link

How to know if mir is using jit or interpreter ? #101

Open bencz opened 4 years ago

bencz commented 4 years ago

I compiled the project on my PowerMac G5 and when executing the tests (make test), I read several outputs talking about interpretation, and I'm in doubt if the JIT or the interpreter was used

vnmakarov commented 4 years ago

make test run tests for the interpreter and JIT. What is run is defined differently for different tests. Using interpreter or generator for some tests can be driven by a C macro definition. For c2m it is defined by option -ei (for interpreter) or -eg or -el (for JIT).

On API level, it is defined what function is passed for MIR_link. If it is MIR_set_interp_interface then the interpreter is used. If it is MIR_set_gen_interface or MIR_set_lazy_gen_interface, JIT is used.