Lines Matching refs:cfunc

70     public void emitCode(CFunc cfunc, String original,
78 if (cfunc.hasTypedPointerArg()) {
79 jfunc = JFunc.convert(cfunc, true);
103 if (cfunc.hasEGLHandleArg()) {
108 jfunc = JFunc.convert(cfunc, false);
225 boolean isNullAllowed(CFunc cfunc) {
226 String[] checks = mChecker.getChecks(cfunc.getName());
240 boolean hasCheckTest(CFunc cfunc) {
241 String[] checks = mChecker.getChecks(cfunc.getName());
255 boolean hasIfTest(CFunc cfunc) {
256 String[] checks = mChecker.getChecks(cfunc.getName());
294 String getErrorReturnValue(CFunc cfunc) {
295 CType returnType = cfunc.getType();
305 String[] checks = mChecker.getChecks(cfunc.getName());
321 boolean isUnsupportedFunc(CFunc cfunc) {
322 String[] checks = mChecker.getChecks(cfunc.getName());
336 String isRequiresFunc(CFunc cfunc) {
337 String[] checks = mChecker.getChecks(cfunc.getName());
351 void emitNativeBoundsChecks(CFunc cfunc, String cname, PrintStream out,
354 String[] checks = mChecker.getChecks(cfunc.getName());
429 void emitSentinelCheck(CFunc cfunc, String cname, PrintStream out,
432 String[] checks = mChecker.getChecks(cfunc.getName());
472 void emitLocalVariablesForSentinel(CFunc cfunc, PrintStream out) {
474 String[] checks = mChecker.getChecks(cfunc.getName());
492 boolean hasNonConstArg(JFunc jfunc, CFunc cfunc, List<Integer> nonPrimitiveArgs) {
498 if (!cfunc.getArgType(cIndex).isConst()) {
502 if (!cfunc.getArgType(cIndex).isConst()) {
732 CFunc cfunc = jfunc.getCFunc();
740 out.println("/* " + cfunc.getOriginal() + " */");
826 String cname = cfunc.getArgName(cIndex);
871 CType returnType = cfunc.getType();
874 boolean isUnsupported = isUnsupportedFunc(cfunc);
879 " \"" + cfunc.getName() + "\");");
881 String retval = getErrorReturnValue(cfunc);
882 if (cfunc.getType().isEGLHandle()) {
883 String baseType = cfunc.getType().getBaseType().toLowerCase();
896 String requiresExtension = isRequiresFunc(cfunc);
903 " \"" + cfunc.getName() + "\");");
907 String retval = getErrorReturnValue(cfunc);
908 if (cfunc.getType().isEGLHandle()) {
909 String baseType = cfunc.getType().getBaseType().toLowerCase();
926 && (hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs)
927 || (cfunc.hasPointerArg() && numArrays > 0))
928 || hasCheckTest(cfunc)
929 || hasIfTest(cfunc))
931 // mChecker.getChecks(cfunc.getName()) != null
952 String retval = getErrorReturnValue(cfunc);
975 String cname = cfunc.getArgName(cIndex);
982 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
999 emitLocalVariablesForSentinel(cfunc, out);
1014 String cname = cfunc.getArgName(cIndex);
1019 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
1047 String cname = cfunc.getArgName(cIndex);
1060 String cname = cfunc.getArgName(cIndex);
1062 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
1086 String cname = cfunc.getArgName(cIndex);
1118 emitNativeBoundsChecks(cfunc, cname, out, false,
1125 cfunc.getArgType(cIndex).getDeclaration() +
1136 emitSentinelCheck(cfunc, cname, out, false,
1163 emitNativeBoundsChecks(cfunc, cname, out, false,
1168 cfunc.getArgType(cIndex).getBaseType() +
1173 "_" + cfunc.getArgName(cIndex) + "Array";
1175 "_" + cfunc.getArgName(cIndex) + "BufferOffset";
1177 boolean nullAllowed = isNullAllowed(cfunc) || isPointerFunc;
1187 cfunc.getArgType(cIndex).getDeclaration() +
1198 cfunc.getArgType(cIndex).getDeclaration() +
1205 emitNativeBoundsChecks(cfunc, cname, out, true,
1224 String cname = cfunc.getArgName(cIndex);
1228 "_" + cfunc.getArgName(cIndex) + "Array";
1230 boolean nullAllowed = isNullAllowed(cfunc) || isPointerFunc;
1237 out.println(indent + indent + cname + " = (" +cfunc.getArgType(cIndex).getDeclaration() +") (_" + cname + "Base + " + bufferOffset + ");");
1248 String name = cfunc.getName();
1259 numArgs = cfunc.getNumArgs();
1277 typecast = "(" + cfunc.getArgType(i).getDeclaration() + ")";
1282 if (cfunc.getArgType(i).isConstCharPointer()) {
1286 if (cfunc.getArgType(i).isEGLHandle() &&
1287 !cfunc.getArgType(i).isPointer()){
1288 out.print(cfunc.getArgName(i)+"_native");
1290 out.print(cfunc.getArgName(i));
1331 cfunc.getArgName(cIndex) +
1334 (cfunc.getArgType(cIndex).isConst() ?
1341 "_" + cfunc.getArgName(cIndex) + "Array";
1345 cfunc.getArgName(cIndex) +
1347 (cfunc.getArgType(cIndex).isConst() ?
1362 String cname = cfunc.getArgName(cIndex);
1377 String baseType = cfunc.getArgType(cIndex).getBaseType().toLowerCase();
1380 "_" + cfunc.getArgName(cIndex) + "Remaining";
1381 offset = numArrays <= 1 ? "offset" : cfunc.getArgName(cIndex) + "Offset";
1387 "jobject " + cfunc.getArgName(cIndex) +
1390 cfunc.getArgName(cIndex) + "[i]);");
1395 cfunc.getArgName(cIndex) +
1397 cfunc.getArgName(cIndex) + "_new);");
1418 if (cfunc.getType().isEGLHandle()) {
1419 String baseType = cfunc.getType().getBaseType().toLowerCase();