Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/ikvm-fork.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjfrijters <jfrijters>2010-06-30 11:17:58 +0400
committerjfrijters <jfrijters>2010-06-30 11:17:58 +0400
commitd8edcb3f95a26dbc4a0f58091660fd6951ece7a7 (patch)
treed7a8608519a07ca66ca1bc303d08c565ba0e20a6 /reflect/Type.cs
parenta03acfcfb9d19da2f2cf8befc6d6af3d4b33579d (diff)
It turns out that "multi dimensional" vectors have "multi dimensional" constructors.
Diffstat (limited to 'reflect/Type.cs')
-rw-r--r--reflect/Type.cs18
1 files changed, 12 insertions, 6 deletions
diff --git a/reflect/Type.cs b/reflect/Type.cs
index da17043b..8d98e4f5 100644
--- a/reflect/Type.cs
+++ b/reflect/Type.cs
@@ -1682,12 +1682,18 @@ namespace IKVM.Reflection
public override MethodBase[] __GetDeclaredMethods()
{
Type[] int32 = new Type[] { this.Module.universe.System_Int32 };
- return new MethodBase[] {
- new ConstructorInfoImpl(new BuiltinArrayMethod(this.Module, this, ".ctor", CallingConventions.Standard | CallingConventions.HasThis, this.Module.universe.System_Void, int32)),
- new BuiltinArrayMethod(this.Module, this, "Set", CallingConventions.Standard | CallingConventions.HasThis, this.Module.universe.System_Void, new Type[] { this.Module.universe.System_Int32, elementType }),
- new BuiltinArrayMethod(this.Module, this, "Address", CallingConventions.Standard | CallingConventions.HasThis, elementType.MakeByRefType(), int32),
- new BuiltinArrayMethod(this.Module, this, "Get", CallingConventions.Standard | CallingConventions.HasThis, elementType, int32),
- };
+ List<MethodBase> list = new List<MethodBase>();
+ list.Add(new BuiltinArrayMethod(this.Module, this, "Set", CallingConventions.Standard | CallingConventions.HasThis, this.Module.universe.System_Void, new Type[] { this.Module.universe.System_Int32, elementType }));
+ list.Add(new BuiltinArrayMethod(this.Module, this, "Address", CallingConventions.Standard | CallingConventions.HasThis, elementType.MakeByRefType(), int32));
+ list.Add(new BuiltinArrayMethod(this.Module, this, "Get", CallingConventions.Standard | CallingConventions.HasThis, elementType, int32));
+ list.Add(new ConstructorInfoImpl(new BuiltinArrayMethod(this.Module, this, ".ctor", CallingConventions.Standard | CallingConventions.HasThis, this.Module.universe.System_Void, int32)));
+ for (Type type = elementType; type.__IsVector; type = type.GetElementType())
+ {
+ Array.Resize(ref int32, int32.Length + 1);
+ int32[int32.Length - 1] = int32[0];
+ list.Add(new ConstructorInfoImpl(new BuiltinArrayMethod(this.Module, this, ".ctor", CallingConventions.Standard | CallingConventions.HasThis, this.Module.universe.System_Void, int32)));
+ }
+ return list.ToArray();
}
public override TypeAttributes Attributes