public void WriteNullCheckIfNeeded(StackInfo stackInfo)
 {
     if ((this.ShouldEmitNullChecksForMethod() && !Extensions.IsValueType(stackInfo.Type)) && (!stackInfo.Type.IsByReference || !((ByReferenceType) stackInfo.Type).ElementType.IsValueType))
     {
         this.RecordNullCheckEmitted();
         object[] args = new object[] { Emit.NullCheck(stackInfo.Type, stackInfo.Expression) };
         this._writer.WriteLine("{0};", args);
     }
 }
 public void WriteDivideByZeroCheckIfNeeded(StackInfo stackInfo)
 {
     if (this.ShouldEmitDivideByZeroChecksForMethod())
     {
         this.RecordDivideByZeroCheckEmitted();
         string str = Emit.DivideByZeroCheck(stackInfo.Type, stackInfo.Expression);
         if (!string.IsNullOrEmpty(str))
         {
             object[] args = new object[] { str };
             this._writer.WriteLine("{0};", args);
         }
     }
 }