• Home
  • Raw
  • Download

Lines Matching refs:out_

99       : out_(out),  in JFuzz()
160 case kBoolean: fputs("boolean", out_); break; in emitType()
161 case kInt: fputs("int", out_); break; in emitType()
162 case kLong: fputs("long", out_); break; in emitType()
163 case kFloat: fputs("float", out_); break; in emitType()
164 case kDouble: fputs("double", out_); break; in emitType()
171 case kBoolean: fputs("Boolean", out_); break; in emitTypeClass()
172 case kInt: fputs("Integer", out_); break; in emitTypeClass()
173 case kLong: fputs("Long", out_); break; in emitTypeClass()
174 case kFloat: fputs("Float", out_); break; in emitTypeClass()
175 case kDouble: fputs("Double", out_); break; in emitTypeClass()
193 fputs(ops[random0(N)], out_); in emitOneOf()
203 fputc('!', out_); in emitUnaryOp()
255 case 1: fputs("(int)", out_); return kLong; in emitTypeConversionOp()
256 case 2: fputs("(int)", out_); return kFloat; in emitTypeConversionOp()
257 case 3: fputs("(int)", out_); return kDouble; in emitTypeConversionOp()
259 case 4: fputs("(int)(byte)(int)", out_); return kInt; in emitTypeConversionOp()
260 case 5: fputs("(int)(short)(int)", out_); return kInt; in emitTypeConversionOp()
265 case 2: fputs("(long)", out_); return kFloat; in emitTypeConversionOp()
266 case 3: fputs("(long)", out_); return kDouble; in emitTypeConversionOp()
268 case 4: fputs("(long)(byte)(long)", out_); return kLong; in emitTypeConversionOp()
269 case 5: fputs("(long)(short)(long)", out_); return kLong; in emitTypeConversionOp()
270 case 6: fputs("(long)(int)(long)", out_); return kLong; in emitTypeConversionOp()
274 case 1: fputs("(float)", out_); return kInt; in emitTypeConversionOp()
275 case 2: fputs("(float)", out_); return kLong; in emitTypeConversionOp()
276 case 3: fputs("(float)", out_); return kDouble; in emitTypeConversionOp()
278 case 4: fputs("(float)(int)(float)", out_); return kFloat; in emitTypeConversionOp()
282 case 1: fputs("(double)", out_); return kInt; in emitTypeConversionOp()
283 case 2: fputs("(double)", out_); return kLong; in emitTypeConversionOp()
284 case 3: fputs("(double)", out_); return kFloat; in emitTypeConversionOp()
286 case 4: fputs("(double)(int)(double)", out_); return kDouble; in emitTypeConversionOp()
287 case 5: fputs("(double)(float)(double)", out_); return kDouble; in emitTypeConversionOp()
298 fputc(' ', out_); in emitTypeConversion()
300 fputc(' ', out_); in emitTypeConversion()
304 fputc(' ', out_); in emitTypeConversion()
313 case 1: fputs("Float.isNaN", out_); return kFloat; in emitIntrinsic1()
314 case 2: fputs("Float.isFinite", out_); return kFloat; in emitIntrinsic1()
315 case 3: fputs("Float.isInfinite", out_); return kFloat; in emitIntrinsic1()
316 case 4: fputs("Double.isNaN", out_); return kDouble; in emitIntrinsic1()
317 case 5: fputs("Double.isFinite", out_); return kDouble; in emitIntrinsic1()
318 case 6: fputs("Double.isInfinite", out_); return kDouble; in emitIntrinsic1()
323 case 1: fprintf(out_, "%s.highestOneBit", prefix); break; in emitIntrinsic1()
324 case 2: fprintf(out_, "%s.lowestOneBit", prefix); break; in emitIntrinsic1()
325 case 3: fprintf(out_, "%s.numberOfLeadingZeros", prefix); break; in emitIntrinsic1()
326 case 4: fprintf(out_, "%s.numberOfTrailingZeros", prefix); break; in emitIntrinsic1()
327 case 5: fprintf(out_, "%s.bitCount", prefix); break; in emitIntrinsic1()
328 case 6: fprintf(out_, "%s.signum", prefix); break; in emitIntrinsic1()
329 case 7: fprintf(out_, "%s.reverse", prefix); break; in emitIntrinsic1()
330 case 8: fprintf(out_, "%s.reverseBytes", prefix); break; in emitIntrinsic1()
331 case 9: fputs("Math.incrementExact", out_); break; in emitIntrinsic1()
332 case 10: fputs("Math.decrementExact", out_); break; in emitIntrinsic1()
333 case 11: fputs("Math.negateExact", out_); break; in emitIntrinsic1()
334 case 12: fputs("Math.abs", out_); break; in emitIntrinsic1()
335 case 13: fputs("Math.round", out_); in emitIntrinsic1()
340 case 1: fputs("Math.abs", out_); break; in emitIntrinsic1()
341 case 2: fputs("Math.ulp", out_); break; in emitIntrinsic1()
342 case 3: fputs("Math.signum", out_); break; in emitIntrinsic1()
343 case 4: fputs("Math.nextUp", out_); break; in emitIntrinsic1()
344 case 5: fputs("Math.nextDown", out_); break; in emitIntrinsic1()
346 fputs("Double.longBitsToDouble", out_); in emitIntrinsic1()
349 fputs("Float.intBitsToFloat", out_); in emitIntrinsic1()
361 case 1: fputs("Boolean.logicalAnd", out_); break; in emitIntrinsic2()
362 case 2: fputs("Boolean.logicalOr", out_); break; in emitIntrinsic2()
363 case 3: fputs("Boolean.logicalXor", out_); break; in emitIntrinsic2()
368 case 1: fprintf(out_, "%s.compare", prefix); break; in emitIntrinsic2()
369 case 2: fprintf(out_, "%s.sum", prefix); break; in emitIntrinsic2()
370 case 3: fprintf(out_, "%s.min", prefix); break; in emitIntrinsic2()
371 case 4: fprintf(out_, "%s.max", prefix); break; in emitIntrinsic2()
372 case 5: fputs("Math.min", out_); break; in emitIntrinsic2()
373 case 6: fputs("Math.max", out_); break; in emitIntrinsic2()
374 case 7: fputs("Math.floorDiv", out_); break; in emitIntrinsic2()
375 case 8: fputs("Math.floorMod", out_); break; in emitIntrinsic2()
376 case 9: fputs("Math.addExact", out_); break; in emitIntrinsic2()
377 case 10: fputs("Math.subtractExact", out_); break; in emitIntrinsic2()
378 case 11: fputs("Math.multiplyExact", out_); break; in emitIntrinsic2()
383 case 1: fprintf(out_, "%s.sum", prefix); break; in emitIntrinsic2()
384 case 2: fprintf(out_, "%s.min", prefix); break; in emitIntrinsic2()
385 case 3: fprintf(out_, "%s.max", prefix); break; in emitIntrinsic2()
386 case 4: fputs("Math.min", out_); break; in emitIntrinsic2()
387 case 5: fputs("Math.max", out_); break; in emitIntrinsic2()
397 fputc('(', out_); in emitIntrinsic()
399 fputc(')', out_); in emitIntrinsic()
402 fputc('(', out_); in emitIntrinsic()
404 fputs(", ", out_); in emitIntrinsic()
406 fputc(')', out_); in emitIntrinsic()
416 case 1: fputs("mA.a()", out_); break; in emitMethodCall()
417 case 2: fputs("mB.a()", out_); break; in emitMethodCall()
418 case 3: fputs("mB.x()", out_); break; in emitMethodCall()
419 case 4: fputs("mBX.x()", out_); break; in emitMethodCall()
420 case 5: fputs("mC.s()", out_); break; in emitMethodCall()
421 case 6: fputs("mC.c()", out_); break; in emitMethodCall()
422 case 7: fputs("mC.x()", out_); break; in emitMethodCall()
423 case 8: fputs("mCX.x()", out_); break; in emitMethodCall()
433 fputc('(', out_); in emitUnbox()
435 fputs(") new ", out_); in emitUnbox()
437 fputc('(', out_); in emitUnbox()
439 fputc(')', out_); in emitUnbox()
445 fprintf(out_, "this instanceof %s", in_inner_ ? "X" : "Test"); in emitMisc()
449 case 1: fprintf(out_, "%s.MIN_VALUE", prefix); break; in emitMisc()
450 case 2: fprintf(out_, "%s.MAX_VALUE", prefix); break; in emitMisc()
455 case 1: fprintf(out_, "%s.MIN_NORMAL", prefix); break; in emitMisc()
456 case 2: fprintf(out_, "%s.MIN_VALUE", prefix); break; in emitMisc()
457 case 3: fprintf(out_, "%s.MAX_VALUE", prefix); break; in emitMisc()
458 case 4: fprintf(out_, "%s.POSITIVE_INFINITY", prefix); break; in emitMisc()
459 case 5: fprintf(out_, "%s.NEGATIVE_INFINITY", prefix); break; in emitMisc()
460 case 6: fprintf(out_, "%s.NaN", prefix); break; in emitMisc()
479 fputs("mArray.length", out_); in emitUpperBound()
481 fprintf(out_, "%u", random1(array_size_)); // random in range in emitUpperBound()
483 fprintf(out_, "%u", array_size_); in emitUpperBound()
490 fprintf(out_, "i%u", random0(loop_nest_)); in emitArrayIndex()
492 fputs("mArray.length - 1", out_); in emitArrayIndex()
494 fprintf(out_, "%u", random0(array_size_)); // random in range in emitArrayIndex()
499 fputs(" - 1", out_); in emitArrayIndex()
501 fputs(" + 1", out_); in emitArrayIndex()
509 case kBoolean: fputs(random1(2) == 1 ? "true" : "false", out_); break; in emitLiteral()
510 case kInt: fprintf(out_, "%d", random()); break; in emitLiteral()
511 case kLong: fprintf(out_, "%dL", random()); break; in emitLiteral()
512 case kFloat: fprintf(out_, "%d.0f", random()); break; in emitLiteral()
513 case kDouble: fprintf(out_, "%d.0", random()); break; in emitLiteral()
520 fputs("mArray", out_); in emitArrayVariable()
522 fputc('[', out_); in emitArrayVariable()
524 fputc(']', out_); in emitArrayVariable()
537 case kBoolean: fprintf(out_, "lZ%u", local); break; in emitLocalVariable()
538 case kInt: fprintf(out_, "lI%u", local); break; in emitLocalVariable()
539 case kLong: fprintf(out_, "lJ%u", local); break; in emitLocalVariable()
540 case kFloat: fprintf(out_, "lF%u", local); break; in emitLocalVariable()
541 case kDouble: fprintf(out_, "lD%u", local); break; in emitLocalVariable()
551 case kBoolean:fputs("mZ", out_); break; in emitFieldVariable()
552 case kInt: fputs("mI", out_); break; in emitFieldVariable()
553 case kLong: fputs("mJ", out_); break; in emitFieldVariable()
554 case kFloat: fputs("mF", out_); break; in emitFieldVariable()
555 case kDouble: fputs("mD", out_); break; in emitFieldVariable()
590 fputc('(', out_); in emitExpression()
595 fputc(' ', out_); in emitExpression()
611 fputs(" ? ", out_); in emitExpression()
613 fputs(" : ", out_); in emitExpression()
639 fputc(' ', out_); in emitExpression()
641 fputc(' ', out_); in emitExpression()
645 fputc(')', out_); in emitExpression()
657 fputc(' ', out_); in emitIndentation()
666 fputs("return ", out_); in emitReturn()
668 fputs(";\n", out_); in emitReturn()
679 fputs("continue;\n", out_); in emitContinue()
691 fputs("break;\n", out_); in emitBreak()
701 fputs("{\n", out_); in emitScope()
706 case kBoolean: fprintf(out_, " lZ%u = ", boolean_local_); break; in emitScope()
707 case kInt: fprintf(out_, " lI%u = ", int_local_); break; in emitScope()
708 case kLong: fprintf(out_, " lJ%u = ", long_local_); break; in emitScope()
709 case kFloat: fprintf(out_, " lF%u = ", float_local_); break; in emitScope()
710 case kDouble: fprintf(out_, " lD%u = ", double_local_); break; in emitScope()
713 fputs(";\n", out_); in emitScope()
723 fputs("}\n", out_); in emitScope()
732 fputs("{ ", out_); in emitArrayInitDim()
735 fputs(", ", out_); in emitArrayInitDim()
737 fputs("}", out_); in emitArrayInitDim()
741 fputs("{\n", out_); in emitArrayInitDim()
748 fputs(",\n", out_); in emitArrayInitDim()
753 fputs(",\n", out_); in emitArrayInitDim()
756 fputs("}", out_); in emitArrayInitDim()
772 fputs("{\n", out_); in emitArrayInit()
778 fputs("[]", out_); in emitArrayInit()
780 fputs(" tmp = ", out_); in emitArrayInit()
782 fputs(";\n", out_); in emitArrayInit()
785 fputs("mArray = tmp;\n", out_); in emitArrayInit()
789 fputs("}\n", out_); in emitArrayInit()
801 fprintf(out_, "for (int i%u = ", loop_nest_); in emitForLoop()
803 fprintf(out_, "0; i%u < ", loop_nest_); in emitForLoop()
805 fprintf(out_, "; i%u++) {\n", loop_nest_); in emitForLoop()
808 fprintf(out_, " - 1; i%d >= 0", loop_nest_); in emitForLoop()
809 fprintf(out_, "; i%d--) {\n", loop_nest_); in emitForLoop()
821 fprintf(out_, "}\n"); in emitForLoop()
833 fputs("{\n", out_); in emitDoLoop()
836 fprintf(out_, "int i%u = %d;\n", loop_nest_, isWhile ? -1 : 0); in emitDoLoop()
839 fprintf(out_, "while (++i%u < ", loop_nest_); in emitDoLoop()
841 fputs(") {\n", out_); in emitDoLoop()
843 fputs("do {\n", out_); in emitDoLoop()
857 fputs("}\n", out_); in emitDoLoop()
859 fprintf(out_, "} while (++i%u < ", loop_nest_); in emitDoLoop()
861 fputs(");\n", out_); in emitDoLoop()
866 fputs("}\n", out_); in emitDoLoop()
877 fputs("if (", out_); in emitIfStmt()
879 fputs(") {\n", out_); in emitIfStmt()
887 fprintf(out_, "} else {\n"); in emitIfStmt()
895 fprintf(out_, "}\n"); in emitIfStmt()
900 fputs("try {\n", out_); in emitTry()
905 fputc('}', out_); in emitTry()
913 fprintf(out_, " catch (%s ex%u_%u) {\n", kExceptionTypes[i], try_nest_, i); in emitCatch()
918 fputc('}', out_); in emitCatch()
924 fputs(" finally {\n", out_); in emitFinally()
929 fputc('}', out_); in emitFinally()
960 fputc('\n', out_); in emitTryCatchFinally()
974 fputs("switch (", out_); in emitSwitch()
976 fputs(") {\n", out_); in emitSwitch()
985 fprintf(out_, "case %u: {\n", random0(array_size_)); in emitSwitch()
987 fprintf(out_, "default: {\n"); in emitSwitch()
993 fputs("break;\n", out_); in emitSwitch()
998 fputs("}\n", out_); in emitSwitch()
1006 fprintf(out_, "}\n"); in emitSwitch()
1011 fputs("nop();\n", out_); in emitNopCall()
1019 fputc(' ', out_); in emitAssignment()
1021 fputc(' ', out_); in emitAssignment()
1023 fputs(";\n", out_); in emitAssignment()
1064 fputs(" private interface X {\n", out_); in emitClassDecls()
1065 fputs(" int x();\n", out_); in emitClassDecls()
1066 fputs(" }\n\n", out_); in emitClassDecls()
1067 fputs(" private class A {\n", out_); in emitClassDecls()
1068 fputs(" public int a() {\n", out_); in emitClassDecls()
1069 fputs(" return ", out_); in emitClassDecls()
1071 fputs(";\n }\n", out_); in emitClassDecls()
1072 fputs(" }\n\n", out_); in emitClassDecls()
1073 fputs(" private class B extends A implements X {\n", out_); in emitClassDecls()
1074 fputs(" public int a() {\n", out_); in emitClassDecls()
1075 fputs(" return super.a() + ", out_); in emitClassDecls()
1077 fputs(";\n }\n", out_); in emitClassDecls()
1078 fputs(" public int x() {\n", out_); in emitClassDecls()
1079 fputs(" return ", out_); in emitClassDecls()
1081 fputs(";\n }\n", out_); in emitClassDecls()
1082 fputs(" }\n\n", out_); in emitClassDecls()
1083 fputs(" private static class C implements X {\n", out_); in emitClassDecls()
1084 fputs(" public static int s() {\n", out_); in emitClassDecls()
1085 fputs(" return ", out_); in emitClassDecls()
1087 fputs(";\n }\n", out_); in emitClassDecls()
1088 fputs(" public int c() {\n", out_); in emitClassDecls()
1089 fputs(" return ", out_); in emitClassDecls()
1091 fputs(";\n }\n", out_); in emitClassDecls()
1092 fputs(" public int x() {\n", out_); in emitClassDecls()
1093 fputs(" return ", out_); in emitClassDecls()
1095 fputs(";\n }\n", out_); in emitClassDecls()
1096 fputs(" }\n\n", out_); in emitClassDecls()
1102 fputs(" private A mA = new B();\n", out_); in emitFieldDecls()
1103 fputs(" private B mB = new B();\n", out_); in emitFieldDecls()
1104 fputs(" private X mBX = new B();\n", out_); in emitFieldDecls()
1105 fputs(" private C mC = new C();\n", out_); in emitFieldDecls()
1106 fputs(" private X mCX = new C();\n\n", out_); in emitFieldDecls()
1107 fputs(" private boolean mZ = false;\n", out_); in emitFieldDecls()
1108 fputs(" private int mI = 0;\n", out_); in emitFieldDecls()
1109 fputs(" private long mJ = 0;\n", out_); in emitFieldDecls()
1110 fputs(" private float mF = 0;\n", out_); in emitFieldDecls()
1111 fputs(" private double mD = 0;\n\n", out_); in emitFieldDecls()
1116 fputs(" private ", out_); in emitArrayDecl()
1119 fputs("[]", out_); in emitArrayDecl()
1121 fputs(" mArray = new ", out_); in emitArrayDecl()
1124 fprintf(out_, "[%d]", array_size_); in emitArrayDecl()
1126 fputs(";\n\n", out_); in emitArrayDecl()
1131 fputs(" private Test() {\n", out_); in emitTestConstructor()
1135 fputs(" a = ", out_); in emitTestConstructor()
1137 fputs(";\n", out_); in emitTestConstructor()
1140 fprintf(out_, "for (int i%u = 0; i%u < %u; i%u++) {\n", i, i, array_size_, i); in emitTestConstructor()
1144 fputs("mArray", out_); in emitTestConstructor()
1146 fprintf(out_, "[i%u]", i); in emitTestConstructor()
1148 fputs(" = a;\n", out_); in emitTestConstructor()
1151 fputs("a = !a;\n", out_); in emitTestConstructor()
1153 fputs("a++;\n", out_); in emitTestConstructor()
1158 fputs("}\n", out_); in emitTestConstructor()
1161 fputs(" }\n\n", out_); in emitTestConstructor()
1166 fputs(" private ", out_); in emitTestMethod()
1168 fputs(" testMethod() {\n", out_); in emitTestMethod()
1176 fputs(" }\n\n", out_); in emitTestMethod()
1181 fputs(" public static void main(String[] args) {\n", out_); in emitMainMethod()
1183 fputs(" Test t = new Test();\n ", out_); in emitMainMethod()
1185 fputs(" r = ", out_); in emitMainMethod()
1187 fputs(";\n", out_); in emitMainMethod()
1188 fputs(" try {\n", out_); in emitMainMethod()
1189 fputs(" r = t.testMethod();\n", out_); in emitMainMethod()
1190 fputs(" } catch (Exception e) {\n", out_); in emitMainMethod()
1191 fputs(" // Arithmetic, null pointer, index out of bounds, etc.\n", out_); in emitMainMethod()
1192 fputs(" System.out.println(\"An exception was caught.\");\n", out_); in emitMainMethod()
1193 fputs(" }\n", out_); in emitMainMethod()
1194 fputs(" System.out.println(\"r = \" + r);\n", out_); in emitMainMethod()
1195 fputs(" System.out.println(\"mZ = \" + t.mZ);\n", out_); in emitMainMethod()
1196 fputs(" System.out.println(\"mI = \" + t.mI);\n", out_); in emitMainMethod()
1197 fputs(" System.out.println(\"mJ = \" + t.mJ);\n", out_); in emitMainMethod()
1198 fputs(" System.out.println(\"mF = \" + t.mF);\n", out_); in emitMainMethod()
1199 fputs(" System.out.println(\"mD = \" + t.mD);\n", out_); in emitMainMethod()
1200 fputs(" System.out.println(\"mArray = \" + ", out_); in emitMainMethod()
1202 fputs("Arrays.toString(t.mArray)", out_); in emitMainMethod()
1204 fputs("Arrays.deepToString(t.mArray)", out_); in emitMainMethod()
1206 fputs(");\n", out_); in emitMainMethod()
1208 fputs(" }\n", out_); in emitMainMethod()
1213 fputs(" public static void nop() {}\n\n", out_); in emitStaticNopMethod()
1218 fputs("\n/**\n * AOSP JFuzz Tester.\n", out_); in emitHeader()
1219 fputs(" * Automatically generated program.\n", out_); in emitHeader()
1220 fprintf(out_, in emitHeader()
1228 fputs("import java.util.Arrays;\n\n", out_); in emitHeader()
1233 fputs("public class Test {\n\n", out_); in emitTestClassWithMain()
1243 fputs("}\n\n", out_); in emitTestClassWithMain()
1268 FILE* out_; member in __anon4838d0330111::JFuzz