Hi,
 wrt the following test program, i am trying to find out how exactly the
jit manages alloc-stmts,

namespace DefaultNamespace {
using System;
public class Test {
 int x;
 public Test() {
1->  Random r=new Random(1234);
 }
}
public class mainclass {
    public static int Main() {
     Console.WriteLine("first stmt");
2->     Test t=new Test();
     return 0;
}

referring to allocation point 1, a call to compileCEE_NEWOBJ is made,
which ultimately calls JIT_NewArr1 that can be captured by a break. but
wrt alloc point 2, no such call is
made. but if we disassemble the code, both the allocations have
corresponding newobj opcodes-
IL_000b: newobj     instance void [mscorlib]System.Random::.ctor(int32)
and
IL_000a: newobj     instance void DefaultNamespace.Test::.ctor()
respectively.
could someone pls explain what happens to the second alloc call, how is it
handled? is it handled thru emitCore(..)? if yes, how does the control
flow to that function, and can we track it somehow?

Thanks & regards
archana

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

Guerrilla ASP.NET
15 March 2004, in Boston, MA
17 May 2004 in Torrance, CA
7 June 2004, London, UK

http://www.develop.com/courses/gaspdotnetls

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

Reply via email to