(DISTFILES): Comment out a few missing files.
[mono-project.git] / mcs / ilasm / codegen / ParamDef.cs
blob52fbbcf21ee3ab89b4a446177745723b1710a1bc
1 //
2 // Mono.ILASM.ParamDef
3 //
4 // Author(s):
5 // Jackson Harper (Jackson@LatitudeGeo.com)
6 //
7 // (C) 2003 Jackson Harper, All rights reserved
8 //
11 using System;
14 namespace Mono.ILASM {
16 /// <summary>
17 /// Definition of a parameter passed to a method
18 /// </summary>
19 public class ParamDef {
21 private PEAPI.ParamAttr attr;
22 private string name;
23 private ITypeRef typeref;
24 private bool is_defined;
25 private PEAPI.Param peapi_param;
27 public static readonly ParamDef Ellipsis = new ParamDef (new PEAPI.ParamAttr (), "ELLIPSIS", null);
29 public ParamDef (PEAPI.ParamAttr attr, string name,
30 ITypeRef typeref) {
31 this.attr = attr;
32 this.name = name;
33 this.typeref = typeref;
34 is_defined = false;
37 public ITypeRef Type {
38 get { return typeref; }
41 public string TypeName {
42 get { return typeref.FullName; }
45 public string Name {
46 get { return name; }
49 public PEAPI.Param PeapiParam {
50 get { return peapi_param; }
53 public bool IsSentinel ()
55 return (typeref is SentinelTypeRef && this != Ellipsis);
58 public void Define (CodeGen code_gen)
60 if (is_defined)
61 return;
63 typeref.Resolve (code_gen);
65 peapi_param = new PEAPI.Param (attr,
66 name, typeref.PeapiType);
68 is_defined = true;