Mark Probst has
been working for the past few months on adding support to the
Mono JIT to support generic code sharing. This is a
technique that allows the JIT to share the same code generated
for two differently instantiated types, for example:

The JIT must generate different code for the actual Stack
instantiation, one must contain a pointer (32 bits on 32 bit
machines) and another one must contain 64 bits. So the
structures are different in memory, and so is the
implementation for Push and Pop.

But certain methods do not depend on the datatype sizes
(for example) and could be shared regardless of how their
container type is instantiated.

Mark posted
the Good
news, the bad news and his strategy to deal with the bad
news. Am going to limit myself to the good news, and you can
click on the link and read the thread for the bad news: