dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] runtime/verifier questions again


From: Andre 'Ilu' Seidelt
Subject: [Pnet-developers] runtime/verifier questions again
Date: Tue, 10 Aug 2004 14:04:24 +0200
User-agent: Mozilla Thunderbird 0.7.2 (Windows/20040707)

Hi Rhys, hi all,

i've got some questions about the runtime again. Although
the questions are mostly about floating point values they
apply to things like decimals and structs, too. :-)

I don't quite get where ILFloat, ILDouble and ILNativeFloat
are used and how. It seems to me, that for local parameter
the according type is used, but for calculations on the
stack always ILNativeFloat? What about method parameters?

It seems the values are stored different depending on
their usage (calculation/local variable/parameter).

Are there 'rules' how values are stored on the stack for
the Execution-, the Parameter- and the LocalVariableStack?


When running the following little fragment from class Test:
-=-=-=-=-=-=-=
public static void Main() {
   new Test().firstMethod();
}

public void firstMethod() {
   int ba = 1; // lower int-border
   float a = 2.0f;
   double aa = 2.0f;
   int bb = 1; // upper int-border
   OtherCall(1, 3.0f, 3.0, 1);
}

public void OtherCall(int a, float b, double c, int d) {
   Thread.Sleep(5000);
}
-=-=-=-=-=-=-=

and dumping the stack just before CALLVIRT is executed I
get the following:

-=-=-=-=-=-=-=
Stack:
 0x10034038<01>: 0x1
 0x10034034<02>: 0x10444000
 0x10034030<03>: 0xC0000000
 0x1003402c<04>: 0x0
 0x10034028<05>: 0x10054000
 0x10034024<06>: 0xC0000000
 0x10034020<07>: 0x0
 0x1003401c<08>: 0x1
 0x10034018<09>: 0x10451FF8
 0x10034014<10>: 0x1
 0x10034010<11>: 0x40000000
 0x1003400c<12>: 0x0
 0x10034008<13>: 0x40000000
 0x10034004<14>: 0x1
 0x10034000<15>: 0x10451FF8
-=-=-=-=-=-=-=

I think this means the following:
<15>    : The instance of 'Test' used by firstMethod as this
<14>    : lower int border
<13>    : seems to be an ILFloat (local variable of firstMethod)
<12-11> : seems to be an ILDouble ( "" )
<10>    : upper int border
<09>    : The instance of 'Test' param to OtherCall as this
<08>    : lower int border
<07-05> : what is this? an ILNativeFloat?
<05-02> : what is this? an ILNativeFloat?
<01>    : upper int border

The values in <02> and <05> look like pointers to something?

Until now I'm not able to interpret the values I find on the
stack if they are floating point values or decimals.

Please help, thx...
   Ilu



reply via email to

[Prev in Thread] Current Thread [Next in Thread]