November 2002
Intermediate to advanced
432 pages
9h 20m
English
Based on the discussion of JIT compilation and invocation, it is apparent that type is involved in method invocation. Specifically, the CLR uses the method table for a type to locate the address of the target method. Consider the following simple type definition:
public class Bob {
public void f() { }
static public void UseBob(int n, Bob b) {
b.f();
}
}
Ignoring method prolog and epilog, the JIT compiler would generate the following IA-32 native code for the UseBob method:
mov ecx, esi call dword ptr ds:[352108h]
The first instruction moves the target object reference into the ecx register. This is because the JIT compiler typically uses the __fastcall stack discipline, and that causes the first two parameters to ...
Read now
Unlock full access