Lines Matching refs:cfunc

71     public void emitCode(CFunc cfunc, String original,  in emitCode()  argument
79 if (cfunc.hasTypedPointerArg()) { in emitCode()
80 jfunc = JFunc.convert(cfunc, true); in emitCode()
104 if (cfunc.hasEGLHandleArg()) { in emitCode()
110 if (cfunc.getName().equals("eglGetPlatformDisplay")) { in emitCode()
115 jfunc = JFunc.convert(cfunc, false); in emitCode()
259 boolean isNullAllowed(CFunc cfunc, String cname) { in isNullAllowed() argument
260 String[] checks = mChecker.getChecks(cfunc.getName()); in isNullAllowed()
275 boolean hasCheckTest(CFunc cfunc) { in hasCheckTest() argument
276 String[] checks = mChecker.getChecks(cfunc.getName()); in hasCheckTest()
290 boolean hasCheckTest(CFunc cfunc, String cname) { in hasCheckTest() argument
291 String[] checks = mChecker.getChecks(cfunc.getName()); in hasCheckTest()
306 boolean hasIfTest(CFunc cfunc) { in hasIfTest() argument
307 String[] checks = mChecker.getChecks(cfunc.getName()); in hasIfTest()
345 String getErrorReturnValue(CFunc cfunc) { in getErrorReturnValue() argument
346 CType returnType = cfunc.getType(); in getErrorReturnValue()
356 String[] checks = mChecker.getChecks(cfunc.getName()); in getErrorReturnValue()
372 boolean isUnsupportedFunc(CFunc cfunc) { in isUnsupportedFunc() argument
373 String[] checks = mChecker.getChecks(cfunc.getName()); in isUnsupportedFunc()
387 String isRequiresFunc(CFunc cfunc) { in isRequiresFunc() argument
388 String[] checks = mChecker.getChecks(cfunc.getName()); in isRequiresFunc()
402 void emitNativeBoundsChecks(CFunc cfunc, String cname, PrintStream out, in emitNativeBoundsChecks() argument
405 String[] checks = mChecker.getChecks(cfunc.getName()); in emitNativeBoundsChecks()
480 void emitSentinelCheck(CFunc cfunc, String cname, PrintStream out, in emitSentinelCheck() argument
483 String[] checks = mChecker.getChecks(cfunc.getName()); in emitSentinelCheck()
523 void emitStringCheck(CFunc cfunc, String cname, PrintStream out, String iii) { in emitStringCheck() argument
525 String[] checks = mChecker.getChecks(cfunc.getName()); in emitStringCheck()
554 void emitLocalVariablesForSentinel(CFunc cfunc, PrintStream out) { in emitLocalVariablesForSentinel() argument
556 String[] checks = mChecker.getChecks(cfunc.getName()); in emitLocalVariablesForSentinel()
574 boolean hasNonConstArg(JFunc jfunc, CFunc cfunc, List<Integer> nonPrimitiveArgs) { in hasNonConstArg() argument
580 if (!cfunc.getArgType(cIndex).isConst()) { in hasNonConstArg()
584 if (!cfunc.getArgType(cIndex).isConst()) { in hasNonConstArg()
827 CFunc cfunc = jfunc.getCFunc(); in emitJniCode() local
835 out.println("/* " + cfunc.getOriginal() + " */"); in emitJniCode()
932 String cname = cfunc.getArgName(cIndex); in emitJniCode()
978 CType returnType = cfunc.getType(); in emitJniCode()
981 boolean isUnsupported = isUnsupportedFunc(cfunc); in emitJniCode()
986 " \"" + cfunc.getName() + "\");"); in emitJniCode()
990 if (cfunc.getType().isEGLHandle()) { in emitJniCode()
991 String baseType = cfunc.getType().getBaseType().toLowerCase(); in emitJniCode()
1003 String requiresExtension = isRequiresFunc(cfunc); in emitJniCode()
1010 " \"" + cfunc.getName() + "\");"); in emitJniCode()
1014 String retval = getErrorReturnValue(cfunc); in emitJniCode()
1015 if (cfunc.getType().isEGLHandle()) { in emitJniCode()
1016 String baseType = cfunc.getType().getBaseType().toLowerCase(); in emitJniCode()
1033 && (hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs) in emitJniCode()
1034 || (cfunc.hasPointerArg() && numArrays > 0)) in emitJniCode()
1036 || hasCheckTest(cfunc) in emitJniCode()
1037 || hasIfTest(cfunc)) in emitJniCode()
1073 String retval = getErrorReturnValue(cfunc); in emitJniCode()
1096 String cname = cfunc.getArgName(cIndex); in emitJniCode()
1103 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx)); in emitJniCode()
1120 emitLocalVariablesForSentinel(cfunc, out); in emitJniCode()
1135 String cname = cfunc.getArgName(cIndex); in emitJniCode()
1140 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx)); in emitJniCode()
1169 String cname = cfunc.getArgName(cIndex); in emitJniCode()
1172 if (hasCheckTest(cfunc, cname)) { in emitJniCode()
1189 String cname = cfunc.getArgName(cIndex); in emitJniCode()
1191 boolean nullAllowed = isNullAllowed(cfunc, cname); in emitJniCode()
1194 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx)); in emitJniCode()
1214 emitStringCheck(cfunc, cname, out, nullAllowedIndent + indent); in emitJniCode()
1231 String cname = cfunc.getArgName(cIndex); in emitJniCode()
1237 boolean nullAllowed = isNullAllowed(cfunc, cname); in emitJniCode()
1280 emitNativeBoundsChecks(cfunc, cname, out, false, in emitJniCode()
1287 cfunc.getArgType(cIndex).getDeclaration() + in emitJniCode()
1299 emitSentinelCheck(cfunc, cname, out, false, in emitJniCode()
1345 emitNativeBoundsChecks(cfunc, cname, out, false, in emitJniCode()
1350 cfunc.getArgType(cIndex).getBaseType() + in emitJniCode()
1362 "_" + cfunc.getArgName(cIndex) + "Array"; in emitJniCode()
1364 "_" + cfunc.getArgName(cIndex) + "BufferOffset"; in emitJniCode()
1387 cfunc.getArgType(cIndex).getDeclaration() + in emitJniCode()
1398 cfunc.getArgType(cIndex).getDeclaration() + in emitJniCode()
1405 emitNativeBoundsChecks(cfunc, cname, out, true, in emitJniCode()
1424 String cname = cfunc.getArgName(cIndex); in emitJniCode()
1428 "_" + cfunc.getArgName(cIndex) + "Array"; in emitJniCode()
1430 boolean nullAllowed = isNullAllowed(cfunc, cname) || in emitJniCode()
1441 …out.println(indent + indent + cname + " = (" +cfunc.getArgType(cIndex).getDeclaration() +") (_" + … in emitJniCode()
1445 …out.println(indent + indent + cname + " = (" +cfunc.getArgType(cIndex).getDeclaration() +") (_" + … in emitJniCode()
1457 String name = cfunc.getName(); in emitJniCode()
1468 numArgs = cfunc.getNumArgs(); in emitJniCode()
1486 typecast = "(" + cfunc.getArgType(i).getDeclaration() + ")"; in emitJniCode()
1491 if (cfunc.getArgType(i).isConstCharPointer()) { in emitJniCode()
1495 if (cfunc.getArgType(i).isEGLHandle() && in emitJniCode()
1496 !cfunc.getArgType(i).isPointer()){ in emitJniCode()
1497 out.print(cfunc.getArgName(i)+"_native"); in emitJniCode()
1499 out.print("("+cfunc.getArgName(i)+")"); in emitJniCode()
1501 out.print(cfunc.getArgName(i)); in emitJniCode()
1543 … "(j" + jfunc.getArgType(idx).getBaseType() + "*)" + cfunc.getArgName(cIndex) + in emitJniCode()
1546 (cfunc.getArgType(cIndex).isConst() ? in emitJniCode()
1554 "_" + cfunc.getArgName(cIndex) + "Array"; in emitJniCode()
1562 cfunc.getArgName(cIndex) + in emitJniCode()
1564 (cfunc.getArgType(cIndex).isConst() ? in emitJniCode()
1570 "_" + cfunc.getArgName(cIndex) + "BufferOffset"; in emitJniCode()
1571 String typeCast = "(char *)" + cfunc.getArgName(cIndex); in emitJniCode()
1577 (cfunc.getArgType(cIndex).isConst() ? in emitJniCode()
1594 String cname = cfunc.getArgName(cIndex); in emitJniCode()
1609 String baseType = cfunc.getArgType(cIndex).getBaseType().toLowerCase(); in emitJniCode()
1612 "_" + cfunc.getArgName(cIndex) + "Remaining"; in emitJniCode()
1613 offset = numArrays <= 1 ? "offset" : cfunc.getArgName(cIndex) + "Offset"; in emitJniCode()
1619 "jobject " + cfunc.getArgName(cIndex) + in emitJniCode()
1622 cfunc.getArgName(cIndex) + "[i]);"); in emitJniCode()
1627 cfunc.getArgName(cIndex) + in emitJniCode()
1629 cfunc.getArgName(cIndex) + "_new);"); in emitJniCode()
1645 if (cfunc.getType().isEGLHandle()) { in emitJniCode()
1646 String baseType = cfunc.getType().getBaseType().toLowerCase(); in emitJniCode()
1659 if (cfunc.getType().isEGLHandle()) { in emitJniCode()
1660 String baseType = cfunc.getType().getBaseType().toLowerCase(); in emitJniCode()