Author: jbevain
Date: 2008-01-30 15:04:24 -0500 (Wed, 30 Jan 2008)
New Revision: 94413

Modified:
   trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
   trunk/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs
Log:
2008-01-30  Jb Evain  <[EMAIL PROTECTED]>

        * MethodCallExpression.cs: very naive implementation of Emit.



Modified: trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog       
2008-01-30 20:01:57 UTC (rev 94412)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/ChangeLog       
2008-01-30 20:04:24 UTC (rev 94413)
@@ -1,5 +1,9 @@
 2008-01-30  Jb Evain  <[EMAIL PROTECTED]>
 
+       * MethodCallExpression.cs: very naive implementation of Emit.
+
+2008-01-30  Jb Evain  <[EMAIL PROTECTED]>
+
        * NewExpression.cs: add Emit support for reference types.
 
 2008-01-30  Jb Evain  <[EMAIL PROTECTED]>

Modified: 
trunk/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs
===================================================================
--- trunk/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs 
2008-01-30 20:01:57 UTC (rev 94412)
+++ trunk/mcs/class/System.Core/System.Linq.Expressions/MethodCallExpression.cs 
2008-01-30 20:04:24 UTC (rev 94413)
@@ -29,6 +29,7 @@
 using System;
 using System.Collections.ObjectModel;
 using System.Reflection;
+using System.Reflection.Emit;
 
 namespace System.Linq.Expressions {
 
@@ -67,7 +68,15 @@
 
                internal override void Emit (EmitContext ec)
                {
-                       throw new NotImplementedException ();
+                       var ig = ec.ig;
+
+                       foreach (var arg in arguments)
+                               arg.Emit (ec);
+
+                       if (obj != null)
+                               obj.Emit (ec);
+
+                       ig.Emit (OpCodes.Callvirt, method);
                }
        }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to