Add something like this to CEEInfo::getNewHelper in vm\jitinterface.cpp:

IMDInternalImport *pMDImport = pMT->GetClass()->GetMDImport();
if (pMDImport->GetCustomAttributeByName(pMT->GetClass()->Getcl(),
"YourCustomAttribute", NULL, NULL) == S_OK)
{
    return CORINFO_HELP_YOURNEWHELPER;
}

-Jan

-----Original Message-----
From: Discussion of the Rotor Shared Source CLI implementation
[mailto:[EMAIL PROTECTED] On Behalf Of Archana
Sent: Thursday, November 11, 2004 4:50 AM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET-ROTOR] adding a new alloc function

Hi,
 could someone please explain how to make the JIT recognize the new
custom attribute as mentioned below?
Thanks
archana

On Tue, 24 Aug 2004, Jan Kotas wrote:

> - If all instances of certain classes are supposed to be allocated by
> your allocator, you can use custom attribute to mark them as such. Or
> you can use custom attribute to say that all instances of given class
in
> an assembly should be allocated using your allocator. The JIT would
> consult the custom attribute every time it jitted a newobj instruction
> and call the appropriate internal implementation of new.
>

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
ASP.NET courses you may be interested in:

Guerrilla.NET
November 29 - December 03, 204, in London, UK
December 06-10, 2004, in Los Angeles
http://www.develop.com/courses/gdotnetls

Essential .NET: building applications and components with CSharp
November 29 - December 03, 2004, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentorŪ  http://www.develop.com
ASP.NET courses you may be interested in:

Guerrilla.NET
November 29 - December 03, 204, in London, UK
December 06-10, 2004, in Los Angeles
http://www.develop.com/courses/gdotnetls

Essential .NET: building applications and components with CSharp
November 29 - December 03, 2004, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to