|
|
November 2010 - Posts
-
Posted Tuesday, November 30, 2010 5:25 PM |
Custom attributes were designed to make the .NET framework extensible; if a .NET language needs to store additional metadata on an item that isn't expressible in IL, then an attribute could be applied to the IL item to represent this metadata. For instance, Read More
|
-
Posted Friday, November 26, 2010 5:04 PM |
In IL, volatile is an instruction prefix used to set a memory barrier at that instruction. However, in C#, volatile is applied to a field to indicate that all accesses on that field should be prefixed with volatile. As I mentioned in my previous post, Read More
|
-
Posted Wednesday, November 24, 2010 1:22 PM |
This time, we'll be having a look at the volatile. prefix instruction, and one of the differences between volatile in IL and C#. From what I can see, it has two effects... Read More
|
-
Posted Wednesday, November 17, 2010 6:50 PM |
The constructor generic constraint is a slightly wierd one. The ECMA specification simply states that it:
constrains [the type] to being a concrete reference type (i.e., not abstract)
that has a public constructor taking no arguments (the default constructor), Read More
|
-
Posted Thursday, November 11, 2010 2:40 PM |
Arrays in .NET are curious beasts. They are the only built-in collection types in the CLR, and SZ-arrays (single dimension, zero-indexed) have their own commands and IL syntax. One of their stranger properties is they have a kind of built-in covariance Read More
|
-
Posted Monday, November 08, 2010 12:15 PM |
In this post we finally get on to how basic generic methods are implemented in IL. First of all, we should briefly cover how a generic method is declared in IL.
Declaring a generic method
The basic syntax for a generic method is fairly straightfoward. Read More
|
-
Posted Friday, November 05, 2010 12:54 PM |
Next up is a look at the details of callvirt and what happens when you call a virtual method. However, in order to do that, we first need to understand some of the low-level CLR datastructures, and what exactly an object instance is.
Object instances Read More
|
-
Posted Tuesday, November 02, 2010 1:20 PM |
Next in my 'Subterranean IL' series, I'll be looking at method calls, and in particular, the difference between reference and value types and what the call instruction requires on the stack. Read More
|
-
Posted Monday, November 01, 2010 1:35 PM |
Today, I'll be starting a new series of blog posts on 'Subterranean IL' - a look at the low-level IL commands available to .NET compilers, what each command does (or at least the more interesting commands) and why each command does what it does. One of Read More
|
|
|