O'Reilly logo

.NET Common Language Runtime Unleashed by Kevin Burton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Basic IL

The CLR is what causes your code to execute. The CLR is like a virtual CPU. Just like your x86 CPU pulls in an instruction at a time (with pre-fetch, cache, and so forth, it might not be as simple as that, but logically, this is what is happening), you can think of the CLR as pushing and pulling variables from the stack and executing instructions. That doesn't happen in real life, but the model forms a basis for understanding IL. Because IL is “intermediate,” it cannot depend on a CPU execution model. It cannot assume that registers will be available, even though most modern CPUs have registers; the number and types of registers vary greatly between CPUs. IL does not even have the concept of registers. IL is completely stack based. Instruction ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required