Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old August 28th, 2008, 09:45 AM
Tony Johansson
Guest
 
Posts: n/a
Default MSIL code

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


  #2  
Old August 28th, 2008, 09:56 AM
Peter Morris
Guest
 
Posts: n/a
Default Re: MSIL code

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

  #3  
Old August 28th, 2008, 12:45 PM
Anthony Jones
Guest
 
Posts: n/a
Default Re: MSIL code

"Tony Johansson" <johansson.andersson@telia.comwrote in message
news:u6aggnOCJHA.4340@TK2MSFTNGP02.phx.gbl...
Quote:
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.
Quote:
>
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


  #4  
Old August 28th, 2008, 07:35 PM
Bob Powell [MVP]
Guest
 
Posts: n/a
Default Re: MSIL code

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.comwrote in message
news:u6aggnOCJHA.4340@TK2MSFTNGP02.phx.gbl...
Quote:
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
>
>
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles