Microsoft.JScript.ThisLiteral.TranslateToILSet C# (CSharp) Method

TranslateToILSet() private method

private TranslateToILSet ( ILGenerator il, AST rhvalue ) : void
il System.Reflection.Emit.ILGenerator
rhvalue AST
return void
      internal override void TranslateToILSet(ILGenerator il, AST rhvalue){
        MethodInfo meth = this.method;
        if (meth != null){
          if (rhvalue != null)
            rhvalue.TranslateToIL(il, meth.GetParameters()[0].ParameterType);
          Type t = meth.ReflectedType;
          if (meth.IsVirtual && !meth.IsFinal && (!t.IsSealed || !t.IsValueType))
            il.Emit(OpCodes.Callvirt, meth);
          else
            il.Emit(OpCodes.Call, meth);
          if (meth.ReturnType != Typeob.Void) //Should never be the case if the property is well formed, but there is no gaurantee
            il.Emit(OpCodes.Pop);
        }else
          base.TranslateToILSet(il, rhvalue);
      }