2010-01-15 Carlos Alberto Cortez <calberto.cortez@gmail.com>
[mono.git] / mcs / mcs / iterators.cs
index 5362bba08bcfb75ea0a8366906d77dc9f60e1f97..20d6741406bac6b9cae6b96914458872c908bfca 100644 (file)
@@ -255,7 +255,7 @@ namespace Mono.CSharp {
                                                new_storey = Convert.ImplicitConversionRequired (ec, new_storey, host_method.MemberType, loc);
 
                                        if (TypeManager.int_interlocked_compare_exchange == null) {
-                                               Type t = TypeManager.CoreLookupType (ec.Compiler, "System.Threading", "Interlocked", Kind.Class, true);
+                                               Type t = TypeManager.CoreLookupType (ec.Compiler, "System.Threading", "Interlocked", MemberKind.Class, true);
                                                if (t != null) {
                                                        TypeManager.int_interlocked_compare_exchange = TypeManager.GetPredefinedMethod (
                                                                t, "CompareExchange", loc, TypeManager.int32_type,
@@ -276,7 +276,7 @@ namespace Mono.CSharp {
                                        ig.Emit (OpCodes.Ldflda, host.PC.Spec.MetaInfo);
                                        IntConstant.EmitInt (ig, (int) Iterator.State.Start);
                                        IntConstant.EmitInt (ig, (int) Iterator.State.Uninitialized);
-                                       ig.Emit (OpCodes.Call, TypeManager.int_interlocked_compare_exchange);
+                                       ig.Emit (OpCodes.Call, (MethodInfo) TypeManager.int_interlocked_compare_exchange.MetaInfo);
 
                                        IntConstant.EmitInt (ig, (int) Iterator.State.Uninitialized);
                                        ig.Emit (OpCodes.Bne_Un_S, label_init);
@@ -362,7 +362,7 @@ namespace Mono.CSharp {
 
                        protected override Expression DoResolve (ResolveContext ec)
                        {
-                               Methods = new MethodBase [] { method.MethodBuilder };
+                               Methods = new [] { method.Spec };
                                type = method.Parent.TypeBuilder;
                                InstanceExpression = new CompilerGeneratedThis (type, Location);
                                return base.DoResolve (ec);
@@ -563,7 +563,7 @@ namespace Mono.CSharp {
 
                        reset.Block = new ToplevelBlock (Compiler, Location);
 
-                       Type ex_type = TypeManager.CoreLookupType (Compiler, "System", "NotSupportedException", Kind.Class, true);
+                       Type ex_type = TypeManager.CoreLookupType (Compiler, "System", "NotSupportedException", MemberKind.Class, true);
                        if (ex_type == null)
                                return;