Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/04/10 15:11:34 (15 years ago)
Author:
epitzer
Message:

remove 32bit guard [new code generation works for all configurations (Release/Debug) x (x86/x64/Any)] (#548)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Persistence/3.3/Default/CompositeSerializers/Storable/StorableReflection.cs

    r3579 r3606  
    6262            MethodInfo methodInfo = memberInfo as MethodInfo;
    6363            if (memberInfo.MemberType != MemberTypes.Method || memberInfo == null)
    64               throw new ArgumentException("Storable hooks must be methods");
    65             if (System.IntPtr.Size == 4) {
    66               DynamicMethod dm = new DynamicMethod("", null, new[] { typeof(object) }, type);
    67               ILGenerator ilgen = dm.GetILGenerator();
    68               ilgen.Emit(OpCodes.Ldarg_0);
    69               ilgen.Emit(OpCodes.Callvirt, methodInfo);
    70               ilgen.Emit(OpCodes.Ret);
    71               yield return (Hook)dm.CreateDelegate(typeof(Hook));
    72             } else {
    73               yield return new Hook(o => methodInfo.Invoke(o, emptyArgs));
    74             }
     64              throw new ArgumentException("Storable hooks must be methods");           
     65            DynamicMethod dm = new DynamicMethod("", null, new[] { typeof(object) }, type);
     66            ILGenerator ilgen = dm.GetILGenerator();
     67            ilgen.Emit(OpCodes.Ldarg_0);
     68            ilgen.Emit(OpCodes.Callvirt, methodInfo);
     69            ilgen.Emit(OpCodes.Ret);
     70            yield return (Hook)dm.CreateDelegate(typeof(Hook));           
    7571          }
    7672        }
Note: See TracChangeset for help on using the changeset viewer.