Managed CodeGen

This blog is to introduce some new features about Managed CodeGen in Whidbey. We provided a new way of doing LightWeight CodeGen, added support for emitting Generics in Reflection.Emit and there is some new exciting token handle stories in Reflection goin

  • Managed CodeGen

    A Tool (attached) to help figure out how to emit a type

    • 1 Comments
    After being in Exchange for almost a year, I tend to forget the how to run Reflection.Emit that I was once so familiared with. Occasionally, I would receive emails from this blog asking how to emit this, how to emit that. Before, the solutions came directly...
  • Managed CodeGen

    I am moving onto Exchange Team

    • 0 Comments
    I am going to program in the Server world using managed code! Maybe after some time, I will start a new blog for IT professionals about Clustering in Exchange. But currently this blog is not likely to have new contents about the most updated CLR technology...
  • Managed CodeGen

    Sample Code to invoke managed code inside profiling API

    • 0 Comments
    ProfilerCallback.cpp // This is the function that will invoke the managed code through COM interop on another thread // this function creates the CCW object // [in] this pointer DWORD WINAPI CreateManagedStub(LPVOID lpParam) { _ManagedStub *...
  • Managed CodeGen

    CLR Profiling API

    • 0 Comments
    I think CLR Profiling API is one of the coolest things in CLR. Here is a nice article I just found on msdn about Whidbey Profiling APIs. Note that Everett Profiling API and Whidbey Profiling API are completely not compatible. You have to explicitly implement...
  • Managed CodeGen

    Something about ReflectionOnly Context

    • 1 Comments
    I was reading Joel's blog about new stuff in Reflection and he mentioned ReflectionOnly context. Apart from the Generics, token handle resolutions, LCG, ReflectionOnly context (actually a loader feature) had a big impact in Reflection area in Whidbey...
  • Managed CodeGen

    GetMethod limitation regarding Generics

    • 1 Comments
    I've got several inquiry emails about this issue, so I think it is a good idea to publish the problem here. Say we have: public class Test { public void Teste<U>(U teste, int i) { Console.WriteLine(teste); } public void Teste<U>...
  • Managed CodeGen

    HaiboLuo's blog

    • 0 Comments
    Our Reflection QA definitely knows a lot and he is now having a blog of his own: http://blogs.msdn.com/haibo_luo A little advertisement, I know he is going to have something cool coming up soon. Just keep an eye on it.
  • Managed CodeGen

    Reflection.Emit is not ThreadSafe

    • 0 Comments
    Users are not supposed to operate on same Reflection.Emit object on multiple threads. Reflection.Emit Objects are *NOT* thread-safe. It is certainly OK to operate on different Reflection.Emit objects on different threads. We have been discovering issues...
  • Managed CodeGen

    Unexpected TypeLoadException during Type Creation

    • 3 Comments
    We have found some limitations in Reflection.Emit that you cannot emit types that can be compiled in C# compiler. You are unlikely to hit it in daily emit job but if ever you met one: public class E { public struct N1 { public E e; } public struct...
  • Managed CodeGen

    Token Handle Resolution with Generics

    • 0 Comments
    In Whidbey, apart from the token handle resolution APIs I mentioned earlier, there are some overloads making these APIs look a bit more complicated. Again, I am using APIs related to MethodInfo as an representitive example: Token -> Info public...
  • Managed CodeGen

    Something about Resolution APIs

    • 0 Comments
    I haven't blogged for a long time because we were busy hitting ZBB for RTM milestone. I am not aware of something special to talk about so let's talk about one of the main new features in Whidbey -- the token handle resolution APIs. We have talked...
  • Managed CodeGen

    Shawn's Blog about Dynamic Assemblies and Declarative Security

    • 1 Comments
    Shawn has an excellent post about Dynamic Assemblies and Declarative Security, please check it out: http://blogs.msdn.com/shawnfa/archive/2005/05.aspx
  • Managed CodeGen

    Debugging LCG

    • 9 Comments
    Maybe it is a little to early to jump into this talk but I think for a user starting to use LCG, he will hit this problem in the first place. When you are emitting a dynamic method and doesn't have a way to persist it, you can imagine that it could be...
  • Managed CodeGen

    Start on LCG

    • 1 Comments
    I think I will start severl topics around LCG in the furture. Our PM Joel has an excellent post about various method invocations and the paragraph about LCG is a sweet start point on Lightweight Code Gen. http://blogs.msdn.com/joelpob/archive/2004...
  • Managed CodeGen

    Known Reflection.Emit Restrictions

    • 3 Comments
    Shreeman suggested us to publish a list of Reflection.Emit known restrictions (that is not going to be made into Whidbey). I happen to have such a list on my machine for my own reference. So I just post them out here: Cannot Emit nested enum type...
  • Managed CodeGen

    TypeName Grammar

    • 16 Comments
    I was about to post another blog regarding to tokens and handles and generics, but our Reflection tester Haibo suggested me to talk a little about the TypeName Grammar that we added in Whidbey because a lot of external bugs are being reported on this...
  • Managed CodeGen

    Token APIs on Module Builder

    • 1 Comments
    We have some token APIs on Module Builder that can be used to as an optional approach as to regular Refelction.Emit APIs. They are: public TypeToken GetTypeToken(Type type) public TypeToken GetTypeToken(String name) // this looks just like ModuleBuilder...
  • Managed CodeGen

    How to Emit Generics

    • 5 Comments
    Reflection.Emit can emit Generics! Checkout here: Here is a code sample that tells you how to emit various Generics. It is created as dev unit test by Chris King who implemented Reflection.Emit on Generics. using System; using System.Reflection;...
  • Managed CodeGen

    Token Resolution (I)

    • 2 Comments
    This is my first post. Let me start by introducing a small program that you can do with Whidbey Reflection. Here is a small app showing you how you can get all the methods in Assembly A that is referenced by Assembly B. There was no API such as GetReferencedMethods...
Page 1 of 1 (19 items)