コード例 #1
0
ファイル: Graph.java プロジェクト: safdariqbal/frex
 public void checki(boolean basic, Var x, Field f, Var y, Field g) {
   fail = false;
   if (!basic) {
     if (x.getType().getKind() == TypeIR.Kind.VOID) fail = true;
     if (y.getType().getKind() == TypeIR.Kind.VOID) fail = true;
     if (fail) {
       assert (false);
     }
   }
   assertion(basic, x, f);
   assertion(basic, y, g);
   if (fail) {
     assert (false);
     System.out.println(" Overall ! ");
     System.out.println(x.getType());
     if (f != null) System.out.println(" f " + f.getType());
     System.out.println(y.getType());
     if (g != null) System.out.println(" g " + g.getType());
   }
 }
コード例 #2
0
ファイル: Graph.java プロジェクト: safdariqbal/frex
 private void assertion(boolean basic, Var x, Field f) {
   if (basic) {
     if (x.getType().getKind() != TypeIR.Kind.BASIC) {
       if (f == null) {
         System.out.println(" 1mm " + x.getType());
         fail = true;
       }
       if (f.getType().getKind() != TypeIR.Kind.BASIC) {
         System.out.println(" xxmm " + x.getType());
         System.out.println(" 2mm " + f.getName() + " " + f.getType());
         fail = true;
       }
     }
   } else {
     if (x.getType().getKind() == TypeIR.Kind.BASIC) {
       System.out.println(" 3mm " + x.getType());
       fail = true;
     }
     if (f != null && f.getType().getKind() == TypeIR.Kind.BASIC) {
       System.out.println(" 4mm " + f.getName() + " " + f.getType());
       fail = true;
     }
   }
 }