Hello!

I'm reading in a book and it says the following.

"MSIL(Microsoft Intermediate Language) generated by all the .NET language
compilers. This is a common
standard for the binary code generated by the compilers and is what is
executed by the CLR"

Now to my question about the text.
Is it really true that CRL is executing the MSIL code ?

I'm quite sure that the code that CRL will execute is the native code that
is output from the JIT
compilers.
The JIT take MSIL as input and generate OS native code that CLR can execute.

You may correct me if I'm wrong here ?

//Tony

Re: MSIL code by Peter

Peter
Thu Aug 28 03:51:12 CDT 2008

MSIL is compiled to native instructions by the just-in-time compiler and
then those are executed. Although the statement is incorrect I suspect the
author may have merely omitted some of the details of the process.


Pete


Re: MSIL code by Anthony

Anthony
Thu Aug 28 06:36:12 CDT 2008

"Tony Johansson" <johansson.andersson@telia.com> wrote in message
news:u6aggnOCJHA.4340@TK2MSFTNGP02.phx.gbl...
> Hello!
>
> I'm reading in a book and it says the following.
>
> "MSIL(Microsoft Intermediate Language) generated by all the .NET language
> compilers. This is a common
> standard for the binary code generated by the compilers and is what is
> executed by the CLR"
>
> Now to my question about the text.
> Is it really true that CRL is executing the MSIL code ?
>
> I'm quite sure that the code that CRL will execute is the native code that
> is output from the JIT
> compilers.
> The JIT take MSIL as input and generate OS native code that CLR can
execute.
>
> You may correct me if I'm wrong here ?
>

I'm don't think the statement is incorrect.

The CLR represents a machine which executes IL. How it does this is doesn't
nullify the fact the IL does ultimately get executed and the thing
responsible for having it executed is the CLR.

If its not true to say "the CLR executes IL code" then the same could be
applied to "a CPU executes machine code". Internally a processor may break
down the execution of single machine instruction into several steps and its
those steps which 'execute'.

--
Anthony Jones - MVP ASP/ASP.NET



Re: MSIL code by Bob

Bob
Thu Aug 28 13:27:29 CDT 2008

The clr is responsible for the execution of MSIL code. This does not mean
that it executes it as though it were in a virtual machine of the classic
type.

The code does run natively on the processor.

However, the process of verification and compilation that the code goes
through before it gets to actually execute on the registers of the processor
is so intense that we might consider the CLR to be a virtual machine.

The strategy has one clear advantage over the classic interpretational or
tokenised virtual machine, that is that once verified, checked and compiled,
the process doesn't have to happen again for the second time that a given
routine is called.


--
--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.


"Tony Johansson" <johansson.andersson@telia.com> wrote in message
news:u6aggnOCJHA.4340@TK2MSFTNGP02.phx.gbl...
> Hello!
>
> I'm reading in a book and it says the following.
>
> "MSIL(Microsoft Intermediate Language) generated by all the .NET language
> compilers. This is a common
> standard for the binary code generated by the compilers and is what is
> executed by the CLR"
>
> Now to my question about the text.
> Is it really true that CRL is executing the MSIL code ?
>
> I'm quite sure that the code that CRL will execute is the native code that
> is output from the JIT
> compilers.
> The JIT take MSIL as input and generate OS native code that CLR can
> execute.
>
> You may correct me if I'm wrong here ?
>
> //Tony
>
>