The code for the NEWSFAST helper is dynamically generated in
jitinterfacex86.cpp:

hlpFuncTable[CORINFO_HELP_NEWSFAST].pfnHelper =
JIT_TrialAlloc::GenAllocSFast(flags);

-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 Yuan Yu
Sent: Friday, August 01, 2003 6:12 PM
To: [EMAIL PROTECTED]
Subject: [DOTNET-ROTOR] How does FJit::compileCEE_NEWOBJ work?

I have been trying to understand how the newobj instruction is jitted.
For
a simple class like

   class Foo { int x = 5; }

and an instruction

   newobj     instance void Foo

Rotor calls FJit::compileCEE_NEWOBJ, and goes to the "allocate normal
object" case where the first line is

  helper_ftn = jitInfo->getHelperFtn(jitInfo->getNewHelper(targetClass,
methodHandle));

The value of jitInfo->getNewHelper(targetClass, methodHandle) appears to
be CORINFO_HELP_NEWSFAST, and, according to the table hlpFuncTable, it
seems to map to JIT_NewFast. So, I thought the helper function
helper_ftn
must have been JIT_NewFast. However, it does not seem to be the case.
So,
what is the value of helper_ftn?

Thanks,
-Yuan

Reply via email to