ASP.NET Dynamic Compilation

M

Marc

I am studying ASP.NET and have a simple question reading the first lines in
this page:



http://msdn.microsoft.com/en-us/library/ms366723(VS.80).aspx

Are they talking about compilation of C# code to IL code or about
compilation of IL code to machine dependant instruction code?





I've got some trouble with the used terms, I think both (C# -> IL and
IL ->machine code) is called compilation?

Marc Wentink
 
M

Manish

Hi Marc,

yes , you code in any language be in VB.NET or C#.net is compiled into
machine independent language MSIL using the language compilers and the
compiled into machine specific code using the JIT compiler at run time.

Regards,
Manish
www.ComponentOne.com
 
M

Marc

Manish said:
yes , you code in any language be in VB.NET or C#.net is compiled into
machine independent language MSIL using the language compilers and the
compiled into machine specific code using the JIT compiler at run time.

Thanks for your effort Manish, but that unfortunately was not really my
question. I might be unclear what is exactly my question. Let me try again:

Does Dynamic Compilation refer to compiling source code to intermediate
language or does it refer to compiling intermediate language to machine
dependant instructions?
 
M

Madhur

Hi Marc

Actually dynamic compilation in this case refers to both compilation
together.
Basically what this means is that you can have .cs (or. vb) files in your
source site.

When you make a request, ASP.NET will compile the .cs first into IL and then
into machine language to emit the required HTML for the client browser.
The conversion from IL to machine is implicit.
 
J

Juan T. Llibre

re:
!> you can have .cs (or. vb) files in your source site

Or both .cs *and* .vb , with a simple configuration in your web.config
plus the creation of a couple of subdirectories under App_Code.
 
M

Marc

Juan T. Llibre said:
Or both .cs *and* .vb , with a simple configuration in your web.config
plus the creation of a couple of subdirectories under App_Code.

Yes I did know that, but that's not really relevant for the question.
 
M

Marc

Madhur said:
When you make a request, ASP.NET will compile the .cs first into IL and
then into machine language to emit the required HTML for the client
browser.
The conversion from IL to machine is implicit.

I am confused with the JIT compilation of IL to machine code. The latter
means, as I believe, that for any IL chunk of code, only the parts that are
needed are translated to machine code. So I think ASP.NET wil make a IL dll,
that would be dynamic compilation, and when it uses it, it will translate
only the used parts of the dll to machine code, according to the JIT
principle.

As far as I can remember JIT works that way in both java and .NET.
 
M

Madhur

Marc said:
I am confused with the JIT compilation of IL to machine code. The
latter means, as I believe, that for any IL chunk of code, only the
parts that are needed are translated to machine code. So I think
ASP.NET wil make a IL dll, that would be dynamic compilation, and
when it uses it, it will translate only the used parts of the dll to
machine code, according to the JIT principle.

As far as I can remember JIT works that way in both java and .NET.

What you have understood is correct. JIT works both in JAVA and .NET but
there intrinsic implementations are different. JIT is very transparent to
the user in
..NET Framework. So Dynamic compilation essentially means your source
compilation
to IL.

Hope this helps

Madhur
 
M

Marc

Madhur said:
So Dynamic compilation essentially means your source compilation
to IL.

But it has nothing to do with JIT compilation of IL code to machine code
right? That was my confusion. I was reading some stuff and about Dynamic
Compilation and I was thinking are they just meaning JIT or something
totally independant of that, something totally different.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top