64 {
65 var int32 =
new Type[] { Module.Universe.System_Int32 };
66 var list = new List<MethodBase>();
67 list.Add(
new BuiltinArrayMethod(
Module,
this,
"Set", CallingConventions.Standard | CallingConventions.HasThis,
Module.Universe.System_Void,
new Type[] { Module.Universe.System_Int32, elementType }));
68 list.Add(
new BuiltinArrayMethod(
Module,
this,
"Address", CallingConventions.Standard | CallingConventions.HasThis,
elementType.MakeByRefType(), int32));
69 list.Add(
new BuiltinArrayMethod(
Module,
this,
"Get", CallingConventions.Standard | CallingConventions.HasThis,
elementType, int32));
70 list.Add(
new ConstructorInfoImpl(
new BuiltinArrayMethod(
Module,
this,
".ctor", CallingConventions.Standard | CallingConventions.HasThis,
Module.Universe.System_Void, int32)));
71
72 for (var type =
elementType; type.IsSZArray; type = type.GetElementType())
73 {
74 Array.Resize(
ref int32, int32.Length + 1);
75 int32[int32.Length - 1] = int32[0];
76 list.Add(
new ConstructorInfoImpl(
new BuiltinArrayMethod(
Module,
this,
".ctor", CallingConventions.Standard | CallingConventions.HasThis,
Module.Universe.System_Void, int32)));
77 }
78
79 return list.ToArray();
80 }