Example #1
0
 public virtual void InvokeStatic(MethodInfo method)
 {
     if (mv != null)
     {
         mv.InvokeStatic(method);
     }
 }
Example #2
0
        public static void CacheModificationInternalUpdate(PropertyInstance p_cacheModification, IMethodVisitor mg, Script script)
        {
            LocalVariableInfo loc_cacheModification = mg.NewLocal <ICacheModification>();
            LocalVariableInfo loc_oldActive         = mg.NewLocal <bool>();

            // ICacheModification cacheModification = this.cacheModification;
            mg.CallThisGetter(p_cacheModification);
            mg.StoreLocal(loc_cacheModification);

            // boolean oldInternalUpdate = cacheModification.isInternalUpdate();
            mg.LoadLocal(loc_cacheModification);
            mg.InvokeInterface(new MethodInstance(null, typeof(ICacheModification), typeof(bool), "get_InternalUpdate"));
            mg.StoreLocal(loc_oldActive);

            // callModificationInternalUpdate(cacheModification, oldInternalUpdate, true)
            mg.LoadLocal(loc_cacheModification);
            mg.LoadLocal(loc_oldActive);
            mg.Push(true);
            mg.InvokeStatic(m_callCacheModificationInternalUpdate);

            mg.TryFinally(script, delegate(IMethodVisitor mv2)
            {
                // callModificationInternalUpdate(cacheModification, oldInternalUpdate, false)
                mv2.LoadLocal(loc_cacheModification);
                mv2.LoadLocal(loc_oldActive);
                mv2.Push(false);
                mv2.InvokeStatic(m_callCacheModificationInternalUpdate);
            });
        }