void discoverObjLeaks() { assertCond(exprType != null); terms[0].discoverObjLeaks(); if (exprType.objectSize() >= Type.CLASSINTERFACE) { terms[0].setObjLeaks(null); } }
void processPass1(Context c) { exprType = c.currentVarType; terms[0].processPass1(c); int s0 = terms[0].exprType().objectSize(); c.arrInitCount++; int s1 = exprType.objectSize(); if (s0 == Type.BOOLEAN ? s1 != Type.BOOLEAN : s0 >= Type.CLASSINTERFACE ? s1 < Type.CLASSINTERFACE : s0 >= Type.LONG && s1 < s0) { fatalError(c, "Incompatible types in array initializer"); } }
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(")"); } }
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(", "); } }
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); } }
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; }
boolean isLiteral() { assertCond(classLiteralValue != null); return classLiteralValue.objectSize() != Type.OBJECTARRAY; }