The main method token is known in ClassLoader::ExecuteMainMethod. If you need it to 
know in the JIT, you need to store it somewhere (static variable should do it) and add 
a method to one of ICorXXXInfo interfaces to expose it to the JIT.

In the shipped Rotor, the JIT is abstracted from metadata through the ICorXXXInfo 
interfaces. Your design will be cleaner if you follow this design by passing the 
actual information your JIT needs instead of the metadata token. It may end up being 
easier since it could fit into one of the existing enums on ICorXXXInfo interface.

-Jan

This posting is provided "AS IS" with no warranties, and confers no rights.

-----Original Message-----
From: Discussion of the Rotor Shared Source CLI implementation [mailto:[EMAIL 
PROTECTED] On Behalf Of Miguel Tomás
Sent: Thursday, June 05, 2003 4:09 AM
To: [EMAIL PROTECTED]
Subject: [DOTNET-ROTOR] Main method token

Hi! I hope you can help me with a little problem I'm having with SSCLI.
I am trying to get the token from main while I'm in the jitCompile method. I thought 
Main was always 0x06000001 but this doesn't seem to be true so I need to get it from 
somewhere. Does anybody know how to obtain it?
Thank you.


---------------------------------
Yahoo! Sorteos
Juega a la Lotería Primitiva sin salir decasa

Reply via email to