Imported Upstream version 4.0.0~alpha1

Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
This commit is contained in:
Jo Shields
2015-04-07 09:35:12 +01:00
parent 283343f570
commit 3c1f479b9d
22469 changed files with 2931443 additions and 869343 deletions

View File

@@ -27,7 +27,9 @@ using System.Diagnostics;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
#if !NO_SYMBOL_WRITER
using System.Diagnostics.SymbolStore;
#endif
using IKVM.Reflection.Metadata;
using IKVM.Reflection.Writer;
@@ -89,15 +91,19 @@ namespace IKVM.Reflection.Emit
{
if (ilgen != null)
{
#if !NO_SYMBOL_WRITER
if (this.ModuleBuilder.symbolWriter != null)
{
this.ModuleBuilder.symbolWriter.OpenMethod(new SymbolToken(-pseudoToken | 0x06000000), this);
}
#endif
rva = ilgen.WriteBody(initLocals);
#if !NO_SYMBOL_WRITER
if (this.ModuleBuilder.symbolWriter != null)
{
this.ModuleBuilder.symbolWriter.CloseMethod();
}
#endif
ilgen = null;
}
}
@@ -288,11 +294,13 @@ namespace IKVM.Reflection.Emit
declarativeSecurity.Add(customBuilder);
}
#if !CORECLR
public void AddDeclarativeSecurity(System.Security.Permissions.SecurityAction securityAction, System.Security.PermissionSet permissionSet)
{
this.ModuleBuilder.AddDeclarativeSecurity(pseudoToken, securityAction, permissionSet);
this.attributes |= MethodAttributes.HasSecurity;
}
#endif
public void SetImplementationFlags(MethodImplAttributes attributes)
{
@@ -742,7 +750,8 @@ namespace IKVM.Reflection.Emit
{
if (methodSignature == null)
{
methodSignature = MethodSignature.MakeFromBuilder(returnType, parameterTypes, customModifiers, callingConvention, gtpb == null ? 0 : gtpb.Length);
methodSignature = MethodSignature.MakeFromBuilder(returnType ?? typeBuilder.Universe.System_Void, parameterTypes ?? Type.EmptyTypes,
customModifiers, callingConvention, gtpb == null ? 0 : gtpb.Length);
}
return methodSignature;
}