-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathCatchBlock.cs
More file actions
45 lines (32 loc) · 1.13 KB
/
Copy pathCatchBlock.cs
File metadata and controls
45 lines (32 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// Mono.ILASM.CatchBlock
//
// Author(s):
// Jackson Harper (Jackson@LatitudeGeo.com)
//
// (C) 2003 Jackson Harper, All rights reserved
//
using System;
namespace Mono.ILASM {
public class CatchBlock : ISehClause {
private BaseTypeRef type_ref;
private HandlerBlock handler_block;
public CatchBlock (BaseTypeRef type_ref)
{
this.type_ref = type_ref;
}
public void SetHandlerBlock (HandlerBlock hb)
{
handler_block = hb;
}
public PEAPI.HandlerBlock Resolve (CodeGen code_gen, MethodDef method)
{
PEAPI.CILLabel from = handler_block.GetFromLabel (code_gen, method);
PEAPI.CILLabel to = handler_block.GetToLabel (code_gen, method);
PEAPI.Catch katch;
type_ref.Resolve (code_gen);
katch = new PEAPI.Catch (type_ref.PeapiType, from, to);
return katch;
}
}
}