Imported Upstream version 4.8.0.309

Former-commit-id: 5f9c6ae75f295e057a7d2971f3a6df4656fa8850
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2016-11-10 13:04:39 +00:00
parent ee1447783b
commit 94b2861243
4912 changed files with 390737 additions and 49310 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1 @@
Cecil ftw!

View File

@@ -0,0 +1,152 @@
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
[assembly: Foo ("bingo")]
[assembly: TypeForwardedTo (typeof (System.Diagnostics.DebuggableAttribute))]
enum Bingo : short {
Fuel = 2,
Binga = 4,
}
/*
in System.Security.AccessControl
[Flags]
public enum AceFlags : byte {
None = 0,
ObjectInherit = 0x01,
ContainerInherit = 0x02,
NoPropagateInherit = 0x04,
InheritOnly = 0x08,
InheritanceFlags = ObjectInherit | ContainerInherit | NoPropagateInherit | InheritOnly,
Inherited = 0x10,
SuccessfulAccess = 0x40,
FailedAccess = 0x80,
AuditFlags = SuccessfulAccess | FailedAccess,
}
*/
class FooAttribute : Attribute {
internal class Token {
}
public FooAttribute ()
{
}
public FooAttribute (string str)
{
}
public FooAttribute (sbyte a, byte b, bool c, bool d, ushort e, short f, char g)
{
}
public FooAttribute (int a, uint b, float c, long d, ulong e, double f)
{
}
public FooAttribute (char [] chars)
{
}
public FooAttribute (object a, object b)
{
}
public FooAttribute (Bingo bingo)
{
}
public FooAttribute (System.Security.AccessControl.AceFlags flags)
{
}
public FooAttribute (Type type)
{
}
public int Bang { get { return 0; } set {} }
public string Fiou { get { return "fiou"; } set {} }
public object Pan;
public string [] PanPan;
public Type Chose;
}
[Foo ("bar")]
class Hamster {
}
[Foo ((string) null)]
class Dentist {
}
[Foo (-12, 242, true, false, 4242, -1983, 'c')]
class Steven {
}
[Foo (-100000, 200000, 12.12f, long.MaxValue, ulong.MaxValue, 64.646464)]
class Seagull {
}
[Foo (new char [] { 'c', 'e', 'c', 'i', 'l' })]
class Rifle {
}
[Foo ("2", 2)]
class Worm {
}
[Foo (new object [] { "2", 2, 'c' }, new object [] { new object [] { 1, 2, 3}, null })]
class Sheep {
}
[Foo (Bang = 42, PanPan = new string [] { "yo", "yo" }, Pan = new object [] { 1, "2", '3' }, Fiou = null)]
class Angola {
}
[Foo (Pan = "fiouuu")]
class BoxedStringField {
}
[Foo (Bingo.Fuel)]
class Zero {
}
[Foo (System.Security.AccessControl.AceFlags.NoPropagateInherit)]
class Ace {
}
[Foo (new object [] { Bingo.Fuel, Bingo.Binga }, null, Pan = System.Security.AccessControl.AceFlags.NoPropagateInherit)]
class Bzzz {
}
[Foo (typeof (Bingo))]
class Typed {
}
[Foo (typeof (FooAttribute.Token))]
class NestedTyped {
}
[Foo (Chose = typeof (Typed))]
class Truc {
}
[Foo (Chose = (Type) null)]
class Machin {
}
[Foo (typeof (Dictionary<,>))]
class OpenGeneric<X, Y> {
}
[Foo (typeof (Dictionary<string, OpenGeneric<Machin, int>[,]>))]
class ClosedGeneric {
}

View File

@@ -0,0 +1,8 @@
using System;
delegate void Pan (object sender, EventArgs args);
abstract class Foo {
public abstract event Pan Bar;
}

View File

@@ -0,0 +1,41 @@
using System;
using System.Runtime.InteropServices;
class Foo {
Bar bar;
}
class Bar {
volatile int oiseau;
}
class Baz {
bool @bool;
char @char;
sbyte @sbyte;
byte @byte;
short int16;
ushort uint16;
int int32;
uint uint32;
long int64;
ulong uint64;
float single;
double @double;
string @string;
object @object;
}
enum Pim {
Pam = 1,
Poum = 2,
}
class PanPan {
public const PanPan Peter = null;
public const string QQ = "qq";
public const string nil = null;
public const object obj = null;
public const int [] ints = null;
}

View File

@@ -0,0 +1,121 @@
using System;
using System.Collections.Generic;
class Foo<TBar, TBaz> {}
abstract class Bar<T> {
T bang;
public abstract Bar<T> Self ();
public abstract Bar<string> SelfString ();
}
abstract class Baz {
public abstract TBang Gazonk<TBang> (object o);
public abstract Bar<TBingo> Gazoo<TBingo> ();
}
class Zap {}
interface IZoom {}
class Bongo<T> where T : Zap, IZoom {
enum Dang {
Ding = 2,
Dong = 12,
}
}
class Parent<T> {}
class Child<T> : Parent<T> {
public T [] array;
}
class TamChild : Child<Tamtam> {}
class RecChild : Child<RecChild> {}
class Tamtam {
static void Foo<TFoo> (TFoo tf)
{
}
static void Bar ()
{
Foo (2);
}
static List<TBeta> Beta<TBeta> ()
{
return new List<TBeta> ();
}
static List<TCharlie> Charlie<TCharlie> ()
{
return new List<TCharlie> ();
}
}
class It {
public IEnumerable<Foo<string, string>> Pwow ()
{
yield return new Foo<string, string> ();
yield return new Foo<string, string> ();
yield return new Foo<string, string> ();
}
public void ReadPwow ()
{
foreach (Foo<string, string> foo in Pwow ())
Tac (foo);
}
public void Tac<T> (T t)
{
}
}
class Duel<T1, T2, T3> where T2 : T1 where T3 : T2 {}
class ChildReader {
public int Read (TamChild t)
{
return t.array.Length;
}
}
struct Nilible<T> where T : struct {
public T t;
}
class Null {
public static int Compare<T> (Nilible<T> x, Nilible<T> y) where T : struct
{
return Comparer<T>.Default.Compare (x.t, y.t);
}
}
public class DoubleFuncClass {
public void Test () { Test<int> (); Test<int, int> (); }
public void Test<T> () { Test<T, int> (); Test<T, T> (); }
public void Test<T, T1> () { Test<T1> (); Test<T1, T> (); }
}
public class DoubleFuncClass<X> {
public void Test () { Test<int> (); Test<int, int> (); }
public void Test<T> () { Test<X, int> (); Test<T, X> (); }
public void Test<T, T1> () { Test<T1> (); Test<T1, T> (); }
}
public class LaMatrix {
public static T At<T> (T[,] m, int i, int j)
{
return m [i, j];
}
}

View File

@@ -0,0 +1,22 @@
using System;
interface IFoo {}
interface IBar : IFoo {}
abstract class Bar : IBar {}
interface IBingo {
void Foo ();
void Bar ();
}
class Bingo : IBingo {
void IBingo.Foo ()
{
}
void IBingo.Bar ()
{
}
}

View File

@@ -0,0 +1,16 @@
using System;
using System.Runtime.InteropServices;
[StructLayout (LayoutKind.Explicit, Size = 16)]
public struct Foo {
[FieldOffset (0)] public ushort Bar;
[FieldOffset (2)] public ushort Baz;
[FieldOffset (4)] public uint Gazonk;
}
class Babar {
}
class Locke {
public int [] integers = new int [] { 1, 2, 3, 4 };
}

View File

@@ -0,0 +1,21 @@
using System;
using System.Runtime.InteropServices;
abstract class Foo {
public abstract void Bar (int a);
}
class Bar {
[DllImport ("foo.dll")]
public extern static void Pan ([MarshalAs (UnmanagedType.I4)] int i);
}
public class Baz {
public void PrintAnswer ()
{
Console.WriteLine ("answer: {0}", 42);
}
}

View File

@@ -0,0 +1,16 @@
class Foo {
class Bar {
class Baz {
}
}
}
class Bingo {
public class Fuel {
}
public static Fuel GetFuel ()
{
return null;
}
}

View File

@@ -0,0 +1,18 @@
using System;
abstract class Foo {
public abstract int Bar { get; }
public abstract string Baz { get; set; }
public abstract string Gazonk { set; }
}
abstract class Bar {
public abstract Foo this [int a, string s] { set; }
}
class Baz {
public string Bingo { get; set; }
}

View File

@@ -0,0 +1,113 @@
.assembly extern mscorlib
{
.ver 0:0:0:0
}
.assembly fptr
{
.ver 0:0:0:0
}
.module fptr.exe
.method public static void Main() cil managed
{
.entrypoint
.locals init (class MakeDecision d, method instance explicit int32 *(class MakeDecision, int32) m, int32 i)
ldc.i4.1
ldc.i4 42
newobj instance void MakeDecision::.ctor(bool, int32)
stloc d
ldc.i4.0
stloc i
br test
loop:
ldloc d
call instance method instance explicit int32 *(class MakeDecision, int32) MakeDecision::Decide()
stloc m
ldloc d
ldc.i4.1
ldloc m
calli instance int32(int32)
call void [mscorlib]System.Console::WriteLine(int32)
ldloc i
ldc.i4.1
add
stloc i
test:
ldloc i
ldc.i4 10
blt loop
ret
}
.class public auto ansi sealed MakeDecision
extends [mscorlib]System.Object
{
.field private bool Oscillate
.field private int32 Value
.method public instance method instance explicit int32 *(class MakeDecision, int32) Decide() cil managed
{
.locals init (bool t)
ldarg.0
ldfld bool MakeDecision::Oscillate
stloc t
ldarg.0
ldloc t
ldc.i4.0
ceq
stfld bool MakeDecision::Oscillate
ldloc t
brfalse subs
ldftn instance int32 MakeDecision::Add(int32)
ret
subs:
ldftn instance int32 MakeDecision::Sub(int32)
ret
}
.method public int32 Add(int32 i) cil managed
{
ldarg.0
ldfld int32 MakeDecision::Value
ldarg i
add
ret
}
.method public int32 Sub(int32 i) cil managed
{
ldarg.0
ldfld int32 MakeDecision::Value
ldarg i
sub
ret
}
.method public hidebysig specialname rtspecialname instance void .ctor(bool s, int32 val) cil managed
{
ldarg.0
ldarg s
stfld bool MakeDecision::Oscillate
ldarg.0
ldarg val
stfld int32 MakeDecision::Value
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
}
}

View File

@@ -0,0 +1,84 @@
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89)
.ver 2:0:0:0
}
.assembly Hello {}
.module Hello.dll
.class private auto ansi Foo {
.method public specialname rtspecialname instance void .ctor () cil managed
{
ldarg.0
call instance void [mscorlib]System.Object::.ctor ()
ret
}
.method public static void Bar (int32 a, int32 b)
{
.locals init (int32 res)
ldarg.0
ldarg.1
mul
stloc.0
ldloc.0
call void Foo::Baz (int32)
ret
}
.method public static void Baz (int32 a)
{
ret
}
.method public void Gazonk ()
{
ldarg 0
pop
ret
}
.method public static void PrintEmpty ()
{
ldsfld string [mscorlib]System.String::Empty
call void [mscorlib]System.Console::WriteLine(string)
ret
}
.method public static bool TestFilter (bool b) cil managed
{
.maxstack 2
.locals init (bool flag)
beginTry:
newobj instance void [mscorlib]System.Exception::.ctor ()
throw
leave endCatch
startFilter:
pop
ldarg.0
endfilter
startCatch:
ldc.i4.1
stloc.0
leave return
leave endCatch
endCatch:
L_001b: ldc.i4.0
L_001c: stloc.0
return:
L_001d: ldloc.0
L_001e: ret
.try beginTry to startFilter filter startFilter handler startCatch to endCatch
}
.method public static !!T GetState<T>(string var, [opt] !!T defaultValue) cil managed
{
.param [2] = nullref
ldarg.1
ret
}
}

View File

@@ -0,0 +1,43 @@
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
.ver 2:0:0:0
}
.assembly MethodSpecs
{
}
.module MethodSpecs.dll
.class private auto ansi beforefieldinit Tamtam
extends [mscorlib]System.Object
{
.method private hidebysig static void Foo<TFoo>(!!TFoo tf) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Tamtam::Foo
.method private hidebysig static void Bar() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldc.i4.2
IL_0001: call void Tamtam::Foo<int32>(!!0)
IL_0006: ret
} // end of method Tamtam::Bar
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method Tamtam::.ctor
} // end of class Tamtam

View File

@@ -0,0 +1,81 @@
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89)
.ver 2:0:0:0
}
.assembly Others {}
.module Others.dll
.class private auto ansi Others {
.field private string _context
.method public specialname instance string get_Context () cil managed
{
ldarg.0
ldfld string Others::_context
ret
}
.method public specialname instance void set_Context (string val) cil managed
{
ldarg.0
ldarg.1
stfld string Others::_context
ret
}
.method public specialname instance void let_Context (string val) cil managed
{
ldarg.0
ldarg.1
stfld string Others::_context
ret
}
.method public specialname instance void bet_Context (string val) cil managed
{
ldarg.0
ldarg.1
stfld string Others::_context
ret
}
.property instance string Context () {
.get instance string Others::get_Context ()
.set instance void Others::set_Context (string val)
.other instance void Others::let_Context (string val)
.other instance void Others::bet_Context (string val)
}
.field private class [mscorlib]System.EventHandler _handler
.method public specialname instance void remove_Handler (class [mscorlib]System.EventHandler) cil managed
{
ret
}
.method public specialname instance void add_Handler (class [mscorlib]System.EventHandler) cil managed
{
ret
}
.method public specialname instance void dang_Handler (class [mscorlib]System.EventHandler) cil managed
{
ret
}
.method public specialname instance void fang_Handler (class [mscorlib]System.EventHandler) cil managed
{
ret
}
.event [mscorlib]System.EventHandler Handler {
.removeon instance void Others::remove_Handler (class [mscorlib]System.EventHandler)
.addon instance void Others::add_Handler (class [mscorlib]System.EventHandler)
.other instance void Others::dang_Handler (class [mscorlib]System.EventHandler)
.other instance void Others::fang_Handler (class [mscorlib]System.EventHandler)
}
}

View File

@@ -0,0 +1,58 @@
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89)
.ver 2:0:0:0
}
.assembly Types {}
.module Types.dll
.class private auto ansi Types {
.field public int32[,] rank_two
.field public int32[0...,0...] rank_two_low_bound_zero
.field public int32[-1...4] rank_one_low_bound_m1
.method public specialname rtspecialname instance void .ctor () cil managed
{
ldarg.0
call instance void [mscorlib]System.Object::.ctor ()
ret
}
}
.class interface private abstract auto ansi IFoo
{
}
.class interface private abstract auto ansi IBar
implements IFoo
{
}
.class interface private abstract IBaz
implements IBar, IFoo
{
}
.class private Fields {
.field private static literal int32 int32_int16 = int16(0x0001)
.field private static literal int16 int16_int32 = int32(0x00000001)
.field private static literal char char_int16 = int16(0x0001)
.field private static literal int16 int16_char = char(0x0073)
.field private static literal int32 int32_nullref = nullref
}
.class public auto ansi CustomAttribute extends [mscorlib]System.Attribute
{
.custom instance void CustomAttribute::.ctor() = ()
.method public hidebysig specialname rtspecialname instance void .ctor()
{
ldarg.0
call instance void [mscorlib]System.Attribute::.ctor()
ret
}
}