You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -1125,7 +1125,7 @@ namespace Mono.CSharp {
|
||||
cdata = encoder.ToArray ();
|
||||
}
|
||||
|
||||
if (!ctor.DeclaringType.IsConditionallyExcluded (context)) {
|
||||
if (!IsConditionallyExcluded (ctor.DeclaringType)) {
|
||||
try {
|
||||
foreach (Attributable target in targets)
|
||||
target.ApplyAttributeBuilder (this, ctor, cdata, predefined);
|
||||
@@ -1166,6 +1166,18 @@ namespace Mono.CSharp {
|
||||
}
|
||||
}
|
||||
|
||||
bool IsConditionallyExcluded (TypeSpec type)
|
||||
{
|
||||
do {
|
||||
if (type.IsConditionallyExcluded (context))
|
||||
return true;
|
||||
|
||||
type = type.BaseType;
|
||||
} while (type != null);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private Expression GetValue ()
|
||||
{
|
||||
if (pos_args == null || pos_args.Count < 1)
|
||||
|
||||
@@ -469,27 +469,37 @@ namespace Mono.CSharp {
|
||||
//
|
||||
lc = left as EnumConstant;
|
||||
rc = right as EnumConstant;
|
||||
if (lc != null || rc != null){
|
||||
if (lc != null || rc != null) {
|
||||
TypeSpec res_type;
|
||||
if (lc == null) {
|
||||
lc = rc;
|
||||
lt = lc.Type;
|
||||
right = left;
|
||||
res_type = right.Type;
|
||||
|
||||
// Y has to be implicitly convertible to E.base
|
||||
left = left.ConvertImplicitly (rc.Child.Type);
|
||||
if (left == null)
|
||||
return null;
|
||||
|
||||
right = rc.Child;
|
||||
} else {
|
||||
res_type = left.Type;
|
||||
|
||||
// U has to be implicitly convertible to E.base
|
||||
right = right.ConvertImplicitly (lc.Child.Type);
|
||||
if (right == null)
|
||||
return null;
|
||||
|
||||
left = lc.Child;
|
||||
}
|
||||
|
||||
// U has to be implicitly convetible to E.base
|
||||
right = right.ConvertImplicitly (lc.Child.Type);
|
||||
if (right == null)
|
||||
return null;
|
||||
|
||||
result = BinaryFold (ec, oper, lc.Child, right, loc);
|
||||
result = BinaryFold (ec, oper, left, right, loc);
|
||||
if (result == null)
|
||||
return null;
|
||||
|
||||
result = result.Reduce (ec, lt);
|
||||
result = result.Reduce (ec, res_type);
|
||||
if (result == null)
|
||||
return null;
|
||||
|
||||
return new EnumConstant (result, lt);
|
||||
return new EnumConstant (result, res_type);
|
||||
}
|
||||
|
||||
if (left is NullLiteral && right is NullLiteral) {
|
||||
|
||||
@@ -1 +1 @@
|
||||
e5d0b1f173584fe1676d1379efa1df8a35346731
|
||||
2f2fe4580b400dfc74c80bd59366ceeeada97f71
|
||||
@@ -1070,7 +1070,10 @@ namespace Mono.CSharp
|
||||
var ie = new InstanceEmitter (instance_copy, IsAddressCall (instance_copy, call_op, method.DeclaringType));
|
||||
|
||||
if (Arguments == null) {
|
||||
ie.EmitLoad (ec, true);
|
||||
if (ConditionalAccess)
|
||||
ie.Emit (ec, true);
|
||||
else
|
||||
ie.EmitLoad (ec, true);
|
||||
}
|
||||
} else if (!InstanceExpressionOnStack) {
|
||||
var ie = new InstanceEmitter (InstanceExpression, IsAddressCall (InstanceExpression, call_op, method.DeclaringType));
|
||||
|
||||
@@ -1 +1 @@
|
||||
a9748379086bbde75a62e2c78329576af82f3755
|
||||
91e6a23b1406f17bcc0ff188c1161ba949f1a98d
|
||||
@@ -1 +1 @@
|
||||
8475a9e489428c0d98d91267b7b40954a54be3c2
|
||||
d2a1b7e95dad11d133df17ce8bafb86896bc3567
|
||||
@@ -1 +1 @@
|
||||
2968ee08584f544f7869efba43e4007b9f259888
|
||||
04ffe7570da75db253b298cb1e2c9ad4c0759a3b
|
||||
@@ -428,13 +428,13 @@ namespace Mono.CSharp {
|
||||
public TypeParameter (TypeParameterSpec spec, TypeSpec parentSpec, MemberName name, Attributes attrs)
|
||||
: base (null, name, attrs)
|
||||
{
|
||||
this.spec = new TypeParameterSpec (parentSpec, spec.DeclaredPosition, spec.MemberDefinition, spec.SpecialConstraint, spec.Variance, null) {
|
||||
this.spec = new TypeParameterSpec (parentSpec, spec.DeclaredPosition, this, spec.SpecialConstraint, spec.Variance, null) {
|
||||
BaseType = spec.BaseType,
|
||||
InterfacesDefined = spec.InterfacesDefined,
|
||||
TypeArguments = spec.TypeArguments
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#region Properties
|
||||
|
||||
public override AttributeTargets AttributeTargets {
|
||||
@@ -2162,6 +2162,10 @@ namespace Mono.CSharp {
|
||||
return this;
|
||||
|
||||
var mutated = (InflatedTypeSpec) MemberwiseClone ();
|
||||
#if DEBUG
|
||||
mutated.ID += 1000000;
|
||||
#endif
|
||||
|
||||
if (decl != DeclaringType) {
|
||||
// Gets back MethodInfo in case of metaInfo was inflated
|
||||
//mutated.info = MemberCache.GetMember<TypeSpec> (DeclaringType.GetDefinition (), this).info;
|
||||
|
||||
@@ -254,6 +254,7 @@ namespace Mono.CSharp
|
||||
sdk_directory.Add ("4.6", new string[] { "4.6-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.6.1", new string[] { "4.6.1-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.6.2", new string [] { "4.6.2-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.7", new string [] { "4.7-api", "v4.0.30319" });
|
||||
sdk_directory.Add ("4.x", new string [] { "4.5", "net_4_x", "v4.0.30319" });
|
||||
}
|
||||
|
||||
|
||||
@@ -373,8 +373,13 @@ namespace Mono.CSharp {
|
||||
var entry_pm = entry as IParametersMember;
|
||||
if (entry_pm != null) {
|
||||
entry_param = entry_pm.Parameters;
|
||||
if (!TypeSpecComparer.Override.IsEqual (entry_param, member_param))
|
||||
continue;
|
||||
if (entry.DeclaringType != member.DeclaringType) {
|
||||
if (!TypeSpecComparer.Override.IsEqual (entry_param, member_param))
|
||||
continue;
|
||||
} else {
|
||||
if (!TypeSpecComparer.Equals (entry_param.Types, member_param.Types))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -444,6 +444,10 @@ namespace Mono.CSharp {
|
||||
return ms;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
int counter = 100000;
|
||||
#endif
|
||||
|
||||
public MethodSpec MakeGenericMethod (IMemberContext context, params TypeSpec[] targs)
|
||||
{
|
||||
if (targs == null)
|
||||
@@ -465,6 +469,10 @@ namespace Mono.CSharp {
|
||||
inflated.constraints = TypeParameterSpec.InflateConstraints (inflator, constraints ?? GenericDefinition.TypeParameters);
|
||||
inflated.state |= StateFlags.PendingMakeMethod;
|
||||
|
||||
#if DEBUG
|
||||
inflated.ID += counter;
|
||||
counter += 100000;
|
||||
#endif
|
||||
// if (inflated.parent == null)
|
||||
// inflated.parent = parent;
|
||||
|
||||
@@ -1867,6 +1875,7 @@ namespace Mono.CSharp {
|
||||
if (debug_builder == null)
|
||||
return;
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
var token = ConstructorBuilder.GetToken ();
|
||||
int t = token.Token;
|
||||
#if STATIC
|
||||
@@ -1875,6 +1884,7 @@ namespace Mono.CSharp {
|
||||
#endif
|
||||
|
||||
debug_builder.DefineMethod (file, t);
|
||||
#endif
|
||||
}
|
||||
|
||||
#region IMethodData Members
|
||||
@@ -2197,6 +2207,7 @@ namespace Mono.CSharp {
|
||||
if (debug_builder == null)
|
||||
return;
|
||||
|
||||
#if !FULL_AOT_RUNTIME
|
||||
var token = builder.GetToken ();
|
||||
int t = token.Token;
|
||||
#if STATIC
|
||||
@@ -2205,6 +2216,7 @@ namespace Mono.CSharp {
|
||||
#endif
|
||||
|
||||
debug_builder.DefineMethod (file, t);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -695,6 +695,20 @@ namespace Mono.CSharp.Nullable
|
||||
Right = Unwrap.CreateUnwrapped (Right);
|
||||
UnwrapRight = Right as Unwrap;
|
||||
}
|
||||
|
||||
if (Left.Type.BuiltinType == BuiltinTypeSpec.Type.Decimal) {
|
||||
var decimal_operators = MemberCache.GetUserOperator (Left.Type, Binary.ConvertBinaryToUserOperator (Binary.Oper), false);
|
||||
|
||||
Arguments args = new Arguments (2);
|
||||
args.Add (new Argument (Left));
|
||||
args.Add (new Argument (Right));
|
||||
|
||||
const OverloadResolver.Restrictions restr = OverloadResolver.Restrictions.ProbingOnly |
|
||||
OverloadResolver.Restrictions.NoBaseMembers | OverloadResolver.Restrictions.BaseMembersIncluded;
|
||||
|
||||
var res = new OverloadResolver (decimal_operators, restr, loc);
|
||||
UserOperator = res.ResolveOperator (rc, ref args);
|
||||
}
|
||||
}
|
||||
|
||||
type = Binary.Type;
|
||||
|
||||
@@ -345,7 +345,7 @@ namespace Mono.CSharp {
|
||||
void About ()
|
||||
{
|
||||
output.WriteLine (
|
||||
"The Mono C# compiler is Copyright 2001-2011, Novell, Inc.\n\n" +
|
||||
"The Mono C# compiler is Copyright 2001-2011, Novell, Inc. 2011-2016 Xamarin Inc, 2016-2017 Microsoft Corp\n\n" +
|
||||
"The compiler source code is released under the terms of the \n" +
|
||||
"MIT X11 or GNU GPL licenses\n\n" +
|
||||
|
||||
@@ -1602,7 +1602,7 @@ namespace Mono.CSharp {
|
||||
void Usage ()
|
||||
{
|
||||
output.WriteLine (
|
||||
"Mono C# compiler, Copyright 2001-2011 Novell, Inc., Copyright 2011-2012 Xamarin, Inc\n" +
|
||||
"Mono C# compiler, Copyright 2001-2011 Novell, Inc., 2011-2016 Xamarin, Inc, 2016-2017 Microsoft Corp\n" +
|
||||
"mcs [options] source-files\n" +
|
||||
" --about About the Mono C# compiler\n" +
|
||||
" -addmodule:M1[,Mn] Adds the module to the generated assembly\n" +
|
||||
|
||||
@@ -1 +1 @@
|
||||
fbb060f52960da9af8218171c9cf6991e8b102cc
|
||||
897312a065db7b614c99ae17a1ca603c087c93b4
|
||||
Reference in New Issue
Block a user