Ejemplo n.º 1
0
 void processOutput(OutputContext oc) {
   assertCond(classLiteralValue != null);
   int s0 = classLiteralValue.objectSize();
   if (s0 != Type.OBJECTARRAY) {
     oc.cPrint(classLiteralValue.signatureClass().getClassRefStr(s0 > Type.CLASSINTERFACE));
   } else {
     oc.cPrint(md != null ? md.routineCName() : MethodDefinition.UNKNOWN_NAME);
     Main.dict.normalCalls++;
     oc.cPrint("(");
     oc.cPrint(classLiteralValue.signatureClass().getClassRefStr(false));
     oc.cPrint(", ");
     oc.cPrint(Integer.toString(classLiteralValue.signatureDimensions()));
     oc.cPrint(")");
   }
 }
Ejemplo n.º 2
0
 void processPass1(Context c) {
   if (classLiteralValue == null) {
     terms[0].processPass1(c);
     ExpressionType exprType0 = terms[0].exprType();
     ClassDefinition cd = exprType0.signatureClass();
     cd.predefineClass(c.forClass);
     cd.markUsed();
     classLiteralValue = exprType0.signatureDimensions() > 0 ? exprType0 : cd.asExactClassType();
     if (exprType0.objectSize() == Type.OBJECTARRAY) {
       cd = Main.dict.get(Names.JAVA_LANG_VMCLASS);
       cd.predefineClass(c.forClass);
       MethodDefinition md = cd.getMethod(Names.SIGN_ARRAYCLASSOF0X);
       if (md != null && md.isClassMethod()) {
         md.markUsed(null);
         this.md = md;
       }
     }
     classLiteralValue.signatureClass().setVTableUsed(false);
   }
 }
Ejemplo n.º 3
0
 boolean storeClassLiteralsGuess(ObjVector parmSig, boolean isActual) {
   ExpressionType exprType0;
   if (isActual) {
     exprType0 = terms[0].actualExprType();
     int s0 = exprType0.objectSize();
     if (s0 < Type.CLASSINTERFACE) return false;
     if (s0 == Type.CLASSINTERFACE) {
       ClassDefinition cd = exprType0.receiverClass();
       exprType0 =
           cd.name().equals(Names.JAVAX_SWING_PLAF_COLORUIRESOURCE)
               ? cd.superClass()
               : cd.mapToPrimType();
     }
   } else {
     exprType0 = terms[0].classLiteralValGuess();
     if (exprType0 == null) return false;
     if (exprType0.signatureDimensions() == 0) {
       exprType0 = exprType0.receiverClass();
     }
   }
   parmSig.addElement(exprType0);
   return true;
 }