2004-02-27 Miguel de Icaza <miguel@ximian.com>
authorMiguel de Icaza <miguel@gnome.org>
Fri, 27 Feb 2004 22:09:24 +0000 (22:09 -0000)
committerMiguel de Icaza <miguel@gnome.org>
Fri, 27 Feb 2004 22:09:24 +0000 (22:09 -0000)
* expression.cs (Invocation.EmitCall): If the method is not
virtual, do not emit a CallVirt to it, use Call.

svn path=/trunk/mcs/; revision=23552

mcs/mcs/ChangeLog
mcs/mcs/expression.cs

index 0d0aac72fd7055ea377c9d807bff1ddde6ecd3ed..c24e9a7b64a16f29840de2e123e130770a6dce38 100755 (executable)
@@ -1,12 +1,15 @@
 2004-02-27  Miguel de Icaza  <miguel@ximian.com>
 
+       * expression.cs (Invocation.EmitCall): If the method is not
+       virtual, do not emit a CallVirt to it, use Call.
+
        * typemanager.cs (GetFullNameSignature): Improve the method to
        cope with ".ctor" and replace it with the type name.
 
        * class.cs (ConstructorInitializer.Resolve): Now the method takes
        as an argument the ConstructorBuilder where it is being defined,
        to catch the recursive constructor invocations.
-       
+
 2004-02-26  Miguel de Icaza  <miguel@ximian.com>
 
        * iterators.cs (IteratorHandler.IsIEnumerator, IsIEnumerable): New
index 084282af75c98821d593b232840ea5e483fcc3c1..3a7a4246e555ced28eb2eea1432e1ffd4237a359 100755 (executable)
@@ -5128,7 +5128,7 @@ namespace Mono.CSharp {
 
                        EmitArguments (ec, method, Arguments);
 
-                       if (is_static || struct_call || is_base){
+                       if (is_static || struct_call || is_base || !method.IsVirtual){
                                if (method is MethodInfo) {
                                        ig.Emit (OpCodes.Call, (MethodInfo) method);
                                } else
@@ -6310,6 +6310,16 @@ namespace Mono.CSharp {
                        }
                        return ret;
                }
+
+               public Expression TurnIntoConstant ()
+               {
+                       //
+                       // Should use something like the above attribute thing.
+                       // It should return a subclass of Constant that just returns
+                       // the computed value of the array
+                       //
+                       throw new Exception ("Does not support yet Turning array into a Constant");
+               }
        }
        
        /// <summary>