Does the F # interpreter (fsi.exe) also execute intermediate language code like the F # compiler (fsc.exe)?

I am currently doing a roster for university about F #. I have a question about the F # interactive console and the F # compiler.

The F # compiler generates Microsoft Intermediate Language Code (MSIL) when compiling an F # source. Then it is translated by the JIT compiler into machine code when the written program is executed.

But what does the F # Interpreter Console do? Does this also mean a line feed F # Code in MSIL, and then JIT, what in machine code? Or does it translate F # -Code directly into machine code?

If he first converts it to IL, then I think there will probably be an IL interpreter, because the JIT compiler only compiles the complete programs. Is not it?

How do you think F # -interpreter processes F # code and translates it?

Hi, Martin

+7
source share
1 answer

The F # compiler emits IL using its own AbsIL library. AbsIL is another MSR project that has been absorbed by F #.

When compiling for interactive mode, AbsIL uses System.Reflection.Emit to emit IL in memory at run time, which in turn is compiled into native JIT code when it executes the code.

+13
source

All Articles