diff --git a/Makefile.in b/Makefile.in index 9c57bec974..322c2eb5a6 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 \ diff --git a/configure.REMOVED.git-id b/configure.REMOVED.git-id index 087dddf6e9..d7ae48f794 100644 --- a/configure.REMOVED.git-id +++ b/configure.REMOVED.git-id @@ -1 +1 @@ -1895650fb1b5a365ada5bcdf3fef86a448da51d2 \ No newline at end of file +08afe9df2791baac02e8201b01cce1aca3beb124 \ No newline at end of file diff --git a/configure.ac.REMOVED.git-id b/configure.ac.REMOVED.git-id index 2af5adf10d..509df77bc6 100644 --- a/configure.ac.REMOVED.git-id +++ b/configure.ac.REMOVED.git-id @@ -1 +1 @@ -2317c4f2abf300ae9f452f4dbfd8b9d63c944e1c \ No newline at end of file +4fa615ca8fe030cfede44041b86cf5bfc38aceaf \ No newline at end of file diff --git a/debian/changelog b/debian/changelog index c37403a443..2482a41142 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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) 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) 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) 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) 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) 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" diff --git a/docs/deploy/mono-api-assembly.html b/docs/deploy/mono-api-assembly.html index 67b2e5f1ce..78d66f4f58 100644 --- a/docs/deploy/mono-api-assembly.html +++ b/docs/deploy/mono-api-assembly.html @@ -1,4 +1,4 @@ - + mono-api-assembly.html diff --git a/docs/deploy/mono-api-class.html b/docs/deploy/mono-api-class.html index 9b2765bfcd..8ae3defebf 100644 --- a/docs/deploy/mono-api-class.html +++ b/docs/deploy/mono-api-class.html @@ -1,4 +1,4 @@ - + mono-api-class.html diff --git a/docs/deploy/mono-api-codegen.html b/docs/deploy/mono-api-codegen.html index a370ad8c3d..ef2db8fafb 100644 --- a/docs/deploy/mono-api-codegen.html +++ b/docs/deploy/mono-api-codegen.html @@ -1,4 +1,4 @@ - + mono-api-codegen.html diff --git a/docs/deploy/mono-api-counters.html b/docs/deploy/mono-api-counters.html index d4503c8794..76706d2967 100644 --- a/docs/deploy/mono-api-counters.html +++ b/docs/deploy/mono-api-counters.html @@ -1,4 +1,4 @@ - + mono-api-counters.html diff --git a/docs/deploy/mono-api-debug.html b/docs/deploy/mono-api-debug.html index 7d8ef273c3..78b31a386d 100644 --- a/docs/deploy/mono-api-debug.html +++ b/docs/deploy/mono-api-debug.html @@ -1,4 +1,4 @@ - + mono-api-debug.html diff --git a/docs/deploy/mono-api-decimal.html b/docs/deploy/mono-api-decimal.html index ad041f21bf..52a9bdb862 100644 --- a/docs/deploy/mono-api-decimal.html +++ b/docs/deploy/mono-api-decimal.html @@ -1,4 +1,4 @@ - + mono-api-decimal.html diff --git a/docs/deploy/mono-api-domains.html b/docs/deploy/mono-api-domains.html index 9a2e7e2975..3966740020 100644 --- a/docs/deploy/mono-api-domains.html +++ b/docs/deploy/mono-api-domains.html @@ -1,4 +1,4 @@ - + mono-api-domains.html diff --git a/docs/deploy/mono-api-dynamic-codegen.html b/docs/deploy/mono-api-dynamic-codegen.html index 0f7d96a0ab..c25acd6b79 100644 --- a/docs/deploy/mono-api-dynamic-codegen.html +++ b/docs/deploy/mono-api-dynamic-codegen.html @@ -1,4 +1,4 @@ - + mono-api-dynamic-codegen.html diff --git a/docs/deploy/mono-api-embedding.html b/docs/deploy/mono-api-embedding.html index f863765602..1c4cef595d 100644 --- a/docs/deploy/mono-api-embedding.html +++ b/docs/deploy/mono-api-embedding.html @@ -1,4 +1,4 @@ - + mono-api-embedding.html diff --git a/docs/deploy/mono-api-exc.html b/docs/deploy/mono-api-exc.html index 9ae3ae1c5c..774a8a61d4 100644 --- a/docs/deploy/mono-api-exc.html +++ b/docs/deploy/mono-api-exc.html @@ -1,4 +1,4 @@ - + mono-api-exc.html diff --git a/docs/deploy/mono-api-gc.html b/docs/deploy/mono-api-gc.html index a3b2d8e44a..047b6cf092 100644 --- a/docs/deploy/mono-api-gc.html +++ b/docs/deploy/mono-api-gc.html @@ -1,4 +1,4 @@ - + mono-api-gc.html diff --git a/docs/deploy/mono-api-gchandle.html b/docs/deploy/mono-api-gchandle.html index 39c0edce08..84b9fc22dd 100644 --- a/docs/deploy/mono-api-gchandle.html +++ b/docs/deploy/mono-api-gchandle.html @@ -1,4 +1,4 @@ - + mono-api-gchandle.html diff --git a/docs/deploy/mono-api-image.html b/docs/deploy/mono-api-image.html index ec6ee1410c..cbb8f2dfa9 100644 --- a/docs/deploy/mono-api-image.html +++ b/docs/deploy/mono-api-image.html @@ -1,4 +1,4 @@ - + mono-api-image.html diff --git a/docs/deploy/mono-api-internal.html b/docs/deploy/mono-api-internal.html index 0ba9ccc20d..4bca456e6f 100644 --- a/docs/deploy/mono-api-internal.html +++ b/docs/deploy/mono-api-internal.html @@ -1,4 +1,4 @@ - + mono-api-internal.html diff --git a/docs/deploy/mono-api-jit.html b/docs/deploy/mono-api-jit.html index f8f86ac094..f358984bd6 100644 --- a/docs/deploy/mono-api-jit.html +++ b/docs/deploy/mono-api-jit.html @@ -1,4 +1,4 @@ - + mono-api-jit.html diff --git a/docs/deploy/mono-api-jitinternal.html b/docs/deploy/mono-api-jitinternal.html index 47806555cd..476c9d7f9f 100644 --- a/docs/deploy/mono-api-jitinternal.html +++ b/docs/deploy/mono-api-jitinternal.html @@ -1,4 +1,4 @@ - + mono-api-jitinternal.html diff --git a/docs/deploy/mono-api-marshal.html b/docs/deploy/mono-api-marshal.html index d22fe30190..22d1b8f898 100644 --- a/docs/deploy/mono-api-marshal.html +++ b/docs/deploy/mono-api-marshal.html @@ -1,4 +1,4 @@ - + mono-api-marshal.html diff --git a/docs/deploy/mono-api-metadata.html b/docs/deploy/mono-api-metadata.html index 82dee794c0..39d59d5d88 100644 --- a/docs/deploy/mono-api-metadata.html +++ b/docs/deploy/mono-api-metadata.html @@ -1,4 +1,4 @@ - + mono-api-metadata.html diff --git a/docs/deploy/mono-api-methods.html b/docs/deploy/mono-api-methods.html index 5b8845c470..d8abf6ee8d 100644 --- a/docs/deploy/mono-api-methods.html +++ b/docs/deploy/mono-api-methods.html @@ -1,4 +1,4 @@ - + mono-api-methods.html diff --git a/docs/deploy/mono-api-object.html b/docs/deploy/mono-api-object.html index 18cfa0aa3c..42dd693fb8 100644 --- a/docs/deploy/mono-api-object.html +++ b/docs/deploy/mono-api-object.html @@ -1,4 +1,4 @@ - + mono-api-object.html diff --git a/docs/deploy/mono-api-profiler.html b/docs/deploy/mono-api-profiler.html index cee44a4860..c0b89c9601 100644 --- a/docs/deploy/mono-api-profiler.html +++ b/docs/deploy/mono-api-profiler.html @@ -1,4 +1,4 @@ - + mono-api-profiler.html diff --git a/docs/deploy/mono-api-reflection.html b/docs/deploy/mono-api-reflection.html index 5157e3afcf..775871a1bb 100644 --- a/docs/deploy/mono-api-reflection.html +++ b/docs/deploy/mono-api-reflection.html @@ -1,4 +1,4 @@ - + mono-api-reflection.html diff --git a/docs/deploy/mono-api-security.html b/docs/deploy/mono-api-security.html index 2950ab0776..9643964250 100644 --- a/docs/deploy/mono-api-security.html +++ b/docs/deploy/mono-api-security.html @@ -1,4 +1,4 @@ - + mono-api-security.html diff --git a/docs/deploy/mono-api-string.html b/docs/deploy/mono-api-string.html index fb15a25b59..54b012b1df 100644 --- a/docs/deploy/mono-api-string.html +++ b/docs/deploy/mono-api-string.html @@ -1,4 +1,4 @@ - + mono-api-string.html diff --git a/docs/deploy/mono-api-threads.html b/docs/deploy/mono-api-threads.html index da56a77260..96fa796ab2 100644 --- a/docs/deploy/mono-api-threads.html +++ b/docs/deploy/mono-api-threads.html @@ -1,4 +1,4 @@ - + mono-api-threads.html diff --git a/docs/deploy/mono-api-type.html b/docs/deploy/mono-api-type.html index de58ff44f4..4364e7d2d6 100644 --- a/docs/deploy/mono-api-type.html +++ b/docs/deploy/mono-api-type.html @@ -1,4 +1,4 @@ - + mono-api-type.html diff --git a/docs/deploy/mono-api-types.html b/docs/deploy/mono-api-types.html index 73e998b92e..0774670f96 100644 --- a/docs/deploy/mono-api-types.html +++ b/docs/deploy/mono-api-types.html @@ -1,4 +1,4 @@ - + mono-api-types.html diff --git a/docs/deploy/mono-api-unsorted.html b/docs/deploy/mono-api-unsorted.html index c8435d1e07..cbf46050b6 100644 --- a/docs/deploy/mono-api-unsorted.html +++ b/docs/deploy/mono-api-unsorted.html @@ -1,4 +1,4 @@ - + mono-api-unsorted.html diff --git a/docs/deploy/mono-api-utils.html b/docs/deploy/mono-api-utils.html index f374b70d39..c0f236e038 100644 --- a/docs/deploy/mono-api-utils.html +++ b/docs/deploy/mono-api-utils.html @@ -1,4 +1,4 @@ - + mono-api-utils.html diff --git a/docs/deploy/mono-api-vm.html b/docs/deploy/mono-api-vm.html index 81854ff22e..d1dc657898 100644 --- a/docs/deploy/mono-api-vm.html +++ b/docs/deploy/mono-api-vm.html @@ -1,4 +1,4 @@ - + mono-api-vm.html diff --git a/docs/deploy/mono-api-wapi.html b/docs/deploy/mono-api-wapi.html index 9b314de916..778f9f9731 100644 --- a/docs/deploy/mono-api-wapi.html +++ b/docs/deploy/mono-api-wapi.html @@ -1,4 +1,4 @@ - + mono-api-wapi.html diff --git a/external/referencesource/mscorlib/system/globalization/datetimeparse.cs.REMOVED.git-id b/external/referencesource/mscorlib/system/globalization/datetimeparse.cs.REMOVED.git-id index 737703de67..744e5612e0 100644 --- a/external/referencesource/mscorlib/system/globalization/datetimeparse.cs.REMOVED.git-id +++ b/external/referencesource/mscorlib/system/globalization/datetimeparse.cs.REMOVED.git-id @@ -1 +1 @@ -530bd396504a300e1f44e8bb369913299172f01f \ No newline at end of file +3db9a4bafdb7398647430f25ef9f145d369259ca \ No newline at end of file diff --git a/man/mono.1 b/man/mono.1 index 2a9347fca0..f11f7ea3ff 100644 --- a/man/mono.1 +++ b/man/mono.1 @@ -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 diff --git a/mcs/build/common/Consts.cs b/mcs/build/common/Consts.cs index 93f00f19d9..60a4ecdf3a 100644 --- a/mcs/build/common/Consts.cs +++ b/mcs/build/common/Consts.cs @@ -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"; diff --git a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs index 4e96356684..c7ef1c7c11 100644 --- a/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs +++ b/mcs/class/System.Core/Test/System.Linq.Expressions/ExpressionTest_Call.cs @@ -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> (expr).Compile (); diff --git a/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs index 1b7d3e867c..1f3f02efb5 100644 --- a/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs +++ b/mcs/class/System.Data/System.Data.SqlClient/SqlDataReader.cs @@ -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 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); - } catch (TdsInternalException ex) { - command.Connection.Close (); - throw SqlException.FromTdsInternalException ((TdsInternalException) ex); + 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 { + 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; } diff --git a/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatReaderGenerator_static.cs b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatReaderGenerator_static.cs index 8b81beca39..e22f68af42 100644 --- a/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatReaderGenerator_static.cs +++ b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatReaderGenerator_static.cs @@ -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) diff --git a/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs index 00e39ab6b6..fdbcc77c5b 100644 --- a/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs +++ b/mcs/class/System.Runtime.Serialization/ReferenceSources/XmlFormatWriterGenerator_static.cs @@ -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 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 memberValue, ref Type memberType, out bool isNull)// Leaves !HasValue on stack { object v = memberValue (); diff --git a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization_test.dll.sources b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization_test.dll.sources index 448ad85b32..66f577c33a 100644 --- a/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization_test.dll.sources +++ b/mcs/class/System.Runtime.Serialization/System.Runtime.Serialization_test.dll.sources @@ -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 diff --git a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/Bug36100.cs.REMOVED.git-id b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/Bug36100.cs.REMOVED.git-id new file mode 100644 index 0000000000..ae2a5226fb --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/Bug36100.cs.REMOVED.git-id @@ -0,0 +1 @@ +0eb5fd5cac80a730d30a79b0d0fbf4155fb5ddf1 \ No newline at end of file diff --git a/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/DataContractSerializerTest_ISerializable.cs b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/DataContractSerializerTest_ISerializable.cs new file mode 100644 index 0000000000..59ff632c42 --- /dev/null +++ b/mcs/class/System.Runtime.Serialization/Test/System.Runtime.Serialization/DataContractSerializerTest_ISerializable.cs @@ -0,0 +1,114 @@ +// +// DataContractSerializerTest_ISerializable.cs +// +// Author: +// Aaron Bockover +// +// 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; + } + } + } +} diff --git a/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform_Mobile.cs b/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform_Mobile.cs index 808fa1ace2..94dcc0285b 100644 --- a/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform_Mobile.cs +++ b/mcs/class/System.XML/System.Xml.Xsl/XslCompiledTransform_Mobile.cs @@ -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) diff --git a/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs b/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs index aa333328d9..3ed7fc3a06 100644 --- a/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs +++ b/mcs/class/System.XML/Test/System.Xml.Xsl/XslCompiledTransformTests.cs @@ -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 (@""); + XmlDocument st = new XmlDocument (); + st.LoadXml (@" + + + + + + + + +"); + XslCompiledTransform xsl = new XslCompiledTransform (); + xsl.Load (st); + + XsltArgumentList args = new XsltArgumentList (); + + MemoryStream mstr = new MemoryStream (); + xsl.Transform (doc, args, mstr); + } } } diff --git a/mcs/class/System/System.IO/KeventWatcher.cs b/mcs/class/System/System.IO/KeventWatcher.cs index 27f61b35d0..06bb07d516 100644 --- a/mcs/class/System/System.IO/KeventWatcher.cs +++ b/mcs/class/System/System.IO/KeventWatcher.cs @@ -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; diff --git a/mcs/class/corlib/ReferenceSources/DefaultBinder.cs b/mcs/class/corlib/ReferenceSources/DefaultBinder.cs index 9f2a2d6808..074e754b95 100644 --- a/mcs/class/corlib/ReferenceSources/DefaultBinder.cs +++ b/mcs/class/corlib/ReferenceSources/DefaultBinder.cs @@ -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: @@ -146,4 +149,4 @@ namespace System return st == type || CanConvertPrimitive ((RuntimeType) st, type); } } -} \ No newline at end of file +} diff --git a/mcs/class/corlib/System.Diagnostics/StackTrace.cs b/mcs/class/corlib/System.Diagnostics/StackTrace.cs index e66221766c..4b90b6fe8a 100644 --- a/mcs/class/corlib/System.Diagnostics/StackTrace.cs +++ b/mcs/class/corlib/System.Diagnostics/StackTrace.cs @@ -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 (""); - if (isException) { - printOffset = true; - indentation = " "; - debugInfo = Locale.GetText (" in {0}:{1} "); - } else { - printOffset = false; - indentation = " "; - debugInfo = Locale.GetText (" in {0}:line {1}"); - } + indentation = " "; + debugInfo = Locale.GetText (" in {0}:{1} "); var newline = String.Format ("{0}{1}{2} ", Environment.NewLine, indentation, Locale.GetText ("at")); @@ -201,21 +194,17 @@ 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) - sb.AppendFormat (" {0}", frame.GetMethodIndex ()); - } else { - sb.AppendFormat (" [0x{0:x5}]", frame.GetILOffset ()); - } + if (frame.GetILOffset () == -1) { + sb.AppendFormat (" <0x{0:x5} + 0x{1:x5}>", frame.GetMethodAddress (), frame.GetNativeOffset ()); + if (frame.GetMethodIndex () != 0xffffff) + sb.AppendFormat (" {0}", frame.GetMethodIndex ()); + } else { + sb.AppendFormat (" [0x{0:x5}]", frame.GetILOffset ()); } sb.AppendFormat (debugInfo, frame.GetSecureFileName (), @@ -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); diff --git a/mcs/class/corlib/System/Delegate.cs b/mcs/class/corlib/System/Delegate.cs index 91eecdccb9..3f65556559 100644 --- a/mcs/class/corlib/System/Delegate.cs +++ b/mcs/class/corlib/System/Delegate.cs @@ -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 diff --git a/mcs/class/corlib/System/MulticastDelegate.cs b/mcs/class/corlib/System/MulticastDelegate.cs index 4941e7cea5..4d7c91c10c 100644 --- a/mcs/class/corlib/System/MulticastDelegate.cs +++ b/mcs/class/corlib/System/MulticastDelegate.cs @@ -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 (); + } + // // 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 other_delegates = new List (); - 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; } diff --git a/mcs/class/corlib/System/TimeZoneInfo.cs b/mcs/class/corlib/System/TimeZoneInfo.cs index faf61add03..23e37302a7 100644 --- a/mcs/class/corlib/System/TimeZoneInfo.cs +++ b/mcs/class/corlib/System/TimeZoneInfo.cs @@ -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 (); diff --git a/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs index 3f1d295042..09bf5075af 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadPoolTest.cs @@ -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 (); + } } } \ No newline at end of file diff --git a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs index 9bfc1c131e..01790cd0df 100644 --- a/mcs/class/corlib/Test/System.Threading/ThreadTest.cs +++ b/mcs/class/corlib/Test/System.Threading/ThreadTest.cs @@ -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; diff --git a/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs b/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs index 283e535fb2..aac510a545 100644 --- a/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs +++ b/mcs/class/corlib/Test/System/TimeZoneInfoTest.cs @@ -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); + } + } } } diff --git a/mcs/class/corlib/Test/System/TypeTest.cs.REMOVED.git-id b/mcs/class/corlib/Test/System/TypeTest.cs.REMOVED.git-id index 3d81b03ccd..2ac61bc2e2 100644 --- a/mcs/class/corlib/Test/System/TypeTest.cs.REMOVED.git-id +++ b/mcs/class/corlib/Test/System/TypeTest.cs.REMOVED.git-id @@ -1 +1 @@ -9f87bcd74d19a29f1b4e41b2d7171f2c1af2835c \ No newline at end of file +bc4d15d32cfe0aba953847153e27ae46f18e35c1 \ No newline at end of file diff --git a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id index 7ed51a40d9..77c9b73997 100644 --- a/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/Mono.Security.dll.REMOVED.git-id @@ -1 +1 @@ -7709d423804e0b435e60e7ca74f198f20d02a535 \ No newline at end of file +f5ed7ffb57a89c75be4f5425ed6528e483d57c58 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id index f949802d23..2e274d4b68 100644 --- a/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Configuration.dll.REMOVED.git-id @@ -1 +1 @@ -ce9eb809ba177cb9c5f9387d1e2d93f17a583be9 \ No newline at end of file +c616ade82d96a5ab15cd8b504e39483514b5241f \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id index 1edbf5a992..62dd46cbc0 100644 --- a/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Core.dll.REMOVED.git-id @@ -1 +1 @@ -dda3cb77811a304fcb8a8c77455268e06b7080b9 \ No newline at end of file +eb04980221098f6aa3334c22a67378b0ce957313 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id index 90395249bc..b779ac7233 100644 --- a/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Security.dll.REMOVED.git-id @@ -1 +1 @@ -d5cb6b4dd17539ae3babb95e036964746d5bb92e \ No newline at end of file +a26a40db174c277495cd693dd648bf93d31fe4b9 \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id index 81e49e8800..9b4c2f5683 100644 --- a/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.Xml.dll.REMOVED.git-id @@ -1 +1 @@ -1dcbcac9b7a00d7ca093ca63316c407012521308 \ No newline at end of file +40b0f0738e2b385449a465b42d82765036b79bfa \ No newline at end of file diff --git a/mcs/class/lib/monolite/System.dll.REMOVED.git-id b/mcs/class/lib/monolite/System.dll.REMOVED.git-id index cc65f95110..b5a0aca67a 100644 --- a/mcs/class/lib/monolite/System.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/System.dll.REMOVED.git-id @@ -1 +1 @@ -c49c24eeb8abb839f5be49574e83c8ad4caaa8e3 \ No newline at end of file +6da2d6871aa2124113966387284988a7780338c7 \ No newline at end of file diff --git a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id index d1a0c62c77..3a0aa8e06d 100644 --- a/mcs/class/lib/monolite/basic.exe.REMOVED.git-id +++ b/mcs/class/lib/monolite/basic.exe.REMOVED.git-id @@ -1 +1 @@ -d6ee7490dcb9342db71705f7f6b807f6a85a6cf0 \ No newline at end of file +0e0947d4aadbc750a8cbde64d1bcf6890ee7fc21 \ No newline at end of file diff --git a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id index 6351f0df04..a6a2acdd1c 100644 --- a/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id +++ b/mcs/class/lib/monolite/mscorlib.dll.REMOVED.git-id @@ -1 +1 @@ -37a62e86a907ce0337c9690758f816e78370f82f \ No newline at end of file +d9648374bf2a844012af4ca23c7e43c89f81a16e \ No newline at end of file diff --git a/mcs/mcs/expression.cs.REMOVED.git-id b/mcs/mcs/expression.cs.REMOVED.git-id index e2a5eaea34..e458e2fe6b 100644 --- a/mcs/mcs/expression.cs.REMOVED.git-id +++ b/mcs/mcs/expression.cs.REMOVED.git-id @@ -1 +1 @@ -f815830cd5626bb85f053420b1d6fcf19e0aeb2a \ No newline at end of file +3c2d3fbe2cac6adc7835cf53aa766fffd4381e86 \ No newline at end of file diff --git a/mcs/tests/test-null-operator-20.cs b/mcs/tests/test-null-operator-20.cs new file mode 100644 index 0000000000..d22f9624a0 --- /dev/null +++ b/mcs/tests/test-null-operator-20.cs @@ -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 (); + } +} diff --git a/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id b/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id index fbb1b18ba7..dfc18e7ac6 100644 --- a/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id +++ b/mcs/tests/ver-il-net_4_5.xml.REMOVED.git-id @@ -1 +1 @@ -08b0ee8ce9da391ffa51e1cc3eb0a3611adf5b5e \ No newline at end of file +7e6d08d8664395f0f877e388bd40276cefe0c2e9 \ No newline at end of file diff --git a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs index c9b66af44a..e1d5b2ed79 100644 --- a/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs +++ b/mcs/tools/linker/Mono.Linker.Steps/MarkStep.cs @@ -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 diff --git a/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs b/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs index a0fe3934ca..6a797c16e4 100644 --- a/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs +++ b/mcs/tools/linker/Mono.Linker.Steps/ResolveFromXmlStep.cs @@ -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); } } diff --git a/mono/cil/opcode.def b/mono/cil/opcode.def index 037b5ef83f..96f53eb9ee 100644 --- a/mono/cil/opcode.def +++ b/mono/cil/opcode.def @@ -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) diff --git a/mono/metadata/domain.c b/mono/metadata/domain.c index ee72b62e06..3bd64cf5ac 100755 --- a/mono/metadata/domain.c +++ b/mono/metadata/domain.c @@ -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} } }, }; diff --git a/mono/metadata/marshal.c.REMOVED.git-id b/mono/metadata/marshal.c.REMOVED.git-id index 44260c5ee8..ef7abdef09 100644 --- a/mono/metadata/marshal.c.REMOVED.git-id +++ b/mono/metadata/marshal.c.REMOVED.git-id @@ -1 +1 @@ -9292a1f14d206875dd19b3483d61333eedaa2207 \ No newline at end of file +f49032b6fbcf3c932ab7f6c10276180a7a5cf6cd \ No newline at end of file diff --git a/mono/metadata/sgen-mono.c b/mono/metadata/sgen-mono.c index b836a839b9..b30d50024d 100644 --- a/mono/metadata/sgen-mono.c +++ b/mono/metadata/sgen-mono.c @@ -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) { diff --git a/mono/metadata/threadpool-ms.c b/mono/metadata/threadpool-ms.c index 674340557a..4e1138013d 100644 --- a/mono/metadata/threadpool-ms.c +++ b/mono/metadata/threadpool-ms.c @@ -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,8 +876,18 @@ monitor_thread (void) if (all_waitsleepjoin) { ThreadPoolCounter counter; - COUNTER_ATOMIC (counter, { counter._.max_working ++; }); - hill_climbing_force_change (counter._.max_working, TRANSITION_STARVATION); + 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); } threadpool->cpu_usage = mono_cpu_usage (threadpool->cpu_usage_state); @@ -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; } diff --git a/mono/metadata/threads.c.REMOVED.git-id b/mono/metadata/threads.c.REMOVED.git-id index 230c7f529e..517c22c44e 100644 --- a/mono/metadata/threads.c.REMOVED.git-id +++ b/mono/metadata/threads.c.REMOVED.git-id @@ -1 +1 @@ -4b6a091a05719bcaeae9c139036b3b64e47d3685 \ No newline at end of file +6a8f7210854722081b142d053b3a793f67637e5e \ No newline at end of file diff --git a/mono/metadata/verify.c.REMOVED.git-id b/mono/metadata/verify.c.REMOVED.git-id index dda5b34450..131b0d2ed5 100644 --- a/mono/metadata/verify.c.REMOVED.git-id +++ b/mono/metadata/verify.c.REMOVED.git-id @@ -1 +1 @@ -68fe0688774e03bdf70e4f80f566f1e98cc3abf8 \ No newline at end of file +43a938d0fc4a0e09757c04938cbbb2ba5b269639 \ No newline at end of file diff --git a/mono/mini/Makefile.am b/mono/mini/Makefile.am index 377586fb40..f2e5ac94f0 100644 --- a/mono/mini/Makefile.am +++ b/mono/mini/Makefile.am @@ -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: diff --git a/mono/mini/Makefile.am.in b/mono/mini/Makefile.am.in index 377586fb40..f2e5ac94f0 100755 --- a/mono/mini/Makefile.am.in +++ b/mono/mini/Makefile.am.in @@ -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: diff --git a/mono/mini/Makefile.in.REMOVED.git-id b/mono/mini/Makefile.in.REMOVED.git-id index 7731a45fd5..9cc31de1d3 100644 --- a/mono/mini/Makefile.in.REMOVED.git-id +++ b/mono/mini/Makefile.in.REMOVED.git-id @@ -1 +1 @@ -cc5a13de3ef26e6c31e86204057f98f071d1db3b \ No newline at end of file +aa98c3527a7389d3b5b9ebf236b36e0d2034d7d8 \ No newline at end of file diff --git a/mono/mini/aot-compiler.c.REMOVED.git-id b/mono/mini/aot-compiler.c.REMOVED.git-id index f8ac012e8c..4a931bb1b6 100644 --- a/mono/mini/aot-compiler.c.REMOVED.git-id +++ b/mono/mini/aot-compiler.c.REMOVED.git-id @@ -1 +1 @@ -f90e82ac07050949995cbc363bae19c32c00b64c \ No newline at end of file +46c962d8d258bbbc41ba0eb536a665e655c91493 \ No newline at end of file diff --git a/mono/mini/aot-runtime.c.REMOVED.git-id b/mono/mini/aot-runtime.c.REMOVED.git-id index a5545e6180..6bd6290532 100644 --- a/mono/mini/aot-runtime.c.REMOVED.git-id +++ b/mono/mini/aot-runtime.c.REMOVED.git-id @@ -1 +1 @@ -8d2f08962c13e0e01c89cb1f9fd8d9c9fadc43d3 \ No newline at end of file +b7a04e595ac8e42f5912b4c52b21919472ebea6e \ No newline at end of file diff --git a/mono/mini/aot-tests.cs b/mono/mini/aot-tests.cs index 98bd905faf..73b72e023c 100644 --- a/mono/mini/aot-tests.cs +++ b/mono/mini/aot-tests.cs @@ -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? 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 (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; + } } diff --git a/mono/mini/driver.c b/mono/mini/driver.c index 884d4a82ae..0cc353cfca 100644 --- a/mono/mini/driver.c +++ b/mono/mini/driver.c @@ -58,6 +58,9 @@ #include #include "version.h" #include "debugger-agent.h" +#if TARGET_OSX +# include +#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); diff --git a/mono/mini/gshared.cs b/mono/mini/gshared.cs index f5ee9bbbf6..944f90dff7 100644 --- a/mono/mini/gshared.cs +++ b/mono/mini/gshared.cs @@ -1718,6 +1718,33 @@ public class Tests return 2; return 0; } + + public interface IFaceTest { + int iface_method (); + } + + public interface IFaceConstrainedIFace { + int foo (ref T val) where T: IFaceTest; + } + + class ConstrainedIFace : IFaceConstrainedIFace { + public int foo (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 (ref t); + } } // #13191 diff --git a/mono/mini/jit-icalls.c b/mono/mini/jit-icalls.c index 03f519a041..b4e550e38e 100644 --- a/mono/mini/jit-icalls.c +++ b/mono/mini/jit-icalls.c @@ -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. diff --git a/mono/mini/method-to-ir.c.REMOVED.git-id b/mono/mini/method-to-ir.c.REMOVED.git-id index 7e73664149..844942f47f 100644 --- a/mono/mini/method-to-ir.c.REMOVED.git-id +++ b/mono/mini/method-to-ir.c.REMOVED.git-id @@ -1 +1 @@ -cb63252e0018b9aefb43fe181130006eafb121b8 \ No newline at end of file +83cb83354cc749cc41c0999b8e401a52ac1c9b01 \ No newline at end of file diff --git a/mono/mini/mini-amd64.c.REMOVED.git-id b/mono/mini/mini-amd64.c.REMOVED.git-id index 137837d18b..77e6de2d4f 100644 --- a/mono/mini/mini-amd64.c.REMOVED.git-id +++ b/mono/mini/mini-amd64.c.REMOVED.git-id @@ -1 +1 @@ -bf88f17bace11357a53f5ac7a00bdefc6a4588ee \ No newline at end of file +f71435042be76f9c1351b68ab479e824c9cd68f3 \ No newline at end of file diff --git a/mono/mini/mini-generic-sharing.c b/mono/mini/mini-generic-sharing.c index 1f737ffe0d..d9b3800d63 100644 --- a/mono/mini/mini-generic-sharing.c +++ b/mono/mini/mini-generic-sharing.c @@ -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) diff --git a/mono/mini/mini-runtime.c.REMOVED.git-id b/mono/mini/mini-runtime.c.REMOVED.git-id index 7321da7dda..edb1e7eb94 100644 --- a/mono/mini/mini-runtime.c.REMOVED.git-id +++ b/mono/mini/mini-runtime.c.REMOVED.git-id @@ -1 +1 @@ -b4605733bb4bb4fa16d13db526cb439680307bba \ No newline at end of file +4330a1ccf556813c171c55ef21cca201c69085f5 \ No newline at end of file diff --git a/mono/mini/mini.h.REMOVED.git-id b/mono/mini/mini.h.REMOVED.git-id index fd294052b3..e050b783ee 100644 --- a/mono/mini/mini.h.REMOVED.git-id +++ b/mono/mini/mini.h.REMOVED.git-id @@ -1 +1 @@ -7c01d8b67d92f0bebbdeff1c929e982a99b7d3bb \ No newline at end of file +7997875cd2e2752bedaea6fda2516a670c2662b3 \ No newline at end of file diff --git a/mono/mini/patch-info.h b/mono/mini/patch-info.h index 165984f23a..e2c57aefa5 100644 --- a/mono/mini/patch-info.h +++ b/mono/mini/patch-info.h @@ -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") diff --git a/mono/mini/version.h b/mono/mini/version.h index 70e6443e9e..a0b6200313 100644 --- a/mono/mini/version.h +++ b/mono/mini/version.h @@ -1 +1 @@ -#define FULL_VERSION "Stable 4.2.1.91/8862921" +#define FULL_VERSION "Stable 4.2.2.30/996df3c" diff --git a/mono/profiler/Makefile.am b/mono/profiler/Makefile.am index 3e1961e996..97501856d3 100644 --- a/mono/profiler/Makefile.am +++ b/mono/profiler/Makefile.am @@ -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) diff --git a/mono/profiler/Makefile.in b/mono/profiler/Makefile.in index 3f60220528..6528f17c91 100644 --- a/mono/profiler/Makefile.in +++ b/mono/profiler/Makefile.in @@ -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) diff --git a/mono/profiler/proflog.c.REMOVED.git-id b/mono/profiler/proflog.c.REMOVED.git-id index 0c69b44965..5d9867f1f9 100644 --- a/mono/profiler/proflog.c.REMOVED.git-id +++ b/mono/profiler/proflog.c.REMOVED.git-id @@ -1 +1 @@ -dfcf6b34bb42b054c3aad0c16e51798401f02028 \ No newline at end of file +d019b1cf2962cfa266f0b7e6f75396789273ef1c \ No newline at end of file diff --git a/mono/sgen/sgen-cardtable.c b/mono/sgen/sgen-cardtable.c index fb18def266..21da2d0df8 100644 --- a/mono/sgen/sgen-cardtable.c +++ b/mono/sgen/sgen-cardtable.c @@ -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 diff --git a/mono/sgen/sgen-gc.c.REMOVED.git-id b/mono/sgen/sgen-gc.c.REMOVED.git-id index a7a6677a39..af68748de5 100644 --- a/mono/sgen/sgen-gc.c.REMOVED.git-id +++ b/mono/sgen/sgen-gc.c.REMOVED.git-id @@ -1 +1 @@ -21fd9dab9e70d3456026645e195f183d4ffb2739 \ No newline at end of file +2fc21552caddc04ff91dd8a266149ea98d4f0dc0 \ No newline at end of file diff --git a/mono/sgen/sgen-marksweep.c b/mono/sgen/sgen-marksweep.c index 0cd42f7a79..55f40aba76 100644 --- a/mono/sgen/sgen-marksweep.c +++ b/mono/sgen/sgen-marksweep.c @@ -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 (); - } + 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); diff --git a/mono/tests/Makefile.am b/mono/tests/Makefile.am index 23c9d1075d..3665b11d96 100644 --- a/mono/tests/Makefile.am +++ b/mono/tests/Makefile.am @@ -182,6 +182,7 @@ BASE_TEST_CS_SRC= \ delegate10.cs \ delegate11.cs \ delegate12.cs \ + delegate13.cs \ remoting1.cs \ remoting2.cs \ remoting3.cs \ diff --git a/mono/tests/Makefile.in b/mono/tests/Makefile.in index 20cc56a390..fd64a25ec0 100644 --- a/mono/tests/Makefile.in +++ b/mono/tests/Makefile.in @@ -601,6 +601,7 @@ BASE_TEST_CS_SRC = \ delegate10.cs \ delegate11.cs \ delegate12.cs \ + delegate13.cs \ remoting1.cs \ remoting2.cs \ remoting3.cs \ diff --git a/mono/tests/delegate13.cs b/mono/tests/delegate13.cs new file mode 100644 index 0000000000..3a4cfd02a0 --- /dev/null +++ b/mono/tests/delegate13.cs @@ -0,0 +1,31 @@ +using System; + +public static class Program +{ + public static int Main () + { + Action d1 = new Action (Method1); + Action d2 = new Action (Method2); + Action d12 = d1 + d2; + Action d21 = d2 + d1; + + if (d1.Method.Name != "Method1") + return 1; + if (d2.Method.Name != "Method2") + return 2; + if (d12.Method.Name != "Method2") + return 3; + if (d21.Method.Name != "Method1") + return 4; + + return 0; + } + + public static void Method1 () + { + } + + public static void Method2 () + { + } +} \ No newline at end of file diff --git a/mono/tests/delegate7.cs b/mono/tests/delegate7.cs index a89657a4ba..dd3a2a3ea2 100644 --- a/mono/tests/delegate7.cs +++ b/mono/tests/delegate7.cs @@ -16,6 +16,10 @@ class Tests { v += 4; Console.WriteLine ("Test.F4"); } + static void F8 () { + v += 8; + Console.WriteLine ("Test.F8"); + } public static int Main () { return TestDriver.RunTests (typeof (Tests)); @@ -33,6 +37,7 @@ class Tests { SimpleDelegate d1 = new SimpleDelegate (F1); SimpleDelegate d2 = new SimpleDelegate (F2); SimpleDelegate d4 = new SimpleDelegate (F4); + SimpleDelegate d8 = new SimpleDelegate (F8); if (d1 - d1 != null) return 1; @@ -82,21 +87,21 @@ class Tests { if (d12 - d12 != null) return 21; - if (!check_is_expected_v (d12 - d14, 2)) + if (!check_is_expected_v (d12 - d14, 3)) return 22; - if (!check_is_expected_v (d12 - d24, 1)) + if (!check_is_expected_v (d12 - d24, 3)) return 23; - if (!check_is_expected_v (d14 - d12, 4)) + if (!check_is_expected_v (d14 - d12, 5)) return 24; if (d14 - d14 != null) return 25; - if (!check_is_expected_v (d14 - d24, 1)) + if (!check_is_expected_v (d14 - d24, 5)) return 26; - if (!check_is_expected_v (d24 - d12, 4)) + if (!check_is_expected_v (d24 - d12, 6)) return 27; - if (!check_is_expected_v (d24 - d14, 2)) + if (!check_is_expected_v (d24 - d14, 6)) return 28; if (d24 - d24 != null) return 29; @@ -112,7 +117,7 @@ class Tests { if (!check_is_expected_v (d124 - d12, 4)) return 34; - if (!check_is_expected_v (d124 - d14, 2)) + if (!check_is_expected_v (d124 - d14, 7)) return 35; if (!check_is_expected_v (d124 - d24, 1)) return 36; @@ -120,6 +125,35 @@ class Tests { if (d124 - d124 != null) return 37; + SimpleDelegate d1248 = d1 + d2 + d4 + d8; + + if (!check_is_expected_v (d1248 - (d1 + d2), 12)) + return 41; + if (!check_is_expected_v (d1248 - (d1 + d4), 15)) + return 42; + if (!check_is_expected_v (d1248 - (d1 + d8), 15)) + return 43; + if (!check_is_expected_v (d1248 - (d2 + d4), 9)) + return 44; + if (!check_is_expected_v (d1248 - (d2 + d8), 15)) + return 45; + if (!check_is_expected_v (d1248 - (d4 + d8), 3)) + return 46; + + if (!check_is_expected_v (d1248 - (d1 + d2 + d4), 8)) + return 51; + if (!check_is_expected_v (d1248 - (d1 + d2 + d8), 15)) + return 52; + if (!check_is_expected_v (d1248 - (d1 + d4 + d8), 15)) + return 53; + if (!check_is_expected_v (d1248 - (d2 + d4 + d8), 1)) + return 54; + if (!check_is_expected_v (d1248 - (d2 + d4 + d8), 1)) + return 54; + + if (d1248 - d1248 != null) + return 55; + return 0; } diff --git a/mono/tests/libtest.c.REMOVED.git-id b/mono/tests/libtest.c.REMOVED.git-id index 8e52fbda67..595b59f130 100644 --- a/mono/tests/libtest.c.REMOVED.git-id +++ b/mono/tests/libtest.c.REMOVED.git-id @@ -1 +1 @@ -0154d608954f93d6ed2e6b6ee373f26cfa68c19d \ No newline at end of file +1c68c9031703e146bcdb2cfd2aeaf5de8a955704 \ No newline at end of file diff --git a/mono/tests/pinvoke3.cs b/mono/tests/pinvoke3.cs index ae64d16e09..4b9a4b7f49 100644 --- a/mono/tests/pinvoke3.cs +++ b/mono/tests/pinvoke3.cs @@ -188,6 +188,9 @@ public class Tests { [DllImport ("libtest", EntryPoint="mono_test_marshal_return_delegate_delegate")] public static extern int mono_test_marshal_return_delegate_delegate (ReturnDelegateDelegate d); + [DllImport ("libtest", EntryPoint="mono_test_marshal_delegate_ref_delegate")] + public static extern int mono_test_marshal_delegate_ref_delegate (DelegateByrefDelegate del); + public delegate int TestDelegate (int a, ref SimpleStruct ss, int b); public delegate SimpleStruct SimpleDelegate2 (SimpleStruct ss); @@ -210,6 +213,8 @@ public class Tests { public delegate return_int_delegate ReturnDelegateDelegate (); + public delegate int DelegateByrefDelegate (ref return_int_delegate del); + public static int Main () { return TestDriver.RunTests (typeof (Tests)); } @@ -333,6 +338,20 @@ public class Tests { return mono_test_marshal_return_delegate_delegate (new ReturnDelegateDelegate (return_delegate)); } + public static int return_plus_1 (int i) { + return i + 1; + } + + public static int ref_delegate_delegate (ref return_int_delegate del) { + del = return_plus_1; + return 0; + } + + public static int test_55_marshal_delegate_ref_delegate () { + var del = new DelegateByrefDelegate (ref_delegate_delegate); + return mono_test_marshal_delegate_ref_delegate (del); + } + /* Passing and returning strings */ public delegate String ReturnStringDelegate (String s); diff --git a/mono/utils/networking-posix.c b/mono/utils/networking-posix.c index 2fe8da9d9f..ad4a623eda 100644 --- a/mono/utils/networking-posix.c +++ b/mono/utils/networking-posix.c @@ -76,11 +76,6 @@ mono_get_address_info (const char *hostname, int port, int flags, MonoAddressInf while (res) { cur = g_new0 (MonoAddressEntry, 1); - if (prev) - prev->next = cur; - else - addr_info->entries = cur; - cur->family = res->ai_family; cur->socktype = res->ai_socktype; cur->protocol = res->ai_protocol; @@ -91,12 +86,20 @@ mono_get_address_info (const char *hostname, int port, int flags, MonoAddressInf cur->address_len = sizeof (struct in6_addr); cur->address.v6 = ((struct sockaddr_in6*)res->ai_addr)->sin6_addr; } else { - g_error ("Cannot handle address family %d", cur->family); + g_warning ("Cannot handle address family %d", cur->family); + res = res->ai_next; + g_free (cur); + continue; } if (res->ai_canonname) cur->canonical_name = g_strdup (res->ai_canonname); + if (prev) + prev->next = cur; + else + addr_info->entries = cur; + prev = cur; res = res->ai_next; } @@ -339,4 +342,4 @@ mono_networking_shutdown (void) { //nothing really } -#endif \ No newline at end of file +#endif diff --git a/msvc/libmonoruntime.vcxproj b/msvc/libmonoruntime.vcxproj index 84ed279abf..646ede9538 100644 --- a/msvc/libmonoruntime.vcxproj +++ b/msvc/libmonoruntime.vcxproj @@ -71,13 +71,11 @@ - - @@ -129,8 +127,6 @@ - - @@ -178,7 +174,6 @@ - @@ -187,7 +182,6 @@ - @@ -226,8 +220,6 @@ - - @@ -483,4 +475,4 @@ - + \ No newline at end of file diff --git a/msvc/libmonoutils.vcxproj b/msvc/libmonoutils.vcxproj index 52e3dc4bc4..035b2a632c 100644 --- a/msvc/libmonoutils.vcxproj +++ b/msvc/libmonoutils.vcxproj @@ -180,7 +180,7 @@ - + @@ -297,4 +297,4 @@ - \ No newline at end of file + diff --git a/msvc/mono.def b/msvc/mono.def index d98ead82b4..9efb26dfc6 100644 --- a/msvc/mono.def +++ b/msvc/mono.def @@ -472,8 +472,6 @@ mono_install_assembly_refonly_preload_hook mono_install_assembly_refonly_search_hook mono_install_assembly_search_hook mono_install_runtime_cleanup -mono_install_threadpool_item_hooks -mono_install_threadpool_thread_hooks mono_install_unhandled_exception_hook mono_invoke_unhandled_exception_hook mono_is_debugger_attached diff --git a/msvc/mono.sln b/msvc/mono.sln index d1114019bd..5b0424cb2b 100644 --- a/msvc/mono.sln +++ b/msvc/mono.sln @@ -51,12 +51,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profiler-logging", "profile {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profiler-cov", "profiler-cov.vcxproj", "{83D4D926-2983-4770-BA92-EB9CB8828C95}" - ProjectSection(ProjectDependencies) = postProject - {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} = {CB0D9E92-293C-439C-9AC7-C5F59B6E0771} - {158073ED-99AE-4196-9EDC-DDB2344F8466} = {158073ED-99AE-4196-9EDC-DDB2344F8466} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jay", "..\mcs\jay\jay.vcxproj", "{5D485D32-3B9F-4287-AB24-C8DA5B89F537}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "profiler-codeanalyst", "profiler-codeanalyst.vcxproj", "{8FEF7F9E-F5F3-470E-91F4-404B7D6BC1BB}" @@ -273,21 +267,6 @@ Global {86663B87-4CD2-42B6-8D8E-C79DA1CCDEE6}.Release_SGen|x64.ActiveCfg = Release|x64 {86663B87-4CD2-42B6-8D8E-C79DA1CCDEE6}.Release|Win32.ActiveCfg = Release|Win32 {86663B87-4CD2-42B6-8D8E-C79DA1CCDEE6}.Release|x64.ActiveCfg = Release|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug_SGen|Win32.ActiveCfg = Debug|Win32 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug_SGen|x64.ActiveCfg = Debug|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug_SGen|x64.Build.0 = Debug|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|Win32.ActiveCfg = Debug|Win32 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|Win32.Build.0 = Debug|Win32 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|x64.ActiveCfg = Debug|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Debug|x64.Build.0 = Debug|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|Win32.ActiveCfg = Release|Win32 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|Win32.Build.0 = Release|Win32 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|x64.ActiveCfg = Release|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release_SGen|x64.Build.0 = Release|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|Win32.ActiveCfg = Release|Win32 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|Win32.Build.0 = Release|Win32 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|x64.ActiveCfg = Release|x64 - {83D4D926-2983-4770-BA92-EB9CB8828C95}.Release|x64.Build.0 = Release|x64 {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|Win32.ActiveCfg = Debug|Win32 {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|Win32.Build.0 = Debug|Win32 {5D485D32-3B9F-4287-AB24-C8DA5B89F537}.Debug_SGen|x64.ActiveCfg = Debug|Win32 @@ -371,7 +350,6 @@ Global {C36612BD-22D3-4B95-85E2-7FDC4FC5D739} = {0EBA83B7-0EB4-4C83-A900-77300A97E8B1} {80A0620A-3478-4E1A-AA7C-0D2387B892AB} = {ECA11C76-E192-4F67-A8FA-28B637D9716F} {5A435710-E6D2-4DD4-9B3F-A7239A32C6F4} = {ECA11C76-E192-4F67-A8FA-28B637D9716F} - {83D4D926-2983-4770-BA92-EB9CB8828C95} = {4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2} {8FEF7F9E-F5F3-470E-91F4-404B7D6BC1BB} = {4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2} {86663B87-4CD2-42B6-8D8E-C79DA1CCDEE6} = {4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2} {F51017F9-B7FB-4F87-B7B5-12799D965783} = {4CFD7702-60B2-4E82-BFAD-FCBB53EB4DA2} diff --git a/po/mcs/de.gmo b/po/mcs/de.gmo index a90e4471be..9064628972 100644 Binary files a/po/mcs/de.gmo and b/po/mcs/de.gmo differ diff --git a/po/mcs/de.po.REMOVED.git-id b/po/mcs/de.po.REMOVED.git-id index 5ebab1bf79..cd7e5143a1 100644 --- a/po/mcs/de.po.REMOVED.git-id +++ b/po/mcs/de.po.REMOVED.git-id @@ -1 +1 @@ -5e0bd609c38f27a1470489ce576b6e907fdb6889 \ No newline at end of file +64fe66bf682888601f3c233df80e30871f64d89c \ No newline at end of file diff --git a/po/mcs/es.gmo b/po/mcs/es.gmo index dccef9ea73..955b634639 100644 Binary files a/po/mcs/es.gmo and b/po/mcs/es.gmo differ diff --git a/po/mcs/es.po.REMOVED.git-id b/po/mcs/es.po.REMOVED.git-id index 854ae16190..38114f6d0b 100644 --- a/po/mcs/es.po.REMOVED.git-id +++ b/po/mcs/es.po.REMOVED.git-id @@ -1 +1 @@ -31df00aa8d2e7d75a24bd99be34a9ea50ac8bd27 \ No newline at end of file +de1b80f9e770927dcebccb15eac235e77a106f70 \ No newline at end of file diff --git a/po/mcs/ja.gmo b/po/mcs/ja.gmo index 1dad9049a5..e980bb9e42 100644 Binary files a/po/mcs/ja.gmo and b/po/mcs/ja.gmo differ diff --git a/po/mcs/ja.po.REMOVED.git-id b/po/mcs/ja.po.REMOVED.git-id index 51739c46d3..9276812a44 100644 --- a/po/mcs/ja.po.REMOVED.git-id +++ b/po/mcs/ja.po.REMOVED.git-id @@ -1 +1 @@ -c07f515acf23bce96687e1d3109cabfba01e06f5 \ No newline at end of file +1b2ba203449c5c1ec4689e5f3072d9026100fdb9 \ No newline at end of file diff --git a/po/mcs/mcs.pot b/po/mcs/mcs.pot index 854f8dad0c..7fb5208cd0 100644 --- a/po/mcs/mcs.pot +++ b/po/mcs/mcs.pot @@ -6,9 +6,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: mono 4.2.1\n" +"Project-Id-Version: mono 4.2.2\n" "Report-Msgid-Bugs-To: http://www.mono-project.com/Bugs\n" -"POT-Creation-Date: 2015-10-30 12:23-0400\n" +"POT-Creation-Date: 2016-01-21 16:05-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -1359,8 +1359,8 @@ msgstr "" msgid "Internal compiler error: {0}" msgstr "" -#: mcs/mcs/ecore.cs:581 mcs/mcs/expression.cs:1874 mcs/mcs/expression.cs:7940 -#: mcs/mcs/expression.cs:7948 +#: mcs/mcs/ecore.cs:581 mcs/mcs/expression.cs:1874 mcs/mcs/expression.cs:7943 +#: mcs/mcs/expression.cs:7951 msgid "A constant value is expected" msgstr "" @@ -1978,160 +1978,160 @@ msgstr "" msgid "Use of unassigned out parameter `{0}'" msgstr "" -#: mcs/mcs/expression.cs:7119 +#: mcs/mcs/expression.cs:7122 #, csharp-format msgid "Cannot invoke a non-delegate type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:7130 +#: mcs/mcs/expression.cs:7133 #, csharp-format msgid "The member `{0}' cannot be used as method or delegate" msgstr "" -#: mcs/mcs/expression.cs:7152 +#: mcs/mcs/expression.cs:7155 msgid "" "Do not directly call your base class Finalize method. It is called " "automatically from your destructor" msgstr "" -#: mcs/mcs/expression.cs:7154 +#: mcs/mcs/expression.cs:7157 msgid "" "Destructors and object.Finalize cannot be called directly. Consider calling " "IDisposable.Dispose if available" msgstr "" -#: mcs/mcs/expression.cs:7183 +#: mcs/mcs/expression.cs:7186 #, csharp-format msgid "" "The base call to method `{0}' cannot be dynamically dispatched. Consider " "casting the dynamic arguments or eliminating the base access" msgstr "" -#: mcs/mcs/expression.cs:7278 +#: mcs/mcs/expression.cs:7281 #, csharp-format msgid "`{0}': cannot explicitly call operator or accessor" msgstr "" -#: mcs/mcs/expression.cs:7468 +#: mcs/mcs/expression.cs:7471 #, csharp-format msgid "Unsafe type `{0}' cannot be used in an object creation expression" msgstr "" -#: mcs/mcs/expression.cs:7491 +#: mcs/mcs/expression.cs:7494 #, csharp-format msgid "" "Cannot create an instance of the variable type `{0}' because it does not " "have the new() constraint" msgstr "" -#: mcs/mcs/expression.cs:7497 +#: mcs/mcs/expression.cs:7500 #, csharp-format msgid "" "`{0}': cannot provide arguments when creating an instance of a variable type" msgstr "" -#: mcs/mcs/expression.cs:7506 +#: mcs/mcs/expression.cs:7509 #, csharp-format msgid "Cannot create an instance of the static class `{0}'" msgstr "" -#: mcs/mcs/expression.cs:7518 +#: mcs/mcs/expression.cs:7521 #, csharp-format msgid "Cannot create an instance of the abstract class or interface `{0}'" msgstr "" -#: mcs/mcs/expression.cs:7791 +#: mcs/mcs/expression.cs:7794 msgid "" "An implicitly typed local variable declarator cannot use an array initializer" msgstr "" -#: mcs/mcs/expression.cs:7954 mcs/mcs/expression.cs:7979 +#: mcs/mcs/expression.cs:7957 mcs/mcs/expression.cs:7982 #, csharp-format msgid "An array initializer of length `{0}' was expected" msgstr "" -#: mcs/mcs/expression.cs:7970 +#: mcs/mcs/expression.cs:7973 msgid "" "Array initializers can only be used in a variable or field initializer. Try " "using a new expression instead" msgstr "" -#: mcs/mcs/expression.cs:7987 +#: mcs/mcs/expression.cs:7990 msgid "A nested array initializer was expected" msgstr "" -#: mcs/mcs/expression.cs:8034 +#: mcs/mcs/expression.cs:8037 msgid "An expression tree cannot contain a multidimensional array initializer" msgstr "" -#: mcs/mcs/expression.cs:8070 +#: mcs/mcs/expression.cs:8073 msgid "Cannot create an array with a negative size" msgstr "" -#: mcs/mcs/expression.cs:8162 +#: mcs/mcs/expression.cs:8165 msgid "" "Can only use array initializer expressions to assign to array types. Try " "using a new expression instead" msgstr "" -#: mcs/mcs/expression.cs:8586 +#: mcs/mcs/expression.cs:8589 msgid "" "The type of an implicitly typed array cannot be inferred from the " "initializer. Try specifying array type explicitly" msgstr "" -#: mcs/mcs/expression.cs:8741 +#: mcs/mcs/expression.cs:8744 msgid "" "The `this' object cannot be used before all of its fields are assigned to" msgstr "" -#: mcs/mcs/expression.cs:8747 +#: mcs/mcs/expression.cs:8750 msgid "" "Keyword `this' is not valid in a static property, static method, or static " "field initializer" msgstr "" -#: mcs/mcs/expression.cs:8750 +#: mcs/mcs/expression.cs:8753 msgid "" "Anonymous methods inside structs cannot access instance members of `this'. " "Consider copying `this' to a local variable outside the anonymous method and " "using the local instead" msgstr "" -#: mcs/mcs/expression.cs:8753 +#: mcs/mcs/expression.cs:8756 msgid "Keyword `this' is not available in the current context" msgstr "" -#: mcs/mcs/expression.cs:8829 +#: mcs/mcs/expression.cs:8832 msgid "Cannot take the address of `this' because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:8831 +#: mcs/mcs/expression.cs:8834 msgid "Cannot pass `this' as a ref or out argument because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:8833 +#: mcs/mcs/expression.cs:8836 msgid "Cannot assign to `this' because it is read-only" msgstr "" -#: mcs/mcs/expression.cs:8901 +#: mcs/mcs/expression.cs:8904 msgid "The __arglist construct is valid only within a variable argument method" msgstr "" -#: mcs/mcs/expression.cs:8962 +#: mcs/mcs/expression.cs:8965 msgid "An expression tree cannot contain a method with variable arguments" msgstr "" -#: mcs/mcs/expression.cs:9236 +#: mcs/mcs/expression.cs:9239 msgid "The typeof operator cannot be used on the dynamic type" msgstr "" -#: mcs/mcs/expression.cs:9277 +#: mcs/mcs/expression.cs:9280 #, csharp-format msgid "`{0}': an attribute argument cannot use type parameters" msgstr "" -#: mcs/mcs/expression.cs:9492 +#: mcs/mcs/expression.cs:9495 #, csharp-format msgid "" "`{0}' does not have a predefined size, therefore sizeof can only be used in " @@ -2139,154 +2139,154 @@ msgid "" "SizeOf)" msgstr "" -#: mcs/mcs/expression.cs:9557 +#: mcs/mcs/expression.cs:9560 #, csharp-format msgid "Alias `{0}' not found" msgstr "" -#: mcs/mcs/expression.cs:9598 +#: mcs/mcs/expression.cs:9601 msgid "" "The namespace alias qualifier `::' cannot be used to invoke a method. " "Consider using `.' instead" msgstr "" -#: mcs/mcs/expression.cs:9688 +#: mcs/mcs/expression.cs:9691 msgid "Cannot perform member binding on `null' value" msgstr "" -#: mcs/mcs/expression.cs:9850 +#: mcs/mcs/expression.cs:9853 #, csharp-format msgid "" "`{0}': cannot reference a type through an expression. Consider using `{1}' " "instead" msgstr "" -#: mcs/mcs/expression.cs:9929 +#: mcs/mcs/expression.cs:9932 #, csharp-format msgid "A nested type cannot be specified through a type parameter `{0}'" msgstr "" -#: mcs/mcs/expression.cs:9937 +#: mcs/mcs/expression.cs:9940 #, csharp-format msgid "" "Alias `{0}' cannot be used with `::' since it denotes a type. Consider " "replacing `::' with `.'" msgstr "" -#: mcs/mcs/expression.cs:10006 +#: mcs/mcs/expression.cs:10009 #, csharp-format msgid "The nested type `{0}' does not exist in the type `{1}'" msgstr "" -#: mcs/mcs/expression.cs:10030 +#: mcs/mcs/expression.cs:10033 #, csharp-format msgid "" "Type `{0}' does not contain a definition for `{1}' and no extension method " "`{1}' of type `{0}' could be found. Are you missing {2}?" msgstr "" -#: mcs/mcs/expression.cs:10322 +#: mcs/mcs/expression.cs:10325 #, csharp-format msgid "Cannot apply indexing with [] to an expression of type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:10459 +#: mcs/mcs/expression.cs:10462 #, csharp-format msgid "Wrong number of indexes `{0}' inside [], expected `{1}'" msgstr "" -#: mcs/mcs/expression.cs:10899 +#: mcs/mcs/expression.cs:10904 msgid "" "The indexer base access cannot be dynamically dispatched. Consider casting " "the dynamic arguments or eliminating the base access" msgstr "" -#: mcs/mcs/expression.cs:10989 +#: mcs/mcs/expression.cs:10994 msgid "An expression tree may not contain a base access" msgstr "" -#: mcs/mcs/expression.cs:11007 +#: mcs/mcs/expression.cs:11012 msgid "Keyword `base' is not available in a static method" msgstr "" -#: mcs/mcs/expression.cs:11009 +#: mcs/mcs/expression.cs:11014 msgid "Keyword `base' is not available in the current context" msgstr "" -#: mcs/mcs/expression.cs:11047 +#: mcs/mcs/expression.cs:11052 msgid "" "A property, indexer or dynamic member access may not be passed as `ref' or " "`out' parameter" msgstr "" -#: mcs/mcs/expression.cs:11392 +#: mcs/mcs/expression.cs:11397 #, csharp-format msgid "Array elements cannot be of type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:11395 +#: mcs/mcs/expression.cs:11400 #, csharp-format msgid "Array elements cannot be of static type `{0}'" msgstr "" -#: mcs/mcs/expression.cs:11571 +#: mcs/mcs/expression.cs:11576 msgid "Cannot use a negative size with stackalloc" msgstr "" -#: mcs/mcs/expression.cs:11575 +#: mcs/mcs/expression.cs:11580 msgid "Cannot use stackalloc in finally or catch" msgstr "" -#: mcs/mcs/expression.cs:11735 +#: mcs/mcs/expression.cs:11740 #, csharp-format msgid "" "Member `{0}' cannot be initialized. An object initializer may only be used " "for fields, or properties" msgstr "" -#: mcs/mcs/expression.cs:11743 +#: mcs/mcs/expression.cs:11748 #, csharp-format msgid "" "Static field or property `{0}' cannot be assigned in an object initializer" msgstr "" -#: mcs/mcs/expression.cs:11847 +#: mcs/mcs/expression.cs:11852 msgid "Expression tree cannot contain a dictionary initializer" msgstr "" -#: mcs/mcs/expression.cs:11972 +#: mcs/mcs/expression.cs:11977 #, csharp-format msgid "" "A field or property `{0}' cannot be initialized with a collection object " "initializer because type `{1}' does not implement `{2}' interface" msgstr "" -#: mcs/mcs/expression.cs:11983 +#: mcs/mcs/expression.cs:11988 #, csharp-format msgid "Inconsistent `{0}' member declaration" msgstr "" -#: mcs/mcs/expression.cs:11991 +#: mcs/mcs/expression.cs:11996 #, csharp-format msgid "" "An object initializer includes more than one member `{0}' initialization" msgstr "" -#: mcs/mcs/expression.cs:12009 +#: mcs/mcs/expression.cs:12014 #, csharp-format msgid "Cannot initialize object of type `{0}' with a collection initializer" msgstr "" -#: mcs/mcs/expression.cs:12154 +#: mcs/mcs/expression.cs:12159 msgid "" "Object and collection initializers cannot be used to instantiate a delegate" msgstr "" -#: mcs/mcs/expression.cs:12362 +#: mcs/mcs/expression.cs:12367 msgid "Anonymous types cannot be used in this expression" msgstr "" -#: mcs/mcs/expression.cs:12456 +#: mcs/mcs/expression.cs:12461 #, csharp-format msgid "An anonymous type property `{0}' cannot be initialized with `{1}'" msgstr "" diff --git a/po/mcs/pt_BR.gmo b/po/mcs/pt_BR.gmo index 1e28e2811b..2c171f2106 100644 Binary files a/po/mcs/pt_BR.gmo and b/po/mcs/pt_BR.gmo differ diff --git a/po/mcs/pt_BR.po.REMOVED.git-id b/po/mcs/pt_BR.po.REMOVED.git-id index 1d4bb62551..e346751593 100644 --- a/po/mcs/pt_BR.po.REMOVED.git-id +++ b/po/mcs/pt_BR.po.REMOVED.git-id @@ -1 +1 @@ -7bfc7e72a14e9d8825dcd7cd26dfc111b8f635c3 \ No newline at end of file +9443b3c010889345ff24f9ac53f88d952d725080 \ No newline at end of file diff --git a/winconfig.h b/winconfig.h index af1960918f..1f6db1c9cf 100644 --- a/winconfig.h +++ b/winconfig.h @@ -636,5 +636,5 @@ /* #undef USE_MONO_MUTEX */ /* Version number of package */ -#define VERSION "4.1.0" +#define VERSION "4.2.2" #endif