Mono 3.10.0 發布,跨平臺 .NET 運行環境

jopen 10年前發布 | 9K 次閱讀 Mono

Mono是一個開源的跨平臺的.NET運行環境,支持Unix, Windows, MacOS等操作系統。

Mono是一個由Xamarin公司(先前是Novell,最早為Ximian)所主持的自由開放源代碼項目。該項目的目標是創建一系列符合ECMA標準(Ecma-334Ecma-335)的.NET工具,包括C#編譯器和通用語言架構。與微軟的.NET Framework共通語言運行平臺)不同,Mono項目不僅可以運行于Windows系統上,還可以運行于Linux,FreeBSD,Unix,OS X和Solaris,甚至一些游戲平臺,例如:Playstation 3,Wii或XBox 360。Mono的標志是一個猴子格式的臉。

Mono現由Novell持有雙重許可,這和Qt和Mozilla Application Suite的情況相似。Mono的C#編譯器及其相關工具發布于GNU通用公共許可證(GPL)之下,其運行時庫發布于GNU寬通用公共許可證(LGPL)之下,其類庫發布于MIT許可證之下。這些均是開源協議因此Mono是一個開源軟件。

微軟開發了一個稱為通用語言架構(Shared Source Common Language Infrastructure,Shared Source CLI;即今ECMA—通用語言架構)的可用于FreeBSD,Windows和Mac OS X的.NET實現版本。微軟的共享源代碼協議并不是開源軟件協議,且可能對于社區來說也是不足夠的(它明文禁止了對軟件的商業用途)。另外,GNU也有一個.NET實現版本Portable.NET項目,該項目與Mono項目有著很多相同的目標。

Mono虛擬機包含一個實時編譯引擎,該引擎可用于如下處理器:x86,SPARC,PowerPC,ARMS390(32位模式和64位模式),x86-64,IA-64和64位模式的SPARC。該虛擬機可以將代碼編譯為本機代碼。


跨平臺 .NET 運行環境 Mono 3.10.0 發布,該版本值得關注的有:

  • 實現了 System.IO.Compression.FileSystem.

  • Uri 實現了 .NET 4.5 行為,可轉換成老的行為,只需要通過設置 System.Uri::s_IriParsing 靜態屬性為 false 即可

此外,該版本通過下面兩個調整實現了性能的提升:

  • 核心元數據解析函數中移除無用的鎖代碼

  • 進行枚舉時避免局部數組中緩存抖動

此外該版本還修復了很多 bug,詳細列表請看:

Highlights

  • Implemented System.IO.Compression.FileSystem.
  • Uri now implements the .NET 4.5 behavior, it can be reverted to the old behavior in the same way by setting the System.Uri::s_IriParsing static field to false.

Performance

  • Remove unnecessary locking from core metadata parsing functions.
  • Avoid cache thrashing of locals array when looping over enumerator.

Known Issues

The OSX package packages an invalid libgdiplus library that affects users of System.Drawing that requires it to work.
This specially affects Xamarin.Mac users that fit the following criteria:

  • Uses Xamarin.Mac Classic (Unified is unaffected).
  • Uses the subsets of System.Drawing that use libgdiplus.dylib internally
    - System.Drawing.RectangleF, PointF, Colors are unaffected
    - System.Drawing.Bitmap, and font for example are affected

The symptom of the problemw is your application failing with: “System.TypeInitializationException: An exception was thrown by the type initializer for System.Drawing.GDIPlus —> System.Exception: GdiplusStartup”

Bug fixes

Runtime

  • Fix support for unaligned offsets in the store_membase_imm opcodes. Fixes #23267.
  • Fix the lookup of nested types which have a namespace. Fixes #21653.
  • Increase some opcode sizes. Fixes #23026.
  • Always pass the imt arg to interface calls in gsharedvt methods. Fixes #22624.
  • Store the epilog length in MonoArchEHJitInfo instead of encoding it in jinfo->unwind_desc, since the latter can overflow for methods with large epilogs. Fixes #22685.
  • Add a mono_thread_detach_if_exiting () public api function which can be called by embedding code to detach the runtime if the code is running from a pthread dtor. Fixes #21164.
  • Fix yet another native types problem. Fixes #22053.
  • Fix the leaking of mach ports introduced by 98bbf8512aec0fa01b4426583280f6d231d22187. Fixes #22068.
  • Add support for constrained calls with vtype return types in gsharedvt code. Fixes #22109.
  • Fix the PLATFORM_GNU check so it works with gnueabi etc. as well. Fixes #21520.
  • Don’t make runtime invoke signatures generic. Fixes #21973.
  • Allow v8..v15 in unwind info on arm64. Fixes part of #21615.
  • Fix Process.PrivateMemorySize64 etc. on ios. Fixes #21882.
  • Fix enum->int casts in gsharedvt code. Fixes #21893.
  • Don’t assert when loading a generic methodspec with 0 arity. Fixes #19097.
  • Avoid asserting when a cattr cannot be loaded. Fixes #21653.
  • Avoid making generic calls from gsharedvt methods normally, go through the rgctx infrastructure instead. Fixes #21677.

Class Libraries

  • Fix Uri UserInfo parsing. Fixes 23246.
  • Update RequestMessage.RequestUri.AbsoluteUri after redirect. Fixes #22383.
  • Fixes XContainer attempt to create a XNode from a null value. Fixes #20151.
  • Changed XObject OnChanged and OnChanging to use Owner. When XObject.Owner is not a XElement XObject.Parent returns null and the owner would not be notified of changing and changed events. Fixes #18772.
  • Process XslLiteralElements with only child attributes as empty ones. Fixes #14751.
  • ‘finally’ protect ClientRuntimeChannel.Begin/EndProcess(). Fixes #22179.
  • WebClient.OpenWrite() must get the response on close. Fixes #10163.
  • Fix WebClient.UploadValuesTaskAsync(); Fixes #20359.
  • Improve System.Security.Claims. Fixes #22282.
  • Fixed serialization of XmlNode field with attribute XmlAnyElement. Fixes #3211.
  • Handle String::Format with escaped closing }. Fixes #22114
  • Add a missing check to TypeBuilder.CreateType (). Fixes #22059.
  • Xml Serialization of Base class w/o a parameterless constructor. Removed validation code that did not allowed serialization of base classes without a parameterless constructor. Fixes #6913.
  • Fixed XmlSerializer to handle attribute XmlSchemePrivider.IsAny. XmlSerializer no longer outputs a root element with class name when the class has the attribute XmlSchemeProvider and IsAny is true. Fixes #11916
  • Test that DeflateStream.Read does read an empty stream. Covers #19313.
  • Reseting all private key values to null is required because a new import may not overwrite existing values. Fixes #18482.
  • Handle quoted filename value. Fixes #21960.
  • Dispose XmlReader using correct value. Fixes #21771.

C# Compiler

  • Don’t use `1 naming for compiler generated second level and deeper nested types. Fixes #22893.
  • Extend missing type check to type lookups. Fixes #20933.
  • Fix copy and paste error in constraints checker. Fixes #22131.
  • Speed up nullable tokenizer. Fixes #20195.
  • Coalescing operator if the lhs of a null is a integer type that is larger than the integer type on the rhs. Fixes #22054.
  • Check for duplicate destructors. Fixes #21983.
  • Switch statement with constant block at first label. Fixes #21805.
  • Decimal constants modulo folding. Fixes #21743.
  • Update codegen for boolean loads. Fixes #21685.

MSBuild

  • Workaround for issues with CreateItem task where metadata are not generated due to up-to-data inputs. Fixes #23022.
  • Add KeepDuplicates etc. to 4.0 as internal. Fixes #20961.
 本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
 轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
 本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!