singrdk/base/Windows/csic/test/switch.il.expected

111 lines
1.7 KiB
Plaintext

.assembly 'switch' { }
.assembly extern 'mscorlib' {
.ver 1:0:5000:0
.publickeytoken = ( b7 7a 5c 56 19 34 e0 89 )
}
.class 'T'
extends [mscorlib]System.Object
{
.method hidebysig public static void 'f'(int32 'x') {
ldarg 0 // x
.locals init ([0]int32 't0')
stloc 0 // t0
ldloc 0 // t0
ldc.i4 1
sub
switch (
$4,
$1,
$1,
$6,
)
ldloc 0 // t0
ldc.i4 -2
beq $5
br $1
$4:
ldc.i4 1
starg 0 // x
br $3
$5:
ldc.i4 2
starg 0 // x
br $3
$1:
ldarg 0 // x
call void [mscorlib]System.Console::'WriteLine'(int32)
br $3
$6:
ldc.i4 5
starg 0 // x
br $3
$2:
$3:
ret
.maxstack 2
} // end of method T.f
.method hidebysig public static int32 'g'(string 'x') {
.locals init ([0]int32 't0')
.locals init ([1]int32 't1')
ldarg 0 // x
.locals init ([2]string 't2')
stloc 2 // t2
ldloc 2 // t2
brfalse $2
ldloc 2 // t2
call string [mscorlib]System.String::'Intern'(string)
stloc 2 // t2
ldloc 2 // t2
ldstr "hi"
beq $5
ldloc 2 // t2
ldstr "there"
beq $6
ldloc 2 // t2
ldstr "you"
beq $7
br $2
$5:
ldc.i4 1
stloc 1 // y
br $4
$6:
ldc.i4 2
stloc 1 // y
br $4
$2:
ldc.i4 3
stloc 1 // y
br $4
$7:
ldc.i4 5
stloc 1 // y
br $4
$3:
$4:
ldloc 1 // y
stloc 0 // t0
br $1
$1:
ldloc 0 // t0
ret
.maxstack 2
} // end of method T.g
.method hidebysig public static void 'Main'() {
.entrypoint
ldc.i4 2
call void 'T'::'f'(int32)
ldstr "hi"
call int32 'T'::'g'(string)
call void [mscorlib]System.Console::'WriteLine'(int32)
ret
.maxstack 1
} // end of method T.Main
.method hidebysig specialname rtspecialname public void .ctor() {
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
.maxstack 1
} // end of constructor T.T
} // end of class T