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

@ -1,43 +0,0 @@
2010-06-18 Rolf Bjarne Kvinge <RKvinge@novell.com>
* ExecutionScope.cs: This class exists in Moonlight, but isn't supported.
* StrongBox_T.cs:
* DynamicAttribute.cs: Include in Moonlight.
2009-12-02 Marek Safar <marek.safar@gmail.com>
* DynamicAttribute.cs: Add arguments check.
2009-11-14 Jb Evain <jbevain@novell.com>
* ExecutionScope.cs: implement IsolateExpression.
2009-07-02 Marek Safar <marek.safar@gmail.com>
* StrongBox_T.cs: Add 4.0 bits.
2009-06-29 Marek Safar <marek.safar@gmail.com>
* DynamicAttribute.cs: Add DynamicAttribute.
2009-03-05 Jb Evain <jbevain@novell.com>
* ExecutionScope.cs: add support for hoisted locals.
2008-06-20 Jb Evain <jbevain@novell.com>
* ExecutionScope.cs (CreateDelegate): implement.
2008-04-19 Jb Evain <jbevain@novell.com>
* ExecutionScope.cs: change the constructor to take a list
of globals.
2008-02-24 Jb Evain <jbevain@novell.com>
* ExecutionScope.cs: update API.
2007-01-19 Marek Safar <marek.safar@gmail.com>
* ChangeLog: Added

View File

@ -1,65 +0,0 @@
//
// DynamicAttribute.cs
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2009, Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_0
using System;
using System.Collections.Generic;
namespace System.Runtime.CompilerServices
{
[AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
public sealed class DynamicAttribute : Attribute
{
static readonly IList<bool> empty = Array.AsReadOnly (new [] { true });
IList<bool> transformFlags;
public DynamicAttribute ()
{
transformFlags = empty;
}
public DynamicAttribute (bool[] transformFlags)
{
if (transformFlags == null)
throw new ArgumentNullException ();
this.transformFlags = transformFlags;
}
public IList<bool> TransformFlags {
get {
return transformFlags;
}
}
}
}
#endif

View File

@ -1,100 +0,0 @@
//
// ExecutionScope.cs
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
// Jb Evain <jbevain@novell.com>
//
// Copyright (C) 2007 - 2008, Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if !FULL_AOT_RUNTIME
using System;
using System.Linq.Expressions;
namespace System.Runtime.CompilerServices {
#if MOBILE_DYNAMIC
[Obsolete ("do not use this type", true)]
#endif
public class ExecutionScope {
public object [] Globals;
public object [] Locals;
public ExecutionScope Parent;
#if !MOBILE_DYNAMIC
internal CompilationContext context;
#endif
internal int compilation_unit;
#if !MOBILE_DYNAMIC
ExecutionScope (CompilationContext context, int compilation_unit)
{
this.context = context;
this.compilation_unit = compilation_unit;
this.Globals = context.GetGlobals ();
}
internal ExecutionScope (CompilationContext context)
: this (context, 0)
{
}
internal ExecutionScope (CompilationContext context, int compilation_unit, ExecutionScope parent, object [] locals)
: this (context, compilation_unit)
{
this.Parent = parent;
this.Locals = locals;
}
#endif
public Delegate CreateDelegate (int indexLambda, object [] locals)
{
#if MOBILE_DYNAMIC
throw new NotSupportedException ();
#else
return context.CreateDelegate (
indexLambda,
new ExecutionScope (context, indexLambda, this, locals));
#endif
}
public object [] CreateHoistedLocals ()
{
#if MOBILE_DYNAMIC
throw new NotSupportedException ();
#else
return context.CreateHoistedLocals (compilation_unit);
#endif
}
public Expression IsolateExpression (Expression expression, object [] locals)
{
#if MOBILE_DYNAMIC
throw new NotSupportedException ();
#else
return context.IsolateExpression (this, locals, expression);
#endif
}
}
}
#endif

View File

@ -1,45 +0,0 @@
//
// ExtensionAttribute.cs
//
// Authors:
// Alejandro Serrano "Serras" (trupill@yahoo.es)
// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2011 Xamarin, Inc (http://www.xamarin.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
#if NET_4_5
using System.Runtime.CompilerServices;
[assembly: TypeForwardedTo (typeof (ExtensionAttribute))]
#else
namespace System.Runtime.CompilerServices {
[AttributeUsage (AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
public sealed class ExtensionAttribute : Attribute {
}
}
#endif

View File

@ -1,34 +0,0 @@
//
// IStrongBox.cs
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.CompilerServices {
public interface IStrongBox {
object Value { get; set; }
}
}

View File

@ -1,52 +0,0 @@
//
// StrongBox<T>.cs
//
// Authors:
// Marek Safar <marek.safar@gmail.com>
//
// Copyright (C) 2007 Novell, Inc (http://www.novell.com)
//
// Permission is hereby granted, free of charge, to any person obtaining
// a copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to
// the following conditions:
//
// The above copyright notice and this permission notice shall be
// included in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
//
namespace System.Runtime.CompilerServices {
public class StrongBox<T> : IStrongBox {
public T Value;
#if NET_4_0
public StrongBox ()
{
}
#endif
public StrongBox (T value)
{
Value = value;
}
object IStrongBox.Value
{
get { return Value; }
set { Value = (T) value; }
}
}
}