153 lines
3.5 KiB
Plaintext
153 lines
3.5 KiB
Plaintext
|
.assembly '2darray2' { }
|
||
|
.assembly extern 'mscorlib' {
|
||
|
.ver 1:0:5000:0
|
||
|
.publickeytoken = ( b7 7a 5c 56 19 34 e0 89 )
|
||
|
}
|
||
|
.class sealed 'point'
|
||
|
extends [mscorlib]System.ValueType
|
||
|
{
|
||
|
.field private int32 'x'
|
||
|
.field private int32 'y'
|
||
|
.method hidebysig specialname rtspecialname public void .ctor(int32 'x',int32 'y') {
|
||
|
ldarg.0
|
||
|
ldarg 1 // x
|
||
|
stfld int32 'point'::'x'
|
||
|
ldarg.0
|
||
|
ldarg 2 // y
|
||
|
stfld int32 'point'::'y'
|
||
|
ret
|
||
|
.maxstack 2
|
||
|
} // end of constructor point.point
|
||
|
.method hidebysig virtual public instance string 'ToString'() {
|
||
|
.locals init ([0]string 't0')
|
||
|
ldstr "({0},{1})"
|
||
|
ldarg.0
|
||
|
ldfld int32 'point'::'x'
|
||
|
box int32
|
||
|
ldarg.0
|
||
|
ldfld int32 'point'::'y'
|
||
|
box int32
|
||
|
call string [mscorlib]System.String::'Format'(string,object,object)
|
||
|
stloc 0 // t0
|
||
|
br $1
|
||
|
$1:
|
||
|
ldloc 0 // t0
|
||
|
ret
|
||
|
.maxstack 3
|
||
|
} // end of method point.ToString
|
||
|
} // end of struct point
|
||
|
.class public 'test'
|
||
|
extends [mscorlib]System.Object
|
||
|
{
|
||
|
.field static private value class 'point'[0...,0...] 'x'
|
||
|
.method hidebysig public static void 'Main'() {
|
||
|
.entrypoint
|
||
|
.locals init ([0]int32 't0')
|
||
|
ldc.i4 0
|
||
|
stloc 0 // i
|
||
|
br $4
|
||
|
$1:
|
||
|
.locals init ([1]int32 't1')
|
||
|
ldc.i4 0
|
||
|
stloc 1 // j
|
||
|
br $8
|
||
|
$5:
|
||
|
ldsfld value class 'point'[0...,0...] 'test'::'x'
|
||
|
ldloc 0 // i
|
||
|
ldloc 1 // j
|
||
|
call instance value class 'point' & value class 'point'[0...,0...]::Address(int32,int32)
|
||
|
.locals init ([2]value class 'point' 't2')
|
||
|
ldloca 2 // t2
|
||
|
ldloc 0 // i
|
||
|
ldloc 1 // j
|
||
|
call instance void 'point'::.ctor(int32,int32)
|
||
|
ldloc 2 // t2
|
||
|
stobj value class 'point'
|
||
|
$6:
|
||
|
ldloc 1 // j
|
||
|
ldc.i4.1
|
||
|
add
|
||
|
.locals init ([3]int32 't3')
|
||
|
stloc 3 // t3
|
||
|
ldloc 3 // t3
|
||
|
stloc 1 // j
|
||
|
$8:
|
||
|
ldloc 1 // j
|
||
|
ldc.i4 4
|
||
|
blt $5
|
||
|
$7:
|
||
|
$2:
|
||
|
ldloc 0 // i
|
||
|
ldc.i4.1
|
||
|
add
|
||
|
.locals init ([4]int32 't4')
|
||
|
stloc 4 // t4
|
||
|
ldloc 4 // t4
|
||
|
stloc 0 // i
|
||
|
$4:
|
||
|
ldloc 0 // i
|
||
|
ldc.i4 2
|
||
|
blt $1
|
||
|
$3:
|
||
|
ldsfld value class 'point'[0...,0...] 'test'::'x'
|
||
|
call void 'test'::'print'(class [mscorlib]System.Collections.IEnumerable)
|
||
|
ret
|
||
|
.maxstack 4
|
||
|
} // end of method test.Main
|
||
|
.method hidebysig static private void 'print'(class [mscorlib]System.Collections.IEnumerable 'x') {
|
||
|
.locals init ([0]value class 'point' 't0')
|
||
|
.locals init ([1]class [mscorlib]System.Collections.IEnumerator 't1')
|
||
|
ldarg 0 // x
|
||
|
callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::'GetEnumerator'()
|
||
|
stloc 1 // t1
|
||
|
.try {
|
||
|
br $2
|
||
|
$1:
|
||
|
ldloc 1 // t1
|
||
|
callvirt instance object [mscorlib]System.Collections.IEnumerator::'get_Current'()
|
||
|
unbox value class 'point'
|
||
|
ldobj value class 'point'
|
||
|
stloc 0 // p
|
||
|
ldloc 0 // p
|
||
|
box value class 'point'
|
||
|
call void [mscorlib]System.Console::'WriteLine'(object)
|
||
|
$2:
|
||
|
ldloc 1 // t1
|
||
|
callvirt instance bool [mscorlib]System.Collections.IEnumerator::'MoveNext'()
|
||
|
brtrue $1
|
||
|
$3:
|
||
|
leave $5
|
||
|
}
|
||
|
finally {
|
||
|
ldloc 1 // t1
|
||
|
.locals init ([2]class [mscorlib]System.IDisposable 't2')
|
||
|
isinst class [mscorlib]System.IDisposable
|
||
|
stloc 2 // t2
|
||
|
ldloc 2 // t2
|
||
|
brfalse $6
|
||
|
ldloc 2 // t2
|
||
|
callvirt instance void [mscorlib]System.IDisposable::'Dispose'()
|
||
|
$6:
|
||
|
endfinally
|
||
|
} // end .try
|
||
|
$5:
|
||
|
$4:
|
||
|
ret
|
||
|
.maxstack 1
|
||
|
} // end of method test.print
|
||
|
.method hidebysig specialname rtspecialname public void .ctor() {
|
||
|
ldarg.0
|
||
|
call instance void [mscorlib]System.Object::.ctor()
|
||
|
ret
|
||
|
.maxstack 1
|
||
|
} // end of constructor test.test
|
||
|
.method hidebysig specialname rtspecialname static private void .cctor() {
|
||
|
ldc.i4 2
|
||
|
ldc.i4 4
|
||
|
newobj instance void value class 'point'[0...,0...]::.ctor(int32,int32)
|
||
|
stsfld value class 'point'[0...,0...] 'test'::'x'
|
||
|
ret
|
||
|
.maxstack 3
|
||
|
} // end of constructor test.test
|
||
|
} // end of class test
|