|
|
Book here says MSIL does not get fully compiled to native? |
|
Author |
Message |
redshock

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
One of the earliest books in C# was "C#: The Complete Reference" by Herbert Schildt. His book suggests in the beginning that the MSIL code gets compiled to native "as needed," so it basically suggests it does the same thing as Java. Later, I remember reading that Microsoft was insisting that all of the MSIL code gets compiled to native, which would also mean there's no runtime processing of the garbage collection etc.
The reason why I doubt Microsoft in this case is because the front of the cover of this book has a quote from Prashant Sridharan, the the C# Product Manager from Microsoft, saying that this is a must-have resource for C# programmers. Doesn't this mean he would have reviewed the book first Why was he okay before with the book saying the code gets compiled to native as a "as needed" basis I'm not frustrated over the topic, but I'm curious why there are two stories here. One could suggest that Microsoft is advertising false information for marketing purposes, or that Mr. Sridaran didn't fully look at the book before recommending it.
.NET Development7
|
|
|
|
 |
Dasa

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
Because garbage collection is implemented as a part of .NET CLR, not
within your program that is compiled to IL I'm just guessing.
Btw, don't put much stock in endor****ts on book covers - much of that is sheer BS - much like resume references.
|
|
|
|
 |
redshock

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
I would agree, but this quote...
"Herb Schildt has written a must-have resource for all C# programmers"
- Prashant Sridharan, C# Product Manager, Microsoft
Sounds credable to me on a cover, but I would think he would have reviewed the first ten pages at least where this compilation process comes in. It seems like it was true in the beginning ,then Microsoft decided to say it was being compiled fully to native. Or, Mr. Sridaran missed this portion completely which it seems to be.
|
|
|
|
 |
Mattias Sjogren

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
The book is correct, IL normally gets compiled to native code on an "as needed" basis. You can however use the NGEN tool to compile an entire assembly at once and store the result on disk. Either way, garbage collection still happens.
|
|
|
|
 |
redshock

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
|
|
 |
Scott Allen

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
I don't think it is a stretch to say "JIT compilation is not interpreted" from the perspective of classically interpreted languages like Smalltalk and Lisp. JIT compilers tend to blur this boundary.
|
|
|
|
 |
Dasa

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
It seems to be an issue of semantic: if a code is compiled to "native" that links to a dll that provides runtime service (GC), is it "fully compiled to native " The phrase "native compilation" can manifest in different shades of implementations.
Btw, NGEN-generated code, is it completely independent of CLR, or does it link to CLR in some way to provide runtime service (e.g., GC)
|
|
|
|
 |
Mattias Sjogren

|
Posted: Common Language Runtime, Book here says MSIL does not get fully compiled to native? |
Top |
|
Btw, NGEN-generated code, is it completely independent of CLR, or does it link to CLR in some way to provide runtime service (e.g., GC)
|
|
It's still very much dependent on the CLR.
|
|
|
|
 |
|
|