[Pkg-mono-svn-commits] [SCM] mono branch, master, updated. debian/2.4+dfsg-6-26-g8b65c7c

Mirco Bauer meebey at meebey.net
Wed Aug 5 23:03:57 UTC 2009


The following commit has been merged in the master branch:
commit e3ec9dc2aa4e8df8a8d617de68e3d18878cb9367
Author: Mirco Bauer <meebey at meebey.net>
Date:   Thu Jul 30 19:55:03 2009 +0200

      * debian/patches/fix_array_compare.dpatch:
        + Fix in the compiler needed for IronRuby.
          (thanks goes to C.J. Adams-Collier for providing the patch)

diff --git a/debian/changelog b/debian/changelog
index 2fb9716..29671db 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -19,6 +19,7 @@ mono (2.4.2.3+dfsg-1~pre1) unstable; urgency=low
     debian/mono-api-diff.cs:
     + As mono-api-diff was dropped from Mono 2.4 and we need it to track API
       changes we bundle it now in the source package.
+      (thanks to C.J. Adams-Collier for this)
   * debian/copyright:
     + Updated for ASP.NET MVC.
   * debian/control:
@@ -27,8 +28,11 @@ mono (2.4.2.3+dfsg-1~pre1) unstable; urgency=low
     + Added libmono-system-web-mvc1.0-cil package.
     + Added libmono-messaging-rabbitmq2.0-cil and libmono-rabbitmq2.0-cil
       package.
+  * debian/patches/fix_array_compare.dpatch:
+    + Fix in the compiler needed for IronRuby.
+      (thanks goes to C.J. Adams-Collier for providing the patch)
 
- -- Mirco Bauer <meebey at debian.org>  Thu, 30 Jul 2009 15:43:43 +0200
+ -- Mirco Bauer <meebey at debian.org>  Thu, 30 Jul 2009 19:35:10 +0200
 
 mono (2.4+dfsg-6) unstable; urgency=low
 
diff --git a/debian/patches/00list b/debian/patches/00list
index 90f237f..9389fcd 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -7,6 +7,7 @@ fix-mono.pc.in
 fix-mono-cairo.pc.in
 fix_BigInteger_overflow_CVE-2007-5197
 fix_implicit_pointer_conversions
+fix_array_compare
 fix_NetworkInterface_endless_loop
 fix_mono-api-info_build
 fix_csharplib_build
diff --git a/debian/patches/fix_array_compare.dpatch b/debian/patches/fix_array_compare.dpatch
new file mode 100755
index 0000000..b411606
--- /dev/null
+++ b/debian/patches/fix_array_compare.dpatch
@@ -0,0 +1,136 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix_array_compare.dpatch by Mirco Bauer <meebey at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+ at DPATCH@
+diff -urNad git~/mcs/mcs/statement.cs git/mcs/mcs/statement.cs
+--- git~/mcs/mcs/statement.cs	2009-07-29 20:30:47.000000000 +0200
++++ git/mcs/mcs/statement.cs	2009-07-30 19:34:34.000000000 +0200
+@@ -4886,6 +4886,7 @@
+ 		}
+ 	}
+ 
++	// FIXME: Why is it almost exact copy of Using ??
+ 	public class UsingTemporary : ExceptionStatement {
+ 		TemporaryVariable local_copy;
+ 		public Statement Statement;
+@@ -5010,7 +5011,6 @@
+ 		Expression var;
+ 		Expression init;
+ 
+-		Expression converted_var;
+ 		ExpressionStatement assign;
+ 
+ 		public Using (Expression var, Expression init, Statement stmt, Location l)
+@@ -5021,31 +5021,6 @@
+ 			loc = l;
+ 		}
+ 
+-		bool ResolveVariable (EmitContext ec)
+-		{
+-			ExpressionStatement a = new SimpleAssign (var, init, loc);
+-			a = a.ResolveStatement (ec);
+-			if (a == null)
+-				return false;
+-
+-			assign = a;
+-
+-			if (TypeManager.ImplementsInterface (a.Type, TypeManager.idisposable_type)) {
+-				converted_var = var;
+-				return true;
+-			}
+-
+-			Expression e = Convert.ImplicitConversionStandard (ec, a, TypeManager.idisposable_type, var.Location);
+-			if (e == null) {
+-				Error_IsNotConvertibleToIDisposable (var);
+-				return false;
+-			}
+-
+-			converted_var = e;
+-
+-			return true;
+-		}
+-
+ 		static public void Error_IsNotConvertibleToIDisposable (Expression expr)
+ 		{
+ 			Report.SymbolRelatedToPreviousError (expr.Type);
+@@ -5066,42 +5041,18 @@
+ 		protected override void EmitFinallyBody (EmitContext ec)
+ 		{
+ 			ILGenerator ig = ec.ig;
++			Label skip = ig.DefineLabel ();
+ 
+-			if (!var.Type.IsValueType) {
+-				Label skip = ig.DefineLabel ();
++			bool emit_null_check = TypeManager.IsReferenceType (var.Type);
++			if (emit_null_check) {
+ 				var.Emit (ec);
+ 				ig.Emit (OpCodes.Brfalse, skip);
+-				converted_var.Emit (ec);
+-				ig.Emit (OpCodes.Callvirt, TypeManager.void_dispose_void);
+-				ig.MarkLabel (skip);
+-			} else {
+-				Expression ml = Expression.MemberLookup(ec.ContainerType, TypeManager.idisposable_type, var.Type, "Dispose", Mono.CSharp.Location.Null);
+-
+-				if (!(ml is MethodGroupExpr)) {
+-					var.Emit (ec);
+-					ig.Emit (OpCodes.Box, var.Type);
+-					ig.Emit (OpCodes.Callvirt, TypeManager.void_dispose_void);
+-				} else {
+-					MethodInfo mi = null;
+-
+-					foreach (MethodInfo mk in ((MethodGroupExpr) ml).Methods) {
+-						if (TypeManager.GetParameterData (mk).Count == 0) {
+-							mi = mk;
+-							break;
+-						}
+-					}
+-
+-					if (mi == null) {
+-						Report.Error(-100, Mono.CSharp.Location.Null, "Internal error: No Dispose method which takes 0 parameters.");
+-						return;
+-					}
++			}
+ 
+-					IMemoryLocation mloc = (IMemoryLocation) var;
++			Invocation.EmitCall (ec, false, var, TypeManager.void_dispose_void, null, loc);
+ 
+-					mloc.AddressOf (ec, AddressOp.Load);
+-					ig.Emit (OpCodes.Call, mi);
+-				}
+-			}
++			if (emit_null_check)
++				ig.MarkLabel (skip);
+ 		}
+ 
+ 		public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
+@@ -5132,6 +5083,27 @@
+ 			return ok;
+ 		}
+ 
++		bool ResolveVariable (EmitContext ec)
++		{
++			assign = new SimpleAssign (var, init, loc);
++			assign = assign.ResolveStatement (ec);
++			if (assign == null)
++				return false;
++
++			if (assign.Type == TypeManager.idisposable_type ||
++				TypeManager.ImplementsInterface (assign.Type, TypeManager.idisposable_type)) {
++				return true;
++			}
++
++			Expression e = Convert.ImplicitConversionStandard (ec, assign, TypeManager.idisposable_type, var.Location);
++			if (e == null) {
++				Error_IsNotConvertibleToIDisposable (var);
++				return false;
++			}
++
++			throw new NotImplementedException ("covariance?");
++		}
++
+ 		protected override void CloneTo (CloneContext clonectx, Statement t)
+ 		{
+ 			Using target = (Using) t;

-- 
mono



More information about the Pkg-mono-svn-commits mailing list