mirror of
https://github.com/SSCLI/sscli_20021101
synced 2026-06-08 12:28:57 +00:00
9fa3874800
Moved the original file to the archive subfolder.
149 lines
4.1 KiB
Plaintext
149 lines
4.1 KiB
Plaintext
// ==++==
|
|
//
|
|
//
|
|
// Copyright (c) 2002 Microsoft Corporation. All rights reserved.
|
|
//
|
|
// The use and distribution terms for this software are contained in the file
|
|
// named license.txt, which can be found in the root of this distribution.
|
|
// By using this software in any fashion, you are agreeing to be bound by the
|
|
// terms of this license.
|
|
//
|
|
// You must not remove this notice, or any other, from this software.
|
|
//
|
|
//
|
|
// ==--==
|
|
|
|
// test interaction of exceptions and garbage collector
|
|
|
|
.assembly extern mscorlib
|
|
{
|
|
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
|
|
.ver 1:0:3300:0
|
|
}
|
|
.assembly extern System.Xml
|
|
{
|
|
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
|
|
.ver 1:0:3300:0
|
|
}
|
|
.assembly excepgc2
|
|
{
|
|
.hash algorithm 0x00008004
|
|
.ver 0:0:0:0
|
|
}
|
|
.module excepgc2.exe
|
|
.subsystem 0x00000003
|
|
.file alignment 512
|
|
.corflags 0x00000001
|
|
|
|
//
|
|
// ============== CLASS STRUCTURE DECLARATION ==================
|
|
//
|
|
.class private auto ansi beforefieldinit MainApp
|
|
extends [mscorlib]System.MarshalByRefObject
|
|
{
|
|
} // end of class MainApp
|
|
|
|
|
|
// =============================================================
|
|
|
|
|
|
// =============== GLOBAL FIELDS AND METHODS ===================
|
|
|
|
|
|
// =============================================================
|
|
|
|
|
|
// =============== CLASS MEMBERS DECLARATION ===================
|
|
// note that class flags, 'extends' and 'implements' clauses
|
|
// are provided here for information only
|
|
|
|
.class private auto ansi beforefieldinit MainApp
|
|
extends [mscorlib]System.MarshalByRefObject
|
|
{
|
|
.method public hidebysig specialname rtspecialname
|
|
instance void .ctor() cil managed
|
|
{
|
|
// Code size 7 (0x7)
|
|
.maxstack 1
|
|
IL_0000: ldarg.0
|
|
IL_0001: call instance void [mscorlib]System.MarshalByRefObject::.ctor()
|
|
IL_0006: ret
|
|
} // end of method MainApp::.ctor
|
|
|
|
.method public hidebysig instance void
|
|
Action() cil managed
|
|
{
|
|
.maxstack 2
|
|
.locals init (class [mscorlib]System.IO.StringWriter V_0,
|
|
class [System.Xml]System.Xml.XmlTextWriter V_1)
|
|
newobj instance void [mscorlib]System.IO.StringWriter::.ctor()
|
|
stloc.0
|
|
ldloc.0
|
|
newobj instance void [System.Xml]System.Xml.XmlTextWriter::.ctor(class [mscorlib]System.IO.TextWriter)
|
|
stloc.1
|
|
ldloc.1
|
|
callvirt instance void [System.Xml]System.Xml.XmlWriter::WriteEndDocument()
|
|
ret
|
|
} // end of method MainApp::Action
|
|
|
|
.method public hidebysig static int32 Main2() cil managed
|
|
{
|
|
.maxstack 2
|
|
.locals init (object V_0)
|
|
|
|
newobj instance void [mscorlib]System.Object::.ctor()
|
|
stloc.0
|
|
|
|
_try:
|
|
newobj instance void MainApp::.ctor()
|
|
call instance void MainApp::Action()
|
|
leave.s _ret
|
|
|
|
_try_end:
|
|
_filter:
|
|
dup
|
|
callvirt class [mscorlib]System.String [mscorlib]System.Object::ToString()
|
|
call void [mscorlib]System.GC::Collect()
|
|
call void [mscorlib]System.Console::WriteLine(object)
|
|
call void [mscorlib]System.Console::WriteLine(object)
|
|
ldc.i4 1
|
|
endfilter
|
|
|
|
_handler:
|
|
dup
|
|
callvirt class [mscorlib]System.String [mscorlib]System.Object::ToString()
|
|
call void [mscorlib]System.GC::Collect()
|
|
call void [mscorlib]System.Console::WriteLine(object)
|
|
call void [mscorlib]System.Console::WriteLine(object)
|
|
leave.s _ret
|
|
|
|
_handler_end:
|
|
_ret:
|
|
ldloc.0
|
|
call void [mscorlib]System.Console::WriteLine(object)
|
|
ldc.i4 0
|
|
ret
|
|
|
|
.try _try to _try_end filter _filter handler _handler to _handler_end
|
|
} // end of method MainApp::Main2
|
|
|
|
.method public hidebysig static int32 Main() cil managed
|
|
{
|
|
.entrypoint
|
|
.maxstack 2
|
|
|
|
newobj instance void [mscorlib]System.Object::.ctor()
|
|
|
|
call int32 MainApp::Main2()
|
|
pop
|
|
|
|
call void [mscorlib]System.Console::WriteLine(object)
|
|
ldstr "Passed"
|
|
call void [mscorlib]System.Console::WriteLine(string)
|
|
|
|
ldc.i4 0
|
|
ret
|
|
}
|
|
|
|
} // end of class MainApp
|