2 // Mono.ILASM.CalliInstr
5 // Jackson Harper (Jackson@LatitudeGeo.com)
7 // (C) 2003 Jackson Harper, All rights reserved
14 namespace Mono.ILASM {
16 public class CalliInstr : IInstr {
18 private PEAPI.CallConv call_conv;
19 private ITypeRef ret_type;
20 private ITypeRef[] param;
22 public CalliInstr (PEAPI.CallConv call_conv, ITypeRef ret_type, ITypeRef[] param)
24 this.call_conv = call_conv;
25 this.ret_type = ret_type;
29 public void Emit (CodeGen code_gen, MethodDef meth,
30 PEAPI.CILInstructions cil)
32 PEAPI.Type[] param_array;
33 PEAPI.CalliSig callisig;
36 param_array = new PEAPI.Type[param.Length];
38 foreach (ITypeRef typeref in param) {
39 typeref.Resolve (code_gen);
40 param_array[count++] = typeref.PeapiType;
43 param_array = new PEAPI.Type[0];
46 ret_type.Resolve (code_gen);
47 callisig = new PEAPI.CalliSig (call_conv,
48 ret_type.PeapiType, param_array);