Permalink
Browse files

Submodule ikvm reflection

  • Loading branch information...
1 parent 76ebd11 commit d88a760e9379acff1599f1d7ff264dbf7b0e5709 @marek-safar marek-safar committed Nov 21, 2012
Showing with 33 additions and 38,433 deletions.
  1. +6 −0 .gitmodules
  2. +1 −0 external/ikvm
  3. +0 −51 mcs/class/IKVM.Reflection/AmbiguousMatchException.cs
  4. +0 −264 mcs/class/IKVM.Reflection/Assembly.cs
  5. +0 −476 mcs/class/IKVM.Reflection/AssemblyName.cs
  6. +0 −51 mcs/class/IKVM.Reflection/BadImageFormatException.cs
  7. +0 −405 mcs/class/IKVM.Reflection/Binder.cs
  8. +0 −239 mcs/class/IKVM.Reflection/ConstructorInfo.cs
  9. +0 −1,016 mcs/class/IKVM.Reflection/CustomAttributeData.cs
  10. +0 −81 mcs/class/IKVM.Reflection/CustomAttributeNamedArgument.cs
  11. +0 −71 mcs/class/IKVM.Reflection/CustomAttributeTypedArgument.cs
  12. +0 −352 mcs/class/IKVM.Reflection/CustomModifiers.cs
  13. +0 −827 mcs/class/IKVM.Reflection/Emit/AssemblyBuilder.cs
  14. +0 −141 mcs/class/IKVM.Reflection/Emit/ConstructorBuilder.cs
  15. +0 −663 mcs/class/IKVM.Reflection/Emit/CustomAttributeBuilder.cs
  16. +0 −75 mcs/class/IKVM.Reflection/Emit/CustomModifiersBuilder.cs
  17. +0 −124 mcs/class/IKVM.Reflection/Emit/EnumBuilder.cs
  18. +0 −129 mcs/class/IKVM.Reflection/Emit/Enums.cs
  19. +0 −281 mcs/class/IKVM.Reflection/Emit/EventBuilder.cs
  20. +0 −121 mcs/class/IKVM.Reflection/Emit/ExceptionHandler.cs
  21. +0 −229 mcs/class/IKVM.Reflection/Emit/FieldBuilder.cs
  22. +0 −1,135 mcs/class/IKVM.Reflection/Emit/ILGenerator.cs
  23. +0 −778 mcs/class/IKVM.Reflection/Emit/MethodBuilder.cs
  24. +0 −1,881 mcs/class/IKVM.Reflection/Emit/ModuleBuilder.cs
  25. +0 −288 mcs/class/IKVM.Reflection/Emit/OpCode.cs
  26. +0 −749 mcs/class/IKVM.Reflection/Emit/OpCodes.cs
  27. +0 −144 mcs/class/IKVM.Reflection/Emit/ParameterBuilder.cs
  28. +0 −288 mcs/class/IKVM.Reflection/Emit/PropertyBuilder.cs
  29. +0 −317 mcs/class/IKVM.Reflection/Emit/SignatureHelper.cs
  30. +0 −271 mcs/class/IKVM.Reflection/Emit/Tokens.cs
  31. +0 −1,252 mcs/class/IKVM.Reflection/Emit/TypeBuilder.cs
  32. +0 −325 mcs/class/IKVM.Reflection/Enums.cs
  33. +0 −252 mcs/class/IKVM.Reflection/EventInfo.cs
  34. +0 −94 mcs/class/IKVM.Reflection/ExceptionHandlingClause.cs
  35. +0 −304 mcs/class/IKVM.Reflection/FieldInfo.cs
  36. +0 −98 mcs/class/IKVM.Reflection/FieldSignature.cs
  37. +0 −527 mcs/class/IKVM.Reflection/Fusion.cs
  38. +0 −694 mcs/class/IKVM.Reflection/GenericWrappers.cs
  39. +0 −146 mcs/class/IKVM.Reflection/IKVM.Reflection.csproj
  40. +0 −32 mcs/class/IKVM.Reflection/Impl/ITypeOwner.cs
  41. +0 −233 mcs/class/IKVM.Reflection/Impl/MdbWriter.cs
  42. +0 −1,188 mcs/class/IKVM.Reflection/Impl/PdbWriter.cs
  43. +0 −84 mcs/class/IKVM.Reflection/Impl/SymbolSupport.cs
  44. +0 −35 mcs/class/IKVM.Reflection/InterfaceMapping.cs
  45. +0 −73 mcs/class/IKVM.Reflection/LocalVariableInfo.cs
  46. +0 −18 mcs/class/IKVM.Reflection/Makefile
  47. +0 −113 mcs/class/IKVM.Reflection/ManifestResourceInfo.cs
  48. +0 −259 mcs/class/IKVM.Reflection/MarshalSpec.cs
  49. +0 −135 mcs/class/IKVM.Reflection/MemberInfo.cs
  50. +0 −99 mcs/class/IKVM.Reflection/Metadata/CliHeader.cs
  51. +0 −101 mcs/class/IKVM.Reflection/Metadata/MetadataRW.cs
  52. +0 −2,722 mcs/class/IKVM.Reflection/Metadata/Tables.cs
  53. +0 −168 mcs/class/IKVM.Reflection/MethodBase.cs
  54. +0 −162 mcs/class/IKVM.Reflection/MethodBody.cs
  55. +0 −36 mcs/class/IKVM.Reflection/MethodImplMap.cs
  56. +0 −403 mcs/class/IKVM.Reflection/MethodInfo.cs
  57. +0 −487 mcs/class/IKVM.Reflection/MethodSignature.cs
  58. +0 −1,170 mcs/class/IKVM.Reflection/Missing.cs
  59. +0 −685 mcs/class/IKVM.Reflection/Module.cs
  60. +0 −189 mcs/class/IKVM.Reflection/ParameterInfo.cs
  61. +0 −45 mcs/class/IKVM.Reflection/ParameterModifier.cs
  62. +0 −27 mcs/class/IKVM.Reflection/Properties/AssemblyInfo.cs
  63. +0 −355 mcs/class/IKVM.Reflection/PropertyInfo.cs
  64. +0 −186 mcs/class/IKVM.Reflection/PropertySignature.cs
  65. +0 −330 mcs/class/IKVM.Reflection/Reader/AssemblyReader.cs
  66. +0 −15 mcs/class/IKVM.Reflection/Reader/Authenticode.cs
  67. +0 −217 mcs/class/IKVM.Reflection/Reader/ByteReader.cs
  68. +0 −166 mcs/class/IKVM.Reflection/Reader/EventInfoImpl.cs
  69. +0 −136 mcs/class/IKVM.Reflection/Reader/Field.cs
  70. +0 −403 mcs/class/IKVM.Reflection/Reader/GenericTypeParameter.cs
  71. +0 −406 mcs/class/IKVM.Reflection/Reader/MetadataReader.cs
  72. +0 −394 mcs/class/IKVM.Reflection/Reader/Method.cs
  73. +0 −1,269 mcs/class/IKVM.Reflection/Reader/ModuleReader.cs
  74. +0 −329 mcs/class/IKVM.Reflection/Reader/PEReader.cs
  75. +0 −179 mcs/class/IKVM.Reflection/Reader/PropertyInfoImpl.cs
  76. +0 −107 mcs/class/IKVM.Reflection/Reader/ResourceModule.cs
  77. +0 −425 mcs/class/IKVM.Reflection/Reader/TypeDefImpl.cs
  78. +0 −696 mcs/class/IKVM.Reflection/Signature.cs
  79. +0 −119 mcs/class/IKVM.Reflection/StandAloneMethodSig.cs
  80. +0 −136 mcs/class/IKVM.Reflection/StrongNameKeyPair.cs
  81. +0 −3,087 mcs/class/IKVM.Reflection/Type.cs
  82. +0 −158 mcs/class/IKVM.Reflection/TypeInfo.cs
  83. +0 −610 mcs/class/IKVM.Reflection/TypeNameParser.cs
  84. +0 −1,110 mcs/class/IKVM.Reflection/Universe.cs
  85. +0 −256 mcs/class/IKVM.Reflection/Util.cs
  86. +0 −368 mcs/class/IKVM.Reflection/Writer/ByteBuffer.cs
  87. +0 −395 mcs/class/IKVM.Reflection/Writer/Heaps.cs
  88. +0 −561 mcs/class/IKVM.Reflection/Writer/MetadataWriter.cs
  89. +0 −436 mcs/class/IKVM.Reflection/Writer/ModuleWriter.cs
  90. +0 −294 mcs/class/IKVM.Reflection/Writer/PEWriter.cs
  91. +0 −411 mcs/class/IKVM.Reflection/Writer/ResourceSection.cs
  92. +0 −855 mcs/class/IKVM.Reflection/Writer/TextSection.cs
  93. +0 −278 mcs/class/IKVM.Reflection/Writer/VersionInfo.cs
  94. +0 −117 mcs/class/IKVM.Reflection/reflect.build
  95. +1 −1 mcs/class/Makefile
  96. +1 −1 mcs/mcs/Makefile
  97. +1 −1 mcs/mcs/ikvm.cs
  98. +16 −16 mcs/mcs/mcs.csproj
  99. +7 −7 mcs/mcs/mcs.exe.sources
View
@@ -16,3 +16,9 @@
[submodule "external/rx"]
path = external/rx
url = git://github.com/mono/rx.git
+[submodule "extern/ikvm"]
+ path = extern/ikvm
+ url = git@github.com:mono/ikvm-fork.git
+[submodule "external/ikvm"]
+ path = external/ikvm
+ url = git@github.com:mono/ikvm-fork.git
Submodule ikvm added at b85c0f
@@ -1,51 +0,0 @@
-/*
- Copyright (C) 2009 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
- jeroen@frijters.net
-
-*/
-using System;
-using System.Runtime.Serialization;
-
-namespace IKVM.Reflection
-{
- [Serializable]
- public sealed class AmbiguousMatchException : Exception
- {
- public AmbiguousMatchException()
- {
- }
-
- public AmbiguousMatchException(string message)
- : base(message)
- {
- }
-
- public AmbiguousMatchException(string message, Exception inner)
- : base(message, inner)
- {
- }
-
- private AmbiguousMatchException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
- }
-}
@@ -1,264 +0,0 @@
-/*
- 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
- jeroen@frijters.net
-
-*/
-using System;
-using System.Collections.Generic;
-
-namespace IKVM.Reflection
-{
- public delegate Module ModuleResolveEventHandler(object sender, ResolveEventArgs e);
-
- public abstract class Assembly : ICustomAttributeProvider
- {
- internal readonly Universe universe;
- protected string fullName; // AssemblyBuilder needs access to this field to clear it when the name changes
- protected List<ModuleResolveEventHandler> resolvers;
-
- internal Assembly(Universe universe)
- {
- this.universe = universe;
- }
-
- public sealed override string ToString()
- {
- return FullName;
- }
-
- public event ModuleResolveEventHandler ModuleResolve
- {
- add
- {
- if (resolvers == null)
- {
- resolvers = new List<ModuleResolveEventHandler>();
- }
- resolvers.Add(value);
- }
- remove
- {
- resolvers.Remove(value);
- }
- }
-
- public abstract Type[] GetTypes();
- public abstract AssemblyName GetName();
- public abstract string ImageRuntimeVersion { get; }
- public abstract Module ManifestModule { get; }
- public abstract MethodInfo EntryPoint { get; }
- public abstract string Location { get; }
- public abstract AssemblyName[] GetReferencedAssemblies();
- public abstract Module[] GetModules(bool getResourceModules);
- public abstract Module[] GetLoadedModules(bool getResourceModules);
- public abstract Module GetModule(string name);
- public abstract string[] GetManifestResourceNames();
- public abstract ManifestResourceInfo GetManifestResourceInfo(string resourceName);
- public abstract System.IO.Stream GetManifestResourceStream(string name);
-
- internal abstract Type FindType(TypeName name);
- internal abstract Type FindTypeIgnoreCase(TypeName lowerCaseName);
-
- // The differences between ResolveType and FindType are:
- // - ResolveType is only used when a type is assumed to exist (because another module's metadata claims it)
- // - ResolveType can return a MissingType
- internal Type ResolveType(TypeName typeName)
- {
- return FindType(typeName) ?? universe.GetMissingTypeOrThrow(this.ManifestModule, null, typeName);
- }
-
- public string FullName
- {
- get { return fullName ?? (fullName = GetName().FullName); }
- }
-
- public Module[] GetModules()
- {
- return GetModules(true);
- }
-
- public IEnumerable<Module> Modules
- {
- get { return GetLoadedModules(); }
- }
-
- public Module[] GetLoadedModules()
- {
- return GetLoadedModules(true);
- }
-
- public AssemblyName GetName(bool copiedName)
- {
- return GetName();
- }
-
- public bool ReflectionOnly
- {
- get { return true; }
- }
-
- public Type[] GetExportedTypes()
- {
- List<Type> list = new List<Type>();
- foreach (Type type in GetTypes())
- {
- if (type.IsVisible)
- {
- list.Add(type);
- }
- }
- return list.ToArray();
- }
-
- public IEnumerable<Type> ExportedTypes
- {
- get { return GetExportedTypes(); }
- }
-
- public IEnumerable<TypeInfo> DefinedTypes
- {
- get
- {
- Type[] types = GetTypes();
- TypeInfo[] typeInfos = new TypeInfo[types.Length];
- for (int i = 0; i < types.Length; i++)
- {
- typeInfos[i] = types[i].GetTypeInfo();
- }
- return typeInfos;
- }
- }
-
- public Type GetType(string name)
- {
- return GetType(name, false);
- }
-
- public Type GetType(string name, bool throwOnError)
- {
- return GetType(name, throwOnError, false);
- }
-
- public Type GetType(string name, bool throwOnError, bool ignoreCase)
- {
- TypeNameParser parser = TypeNameParser.Parse(name, throwOnError);
- if (parser.Error)
- {
- return null;
- }
- if (parser.AssemblyName != null)
- {
- if (throwOnError)
- {
- throw new ArgumentException("Type names passed to Assembly.GetType() must not specify an assembly.");
- }
- else
- {
- return null;
- }
- }
- TypeName typeName = TypeName.Split(TypeNameParser.Unescape(parser.FirstNamePart));
- Type type = ignoreCase
- ? FindTypeIgnoreCase(typeName.ToLowerInvariant())
- : FindType(typeName);
- if (type == null && __IsMissing)
- {
- throw new MissingAssemblyException((MissingAssembly)this);
- }
- return parser.Expand(type, this, throwOnError, name, false, ignoreCase);
- }
-
- public virtual Module LoadModule(string moduleName, byte[] rawModule)
- {
- throw new NotSupportedException();
- }
-
- public Module LoadModule(string moduleName, byte[] rawModule, byte[] rawSymbolStore)
- {
- return LoadModule(moduleName, rawModule);
- }
-
- public bool IsDefined(Type attributeType, bool inherit)
- {
- return CustomAttributeData.__GetCustomAttributes(this, attributeType, inherit).Count != 0;
- }
-
- public IList<CustomAttributeData> __GetCustomAttributes(Type attributeType, bool inherit)
- {
- return CustomAttributeData.__GetCustomAttributes(this, attributeType, inherit);
- }
-
- public IList<CustomAttributeData> GetCustomAttributesData()
- {
- return CustomAttributeData.GetCustomAttributes(this);
- }
-
- public IEnumerable<CustomAttributeData> CustomAttributes
- {
- get { return GetCustomAttributesData(); }
- }
-
- public static string CreateQualifiedName(string assemblyName, string typeName)
- {
- return typeName + ", " + assemblyName;
- }
-
- public static Assembly GetAssembly(Type type)
- {
- return type.Assembly;
- }
-
- public string CodeBase
- {
- get
- {
- string path = this.Location.Replace(System.IO.Path.DirectorySeparatorChar, '/');
- if (!path.StartsWith("/"))
- {
- path = "/" + path;
- }
- return "file://" + path;
- }
- }
-
- public virtual bool IsDynamic
- {
- get { return false; }
- }
-
- public virtual bool __IsMissing
- {
- get { return false; }
- }
-
- public AssemblyNameFlags __AssemblyFlags
- {
- get { return GetAssemblyFlags(); }
- }
-
- protected virtual AssemblyNameFlags GetAssemblyFlags()
- {
- return GetName().Flags;
- }
-
- internal abstract IList<CustomAttributeData> GetCustomAttributesData(Type attributeType);
- }
-}
Oops, something went wrong.

0 comments on commit d88a760

Please sign in to comment.