Merge branch 'master' of github.com:mono/linux-packaging-mono
Former-commit-id: 1993ef9a927033a9baf0e92effb59c2fc631f865
This commit is contained in:
commit
0c926a3c8e
@ -84,8 +84,8 @@ DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in mkinstalldirs \
|
||||
$(srcdir)/mono-uninstalled.pc.in COPYING.LIB ChangeLog NEWS \
|
||||
compile config.guess config.rpath config.sub depcomp \
|
||||
install-sh missing ltmain.sh
|
||||
compile config.guess config.rpath config.sub install-sh \
|
||||
missing ltmain.sh
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/iconv.m4 \
|
||||
$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
|
||||
|
@ -1 +1 @@
|
||||
1895650fb1b5a365ada5bcdf3fef86a448da51d2
|
||||
08afe9df2791baac02e8201b01cce1aca3beb124
|
@ -1 +1 @@
|
||||
2317c4f2abf300ae9f452f4dbfd8b9d63c944e1c
|
||||
4fa615ca8fe030cfede44041b86cf5bfc38aceaf
|
30
debian/changelog
vendored
30
debian/changelog
vendored
@ -1,3 +1,33 @@
|
||||
mono (4.2.2.30-0xamarin1) alpha; urgency=low
|
||||
|
||||
* "New release - mono-4.2.2.30.tar.bz2"
|
||||
|
||||
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Thu, 21 Jan 2016 17:41:07 -0500
|
||||
|
||||
mono (4.2.2.29-0xamarin1) alpha; urgency=low
|
||||
|
||||
* "New release - mono-4.2.2.29.tar.bz2"
|
||||
|
||||
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Mon, 18 Jan 2016 21:31:57 -0500
|
||||
|
||||
mono (4.2.2.10-0xamarin1) alpha; urgency=low
|
||||
|
||||
* "New release - mono-4.2.2.10.tar.bz2"
|
||||
|
||||
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Fri, 18 Dec 2015 19:43:17 -0500
|
||||
|
||||
mono (4.2.1.124-0xamarin1) alpha; urgency=low
|
||||
|
||||
* "New release - mono-4.2.1.124.tar.bz2"
|
||||
|
||||
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Wed, 09 Dec 2015 05:58:04 -0500
|
||||
|
||||
mono (4.2.1.102-0xamarin1) alpha; urgency=low
|
||||
|
||||
* "New release - mono-4.2.1.102.tar.bz2"
|
||||
|
||||
-- Xamarin Public Jenkins (auto-signing) <releng@xamarin.com> Thu, 12 Nov 2015 04:33:29 -0500
|
||||
|
||||
mono (4.2.1.91-0xamarin1) alpha; urgency=low
|
||||
|
||||
* "New release - mono-4.2.1.91.tar.bz2"
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-assembly.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-class.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-codegen.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-counters.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-debug.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-decimal.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-domains.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-dynamic-codegen.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-embedding.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-exc.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-gc.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-gchandle.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-image.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-internal.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-jit.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-jitinternal.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-marshal.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-metadata.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-methods.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-object.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-profiler.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-reflection.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-security.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-string.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-threads.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-type.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-types.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-unsorted.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-utils.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-vm.html</title>
|
||||
|
@ -1,4 +1,4 @@
|
||||
<?xml version="1.0" encoding="us-ascii"?><span>
|
||||
<?xml version="1.0" encoding="utf-8"?><span>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>mono-api-wapi.html</title>
|
||||
|
@ -1 +1 @@
|
||||
530bd396504a300e1f44e8bb369913299172f01f
|
||||
3db9a4bafdb7398647430f25ef9f145d369259ca
|
@ -992,7 +992,12 @@ where V is the architecture number 4, 5, 6, 7 and the options can be currently b
|
||||
.TP
|
||||
\fBMONO_ARM_FORCE_SOFT_FLOAT\fR
|
||||
When Mono is built with a soft float fallback on ARM and this variable is set to
|
||||
"1", Mono will always emit soft float code, even if a VFP unit is detected.
|
||||
"1", Mono will always emit soft float code, even if a VFP unit is
|
||||
detected.
|
||||
.TP
|
||||
\fBMONO_DARWIN_WATCHER_MAXFDS\fR
|
||||
This is a debugging aid used to force limits on the FileSystemWatcher
|
||||
implementation in Darwin. There is no limit by default.
|
||||
.TP
|
||||
\fBMONO_DISABLE_AIO\fR
|
||||
If set, tells mono NOT to attempt using native asynchronous I/O services. In
|
||||
|
@ -34,7 +34,7 @@ static class Consts
|
||||
// Use these assembly version constants to make code more maintainable.
|
||||
//
|
||||
|
||||
public const string MonoVersion = "4.2.1.0";
|
||||
public const string MonoVersion = "4.2.2.0";
|
||||
public const string MonoCompany = "Mono development team";
|
||||
public const string MonoProduct = "Mono Common Language Infrastructure";
|
||||
public const string MonoCopyright = "(c) Various Mono authors";
|
||||
|
@ -247,7 +247,7 @@ namespace MonoTests.System.Linq.Expressions {
|
||||
public void CallMethodOnDateTime ()
|
||||
{
|
||||
var left = Expression.Call (Expression.Constant (DateTime.Now), typeof(DateTime).GetMethod ("AddDays"), Expression.Constant (-5.0));
|
||||
var right = Expression.Constant (DateTime.Today);
|
||||
var right = Expression.Constant (DateTime.Today.AddDays (1));
|
||||
var expr = Expression.GreaterThan (left, right);
|
||||
|
||||
var eq = Expression.Lambda<Func<bool>> (expr).Compile ();
|
||||
|
@ -1263,20 +1263,29 @@ namespace System.Data.SqlClient
|
||||
throw new ArgumentNullException ("values");
|
||||
|
||||
int len = values.Length;
|
||||
int bigDecimalIndex = command.Tds.ColumnValues.BigDecimalIndex;
|
||||
var tds = command.Tds;
|
||||
int columns = Math.Min (len, tds.Columns.Count);
|
||||
|
||||
if ((command.CommandBehavior & CommandBehavior.SequentialAccess) != 0) {
|
||||
for (int i = 0; i < columns; ++i) {
|
||||
values [i] = tds.GetSequentialColumnValue (i);
|
||||
}
|
||||
} else {
|
||||
int bigDecimalIndex = tds.ColumnValues.BigDecimalIndex;
|
||||
|
||||
// If a four-byte decimal is stored, then we can't convert to
|
||||
// a native type. Throw an OverflowException.
|
||||
if (bigDecimalIndex >= 0 && bigDecimalIndex < len)
|
||||
throw new OverflowException ();
|
||||
try {
|
||||
command.Tds.ColumnValues.CopyTo (0, values, 0,
|
||||
len > command.Tds.ColumnValues.Count ? command.Tds.ColumnValues.Count : len);
|
||||
tds.ColumnValues.CopyTo (0, values, 0, columns);
|
||||
} catch (TdsInternalException ex) {
|
||||
command.Connection.Close ();
|
||||
throw SqlException.FromTdsInternalException ((TdsInternalException)ex);
|
||||
}
|
||||
return (len < FieldCount ? len : FieldCount);
|
||||
}
|
||||
|
||||
return columns;
|
||||
}
|
||||
|
||||
|
||||
|
@ -181,8 +181,8 @@ namespace System.Runtime.Serialization
|
||||
void ReadISerializable (ClassDataContract classContract)
|
||||
{
|
||||
ConstructorInfo ctor = classContract.GetISerializableConstructor ();
|
||||
context.ReadSerializationInfo (xmlReader, classContract.UnderlyingType);
|
||||
ctor.Invoke (objectLocal, new object [] {context.GetStreamingContext ()});
|
||||
var info = context.ReadSerializationInfo (xmlReader, classContract.UnderlyingType);
|
||||
ctor.Invoke (objectLocal, new object [] {info, context.GetStreamingContext ()});
|
||||
}
|
||||
|
||||
void ReadClass (ClassDataContract classContract)
|
||||
|
@ -469,8 +469,13 @@ namespace System.Runtime.Serialization
|
||||
PrimitiveDataContract primitiveContract = PrimitiveDataContract.GetPrimitiveDataContract(memberType);
|
||||
if (primitiveContract != null && !writeXsiType)
|
||||
primitiveContract.XmlFormatContentWriterMethod.Invoke (writer, new object [] {memberValue});
|
||||
else
|
||||
InternalSerialize(XmlFormatGeneratorStatics.InternalSerializeMethod, () => memberValue, memberType, writeXsiType);
|
||||
else {
|
||||
// InternalSerialize(XmlFormatGeneratorStatics.InternalSerializeMethod, () => memberValue, memberType, writeXsiType);
|
||||
var typeHandleValue = Type.GetTypeHandle (memberValue);
|
||||
var isDeclaredType = typeHandleValue.Equals (CodeInterpreter.ConvertValue (memberValue, memberType, Globals.TypeOfObject));
|
||||
|
||||
ctx.InternalSerialize (writer, memberValue, isDeclaredType, writeXsiType, DataContract.GetId (memberType.TypeHandle), memberType.TypeHandle);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -500,22 +505,19 @@ namespace System.Runtime.Serialization
|
||||
if (isNull2) {
|
||||
XmlFormatGeneratorStatics.WriteNullMethod.Invoke (ctx, new object [] {writer, memberType, DataContract.IsTypeSerializable(memberType)});
|
||||
} else {
|
||||
InternalSerialize((isNullableOfT ? XmlFormatGeneratorStatics.InternalSerializeMethod : XmlFormatGeneratorStatics.InternalSerializeReferenceMethod),
|
||||
() => memberValue, memberType, writeXsiType);
|
||||
var typeHandleValue = Type.GetTypeHandle (memberValue);
|
||||
var isDeclaredType = typeHandleValue.Equals (CodeInterpreter.ConvertValue (memberValue, memberType, Globals.TypeOfObject));
|
||||
if (isNullableOfT)
|
||||
ctx.InternalSerialize (writer, memberValue, isDeclaredType, writeXsiType, DataContract.GetId (memberType.TypeHandle), memberType.TypeHandle);
|
||||
else
|
||||
ctx.InternalSerializeReference (writer, memberValue, isDeclaredType, writeXsiType, DataContract.GetId (memberType.TypeHandle), memberType.TypeHandle);
|
||||
//InternalSerialize((isNullableOfT ? XmlFormatGeneratorStatics.InternalSerializeMethod : XmlFormatGeneratorStatics.InternalSerializeReferenceMethod), () => memberValue, memberType, writeXsiType);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void InternalSerialize (MethodInfo methodInfo, Func<object> memberValue, Type memberType, bool writeXsiType)
|
||||
{
|
||||
var v = memberValue ();
|
||||
var typeHandleValue = Type.GetTypeHandle (v);
|
||||
var isDeclaredType = typeHandleValue.Equals (CodeInterpreter.ConvertValue (v, memberType, Globals.TypeOfObject));
|
||||
methodInfo.Invoke (ctx, new object [] {writer, memberValue != null ? v : null, isDeclaredType, writeXsiType, DataContract.GetId (memberType.TypeHandle), memberType.TypeHandle});
|
||||
}
|
||||
|
||||
object UnwrapNullableObject(Func<object> memberValue, ref Type memberType, out bool isNull)// Leaves !HasValue on stack
|
||||
{
|
||||
object v = memberValue ();
|
||||
|
@ -5,10 +5,12 @@ System.Runtime.Serialization/Bug2843Test.cs
|
||||
System.Runtime.Serialization/Bug3258Test.cs
|
||||
System.Runtime.Serialization/Bug242Test.cs
|
||||
System.Runtime.Serialization/Bug695203Test.cs
|
||||
System.Runtime.Serialization/Bug36100.cs
|
||||
System.Runtime.Serialization/DataContractResolverTest.cs
|
||||
System.Runtime.Serialization/DataContractSerializerTest_DuplicateQName.cs
|
||||
System.Runtime.Serialization/DataContractSerializerTest_NullableWithDictionary.cs
|
||||
System.Runtime.Serialization/DataContractSerializerTest_InvalidCharacters.cs
|
||||
System.Runtime.Serialization/DataContractSerializerTest_ISerializable.cs
|
||||
System.Runtime.Serialization/DataContractSerializerTest.cs
|
||||
System.Runtime.Serialization/KnownTypeAttributeTest.cs
|
||||
System.Runtime.Serialization/XmlObjectSerializerTest.cs
|
||||
|
@ -0,0 +1 @@
|
||||
0eb5fd5cac80a730d30a79b0d0fbf4155fb5ddf1
|
@ -0,0 +1,114 @@
|
||||
//
|
||||
// DataContractSerializerTest_ISerializable.cs
|
||||
//
|
||||
// Author:
|
||||
// Aaron Bockover <abock@xamarin.com>
|
||||
//
|
||||
// Copyright 2015 Xamarin Inc. All rights reserved.
|
||||
//
|
||||
// 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.
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Xml;
|
||||
|
||||
using NUnit.Framework;
|
||||
|
||||
namespace MonoTests.System.Runtime.Serialization
|
||||
{
|
||||
[TestFixture]
|
||||
public class DataContractSerializerTest_ISerializable
|
||||
{
|
||||
[Serializable]
|
||||
sealed class TestClassISerializable : ISerializable
|
||||
{
|
||||
public string Foo { get; }
|
||||
|
||||
public TestClassISerializable (string foo)
|
||||
{
|
||||
Foo = foo;
|
||||
}
|
||||
|
||||
TestClassISerializable (SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
Foo = info.GetString ("foo");
|
||||
}
|
||||
|
||||
void ISerializable.GetObjectData (SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
info.AddValue ("foo", Foo);
|
||||
}
|
||||
}
|
||||
|
||||
// Tests that the ISerializable constructor is properly invoked, which
|
||||
// regressed when integrating MS Reference Source DCS, et. al.:
|
||||
// https://bugzilla.xamarin.com/show_bug.cgi?id=37171
|
||||
[Test]
|
||||
public void TestISerializableCtor ()
|
||||
{
|
||||
var serializer = new DataContractSerializer (
|
||||
typeof(TestClassISerializable),
|
||||
new DataContractSerializerSettings {
|
||||
DataContractResolver = new Resolver ()
|
||||
}
|
||||
);
|
||||
|
||||
var stream = new MemoryStream ();
|
||||
|
||||
var expected = new TestClassISerializable ("hello world");
|
||||
serializer.WriteObject (stream, expected);
|
||||
|
||||
stream.Flush ();
|
||||
stream.Position = 0;
|
||||
|
||||
var actual = (TestClassISerializable)serializer.ReadObject (stream);
|
||||
|
||||
Assert.AreEqual (expected.Foo, actual.Foo, "#DCS_ISer_Ctor");
|
||||
}
|
||||
|
||||
// Resolver to force DCS to serialize any type, ensuring the ISerializable
|
||||
// path will be taken for objects implementing that interface
|
||||
class Resolver : DataContractResolver
|
||||
{
|
||||
public override Type ResolveName (string typeName, string typeNamespace,
|
||||
Type declaredType, DataContractResolver knownTypeResolver)
|
||||
{
|
||||
return Type.GetType (typeNamespace == null
|
||||
? typeName
|
||||
: typeNamespace + "." + typeName
|
||||
);
|
||||
}
|
||||
|
||||
public override bool TryResolveType (Type type, Type declaredType,
|
||||
DataContractResolver knownTypeResolver,
|
||||
out XmlDictionaryString typeName,
|
||||
out XmlDictionaryString typeNamespace)
|
||||
{
|
||||
var name = type.FullName;
|
||||
var namesp = type.Namespace;
|
||||
name = name.Substring (type.Namespace.Length + 1);
|
||||
typeName = new XmlDictionaryString (XmlDictionary.Empty, name, 0);
|
||||
typeNamespace = new XmlDictionaryString (XmlDictionary.Empty, namesp, 0);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -121,7 +121,9 @@ namespace System.Xml.Xsl
|
||||
|
||||
public void Transform (IXPathNavigable input, XsltArgumentList arguments, Stream results)
|
||||
{
|
||||
Transform (input.CreateNavigator (), arguments, results);
|
||||
using (var sw = new StreamWriter (results)) {
|
||||
Transform (input.CreateNavigator (), arguments, sw);
|
||||
}
|
||||
}
|
||||
|
||||
public void Transform (IXPathNavigable input, XmlWriter results)
|
||||
|
@ -168,5 +168,31 @@ xmlns:xsl='http://www.w3.org/1999/XSL/Transform' xmlns:msxsl='urn:schemas-micros
|
||||
// Returns true on .NET and False on mono 2.10.2
|
||||
Assert.IsTrue (xslCompiledTransform.OutputSettings.Indent, "#1");
|
||||
}
|
||||
|
||||
[Test] // Bug 36436
|
||||
public void TransformWithXmlDocument ()
|
||||
{
|
||||
XmlDocument doc = new XmlDocument ();
|
||||
doc.LoadXml (@"<ROOT/>");
|
||||
XmlDocument st = new XmlDocument ();
|
||||
st.LoadXml (@"<?xml version=""1.0"" encoding=""utf-8""?>
|
||||
<xsl:stylesheet version=""1.0"" xmlns:vy=""Vineyard.Elements""
|
||||
xmlns:xsl=""http://www.w3.org/1999/XSL/Transform"" xmlns:xlink=""http://www.w3.org/1999/xlink"" xmlns:user=""http://www.mydomain.com/mynamespace"">
|
||||
<xsl:output method=""xml""/>
|
||||
|
||||
<xsl:param name=""os"" select=""ios""/>
|
||||
|
||||
<xsl:template match=""/ROOT"" >
|
||||
<xsl:copy/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>");
|
||||
XslCompiledTransform xsl = new XslCompiledTransform ();
|
||||
xsl.Load (st);
|
||||
|
||||
XsltArgumentList args = new XsltArgumentList ();
|
||||
|
||||
MemoryStream mstr = new MemoryStream ();
|
||||
xsl.Transform (doc, args, mstr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -162,6 +162,8 @@ namespace System.IO {
|
||||
|
||||
class KqueueMonitor : IDisposable
|
||||
{
|
||||
static bool initialized;
|
||||
|
||||
public int Connection
|
||||
{
|
||||
get { return conn; }
|
||||
@ -171,6 +173,13 @@ namespace System.IO {
|
||||
{
|
||||
this.fsw = fsw;
|
||||
this.conn = -1;
|
||||
if (!initialized){
|
||||
int t;
|
||||
initialized = true;
|
||||
var maxenv = Environment.GetEnvironmentVariable ("MONO_DARWIN_WATCHER_MAXFDS");
|
||||
if (maxenv != null && Int32.TryParse (maxenv, out t))
|
||||
maxFds = t;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose ()
|
||||
@ -625,7 +634,7 @@ namespace System.IO {
|
||||
const int F_GETPATH = 50;
|
||||
const int __DARWIN_MAXPATHLEN = 1024;
|
||||
static readonly kevent[] emptyEventList = new System.IO.kevent[0];
|
||||
const int maxFds = 200;
|
||||
int maxFds = Int32.MaxValue;
|
||||
|
||||
FileSystemWatcher fsw;
|
||||
int conn;
|
||||
|
@ -36,7 +36,10 @@ namespace System
|
||||
return false;
|
||||
|
||||
var from = Type.GetTypeCode (source);
|
||||
switch (Type.GetTypeCode (target)) {
|
||||
var to = Type.GetTypeCode (target);
|
||||
if (from == to && source.IsPrimitive)
|
||||
return true;
|
||||
switch (to) {
|
||||
case TypeCode.Char:
|
||||
switch (from) {
|
||||
case TypeCode.Byte:
|
||||
|
@ -170,21 +170,14 @@ namespace System.Diagnostics {
|
||||
return frames;
|
||||
}
|
||||
|
||||
bool AddFrames (StringBuilder sb, bool isException = false)
|
||||
bool AddFrames (StringBuilder sb)
|
||||
{
|
||||
bool printOffset;
|
||||
string debugInfo, indentation;
|
||||
string unknown = Locale.GetText ("<unknown method>");
|
||||
|
||||
if (isException) {
|
||||
printOffset = true;
|
||||
indentation = " ";
|
||||
debugInfo = Locale.GetText (" in {0}:{1} ");
|
||||
} else {
|
||||
printOffset = false;
|
||||
indentation = " ";
|
||||
debugInfo = Locale.GetText (" in {0}:line {1}");
|
||||
}
|
||||
|
||||
var newline = String.Format ("{0}{1}{2} ", Environment.NewLine, indentation,
|
||||
Locale.GetText ("at"));
|
||||
@ -201,14 +194,11 @@ namespace System.Diagnostics {
|
||||
string internal_name = frame.GetInternalMethodName ();
|
||||
if (internal_name != null)
|
||||
sb.Append (internal_name);
|
||||
else if (printOffset)
|
||||
sb.AppendFormat ("<0x{0:x5} + 0x{1:x5}> {2}", frame.GetMethodAddress (), frame.GetNativeOffset (), unknown);
|
||||
else
|
||||
sb.AppendFormat (unknown);
|
||||
sb.AppendFormat ("<0x{0:x5} + 0x{1:x5}> {2}", frame.GetMethodAddress (), frame.GetNativeOffset (), unknown);
|
||||
} else {
|
||||
GetFullNameForStackTrace (sb, frame.GetMethod ());
|
||||
|
||||
if (printOffset) {
|
||||
if (frame.GetILOffset () == -1) {
|
||||
sb.AppendFormat (" <0x{0:x5} + 0x{1:x5}>", frame.GetMethodAddress (), frame.GetNativeOffset ());
|
||||
if (frame.GetMethodIndex () != 0xffffff)
|
||||
@ -216,7 +206,6 @@ namespace System.Diagnostics {
|
||||
} else {
|
||||
sb.AppendFormat (" [0x{0:x5}]", frame.GetILOffset ());
|
||||
}
|
||||
}
|
||||
|
||||
sb.AppendFormat (debugInfo, frame.GetSecureFileName (),
|
||||
frame.GetFileLineNumber ());
|
||||
@ -293,7 +282,7 @@ namespace System.Diagnostics {
|
||||
//
|
||||
if (captured_traces != null) {
|
||||
foreach (var t in captured_traces) {
|
||||
if (!t.AddFrames (sb, true))
|
||||
if (!t.AddFrames (sb))
|
||||
continue;
|
||||
|
||||
sb.Append (Environment.NewLine);
|
||||
|
@ -102,17 +102,7 @@ namespace System
|
||||
|
||||
public MethodInfo Method {
|
||||
get {
|
||||
if (method_info != null) {
|
||||
return method_info;
|
||||
} else {
|
||||
if (method != IntPtr.Zero) {
|
||||
if (!method_is_virtual)
|
||||
method_info = (MethodInfo)MethodBase.GetMethodFromHandleNoGenericCheck (new RuntimeMethodHandle (method));
|
||||
else
|
||||
method_info = GetVirtualMethod_internal ();
|
||||
}
|
||||
return method_info;
|
||||
}
|
||||
return GetMethodImpl ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -511,7 +501,17 @@ namespace System
|
||||
|
||||
protected virtual MethodInfo GetMethodImpl ()
|
||||
{
|
||||
return Method;
|
||||
if (method_info != null) {
|
||||
return method_info;
|
||||
} else {
|
||||
if (method != IntPtr.Zero) {
|
||||
if (!method_is_virtual)
|
||||
method_info = (MethodInfo)MethodBase.GetMethodFromHandleNoGenericCheck (new RuntimeMethodHandle (method));
|
||||
else
|
||||
method_info = GetVirtualMethod_internal ();
|
||||
}
|
||||
return method_info;
|
||||
}
|
||||
}
|
||||
|
||||
// This is from ISerializable
|
||||
|
@ -33,6 +33,7 @@
|
||||
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
@ -112,6 +113,14 @@ namespace System
|
||||
return base.GetHashCode ();
|
||||
}
|
||||
|
||||
protected override MethodInfo GetMethodImpl ()
|
||||
{
|
||||
if (delegates != null)
|
||||
return delegates [delegates.Length - 1].Method;
|
||||
|
||||
return base.GetMethodImpl ();
|
||||
}
|
||||
|
||||
// <summary>
|
||||
// Return, in order of invocation, the invocation list
|
||||
// of a MulticastDelegate
|
||||
@ -161,6 +170,32 @@ namespace System
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Based on the Boyer–Moore string search algorithm */
|
||||
int LastIndexOf (Delegate[] haystack, Delegate[] needle)
|
||||
{
|
||||
if (haystack.Length < needle.Length)
|
||||
return -1;
|
||||
|
||||
if (haystack.Length == needle.Length) {
|
||||
for (int i = 0; i < haystack.Length; ++i)
|
||||
if (!haystack [i].Equals (needle [i]))
|
||||
return -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (int i = haystack.Length - needle.Length, j; i >= 0;) {
|
||||
for (j = 0; needle [j].Equals (haystack [i]); ++i, ++j) {
|
||||
if (j == needle.Length - 1)
|
||||
return i - j;
|
||||
}
|
||||
|
||||
i -= j + 1;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
protected sealed override Delegate RemoveImpl (Delegate value)
|
||||
{
|
||||
if (value == null)
|
||||
@ -201,42 +236,23 @@ namespace System
|
||||
return ret;
|
||||
} else {
|
||||
/* wild case : remove MulticastDelegate from MulticastDelegate
|
||||
* complexity is O(m * n), with n the number of elements in
|
||||
* complexity is O(m + n), with n the number of elements in
|
||||
* this.delegates and m the number of elements in other.delegates */
|
||||
MulticastDelegate ret = AllocDelegateLike_internal (this);
|
||||
ret.delegates = new Delegate [delegates.Length];
|
||||
|
||||
/* we should use a set with O(1) lookup complexity
|
||||
* but HashSet is implemented in System.Core.dll */
|
||||
List<Delegate> other_delegates = new List<Delegate> ();
|
||||
for (int i = 0; i < other.delegates.Length; ++i)
|
||||
other_delegates.Add (other.delegates [i]);
|
||||
|
||||
int idx = delegates.Length;
|
||||
if (delegates.Equals (other.delegates))
|
||||
return null;
|
||||
|
||||
/* we need to remove elements from the end to the beginning, as
|
||||
* the addition and removal of delegates behaves like a stack */
|
||||
for (int i = delegates.Length - 1; i >= 0; --i) {
|
||||
/* if delegates[i] is not in other_delegates,
|
||||
* then we can safely add it to ret.delegates
|
||||
* otherwise we remove it from other_delegates */
|
||||
if (!other_delegates.Remove (delegates [i]))
|
||||
ret.delegates [--idx] = delegates [i];
|
||||
}
|
||||
int idx = LastIndexOf (delegates, other.delegates);
|
||||
if (idx == -1)
|
||||
return this;
|
||||
|
||||
/* the elements are at the end of the array, we
|
||||
* need to move them back to the beginning of it */
|
||||
int count = delegates.Length - idx;
|
||||
Array.Copy (ret.delegates, idx, ret.delegates, 0, count);
|
||||
MulticastDelegate ret = AllocDelegateLike_internal (this);
|
||||
ret.delegates = new Delegate [delegates.Length - other.delegates.Length];
|
||||
|
||||
if (count == 0)
|
||||
return null;
|
||||
|
||||
if (count == 1)
|
||||
return ret.delegates [0];
|
||||
|
||||
if (count != delegates.Length)
|
||||
Array.Resize (ref ret.delegates, count);
|
||||
Array.Copy (delegates, ret.delegates, idx);
|
||||
Array.Copy (delegates, idx + other.delegates.Length, ret.delegates, idx, delegates.Length - idx - other.delegates.Length);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1318,7 +1318,8 @@ namespace System
|
||||
else {
|
||||
abbrevs.Add (abbrev_index, sb.ToString ());
|
||||
//Adding all the substrings too, as it seems to be used, at least for Africa/Windhoek
|
||||
for (int j = 1; j < sb.Length; j++)
|
||||
//j == sb.Length empty substring also needs to be added #31432
|
||||
for (int j = 1; j <= sb.Length; j++)
|
||||
abbrevs.Add (abbrev_index + j, sb.ToString (j, sb.Length - j));
|
||||
abbrev_index = i + 1;
|
||||
sb = new StringBuilder ();
|
||||
|
@ -35,6 +35,25 @@ namespace MonoTests.System.Threading
|
||||
[TestFixture]
|
||||
public class ThreadPoolTests
|
||||
{
|
||||
int minWorkerThreads;
|
||||
int minCompletionPortThreads;
|
||||
int maxWorkerThreads;
|
||||
int maxCompletionPortThreads;
|
||||
|
||||
[SetUp]
|
||||
public void SetUp ()
|
||||
{
|
||||
ThreadPool.GetMinThreads (out minWorkerThreads, out minCompletionPortThreads);
|
||||
ThreadPool.GetMaxThreads (out maxWorkerThreads, out maxCompletionPortThreads);
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
public void TearDown ()
|
||||
{
|
||||
ThreadPool.SetMinThreads (minWorkerThreads, minCompletionPortThreads);
|
||||
ThreadPool.SetMaxThreads (maxWorkerThreads, maxCompletionPortThreads);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void RegisterWaitForSingleObject_InvalidArguments ()
|
||||
{
|
||||
@ -99,5 +118,85 @@ namespace MonoTests.System.Threading
|
||||
Assert.IsTrue (ev.Wait (3000));
|
||||
}
|
||||
#endif
|
||||
|
||||
[Test]
|
||||
public void SetAndGetMinThreads ()
|
||||
{
|
||||
int workerThreads, completionPortThreads;
|
||||
int workerThreads_new, completionPortThreads_new;
|
||||
|
||||
ThreadPool.GetMinThreads (out workerThreads, out completionPortThreads);
|
||||
Assert.IsTrue (workerThreads > 0, "#1");
|
||||
Assert.IsTrue (completionPortThreads > 0, "#2");
|
||||
|
||||
workerThreads_new = workerThreads == 1 ? 2 : 1;
|
||||
completionPortThreads_new = completionPortThreads == 1 ? 2 : 1;
|
||||
ThreadPool.SetMinThreads (workerThreads_new, completionPortThreads_new);
|
||||
|
||||
ThreadPool.GetMinThreads (out workerThreads, out completionPortThreads);
|
||||
Assert.IsTrue (workerThreads == workerThreads_new, "#3");
|
||||
Assert.IsTrue (completionPortThreads == completionPortThreads_new, "#4");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void SetAndGetMaxThreads ()
|
||||
{
|
||||
int cpuCount = Environment.ProcessorCount;
|
||||
int workerThreads, completionPortThreads;
|
||||
int workerThreads_new, completionPortThreads_new;
|
||||
|
||||
ThreadPool.GetMaxThreads (out workerThreads, out completionPortThreads);
|
||||
Assert.IsTrue (workerThreads > 0, "#1");
|
||||
Assert.IsTrue (completionPortThreads > 0, "#2");
|
||||
|
||||
workerThreads_new = workerThreads == cpuCount ? cpuCount + 1 : cpuCount;
|
||||
completionPortThreads_new = completionPortThreads == cpuCount ? cpuCount + 1 : cpuCount;
|
||||
ThreadPool.SetMaxThreads (workerThreads_new, completionPortThreads_new);
|
||||
|
||||
ThreadPool.GetMaxThreads (out workerThreads, out completionPortThreads);
|
||||
Assert.IsTrue (workerThreads == workerThreads_new, "#3");
|
||||
Assert.IsTrue (completionPortThreads == completionPortThreads_new, "#4");
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void GetAvailableThreads ()
|
||||
{
|
||||
ManualResetEvent mre = new ManualResetEvent (false);
|
||||
DateTime start = DateTime.Now;
|
||||
int i, workerThreads, completionPortThreads;
|
||||
|
||||
try {
|
||||
Assert.IsTrue (ThreadPool.SetMaxThreads (Environment.ProcessorCount, Environment.ProcessorCount));
|
||||
|
||||
while (true) {
|
||||
ThreadPool.GetAvailableThreads (out workerThreads, out completionPortThreads);
|
||||
if (workerThreads == 0)
|
||||
break;
|
||||
|
||||
if ((DateTime.Now - start).TotalSeconds >= 10)
|
||||
Assert.Fail ("did not reach 0 available threads");
|
||||
|
||||
ThreadPool.QueueUserWorkItem (GetAvailableThreads_Callback, mre);
|
||||
Thread.Sleep (1);
|
||||
}
|
||||
} finally {
|
||||
mre.Set ();
|
||||
}
|
||||
}
|
||||
|
||||
void GetAvailableThreads_Callback (object state)
|
||||
{
|
||||
ManualResetEvent mre = (ManualResetEvent) state;
|
||||
|
||||
if (mre.WaitOne (0))
|
||||
return;
|
||||
|
||||
ThreadPool.QueueUserWorkItem (GetAvailableThreads_Callback, mre);
|
||||
ThreadPool.QueueUserWorkItem (GetAvailableThreads_Callback, mre);
|
||||
ThreadPool.QueueUserWorkItem (GetAvailableThreads_Callback, mre);
|
||||
ThreadPool.QueueUserWorkItem (GetAvailableThreads_Callback, mre);
|
||||
|
||||
mre.WaitOne ();
|
||||
}
|
||||
}
|
||||
}
|
@ -855,6 +855,32 @@ namespace MonoTests.System.Threading
|
||||
Assert.AreSame (Thread.GetNamedDataSlot ("te#st"), Thread.GetNamedDataSlot ("te#st"), "#2");
|
||||
}
|
||||
|
||||
class DomainClass : MarshalByRefObject {
|
||||
Thread m_thread;
|
||||
bool success;
|
||||
|
||||
public bool Run () {
|
||||
m_thread = new Thread(ThreadProc);
|
||||
m_thread.Start(Thread.CurrentThread);
|
||||
m_thread.Join();
|
||||
return success;
|
||||
}
|
||||
|
||||
public void ThreadProc (object arg) {
|
||||
success = m_thread == Thread.CurrentThread;
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CurrentThread_Domains ()
|
||||
{
|
||||
AppDomain ad = AppDomain.CreateDomain ("foo");
|
||||
ad.Load (typeof (DomainClass).Assembly.GetName ());
|
||||
var o = (DomainClass)ad.CreateInstanceAndUnwrap (typeof (DomainClass).Assembly.FullName, typeof (DomainClass).FullName);
|
||||
Assert.IsTrue (o.Run ());
|
||||
AppDomain.Unload (ad);
|
||||
}
|
||||
|
||||
void CheckIsRunning (string s, Thread t)
|
||||
{
|
||||
int c = counter;
|
||||
|
@ -1076,5 +1076,30 @@ namespace MonoTests.System
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[TestFixture]
|
||||
public class ParseTZBuffer
|
||||
{
|
||||
MethodInfo parseTZBuffer;
|
||||
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
{
|
||||
var flags = BindingFlags.Static | BindingFlags.NonPublic;
|
||||
parseTZBuffer = typeof (TimeZoneInfo).GetMethod ("ParseTZBuffer", flags);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Bug31432 ()
|
||||
{
|
||||
// Europe/Moscow from failing device
|
||||
var base64Data = "VFppZjIAAAAAAAAAAAAAAAAAAAAAAAAPAAAADwAAAAAAAABNAAAADwAAACKbXx7HnT7yeZ4q7vme9zlpn4RX+aDYbOmhABYJoTymQKQQbcCkPTKwpRVosKU9A8CnHkVQtaQZYBUnp9AWGNxAFwjbUBf6D8AY6g7QGdtDQBrMk9AbvKDwHKyR8B2cgvAejHPwH3xk8CBsVfAhXEbwIkw38CM8KPAkLBnwJRwK8CYL+/AnBSdwJ/UYcCjlF4ApeL+AKdTQQCrEszArtNxwLKTNcC2UvnAuhK9wL3SgcDBkkXAxXbzwMnKX8DM9nvA0UnnwNR2A8DYyW/A2/WLwOBt4cDjdRPA5+1pwOr0m8DvbPHA8pkNwPbsecD6GJXA/mwBwQGYHcEGEHPBCRelwQ2P+8EQly3BFQ+DwRgWtcEcjwvBH7snwSQOk8EnOq/BK44bwS66N8EzMo3BNjm/wVEwdYAIBAgMBAwUEBQYFBwgHCQcJBwkHCQoLCgsKCwoLCgsKCwoMDQoJBwsKCwoLCgsKCwoLCgsKCwoLCgsKCwoLCgsKCwoLCgsKCwoLCg4KAAAjOQAAAAAxhwEEAAAjdwAAAAA/lwEIAAAqMAADAAA4QAENAABGUAEPAAAqMAARAAAcIAAVAAA4QAEZAAAqMAARAAA4QAEZAAAqMAEdAAAcIAAVAAA4QAARTU1UAE1TVABNRFNUAFMATQBNU0sARUVUAE1TRABFRVNUAAAAAAAAAAAAAAABAQEBAQAAAAAAAAAAAAAAAAAAAFRaaWYyAAAAAAAAAAAAAAAAAAAAAAAAEAAAABAAAAAAAAAATgAAABAAAAAm/////1a2wMf/////m18ex/////+dPvJ5/////54q7vn/////nvc5af////+fhFf5/////6DYbOn/////oQAWCf////+hPKZA/////6QQbcD/////pD0ysP////+lFWiw/////6U9A8D/////px5FUP////+1pBlgAAAAABUnp9AAAAAAFhjcQAAAAAAXCNtQAAAAABf6D8AAAAAAGOoO0AAAAAAZ20NAAAAAABrMk9AAAAAAG7yg8AAAAAAcrJHwAAAAAB2cgvAAAAAAHoxz8AAAAAAffGTwAAAAACBsVfAAAAAAIVxG8AAAAAAiTDfwAAAAACM8KPAAAAAAJCwZ8AAAAAAlHArwAAAAACYL+/AAAAAAJwUncAAAAAAn9RhwAAAAACjlF4AAAAAAKXi/gAAAAAAp1NBAAAAAACrEszAAAAAAK7TccAAAAAAspM1wAAAAAC2UvnAAAAAALoSvcAAAAAAvdKBwAAAAADBkkXAAAAAAMV288AAAAAAycpfwAAAAADM9nvAAAAAANFJ58AAAAAA1HYDwAAAAADYyW/AAAAAANv1i8AAAAAA4G3hwAAAAADjdRPAAAAAAOftacAAAAAA6vSbwAAAAADvbPHAAAAAAPKZDcAAAAAA9ux5wAAAAAD6GJXAAAAAAP5sAcAAAAABAZgdwAAAAAEGEHPAAAAAAQkXpcAAAAABDY/7wAAAAAEQly3AAAAAARUPg8AAAAABGBa1wAAAAAEcjwvAAAAAAR+7J8AAAAABJA6TwAAAAAEnOq/AAAAAASuOG8AAAAABLro3wAAAAAEzMo3AAAAAATY5v8AAAAABUTB1gAQMCAwQCBAYFBgcGCAkICggKCAoICgsMCwwLDAsMCwwLDAsNDgsKCAwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCw8LAAAjOQAAAAAjOQAEAAAxhwEIAAAjdwAEAAA/lwEMAAAqMAADAAA4QAERAABGUAETAAAqMAAVAAAcIAAZAAA4QAEdAAAqMAAVAAA4QAEdAAAqMAEhAAAcIAAZAAA4QAAVTE1UAE1NVABNU1QATURTVABTAE0ATVNLAEVFVABNU0QARUVTVAAAAAAAAAAAAAAAAAEBAQEBAAAAAAAAAAAAAAAAAAAAAApNU0stMwo=";
|
||||
|
||||
var data = Convert.FromBase64String (base64Data);
|
||||
|
||||
var tz = parseTZBuffer.Invoke (null, new object[] { "Test", data, data.Length});
|
||||
Assert.IsTrue (tz != null);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
9f87bcd74d19a29f1b4e41b2d7171f2c1af2835c
|
||||
bc4d15d32cfe0aba953847153e27ae46f18e35c1
|
@ -1 +1 @@
|
||||
7709d423804e0b435e60e7ca74f198f20d02a535
|
||||
f5ed7ffb57a89c75be4f5425ed6528e483d57c58
|
@ -1 +1 @@
|
||||
ce9eb809ba177cb9c5f9387d1e2d93f17a583be9
|
||||
c616ade82d96a5ab15cd8b504e39483514b5241f
|
@ -1 +1 @@
|
||||
dda3cb77811a304fcb8a8c77455268e06b7080b9
|
||||
eb04980221098f6aa3334c22a67378b0ce957313
|
@ -1 +1 @@
|
||||
d5cb6b4dd17539ae3babb95e036964746d5bb92e
|
||||
a26a40db174c277495cd693dd648bf93d31fe4b9
|
@ -1 +1 @@
|
||||
1dcbcac9b7a00d7ca093ca63316c407012521308
|
||||
40b0f0738e2b385449a465b42d82765036b79bfa
|
@ -1 +1 @@
|
||||
c49c24eeb8abb839f5be49574e83c8ad4caaa8e3
|
||||
6da2d6871aa2124113966387284988a7780338c7
|
@ -1 +1 @@
|
||||
d6ee7490dcb9342db71705f7f6b807f6a85a6cf0
|
||||
0e0947d4aadbc750a8cbde64d1bcf6890ee7fc21
|
@ -1 +1 @@
|
||||
37a62e86a907ce0337c9690758f816e78370f82f
|
||||
d9648374bf2a844012af4ca23c7e43c89f81a16e
|
@ -1 +1 @@
|
||||
f815830cd5626bb85f053420b1d6fcf19e0aeb2a
|
||||
3c2d3fbe2cac6adc7835cf53aa766fffd4381e86
|
13
mcs/tests/test-null-operator-20.cs
Normal file
13
mcs/tests/test-null-operator-20.cs
Normal file
@ -0,0 +1,13 @@
|
||||
class M
|
||||
{
|
||||
public static void Main ()
|
||||
{
|
||||
string s = null;
|
||||
s?.CompareTo ("xx").CompareTo(s?.EndsWith ("x")).GetHashCode ();
|
||||
|
||||
string s1 = "abcd";
|
||||
string s2 = null;
|
||||
|
||||
var idx = s1.Substring(1)[s2?.GetHashCode () ?? 0].GetHashCode ();
|
||||
}
|
||||
}
|
@ -1 +1 @@
|
||||
08b0ee8ce9da391ffa51e1cc3eb0a3611adf5b5e
|
||||
7e6d08d8664395f0f877e388bd40276cefe0c2e9
|
@ -334,6 +334,9 @@ namespace Mono.Linker.Steps {
|
||||
return;
|
||||
|
||||
MarkType (et);
|
||||
if (argument.Value == null)
|
||||
return;
|
||||
|
||||
foreach (var cac in (CustomAttributeArgument[]) argument.Value)
|
||||
MarkWithResolvedScope ((TypeReference) cac.Value);
|
||||
} else if (at.Namespace == "System" && at.Name == "Type") {
|
||||
@ -355,7 +358,6 @@ namespace Mono.Linker.Steps {
|
||||
if ((git != null) && git.HasGenericArguments) {
|
||||
foreach (var ga in git.GenericArguments)
|
||||
MarkWithResolvedScope (ga);
|
||||
return;
|
||||
}
|
||||
// we cannot set the Scope of a TypeSpecification but it's element type can be set
|
||||
// e.g. System.String[] -> System.String
|
||||
|
@ -129,15 +129,24 @@ namespace Mono.Linker.Steps {
|
||||
return new Regex (pattern.Replace(".", @"\.").Replace("*", "(.*)"));
|
||||
}
|
||||
|
||||
void MatchType (TypeDefinition type, Regex regex, XPathNavigator nav)
|
||||
{
|
||||
if (regex.Match (type.FullName).Success)
|
||||
ProcessType (type, nav);
|
||||
|
||||
if (!type.HasNestedTypes)
|
||||
return;
|
||||
|
||||
foreach (var nt in type.NestedTypes)
|
||||
MatchType (nt, regex, nav);
|
||||
}
|
||||
|
||||
void ProcessTypePattern (string fullname, AssemblyDefinition assembly, XPathNavigator nav)
|
||||
{
|
||||
Regex regex = CreateRegexFromPattern (fullname);
|
||||
|
||||
foreach (TypeDefinition type in assembly.MainModule.Types) {
|
||||
if (!regex.Match (type.FullName).Success)
|
||||
continue;
|
||||
|
||||
ProcessType (type, nav);
|
||||
MatchType (type, regex, nav);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,6 +315,7 @@ OPDEF(CEE_MONO_JIT_ICALL_ADDR, "mono_jit_icall_addr", Pop0, PushI, InlineI, X, 2
|
||||
OPDEF(CEE_MONO_LDPTR_INT_REQ_FLAG, "mono_ldptr_int_req_flag", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x14, NEXT)
|
||||
OPDEF(CEE_MONO_LDPTR_CARD_TABLE, "mono_ldptr_card_table", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x15, NEXT)
|
||||
OPDEF(CEE_MONO_LDPTR_NURSERY_START, "mono_ldptr_nursery_start", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x16, NEXT)
|
||||
OPDEF(CEE_MONO_LDPTR_NURSERY_BITS, "mono_ldptr_nursery_bits", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x17, NEXT)
|
||||
#ifndef OPALIAS
|
||||
#define _MONO_CIL_OPALIAS_DEFINED_
|
||||
#define OPALIAS(a,s,r)
|
||||
|
@ -120,8 +120,6 @@ static const MonoRuntimeInfo *current_runtime = NULL;
|
||||
*/
|
||||
static const MonoRuntimeInfo supported_runtimes[] = {
|
||||
{"v4.0.30319","4.5", { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
|
||||
{"v4.0.30128","4.0", { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
|
||||
{"v4.0.20506","4.0", { {4,0,0,0}, {10,0,0,0}, {4,0,0,0}, {4,0,0,0} } },
|
||||
{"mobile", "2.1", { {2,0,5,0}, {10,0,0,0}, {2,0,5,0}, {2,0,5,0} } },
|
||||
{"moonlight", "2.1", { {2,0,5,0}, { 9,0,0,0}, {3,5,0,0}, {3,0,0,0} } },
|
||||
};
|
||||
|
@ -1 +1 @@
|
||||
9292a1f14d206875dd19b3483d61333eedaa2207
|
||||
f49032b6fbcf3c932ab7f6c10276180a7a5cf6cd
|
@ -220,12 +220,14 @@ emit_nursery_check (MonoMethodBuilder *mb, int *nursery_check_return_labels, gbo
|
||||
*/
|
||||
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
|
||||
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_START);
|
||||
mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
|
||||
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
|
||||
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_BITS);
|
||||
mono_mb_emit_byte (mb, CEE_SHR_UN);
|
||||
mono_mb_emit_stloc (mb, shifted_nursery_start);
|
||||
|
||||
mono_mb_emit_ldarg (mb, 0);
|
||||
mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
|
||||
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
|
||||
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_BITS);
|
||||
mono_mb_emit_byte (mb, CEE_SHR_UN);
|
||||
mono_mb_emit_ldloc (mb, shifted_nursery_start);
|
||||
nursery_check_return_labels [0] = mono_mb_emit_branch (mb, CEE_BEQ);
|
||||
@ -234,7 +236,8 @@ emit_nursery_check (MonoMethodBuilder *mb, int *nursery_check_return_labels, gbo
|
||||
// if (!ptr_in_nursery (*ptr)) return;
|
||||
mono_mb_emit_ldarg (mb, 0);
|
||||
mono_mb_emit_byte (mb, CEE_LDIND_I);
|
||||
mono_mb_emit_icon (mb, DEFAULT_NURSERY_BITS);
|
||||
mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
|
||||
mono_mb_emit_byte (mb, CEE_MONO_LDPTR_NURSERY_BITS);
|
||||
mono_mb_emit_byte (mb, CEE_SHR_UN);
|
||||
mono_mb_emit_ldloc (mb, shifted_nursery_start);
|
||||
nursery_check_return_labels [1] = mono_mb_emit_branch (mb, CEE_BNE_UN);
|
||||
@ -2339,6 +2342,8 @@ sgen_client_scan_thread_data (void *start_nursery, void *end_nursery, gboolean p
|
||||
|
||||
FOREACH_THREAD (info) {
|
||||
int skip_reason = 0;
|
||||
void *aligned_stack_start = (void*)(mword) ALIGN_TO ((mword)info->client_info.stack_start, SIZEOF_VOID_P);
|
||||
|
||||
if (info->client_info.skip) {
|
||||
SGEN_LOG (3, "Skipping dead thread %p, range: %p-%p, size: %zd", info, info->client_info.stack_start, info->client_info.stack_end, (char*)info->client_info.stack_end - (char*)info->client_info.stack_start);
|
||||
skip_reason = 1;
|
||||
@ -2358,13 +2363,13 @@ sgen_client_scan_thread_data (void *start_nursery, void *end_nursery, gboolean p
|
||||
g_assert (info->client_info.suspend_done);
|
||||
SGEN_LOG (3, "Scanning thread %p, range: %p-%p, size: %zd, pinned=%zd", info, info->client_info.stack_start, info->client_info.stack_end, (char*)info->client_info.stack_end - (char*)info->client_info.stack_start, sgen_get_pinned_count ());
|
||||
if (mono_gc_get_gc_callbacks ()->thread_mark_func && !conservative_stack_mark) {
|
||||
mono_gc_get_gc_callbacks ()->thread_mark_func (info->client_info.runtime_data, info->client_info.stack_start, info->client_info.stack_end, precise, &ctx);
|
||||
mono_gc_get_gc_callbacks ()->thread_mark_func (info->client_info.runtime_data, aligned_stack_start, info->client_info.stack_end, precise, &ctx);
|
||||
} else if (!precise) {
|
||||
if (!conservative_stack_mark) {
|
||||
fprintf (stderr, "Precise stack mark not supported - disabling.\n");
|
||||
conservative_stack_mark = TRUE;
|
||||
}
|
||||
sgen_conservatively_pin_objects_from (info->client_info.stack_start, info->client_info.stack_end, start_nursery, end_nursery, PIN_TYPE_STACK);
|
||||
sgen_conservatively_pin_objects_from (aligned_stack_start, info->client_info.stack_end, start_nursery, end_nursery, PIN_TYPE_STACK);
|
||||
}
|
||||
|
||||
if (!precise) {
|
||||
|
@ -480,11 +480,13 @@ domain_get_next (ThreadPoolDomain *current)
|
||||
return tpdomain;
|
||||
}
|
||||
|
||||
static void
|
||||
/* return TRUE if timeout, FALSE otherwise (worker unpark or interrupt) */
|
||||
static gboolean
|
||||
worker_park (void)
|
||||
{
|
||||
mono_cond_t cond;
|
||||
MonoInternalThread *thread = mono_thread_internal_current ();
|
||||
gboolean timeout = FALSE;
|
||||
|
||||
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] current worker parking", GetCurrentThreadId ());
|
||||
|
||||
@ -495,10 +497,17 @@ worker_park (void)
|
||||
mono_mutex_lock (&threadpool->active_threads_lock);
|
||||
|
||||
if (!mono_runtime_is_shutting_down ()) {
|
||||
static gpointer rand_handle = NULL;
|
||||
|
||||
if (!rand_handle)
|
||||
rand_handle = rand_create ();
|
||||
g_assert (rand_handle);
|
||||
|
||||
g_ptr_array_add (threadpool->parked_threads, &cond);
|
||||
g_ptr_array_remove_fast (threadpool->working_threads, thread);
|
||||
|
||||
mono_cond_wait (&cond, &threadpool->active_threads_lock);
|
||||
if (mono_cond_timedwait_ms (&cond, &threadpool->active_threads_lock, rand_next (rand_handle, 5 * 1000, 60 * 1000)) != 0)
|
||||
timeout = TRUE;
|
||||
|
||||
g_ptr_array_add (threadpool->working_threads, thread);
|
||||
g_ptr_array_remove (threadpool->parked_threads, &cond);
|
||||
@ -511,6 +520,8 @@ worker_park (void)
|
||||
mono_cond_destroy (&cond);
|
||||
|
||||
mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] current worker unparking", GetCurrentThreadId ());
|
||||
|
||||
return timeout;
|
||||
}
|
||||
|
||||
static gboolean
|
||||
@ -585,13 +596,15 @@ worker_thread (gpointer data)
|
||||
}
|
||||
|
||||
if (retire || !(tpdomain = domain_get_next (previous_tpdomain))) {
|
||||
gboolean timeout;
|
||||
|
||||
COUNTER_ATOMIC (counter, {
|
||||
counter._.working --;
|
||||
counter._.parked ++;
|
||||
});
|
||||
|
||||
mono_mutex_unlock (&threadpool->domains_lock);
|
||||
worker_park ();
|
||||
timeout = worker_park ();
|
||||
mono_mutex_lock (&threadpool->domains_lock);
|
||||
|
||||
COUNTER_ATOMIC (counter, {
|
||||
@ -599,6 +612,9 @@ worker_thread (gpointer data)
|
||||
counter._.parked --;
|
||||
});
|
||||
|
||||
if (timeout)
|
||||
break;
|
||||
|
||||
if (retire)
|
||||
retire = FALSE;
|
||||
|
||||
@ -860,7 +876,17 @@ monitor_thread (void)
|
||||
|
||||
if (all_waitsleepjoin) {
|
||||
ThreadPoolCounter counter;
|
||||
COUNTER_ATOMIC (counter, { counter._.max_working ++; });
|
||||
gboolean limit_worker_max_reached = FALSE;
|
||||
|
||||
COUNTER_ATOMIC (counter, {
|
||||
if (counter._.max_working >= threadpool->limit_worker_max) {
|
||||
limit_worker_max_reached = TRUE;
|
||||
break;
|
||||
}
|
||||
counter._.max_working ++;
|
||||
});
|
||||
|
||||
if (!limit_worker_max_reached)
|
||||
hill_climbing_force_change (counter._.max_working, TRANSITION_STARVATION);
|
||||
}
|
||||
|
||||
@ -1405,12 +1431,16 @@ mono_threadpool_ms_resume (void)
|
||||
void
|
||||
ves_icall_System_Threading_ThreadPool_GetAvailableThreadsNative (gint32 *worker_threads, gint32 *completion_port_threads)
|
||||
{
|
||||
ThreadPoolCounter counter;
|
||||
|
||||
if (!worker_threads || !completion_port_threads)
|
||||
return;
|
||||
|
||||
mono_lazy_initialize (&status, initialize);
|
||||
|
||||
*worker_threads = threadpool->limit_worker_max;
|
||||
counter.as_gint64 = COUNTER_READ ();
|
||||
|
||||
*worker_threads = MAX (0, threadpool->limit_worker_max - counter._.active);
|
||||
*completion_port_threads = threadpool->limit_io_max;
|
||||
}
|
||||
|
||||
@ -1448,8 +1478,8 @@ ves_icall_System_Threading_ThreadPool_SetMinThreadsNative (gint32 worker_threads
|
||||
if (completion_port_threads <= 0 || completion_port_threads > threadpool->limit_io_max)
|
||||
return FALSE;
|
||||
|
||||
threadpool->limit_worker_max = worker_threads;
|
||||
threadpool->limit_io_max = completion_port_threads;
|
||||
threadpool->limit_worker_min = worker_threads;
|
||||
threadpool->limit_io_min = completion_port_threads;
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -1 +1 @@
|
||||
4b6a091a05719bcaeae9c139036b3b64e47d3685
|
||||
6a8f7210854722081b142d053b3a793f67637e5e
|
@ -1 +1 @@
|
||||
68fe0688774e03bdf70e4f80f566f1e98cc3abf8
|
||||
43a938d0fc4a0e09757c04938cbbb2ba5b269639
|
@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.2.1.91/8862921\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.2.2.30/996df3c\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -749,7 +749,7 @@ EXTRA_DIST = TestDriver.cs \
|
||||
Makefile.am.in
|
||||
|
||||
version.h: Makefile
|
||||
echo "#define FULL_VERSION \"Stable 4.2.1.91/8862921\"" > version.h
|
||||
echo "#define FULL_VERSION \"Stable 4.2.2.30/996df3c\"" > version.h
|
||||
|
||||
# Utility target for patching libtool to speed up linking
|
||||
patch-libtool:
|
||||
|
@ -1 +1 @@
|
||||
cc5a13de3ef26e6c31e86204057f98f071d1db3b
|
||||
aa98c3527a7389d3b5b9ebf236b36e0d2034d7d8
|
@ -1 +1 @@
|
||||
f90e82ac07050949995cbc363bae19c32c00b64c
|
||||
46c962d8d258bbbc41ba0eb536a665e655c91493
|
@ -1 +1 @@
|
||||
8d2f08962c13e0e01c89cb1f9fd8d9c9fadc43d3
|
||||
b7a04e595ac8e42f5912b4c52b21919472ebea6e
|
@ -291,4 +291,36 @@ class Tests
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct LargeStruct {
|
||||
public int a, b, c, d;
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.NoInlining)]
|
||||
public static bool GetHasValue<T>(T? value) where T : struct
|
||||
{
|
||||
return value.HasValue;
|
||||
}
|
||||
|
||||
[Category ("DYNCALL")]
|
||||
public static int test_0_large_nullable_invoke () {
|
||||
var s = new LargeStruct () { a = 1, b = 2, c = 3, d = 4 };
|
||||
|
||||
GetHasValue<LargeStruct> (s);
|
||||
|
||||
#if __MOBILE__
|
||||
var m = typeof(AotTests).GetMethod("GetHasValue", BindingFlags.Static | BindingFlags.Public);
|
||||
#else
|
||||
var m = typeof(Tests).GetMethod("GetHasValue", BindingFlags.Static | BindingFlags.Public);
|
||||
#endif
|
||||
|
||||
Type type = typeof (LargeStruct?).GetGenericArguments () [0];
|
||||
bool b1 = (bool)m.MakeGenericMethod (new Type[] {type}).Invoke (null, new object[] { s });
|
||||
if (!b1)
|
||||
return 1;
|
||||
bool b2 = (bool)m.MakeGenericMethod (new Type[] {type}).Invoke (null, new object[] { null });
|
||||
if (b2)
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -58,6 +58,9 @@
|
||||
#include <locale.h>
|
||||
#include "version.h"
|
||||
#include "debugger-agent.h"
|
||||
#if TARGET_OSX
|
||||
# include <sys/resource.h>
|
||||
#endif
|
||||
|
||||
static FILE *mini_stats_fd;
|
||||
|
||||
@ -1462,6 +1465,26 @@ switch_gc (char* argv[], const char* target_gc)
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef TARGET_OSX
|
||||
|
||||
/*
|
||||
* tries to increase the minimum number of files, if the number is below 1024
|
||||
*/
|
||||
static void
|
||||
darwin_change_default_file_handles ()
|
||||
{
|
||||
struct rlimit limit;
|
||||
|
||||
if (getrlimit (RLIMIT_NOFILE, &limit) == 0){
|
||||
if (limit.rlim_cur < 1024){
|
||||
limit.rlim_cur = MAX(1024,limit.rlim_cur);
|
||||
setrlimit (RLIMIT_NOFILE, &limit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* mono_main:
|
||||
* @argc: number of arguments in the argv array
|
||||
@ -1514,6 +1537,10 @@ mono_main (int argc, char* argv[])
|
||||
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
#if TARGET_OSX
|
||||
darwin_change_default_file_handles ();
|
||||
#endif
|
||||
|
||||
if (g_getenv ("MONO_NO_SMP"))
|
||||
mono_set_use_smp (FALSE);
|
||||
|
||||
|
@ -1718,6 +1718,33 @@ public class Tests
|
||||
return 2;
|
||||
return 0;
|
||||
}
|
||||
|
||||
public interface IFaceTest {
|
||||
int iface_method ();
|
||||
}
|
||||
|
||||
public interface IFaceConstrainedIFace {
|
||||
int foo<T, T2> (ref T val) where T: IFaceTest;
|
||||
}
|
||||
|
||||
class ConstrainedIFace : IFaceConstrainedIFace {
|
||||
public int foo<T, T2> (ref T val) where T: IFaceTest {
|
||||
return val.iface_method ();
|
||||
}
|
||||
}
|
||||
|
||||
class ClassTest : IFaceTest {
|
||||
public int iface_method () {
|
||||
return 42;
|
||||
}
|
||||
}
|
||||
|
||||
// Test constrained calls on an interface made from gsharedvt methods
|
||||
public static int test_42_gsharedvt_constrained_iface () {
|
||||
IFaceConstrainedIFace obj = new ConstrainedIFace ();
|
||||
IFaceTest t = new ClassTest ();
|
||||
return obj.foo<IFaceTest, int> (ref t);
|
||||
}
|
||||
}
|
||||
|
||||
// #13191
|
||||
|
@ -1204,11 +1204,16 @@ static MonoMethod*
|
||||
constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *klass, gpointer *this_arg)
|
||||
{
|
||||
MonoMethod *m;
|
||||
int vt_slot;
|
||||
int vt_slot, iface_offset;
|
||||
|
||||
if (klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
|
||||
mono_set_pending_exception (mono_get_exception_execution_engine ("Not yet supported."));
|
||||
return NULL;
|
||||
MonoObject *this_obj;
|
||||
|
||||
/* Have to use the receiver's type instead of klass, the receiver is a ref type */
|
||||
this_obj = *(MonoObject**)mp;
|
||||
g_assert (this_obj);
|
||||
|
||||
klass = this_obj->vtable->klass;
|
||||
}
|
||||
|
||||
if (mono_method_signature (cmethod)->pinvoke) {
|
||||
@ -1220,8 +1225,6 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k
|
||||
g_assert (klass->vtable);
|
||||
vt_slot = mono_method_get_vtable_slot (cmethod);
|
||||
if (cmethod->klass->flags & TYPE_ATTRIBUTE_INTERFACE) {
|
||||
int iface_offset;
|
||||
|
||||
iface_offset = mono_class_interface_offset (klass, cmethod->klass);
|
||||
g_assert (iface_offset != -1);
|
||||
vt_slot += iface_offset;
|
||||
@ -1230,6 +1233,7 @@ constrained_gsharedvt_call_setup (gpointer mp, MonoMethod *cmethod, MonoClass *k
|
||||
if (cmethod->is_inflated)
|
||||
m = mono_class_inflate_generic_method (m, mono_method_get_context (cmethod));
|
||||
}
|
||||
|
||||
if (klass->valuetype && (m->klass == mono_defaults.object_class || m->klass == mono_defaults.enum_class->parent || m->klass == mono_defaults.enum_class))
|
||||
/*
|
||||
* Calling a non-vtype method with a vtype receiver, has to box.
|
||||
|
@ -1 +1 @@
|
||||
cb63252e0018b9aefb43fe181130006eafb121b8
|
||||
83cb83354cc749cc41c0999b8e401a52ac1c9b01
|
@ -1 +1 @@
|
||||
bf88f17bace11357a53f5ac7a00bdefc6a4588ee
|
||||
f71435042be76f9c1351b68ab479e824c9cd68f3
|
@ -882,11 +882,11 @@ class_type_info (MonoDomain *domain, MonoClass *class, MonoRgctxInfoType info_ty
|
||||
return GUINT_TO_POINTER (mono_class_value_size (class, NULL));
|
||||
case MONO_RGCTX_INFO_CLASS_BOX_TYPE:
|
||||
if (MONO_TYPE_IS_REFERENCE (&class->byval_arg))
|
||||
return GUINT_TO_POINTER (1);
|
||||
return GUINT_TO_POINTER (MONO_GSHAREDVT_BOX_TYPE_REF);
|
||||
else if (mono_class_is_nullable (class))
|
||||
return GUINT_TO_POINTER (2);
|
||||
return GUINT_TO_POINTER (MONO_GSHAREDVT_BOX_TYPE_NULLABLE);
|
||||
else
|
||||
return GUINT_TO_POINTER (0);
|
||||
return GUINT_TO_POINTER (MONO_GSHAREDVT_BOX_TYPE_VTYPE);
|
||||
case MONO_RGCTX_INFO_MEMCPY:
|
||||
case MONO_RGCTX_INFO_BZERO: {
|
||||
static MonoMethod *memcpy_method [17];
|
||||
@ -1236,11 +1236,11 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
|
||||
|
||||
impl_class = method->klass;
|
||||
if (MONO_TYPE_IS_REFERENCE (&impl_class->byval_arg))
|
||||
return GUINT_TO_POINTER (1);
|
||||
return GUINT_TO_POINTER (MONO_GSHAREDVT_BOX_TYPE_REF);
|
||||
else if (mono_class_is_nullable (impl_class))
|
||||
return GUINT_TO_POINTER (2);
|
||||
return GUINT_TO_POINTER (MONO_GSHAREDVT_BOX_TYPE_NULLABLE);
|
||||
else
|
||||
return GUINT_TO_POINTER (0);
|
||||
return GUINT_TO_POINTER (MONO_GSHAREDVT_BOX_TYPE_VTYPE);
|
||||
}
|
||||
#ifndef DISABLE_REMOTING
|
||||
case MONO_RGCTX_INFO_REMOTING_INVOKE_WITH_CHECK:
|
||||
@ -1253,10 +1253,11 @@ instantiate_info (MonoDomain *domain, MonoRuntimeGenericContextInfoTemplate *oti
|
||||
case MONO_RGCTX_INFO_FIELD_OFFSET: {
|
||||
MonoClassField *field = data;
|
||||
|
||||
/* The value is offset by 1 */
|
||||
if (field->parent->valuetype && !(field->type->attrs & FIELD_ATTRIBUTE_STATIC))
|
||||
return GUINT_TO_POINTER (field->offset - sizeof (MonoObject));
|
||||
return GUINT_TO_POINTER (field->offset - sizeof (MonoObject) + 1);
|
||||
else
|
||||
return GUINT_TO_POINTER (field->offset);
|
||||
return GUINT_TO_POINTER (field->offset + 1);
|
||||
}
|
||||
case MONO_RGCTX_INFO_METHOD_RGCTX: {
|
||||
MonoMethodInflated *method = data;
|
||||
@ -1851,6 +1852,7 @@ fill_runtime_generic_context (MonoVTable *class_vtable, MonoRuntimeGenericContex
|
||||
method_inst ? method_inst->type_argc : 0, slot, TRUE, TRUE, &do_free);
|
||||
/* This might take the loader lock */
|
||||
info = instantiate_info (domain, &oti, &context, class);
|
||||
g_assert (info);
|
||||
|
||||
/*
|
||||
if (method_inst)
|
||||
|
@ -1 +1 @@
|
||||
b4605733bb4bb4fa16d13db526cb439680307bba
|
||||
4330a1ccf556813c171c55ef21cca201c69085f5
|
@ -1 +1 @@
|
||||
7c01d8b67d92f0bebbdeff1c929e982a99b7d3bb
|
||||
7997875cd2e2752bedaea6fda2516a670c2662b3
|
@ -55,4 +55,5 @@ PATCH_INFO(LDSTR_LIT, "ldstr_lit")
|
||||
PATCH_INFO(GC_NURSERY_START, "gc_nursery_start")
|
||||
PATCH_INFO(VIRT_METHOD, "virt_method")
|
||||
PATCH_INFO(GC_SAFE_POINT_FLAG, "gc_safe_point_flag")
|
||||
PATCH_INFO(GC_NURSERY_BITS, "gc_nursery_bits")
|
||||
PATCH_INFO(NONE, "none")
|
||||
|
@ -1 +1 @@
|
||||
#define FULL_VERSION "Stable 4.2.1.91/8862921"
|
||||
#define FULL_VERSION "Stable 4.2.2.30/996df3c"
|
||||
|
@ -19,7 +19,7 @@ if HAVE_VTUNE
|
||||
vtune_lib = libmono-profiler-vtune.la
|
||||
endif
|
||||
|
||||
lib_LTLIBRARIES = libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la $(vtune_lib)
|
||||
lib_LTLIBRARIES = libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la libmono-profiler-log-static.la $(vtune_lib)
|
||||
|
||||
if PLATFORM_DARWIN
|
||||
libmono_profiler_log_la_LDFLAGS = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace
|
||||
@ -68,6 +68,14 @@ libmono_profiler_vtune_la_CFLAGS = $(VTUNE_CFLAGS)
|
||||
libmono_profiler_vtune_la_LIBADD = $(VTUNE_LIBS) $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
|
||||
endif
|
||||
|
||||
# The log profile uses eglib functions, so it needs to be linked against
|
||||
# libeglib in shared mode, but not in static mode, since that would
|
||||
# leads to duplicate symbols when it is linked into an app which
|
||||
# also uses eglib (e.g. the runtime). Automake doesn't support this
|
||||
# functionality, so create a separate static version of the library.
|
||||
libmono_profiler_log_static_la_SOURCES = proflog.c
|
||||
libmono_profiler_log_static_la_LDFLAGS = -static
|
||||
|
||||
mprof_report_SOURCES = decode.c
|
||||
mprof_report_LDADD = $(Z_LIBS) $(GLIB_LIBS) $(LIBICONV)
|
||||
|
||||
|
@ -160,6 +160,16 @@ libmono_profiler_iomap_la_OBJECTS = \
|
||||
$(am_libmono_profiler_iomap_la_OBJECTS)
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@am_libmono_profiler_iomap_la_rpath = -rpath \
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@ $(libdir)
|
||||
libmono_profiler_log_static_la_LIBADD =
|
||||
am_libmono_profiler_log_static_la_OBJECTS = proflog.lo
|
||||
libmono_profiler_log_static_la_OBJECTS = \
|
||||
$(am_libmono_profiler_log_static_la_OBJECTS)
|
||||
libmono_profiler_log_static_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
|
||||
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
|
||||
$(AM_CFLAGS) $(CFLAGS) \
|
||||
$(libmono_profiler_log_static_la_LDFLAGS) $(LDFLAGS) -o $@
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@am_libmono_profiler_log_static_la_rpath = -rpath \
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@ $(libdir)
|
||||
libmono_profiler_log_la_DEPENDENCIES = $(am__DEPENDENCIES_3) \
|
||||
$(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
|
||||
am_libmono_profiler_log_la_OBJECTS = proflog.lo
|
||||
@ -221,10 +231,12 @@ am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libmono_profiler_aot_la_SOURCES) \
|
||||
$(libmono_profiler_iomap_la_SOURCES) \
|
||||
$(libmono_profiler_log_static_la_SOURCES) \
|
||||
$(libmono_profiler_log_la_SOURCES) \
|
||||
$(libmono_profiler_vtune_la_SOURCES) $(mprof_report_SOURCES)
|
||||
DIST_SOURCES = $(libmono_profiler_aot_la_SOURCES) \
|
||||
$(libmono_profiler_iomap_la_SOURCES) \
|
||||
$(libmono_profiler_log_static_la_SOURCES) \
|
||||
$(libmono_profiler_log_la_SOURCES) \
|
||||
$(am__libmono_profiler_vtune_la_SOURCES_DIST) \
|
||||
$(mprof_report_SOURCES)
|
||||
@ -471,7 +483,7 @@ AM_CPPFLAGS = \
|
||||
$(GLIB_CFLAGS)
|
||||
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HAVE_VTUNE_TRUE@@HOST_WIN32_FALSE@vtune_lib = libmono-profiler-vtune.la
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@lib_LTLIBRARIES = libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la $(vtune_lib)
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@lib_LTLIBRARIES = libmono-profiler-aot.la libmono-profiler-iomap.la libmono-profiler-log.la libmono-profiler-log-static.la $(vtune_lib)
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@@PLATFORM_ANDROID_TRUE@libmono_profiler_log_la_LDFLAGS = -avoid-version
|
||||
@DISABLE_LIBRARIES_FALSE@@DISABLE_PROFILER_FALSE@@HOST_WIN32_FALSE@@PLATFORM_DARWIN_TRUE@libmono_profiler_log_la_LDFLAGS = -Wl,-undefined -Wl,suppress -Wl,-flat_namespace
|
||||
@DISABLE_EXECUTABLES_FALSE@@SHARED_MONO_FALSE@@SUPPORT_BOEHM_TRUE@LIBMONO = $(top_builddir)/mono/mini/$(LIBMONO_LA) $(static_libs)
|
||||
@ -496,6 +508,14 @@ libmono_profiler_log_la_LIBADD = $(LIBMONO) $(GLIB_LIBS) $(Z_LIBS)
|
||||
@HAVE_VTUNE_TRUE@libmono_profiler_vtune_la_SOURCES = mono-profiler-vtune.c
|
||||
@HAVE_VTUNE_TRUE@libmono_profiler_vtune_la_CFLAGS = $(VTUNE_CFLAGS)
|
||||
@HAVE_VTUNE_TRUE@libmono_profiler_vtune_la_LIBADD = $(VTUNE_LIBS) $(LIBMONO) $(GLIB_LIBS) $(LIBICONV)
|
||||
|
||||
# The log profile uses eglib functions, so it needs to be linked against
|
||||
# libeglib in shared mode, but not in static mode, since that would
|
||||
# leads to duplicate symbols when it is linked into an app which
|
||||
# also uses eglib (e.g. the runtime). Automake doesn't support this
|
||||
# functionality, so create a separate static version of the library.
|
||||
libmono_profiler_log_static_la_SOURCES = proflog.c
|
||||
libmono_profiler_log_static_la_LDFLAGS = -static
|
||||
mprof_report_SOURCES = decode.c
|
||||
mprof_report_LDADD = $(Z_LIBS) $(GLIB_LIBS) $(LIBICONV)
|
||||
PLOG_TESTS_SRC = test-alloc.cs test-busy.cs test-monitor.cs test-excleave.cs \
|
||||
@ -587,6 +607,9 @@ libmono-profiler-aot.la: $(libmono_profiler_aot_la_OBJECTS) $(libmono_profiler_a
|
||||
libmono-profiler-iomap.la: $(libmono_profiler_iomap_la_OBJECTS) $(libmono_profiler_iomap_la_DEPENDENCIES) $(EXTRA_libmono_profiler_iomap_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(LINK) $(am_libmono_profiler_iomap_la_rpath) $(libmono_profiler_iomap_la_OBJECTS) $(libmono_profiler_iomap_la_LIBADD) $(LIBS)
|
||||
|
||||
libmono-profiler-log-static.la: $(libmono_profiler_log_static_la_OBJECTS) $(libmono_profiler_log_static_la_DEPENDENCIES) $(EXTRA_libmono_profiler_log_static_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libmono_profiler_log_static_la_LINK) $(am_libmono_profiler_log_static_la_rpath) $(libmono_profiler_log_static_la_OBJECTS) $(libmono_profiler_log_static_la_LIBADD) $(LIBS)
|
||||
|
||||
libmono-profiler-log.la: $(libmono_profiler_log_la_OBJECTS) $(libmono_profiler_log_la_DEPENDENCIES) $(EXTRA_libmono_profiler_log_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(libmono_profiler_log_la_LINK) $(am_libmono_profiler_log_la_rpath) $(libmono_profiler_log_la_OBJECTS) $(libmono_profiler_log_la_LIBADD) $(LIBS)
|
||||
|
||||
|
@ -1 +1 @@
|
||||
dfcf6b34bb42b054c3aad0c16e51798401f02028
|
||||
d019b1cf2962cfa266f0b7e6f75396789273ef1c
|
@ -247,7 +247,7 @@ sgen_card_table_mark_range (mword address, mword size)
|
||||
SGEN_ASSERT (0, num_cards <= CARD_COUNT_IN_BYTES, "How did we get an object larger than the card table?");
|
||||
if (end > SGEN_CARDTABLE_END) {
|
||||
memset (start, 1, SGEN_CARDTABLE_END - start);
|
||||
memset (sgen_cardtable, 1, end - sgen_cardtable);
|
||||
memset (sgen_cardtable, 1, end - SGEN_CARDTABLE_END);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
@ -1 +1 @@
|
||||
21fd9dab9e70d3456026645e195f183d4ffb2739
|
||||
2fc21552caddc04ff91dd8a266149ea98d4f0dc0
|
@ -559,17 +559,14 @@ ms_alloc_block (int size_index, gboolean pinned, gboolean has_references)
|
||||
add_free_block (free_blocks, size_index, info);
|
||||
|
||||
/*
|
||||
* This is the only place where the `allocated_blocks` array can potentially grow.
|
||||
* We need to make sure concurrent sweep isn't running when that happens, so in that
|
||||
* specific case we just wait for sweep to finish.
|
||||
* Adding to the allocated_blocks array is racy with the removal of nulls when
|
||||
* sweeping. We wait for sweep to finish to avoid that.
|
||||
*
|
||||
* The memory barrier here and in `sweep_job_func()` are required because we need
|
||||
* `allocated_blocks` synchronized between this and the sweep thread.
|
||||
*/
|
||||
if (sgen_pointer_queue_will_grow (&allocated_blocks)) {
|
||||
major_finish_sweep_checking ();
|
||||
mono_memory_barrier ();
|
||||
}
|
||||
|
||||
sgen_pointer_queue_add (&allocated_blocks, BLOCK_TAG (info));
|
||||
|
||||
@ -746,8 +743,6 @@ major_alloc_degraded (GCVTable vtable, size_t size)
|
||||
{
|
||||
GCObject *obj;
|
||||
|
||||
major_finish_sweep_checking ();
|
||||
|
||||
obj = alloc_obj (vtable, size, FALSE, SGEN_VTABLE_HAS_REFERENCES (vtable));
|
||||
if (G_LIKELY (obj)) {
|
||||
HEAVY_STAT (++stat_objects_alloced_degraded);
|
||||
|
@ -182,6 +182,7 @@ BASE_TEST_CS_SRC= \
|
||||
delegate10.cs \
|
||||
delegate11.cs \
|
||||
delegate12.cs \
|
||||
delegate13.cs \
|
||||
remoting1.cs \
|
||||
remoting2.cs \
|
||||
remoting3.cs \
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user