private void handleDefault(Tree child) {
   TreeFormat.println("DEFAULT");
   TreeFormat.up();
   ConstValue const_value = new ConstValue(child.getChild(0));
   const_value.execute();
   TreeFormat.down();
 }
Example #2
0
 void processOutput(OutputContext oc) {
   int s0 = exprType.objectSize();
   if (oc.arrInitCount >= 0) {
     ConstValue constVal0;
     if (s0 >= Type.CLASSINTERFACE
         ? terms[0].exprType().objectSize() != Type.NULLREF
         : (constVal0 = terms[0].evaluateConstValue()) == null || constVal0.isNonZero()) {
       assertCond(oc.arrInitLevel > 0);
       oc.arrayIndent();
       oc.cPrint("JCGO_ARR_INTERNALACC(");
       oc.cPrint(Type.cName[s0 < Type.CLASSINTERFACE ? s0 : Type.CLASSINTERFACE]);
       oc.cPrint(", (");
       oc.cPrint(
           Type.cName[
               s0 < Type.BOOLEAN || s0 > Type.DOUBLE
                   ? Type.OBJECTARRAY
                   : Type.CLASSINTERFACE + s0]);
       oc.cPrint(")");
       oc.cPrint(OutputContext.getRcvrName(oc.arrInitLevel, Type.CLASSINTERFACE));
       oc.cPrint(", ");
       oc.cPrint(Integer.toString(oc.arrInitCount));
       oc.cPrint(")= ");
       if (s0 >= Type.CLASSINTERFACE
           || s0 == Type.BOOLEAN
           || terms[0].exprType().objectSize() != s0
           || (s0 >= Type.BYTE && s0 < Type.INT && terms[0].isLiteral())) {
         oc.cPrint("(");
         oc.cPrint(Type.cName[s0 < Type.CLASSINTERFACE ? s0 : Type.CLASSINTERFACE]);
         oc.cPrint(")");
         terms[0].atomaryOutput(oc);
       } else {
         terms[0].processOutput(oc);
       }
       oc.cPrint(",");
     }
     oc.arrInitCount++;
   } else {
     if (s0 >= Type.CLASSINTERFACE || terms[0].exprType().objectSize() != s0) {
       oc.cPrint("(");
       oc.cPrint(Type.cName[s0 < Type.CLASSINTERFACE ? s0 : Type.CLASSINTERFACE]);
       oc.cPrint(")");
       terms[0].atomaryOutput(oc);
     } else {
       terms[0].processOutput(oc);
     }
     oc.cPrint(", ");
   }
 }