예제 #1
0
파일: IR.cs 프로젝트: robin5/DemiTasse
 public static void Append(IrStmt irStmt)
 {
     if (irStmt != null)
         irStmt.GenerateIrData();
     else
         Append(" [null]\n");
 }
예제 #2
0
 public void add(IrStmt s)
 {
     if (s is IrStmtList)
     {
         IrStmtList sl = (IrStmtList) s;
         for (int i=0; i<sl.size(); i++)
             list.Add(sl.elementAt(i));
     }
     else
     {
         list.Add(s);
     }
 }
예제 #3
0
 private bool nullSTMT(IrStmt s)
 {
     if (null != (s as IrStmtList))
         return ((IrStmtList)s).size() == 0;
     else
         return s == null;
 }
예제 #4
0
 private IrStmt mergeSTMTs(IrStmt s1, IrStmt s2, IrStmt s3)
 {
     if (nullSTMT(s1)) return mergeSTMTs(s2, s3);
     if (nullSTMT(s2)) return mergeSTMTs(s1, s3);
     IrStmtList sl = new IrStmtList();
     sl.add(s1);
     sl.add(mergeSTMTs(s2, s3));
     return sl;
 }
예제 #5
0
 private IrStmt mergeSTMTs(IrStmt s1, IrStmt s2)
 {
     if (nullSTMT(s1)) return s2;
     if (nullSTMT(s2)) return s1;
     IrStmtList sl = new IrStmtList();
     sl.add(s1);
     sl.add(s2);
     return sl;
 }
예제 #6
0
파일: Canon.cs 프로젝트: robin5/DemiTasse
 private IrStmt mergeStmts(IrStmt s1, IrStmt s2)
 {
     if (s1 == null) return s2;
     if (s2 == null) return s1;
     IrStmtList sl = new IrStmtList();
     sl.add(s1);
     sl.add(s2);
     return sl;
 }