Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\dir.props" />
<PropertyGroup>
<AssemblyVersion>4.1.0.0</AssemblyVersion>
<IsNETCoreApp>true</IsNETCoreApp>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
netcoreapp;
uap;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,359 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
// ------------------------------------------------------------------------------
// Changes to this file must follow the http://aka.ms/api-review process.
// ------------------------------------------------------------------------------
// These types were moved down to System.Runtime
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.CallingConventions))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.EventAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.FieldAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.GenericParameterAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.MethodImplAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.ParameterAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.PropertyAttributes))]
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Reflection.TypeAttributes))]
namespace System.Reflection.Emit
{
public enum FlowControl
{
Branch = 0,
Break = 1,
Call = 2,
Cond_Branch = 3,
Meta = 4,
Next = 5,
[Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
Phi = 6,
Return = 7,
Throw = 8,
}
[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)]
public partial struct OpCode
{
public System.Reflection.Emit.FlowControl FlowControl { get { throw null; } }
public string Name { get { throw null; } }
public System.Reflection.Emit.OpCodeType OpCodeType { get { throw null; } }
public System.Reflection.Emit.OperandType OperandType { get { throw null; } }
public int Size { get { throw null; } }
public System.Reflection.Emit.StackBehaviour StackBehaviourPop { get { throw null; } }
public System.Reflection.Emit.StackBehaviour StackBehaviourPush { get { throw null; } }
public short Value { get { throw null; } }
public override bool Equals(object obj) { throw null; }
public bool Equals(System.Reflection.Emit.OpCode obj) { throw null; }
public override int GetHashCode() { throw null; }
public static bool operator ==(System.Reflection.Emit.OpCode a, System.Reflection.Emit.OpCode b) { throw null; }
public static bool operator !=(System.Reflection.Emit.OpCode a, System.Reflection.Emit.OpCode b) { throw null; }
public override string ToString() { throw null; }
}
public partial class OpCodes
{
internal OpCodes() { }
public static readonly System.Reflection.Emit.OpCode Add;
public static readonly System.Reflection.Emit.OpCode Add_Ovf;
public static readonly System.Reflection.Emit.OpCode Add_Ovf_Un;
public static readonly System.Reflection.Emit.OpCode And;
public static readonly System.Reflection.Emit.OpCode Arglist;
public static readonly System.Reflection.Emit.OpCode Beq;
public static readonly System.Reflection.Emit.OpCode Beq_S;
public static readonly System.Reflection.Emit.OpCode Bge;
public static readonly System.Reflection.Emit.OpCode Bge_S;
public static readonly System.Reflection.Emit.OpCode Bge_Un;
public static readonly System.Reflection.Emit.OpCode Bge_Un_S;
public static readonly System.Reflection.Emit.OpCode Bgt;
public static readonly System.Reflection.Emit.OpCode Bgt_S;
public static readonly System.Reflection.Emit.OpCode Bgt_Un;
public static readonly System.Reflection.Emit.OpCode Bgt_Un_S;
public static readonly System.Reflection.Emit.OpCode Ble;
public static readonly System.Reflection.Emit.OpCode Ble_S;
public static readonly System.Reflection.Emit.OpCode Ble_Un;
public static readonly System.Reflection.Emit.OpCode Ble_Un_S;
public static readonly System.Reflection.Emit.OpCode Blt;
public static readonly System.Reflection.Emit.OpCode Blt_S;
public static readonly System.Reflection.Emit.OpCode Blt_Un;
public static readonly System.Reflection.Emit.OpCode Blt_Un_S;
public static readonly System.Reflection.Emit.OpCode Bne_Un;
public static readonly System.Reflection.Emit.OpCode Bne_Un_S;
public static readonly System.Reflection.Emit.OpCode Box;
public static readonly System.Reflection.Emit.OpCode Br;
public static readonly System.Reflection.Emit.OpCode Br_S;
public static readonly System.Reflection.Emit.OpCode Break;
public static readonly System.Reflection.Emit.OpCode Brfalse;
public static readonly System.Reflection.Emit.OpCode Brfalse_S;
public static readonly System.Reflection.Emit.OpCode Brtrue;
public static readonly System.Reflection.Emit.OpCode Brtrue_S;
public static readonly System.Reflection.Emit.OpCode Call;
public static readonly System.Reflection.Emit.OpCode Calli;
public static readonly System.Reflection.Emit.OpCode Callvirt;
public static readonly System.Reflection.Emit.OpCode Castclass;
public static readonly System.Reflection.Emit.OpCode Ceq;
public static readonly System.Reflection.Emit.OpCode Cgt;
public static readonly System.Reflection.Emit.OpCode Cgt_Un;
public static readonly System.Reflection.Emit.OpCode Ckfinite;
public static readonly System.Reflection.Emit.OpCode Clt;
public static readonly System.Reflection.Emit.OpCode Clt_Un;
public static readonly System.Reflection.Emit.OpCode Constrained;
public static readonly System.Reflection.Emit.OpCode Conv_I;
public static readonly System.Reflection.Emit.OpCode Conv_I1;
public static readonly System.Reflection.Emit.OpCode Conv_I2;
public static readonly System.Reflection.Emit.OpCode Conv_I4;
public static readonly System.Reflection.Emit.OpCode Conv_I8;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I1;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I1_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I2;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I2_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I4;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I4_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I8;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_I8_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U1;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U1_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U2;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U2_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U4;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U4_Un;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U8;
public static readonly System.Reflection.Emit.OpCode Conv_Ovf_U8_Un;
public static readonly System.Reflection.Emit.OpCode Conv_R_Un;
public static readonly System.Reflection.Emit.OpCode Conv_R4;
public static readonly System.Reflection.Emit.OpCode Conv_R8;
public static readonly System.Reflection.Emit.OpCode Conv_U;
public static readonly System.Reflection.Emit.OpCode Conv_U1;
public static readonly System.Reflection.Emit.OpCode Conv_U2;
public static readonly System.Reflection.Emit.OpCode Conv_U4;
public static readonly System.Reflection.Emit.OpCode Conv_U8;
public static readonly System.Reflection.Emit.OpCode Cpblk;
public static readonly System.Reflection.Emit.OpCode Cpobj;
public static readonly System.Reflection.Emit.OpCode Div;
public static readonly System.Reflection.Emit.OpCode Div_Un;
public static readonly System.Reflection.Emit.OpCode Dup;
public static readonly System.Reflection.Emit.OpCode Endfilter;
public static readonly System.Reflection.Emit.OpCode Endfinally;
public static readonly System.Reflection.Emit.OpCode Initblk;
public static readonly System.Reflection.Emit.OpCode Initobj;
public static readonly System.Reflection.Emit.OpCode Isinst;
public static readonly System.Reflection.Emit.OpCode Jmp;
public static readonly System.Reflection.Emit.OpCode Ldarg;
public static readonly System.Reflection.Emit.OpCode Ldarg_0;
public static readonly System.Reflection.Emit.OpCode Ldarg_1;
public static readonly System.Reflection.Emit.OpCode Ldarg_2;
public static readonly System.Reflection.Emit.OpCode Ldarg_3;
public static readonly System.Reflection.Emit.OpCode Ldarg_S;
public static readonly System.Reflection.Emit.OpCode Ldarga;
public static readonly System.Reflection.Emit.OpCode Ldarga_S;
public static readonly System.Reflection.Emit.OpCode Ldc_I4;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_0;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_1;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_2;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_3;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_4;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_5;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_6;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_7;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_8;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_M1;
public static readonly System.Reflection.Emit.OpCode Ldc_I4_S;
public static readonly System.Reflection.Emit.OpCode Ldc_I8;
public static readonly System.Reflection.Emit.OpCode Ldc_R4;
public static readonly System.Reflection.Emit.OpCode Ldc_R8;
public static readonly System.Reflection.Emit.OpCode Ldelem;
public static readonly System.Reflection.Emit.OpCode Ldelem_I;
public static readonly System.Reflection.Emit.OpCode Ldelem_I1;
public static readonly System.Reflection.Emit.OpCode Ldelem_I2;
public static readonly System.Reflection.Emit.OpCode Ldelem_I4;
public static readonly System.Reflection.Emit.OpCode Ldelem_I8;
public static readonly System.Reflection.Emit.OpCode Ldelem_R4;
public static readonly System.Reflection.Emit.OpCode Ldelem_R8;
public static readonly System.Reflection.Emit.OpCode Ldelem_Ref;
public static readonly System.Reflection.Emit.OpCode Ldelem_U1;
public static readonly System.Reflection.Emit.OpCode Ldelem_U2;
public static readonly System.Reflection.Emit.OpCode Ldelem_U4;
public static readonly System.Reflection.Emit.OpCode Ldelema;
public static readonly System.Reflection.Emit.OpCode Ldfld;
public static readonly System.Reflection.Emit.OpCode Ldflda;
public static readonly System.Reflection.Emit.OpCode Ldftn;
public static readonly System.Reflection.Emit.OpCode Ldind_I;
public static readonly System.Reflection.Emit.OpCode Ldind_I1;
public static readonly System.Reflection.Emit.OpCode Ldind_I2;
public static readonly System.Reflection.Emit.OpCode Ldind_I4;
public static readonly System.Reflection.Emit.OpCode Ldind_I8;
public static readonly System.Reflection.Emit.OpCode Ldind_R4;
public static readonly System.Reflection.Emit.OpCode Ldind_R8;
public static readonly System.Reflection.Emit.OpCode Ldind_Ref;
public static readonly System.Reflection.Emit.OpCode Ldind_U1;
public static readonly System.Reflection.Emit.OpCode Ldind_U2;
public static readonly System.Reflection.Emit.OpCode Ldind_U4;
public static readonly System.Reflection.Emit.OpCode Ldlen;
public static readonly System.Reflection.Emit.OpCode Ldloc;
public static readonly System.Reflection.Emit.OpCode Ldloc_0;
public static readonly System.Reflection.Emit.OpCode Ldloc_1;
public static readonly System.Reflection.Emit.OpCode Ldloc_2;
public static readonly System.Reflection.Emit.OpCode Ldloc_3;
public static readonly System.Reflection.Emit.OpCode Ldloc_S;
public static readonly System.Reflection.Emit.OpCode Ldloca;
public static readonly System.Reflection.Emit.OpCode Ldloca_S;
public static readonly System.Reflection.Emit.OpCode Ldnull;
public static readonly System.Reflection.Emit.OpCode Ldobj;
public static readonly System.Reflection.Emit.OpCode Ldsfld;
public static readonly System.Reflection.Emit.OpCode Ldsflda;
public static readonly System.Reflection.Emit.OpCode Ldstr;
public static readonly System.Reflection.Emit.OpCode Ldtoken;
public static readonly System.Reflection.Emit.OpCode Ldvirtftn;
public static readonly System.Reflection.Emit.OpCode Leave;
public static readonly System.Reflection.Emit.OpCode Leave_S;
public static readonly System.Reflection.Emit.OpCode Localloc;
public static readonly System.Reflection.Emit.OpCode Mkrefany;
public static readonly System.Reflection.Emit.OpCode Mul;
public static readonly System.Reflection.Emit.OpCode Mul_Ovf;
public static readonly System.Reflection.Emit.OpCode Mul_Ovf_Un;
public static readonly System.Reflection.Emit.OpCode Neg;
public static readonly System.Reflection.Emit.OpCode Newarr;
public static readonly System.Reflection.Emit.OpCode Newobj;
public static readonly System.Reflection.Emit.OpCode Nop;
public static readonly System.Reflection.Emit.OpCode Not;
public static readonly System.Reflection.Emit.OpCode Or;
public static readonly System.Reflection.Emit.OpCode Pop;
public static readonly System.Reflection.Emit.OpCode Prefix1;
public static readonly System.Reflection.Emit.OpCode Prefix2;
public static readonly System.Reflection.Emit.OpCode Prefix3;
public static readonly System.Reflection.Emit.OpCode Prefix4;
public static readonly System.Reflection.Emit.OpCode Prefix5;
public static readonly System.Reflection.Emit.OpCode Prefix6;
public static readonly System.Reflection.Emit.OpCode Prefix7;
public static readonly System.Reflection.Emit.OpCode Prefixref;
public static readonly System.Reflection.Emit.OpCode Readonly;
public static readonly System.Reflection.Emit.OpCode Refanytype;
public static readonly System.Reflection.Emit.OpCode Refanyval;
public static readonly System.Reflection.Emit.OpCode Rem;
public static readonly System.Reflection.Emit.OpCode Rem_Un;
public static readonly System.Reflection.Emit.OpCode Ret;
public static readonly System.Reflection.Emit.OpCode Rethrow;
public static readonly System.Reflection.Emit.OpCode Shl;
public static readonly System.Reflection.Emit.OpCode Shr;
public static readonly System.Reflection.Emit.OpCode Shr_Un;
public static readonly System.Reflection.Emit.OpCode Sizeof;
public static readonly System.Reflection.Emit.OpCode Starg;
public static readonly System.Reflection.Emit.OpCode Starg_S;
public static readonly System.Reflection.Emit.OpCode Stelem;
public static readonly System.Reflection.Emit.OpCode Stelem_I;
public static readonly System.Reflection.Emit.OpCode Stelem_I1;
public static readonly System.Reflection.Emit.OpCode Stelem_I2;
public static readonly System.Reflection.Emit.OpCode Stelem_I4;
public static readonly System.Reflection.Emit.OpCode Stelem_I8;
public static readonly System.Reflection.Emit.OpCode Stelem_R4;
public static readonly System.Reflection.Emit.OpCode Stelem_R8;
public static readonly System.Reflection.Emit.OpCode Stelem_Ref;
public static readonly System.Reflection.Emit.OpCode Stfld;
public static readonly System.Reflection.Emit.OpCode Stind_I;
public static readonly System.Reflection.Emit.OpCode Stind_I1;
public static readonly System.Reflection.Emit.OpCode Stind_I2;
public static readonly System.Reflection.Emit.OpCode Stind_I4;
public static readonly System.Reflection.Emit.OpCode Stind_I8;
public static readonly System.Reflection.Emit.OpCode Stind_R4;
public static readonly System.Reflection.Emit.OpCode Stind_R8;
public static readonly System.Reflection.Emit.OpCode Stind_Ref;
public static readonly System.Reflection.Emit.OpCode Stloc;
public static readonly System.Reflection.Emit.OpCode Stloc_0;
public static readonly System.Reflection.Emit.OpCode Stloc_1;
public static readonly System.Reflection.Emit.OpCode Stloc_2;
public static readonly System.Reflection.Emit.OpCode Stloc_3;
public static readonly System.Reflection.Emit.OpCode Stloc_S;
public static readonly System.Reflection.Emit.OpCode Stobj;
public static readonly System.Reflection.Emit.OpCode Stsfld;
public static readonly System.Reflection.Emit.OpCode Sub;
public static readonly System.Reflection.Emit.OpCode Sub_Ovf;
public static readonly System.Reflection.Emit.OpCode Sub_Ovf_Un;
public static readonly System.Reflection.Emit.OpCode Switch;
public static readonly System.Reflection.Emit.OpCode Tailcall;
public static readonly System.Reflection.Emit.OpCode Throw;
public static readonly System.Reflection.Emit.OpCode Unaligned;
public static readonly System.Reflection.Emit.OpCode Unbox;
public static readonly System.Reflection.Emit.OpCode Unbox_Any;
public static readonly System.Reflection.Emit.OpCode Volatile;
public static readonly System.Reflection.Emit.OpCode Xor;
public static bool TakesSingleByteArgument(System.Reflection.Emit.OpCode inst) { throw null; }
}
public enum OpCodeType
{
[Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
Annotation = 0,
Macro = 1,
Nternal = 2,
Objmodel = 3,
Prefix = 4,
Primitive = 5,
}
public enum OperandType
{
InlineBrTarget = 0,
InlineField = 1,
InlineI = 2,
InlineI8 = 3,
InlineMethod = 4,
InlineNone = 5,
[Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
InlinePhi = 6,
InlineR = 7,
InlineSig = 9,
InlineString = 10,
InlineSwitch = 11,
InlineTok = 12,
InlineType = 13,
InlineVar = 14,
ShortInlineBrTarget = 15,
ShortInlineI = 16,
ShortInlineR = 17,
ShortInlineVar = 18,
}
public enum PackingSize
{
Size1 = 1,
Size128 = 128,
Size16 = 16,
Size2 = 2,
Size32 = 32,
Size4 = 4,
Size64 = 64,
Size8 = 8,
Unspecified = 0,
}
public enum StackBehaviour
{
Pop0 = 0,
Pop1 = 1,
Pop1_pop1 = 2,
Popi = 3,
Popi_pop1 = 4,
Popi_popi = 5,
Popi_popi_popi = 7,
Popi_popi8 = 6,
Popi_popr4 = 8,
Popi_popr8 = 9,
Popref = 10,
Popref_pop1 = 11,
Popref_popi = 12,
Popref_popi_pop1 = 28,
Popref_popi_popi = 13,
Popref_popi_popi8 = 14,
Popref_popi_popr4 = 15,
Popref_popi_popr8 = 16,
Popref_popi_popref = 17,
Push0 = 18,
Push1 = 19,
Push1_push1 = 20,
Pushi = 21,
Pushi8 = 22,
Pushr4 = 23,
Pushr8 = 24,
Pushref = 25,
Varpop = 26,
Varpush = 27,
}
}

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'uap-Release|AnyCPU'" />
<ItemGroup>
<Compile Include="System.Reflection.Primitives.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\System.Runtime\ref\System.Runtime.csproj" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -0,0 +1,12 @@
MembersMustExist : Member 'System.Reflection.EventAttributes System.Reflection.EventAttributes.ReservedMask' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.FieldAttributes System.Reflection.FieldAttributes.ReservedMask' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.MethodAttributes System.Reflection.MethodAttributes.ReservedMask' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.MethodImplAttributes System.Reflection.MethodImplAttributes.MaxMethodImplVal' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.ParameterAttributes System.Reflection.ParameterAttributes.Reserved3' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.ParameterAttributes System.Reflection.ParameterAttributes.Reserved4' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.ParameterAttributes System.Reflection.ParameterAttributes.ReservedMask' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.PropertyAttributes System.Reflection.PropertyAttributes.Reserved2' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.PropertyAttributes System.Reflection.PropertyAttributes.Reserved3' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.PropertyAttributes System.Reflection.PropertyAttributes.Reserved4' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.PropertyAttributes System.Reflection.PropertyAttributes.ReservedMask' does not exist in the implementation but it does exist in the contract.
MembersMustExist : Member 'System.Reflection.TypeAttributes System.Reflection.TypeAttributes.ReservedMask' does not exist in the implementation but it does exist in the contract.

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<BuildConfigurations>
net463-Windows_NT;
uap101aot-Windows_NT;
netcoreapp;
netcoreapp1.2corert;
</BuildConfigurations>
</PropertyGroup>
</Project>

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
<PropertyGroup>
<AssemblyName>System.Reflection.Primitives</AssemblyName>
<IsPartialFacadeAssembly>true</IsPartialFacadeAssembly>
</PropertyGroup>
<!-- Help VS understand available configurations -->
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='net463-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='uap101aot-Windows_NT-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='uap101aot-Windows_NT-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp-Release|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp1.2corert-Debug|AnyCPU'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='netcoreapp1.2corert-Release|AnyCPU'" />
<ItemGroup Condition="'$(TargetGroup)'=='uap101aot' or '$(TargetGroup)'=='netcoreapp1.2corert'">
<Compile Include="System\Reflection\Emit\FlowControl.cs" />
<Compile Include="System\Reflection\Emit\Opcode.cs" />
<Compile Include="System\Reflection\Emit\OpCodes.cs" />
<Compile Include="System\Reflection\Emit\OpcodeType.cs" />
<Compile Include="System\Reflection\Emit\OperandType.cs" />
<Compile Include="System\Reflection\Emit\PackingSize.cs" />
<Compile Include="System\Reflection\Emit\StackBehaviour.cs" />
</ItemGroup>
<ItemGroup>
<TargetingPackReference Include="mscorlib" Condition="'$(TargetGroup)' == 'net463'" />
<TargetingPackReference Include="System.Private.CoreLib" Condition="'$(TargetGroup)' != 'net463'" />
</ItemGroup>
<ItemGroup>
<ReferenceFromRuntime Include="System.Private.CoreLib" />
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
</Project>

View File

@@ -0,0 +1,21 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Reflection.Emit
{
[Serializable]
public enum FlowControl
{
Branch = 0,
Break = 1,
Call = 2,
Cond_Branch = 3,
Meta = 4,
Next = 5,
[Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
Phi = 6,
Return = 7,
Throw = 8,
}
}

View File

@@ -0,0 +1 @@
2875c95818af12beea8f6654314dee3319bd9b44

View File

@@ -0,0 +1,197 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Threading;
using System.Diagnostics.Contracts;
namespace System.Reflection.Emit
{
public struct OpCode
{
//
// Use packed bitfield for flags to avoid code bloat
//
internal const int OperandTypeMask = 0x1F; // 000000000000000000000000000XXXXX
internal const int FlowControlShift = 5; // 00000000000000000000000XXXX00000
internal const int FlowControlMask = 0x0F;
internal const int OpCodeTypeShift = 9; // 00000000000000000000XXX000000000
internal const int OpCodeTypeMask = 0x07;
internal const int StackBehaviourPopShift = 12; // 000000000000000XXXXX000000000000
internal const int StackBehaviourPushShift = 17; // 0000000000XXXXX00000000000000000
internal const int StackBehaviourMask = 0x1F;
internal const int SizeShift = 22; // 00000000XX0000000000000000000000
internal const int SizeMask = 0x03;
internal const int EndsUncondJmpBlkFlag = 0x01000000; // 0000000X000000000000000000000000
// unused // 0000XXX0000000000000000000000000
internal const int StackChangeShift = 28; // XXXX0000000000000000000000000000
private OpCodeValues m_value;
private int m_flags;
internal OpCode(OpCodeValues value, int flags)
{
m_value = value;
m_flags = flags;
}
internal bool EndsUncondJmpBlk()
{
return (m_flags & EndsUncondJmpBlkFlag) != 0;
}
internal int StackChange()
{
return (m_flags >> StackChangeShift);
}
public OperandType OperandType
{
get
{
return (OperandType)(m_flags & OperandTypeMask);
}
}
public FlowControl FlowControl
{
get
{
return (FlowControl)((m_flags >> FlowControlShift) & FlowControlMask);
}
}
public OpCodeType OpCodeType
{
get
{
return (OpCodeType)((m_flags >> OpCodeTypeShift) & OpCodeTypeMask);
}
}
public StackBehaviour StackBehaviourPop
{
get
{
return (StackBehaviour)((m_flags >> StackBehaviourPopShift) & StackBehaviourMask);
}
}
public StackBehaviour StackBehaviourPush
{
get
{
return (StackBehaviour)((m_flags >> StackBehaviourPushShift) & StackBehaviourMask);
}
}
public int Size
{
get
{
return (m_flags >> SizeShift) & SizeMask;
}
}
public short Value
{
get
{
return (short)m_value;
}
}
private static volatile string[] g_nameCache;
public String Name
{
get
{
if (Size == 0)
return null;
// Create and cache the opcode names lazily. They should be rarely used (only for logging, etc.)
// Note that we do not any locks here because of we always get the same names. The last one wins.
string[] nameCache = g_nameCache;
if (nameCache == null)
{
nameCache = new String[0x11f];
g_nameCache = nameCache;
}
OpCodeValues opCodeValue = (OpCodeValues)(ushort)Value;
int idx = (int)opCodeValue;
if (idx > 0xFF)
{
if (idx >= 0xfe00 && idx <= 0xfe1e)
{
// Transform two byte opcode value to lower range that's suitable
// for array index
idx = 0x100 + (idx - 0xfe00);
}
else
{
// Unknown opcode
return null;
}
}
String name = Volatile.Read(ref nameCache[idx]);
if (name != null)
return name;
// Create ilasm style name from the enum value name.
name = Enum.GetName(typeof(OpCodeValues), opCodeValue).ToLowerInvariant().Replace("_", ".");
Volatile.Write(ref nameCache[idx], name);
return name;
}
}
[Pure]
public override bool Equals(Object obj)
{
if (obj is OpCode)
return Equals((OpCode)obj);
else
return false;
}
[Pure]
public bool Equals(OpCode obj)
{
return obj.Value == Value;
}
[Pure]
public static bool operator ==(OpCode a, OpCode b)
{
return a.Equals(b);
}
[Pure]
public static bool operator !=(OpCode a, OpCode b)
{
return !(a == b);
}
public override int GetHashCode()
{
return Value;
}
public override String ToString()
{
return Name;
}
}
}

View File

@@ -0,0 +1,18 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Reflection.Emit
{
[Serializable]
public enum OpCodeType
{
[Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
Annotation = 0,
Macro = 1,
Nternal = 2,
Objmodel = 3,
Prefix = 4,
Primitive = 5,
}
}

View File

@@ -0,0 +1,30 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Reflection.Emit
{
[Serializable]
public enum OperandType
{
InlineBrTarget = 0,
InlineField = 1,
InlineI = 2,
InlineI8 = 3,
InlineMethod = 4,
InlineNone = 5,
[Obsolete("This API has been deprecated. http://go.microsoft.com/fwlink/?linkid=14202")]
InlinePhi = 6,
InlineR = 7,
InlineSig = 9,
InlineString = 10,
InlineSwitch = 11,
InlineTok = 12,
InlineType = 13,
InlineVar = 14,
ShortInlineBrTarget = 15,
ShortInlineI = 16,
ShortInlineR = 17,
ShortInlineVar = 18,
}
}

View File

@@ -0,0 +1,20 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Reflection.Emit
{
[Serializable]
public enum PackingSize
{
Unspecified = 0,
Size1 = 1,
Size2 = 2,
Size4 = 4,
Size8 = 8,
Size16 = 16,
Size32 = 32,
Size64 = 64,
Size128 = 128,
}
}

View File

@@ -0,0 +1,40 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
namespace System.Reflection.Emit
{
[Serializable]
public enum StackBehaviour
{
Pop0 = 0,
Pop1 = 1,
Pop1_pop1 = 2,
Popi = 3,
Popi_pop1 = 4,
Popi_popi = 5,
Popi_popi8 = 6,
Popi_popi_popi = 7,
Popi_popr4 = 8,
Popi_popr8 = 9,
Popref = 10,
Popref_pop1 = 11,
Popref_popi = 12,
Popref_popi_popi = 13,
Popref_popi_popi8 = 14,
Popref_popi_popr4 = 15,
Popref_popi_popr8 = 16,
Popref_popi_popref = 17,
Push0 = 18,
Push1 = 19,
Push1_push1 = 20,
Pushi = 21,
Pushi8 = 22,
Pushr4 = 23,
Pushr8 = 24,
Pushref = 25,
Varpop = 26,
Varpush = 27,
Popref_popi_pop1 = 28,
}
}