-
-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split many types out into separate files. No impactful changes.
Sort usings, add spacing. Replace Empty.Array with Array.Empty.
- Loading branch information
Showing
157 changed files
with
7,637 additions
and
5,142 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
Copyright (C) 2009-2015 Jeroen Frijters | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
Jeroen Frijters | ||
[email protected] | ||
*/ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace IKVM.Reflection | ||
{ | ||
sealed class ArrayType : ElementHolderType | ||
{ | ||
internal static Type Make(Type type, CustomModifiers mods) | ||
{ | ||
return type.Universe.CanonicalizeType(new ArrayType(type, mods)); | ||
} | ||
|
||
private ArrayType(Type type, CustomModifiers mods) | ||
: base(type, mods, Signature.ELEMENT_TYPE_SZARRAY) | ||
{ | ||
} | ||
|
||
public override Type BaseType | ||
{ | ||
get { return elementType.Module.universe.System_Array; } | ||
} | ||
|
||
public override Type[] __GetDeclaredInterfaces() | ||
{ | ||
return new Type[] { | ||
this.Module.universe.Import(typeof(IList<>)).MakeGenericType(elementType), | ||
this.Module.universe.Import(typeof(ICollection<>)).MakeGenericType(elementType), | ||
this.Module.universe.Import(typeof(IEnumerable<>)).MakeGenericType(elementType) | ||
}; | ||
} | ||
|
||
public override MethodBase[] __GetDeclaredMethods() | ||
{ | ||
Type[] int32 = new Type[] { this.Module.universe.System_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 | ||
{ | ||
get { return TypeAttributes.Public | TypeAttributes.Sealed | TypeAttributes.Serializable; } | ||
} | ||
|
||
public override int GetArrayRank() | ||
{ | ||
return 1; | ||
} | ||
|
||
public override bool Equals(object o) | ||
{ | ||
return EqualsHelper(o as ArrayType); | ||
} | ||
|
||
public override int GetHashCode() | ||
{ | ||
return elementType.GetHashCode() * 5; | ||
} | ||
|
||
internal override string GetSuffix() | ||
{ | ||
return "[]"; | ||
} | ||
|
||
protected override Type Wrap(Type type, CustomModifiers mods) | ||
{ | ||
return Make(type, mods); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
Copyright (C) 2009-2012 Jeroen Frijters | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
Jeroen Frijters | ||
[email protected] | ||
*/ | ||
namespace IKVM.Reflection | ||
{ | ||
public enum AssemblyContentType | ||
{ | ||
Default = 0, | ||
WindowsRuntime = 1, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
Copyright (C) 2009-2012 Jeroen Frijters | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
Jeroen Frijters | ||
[email protected] | ||
*/ | ||
namespace IKVM.Reflection | ||
{ | ||
public enum AssemblyHashAlgorithm | ||
{ | ||
None = 0, | ||
MD5 = 0x8003, | ||
SHA1 = 0x8004, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
Copyright (C) 2009-2012 Jeroen Frijters | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
Jeroen Frijters | ||
[email protected] | ||
*/ | ||
using System; | ||
|
||
namespace IKVM.Reflection | ||
{ | ||
[Flags] | ||
public enum AssemblyNameFlags | ||
{ | ||
None = 0, | ||
PublicKey = 1, | ||
Retargetable = 256, | ||
EnableJITcompileOptimizer = 16384, | ||
EnableJITcompileTracking = 32768, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* | ||
Copyright (C) 2009-2012 Jeroen Frijters | ||
This software is provided 'as-is', without any express or implied | ||
warranty. In no event will the authors be held liable for any damages | ||
arising from the use of this software. | ||
Permission is granted to anyone to use this software for any purpose, | ||
including commercial applications, and to alter it and redistribute it | ||
freely, subject to the following restrictions: | ||
1. The origin of this software must not be misrepresented; you must not | ||
claim that you wrote the original software. If you use this software | ||
in a product, an acknowledgment in the product documentation would be | ||
appreciated but is not required. | ||
2. Altered source versions must be plainly marked as such, and must not be | ||
misrepresented as being the original software. | ||
3. This notice may not be removed or altered from any source distribution. | ||
Jeroen Frijters | ||
[email protected] | ||
*/ | ||
namespace IKVM.Reflection | ||
{ | ||
public enum AssemblyVersionCompatibility | ||
{ | ||
SameMachine = 1, | ||
SameProcess = 2, | ||
SameDomain = 3, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.