At what point is the byte code obtained?

At what stage is the Bytecode generated inside the .NET Framework?

Am I right in saying that the user writes his source code in the language of his choice (possibly C #), when this source is compiled, it is converted to byte code? (what then uses this byte code?)

+4
source share
3 answers

Wikipedia definition:

Bytecode is a term that has been used to denote various forms of learning sets designed for efficient execution by a software interpreter, and is also suitable for further compilation into machine code.

Although bytecode is a general term, it is more used in the Java world. In .net Intermediate Language (IL or MSIL) can be referenced as bytecode. It is created by each .net language compiler. Later it is executed by the CLR (an analogue of the JVM in the java world). Right before the CLR executes the code, it is compiled by the Just-In-Time compiler (part of the CLR). It is compiled into its own machine language, and then executed directly by the processor. (Managed binaries can also be precompiled)

+3
source

Any target code for the .NET Framework source code is compiled into MSIL (MS Intermidiate Language), which can be interpreted and executed by the CLR. The MSIL code is compiled in native JIT code (Just-In-Time compiler) during application startup.

0
source

Bytecode is a generic term for most base VM languages.

There is a bytecode compiler and a virtual machine.

The compiler will take your code and convert it to bytecode.

Then the bytecode is interpreted by the virtual machine.

A VM can have a special module called Jit, which converts the bytecode into a native assembly. Then this native assembly no longer needs a virtual machine to execute. But obviously you need a virtual machine to call it

Bytecode is just an intermediate language in which the site is between the VM and your source code.

0
source

Source: https://habr.com/ru/post/1334938/


All Articles