Lines Matching full: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() + " */");
836 String cname = cfunc.getArgName(cIndex);
881 CType returnType = cfunc.getType();
884 boolean isUnsupported = isUnsupportedFunc(cfunc);
889 " \"" + cfunc.getName() + "\");");
891 String retval = getErrorReturnValue(cfunc);
892 if (cfunc.getType().isEGLHandle()) {
893 String baseType = cfunc.getType().getBaseType().toLowerCase();
906 String requiresExtension = isRequiresFunc(cfunc);
913 " \"" + cfunc.getName() + "\");");
917 String retval = getErrorReturnValue(cfunc);
918 if (cfunc.getType().isEGLHandle()) {
919 String baseType = cfunc.getType().getBaseType().toLowerCase();
936 && (hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs)
937 || (cfunc.hasPointerArg() && numArrays > 0))
938 || hasCheckTest(cfunc)
939 || hasIfTest(cfunc))
941 // mChecker.getChecks(cfunc.getName()) != null
962 String retval = getErrorReturnValue(cfunc);
985 String cname = cfunc.getArgName(cIndex);
992 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
1009 emitLocalVariablesForSentinel(cfunc, out);
1024 String cname = cfunc.getArgName(cIndex);
1029 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
1057 String cname = cfunc.getArgName(cIndex);
1070 String cname = cfunc.getArgName(cIndex);
1072 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
1096 String cname = cfunc.getArgName(cIndex);
1128 emitNativeBoundsChecks(cfunc, cname, out, false,
1135 cfunc.getArgType(cIndex).getDeclaration() +
1146 emitSentinelCheck(cfunc, cname, out, false,
1173 emitNativeBoundsChecks(cfunc, cname, out, false,
1178 cfunc.getArgType(cIndex).getBaseType() +
1183 "_" + cfunc.getArgName(cIndex) + "Array";
1185 "_" + cfunc.getArgName(cIndex) + "BufferOffset";
1187 boolean nullAllowed = isNullAllowed(cfunc) || isPointerFunc;
1197 cfunc.getArgType(cIndex).getDeclaration() +
1208 cfunc.getArgType(cIndex).getDeclaration() +
1215 emitNativeBoundsChecks(cfunc, cname, out, true,
1234 String cname = cfunc.getArgName(cIndex);
1238 "_" + cfunc.getArgName(cIndex) + "Array";
1240 boolean nullAllowed = isNullAllowed(cfunc) || isPointerFunc;
1247 out.println(indent + indent + cname + " = (" +cfunc.getArgType(cIndex).getDeclaration() +") (_" + cname + "Base + " + bufferOffset + ");");
1258 String name = cfunc.getName();
1269 numArgs = cfunc.getNumArgs();
1287 typecast = "(" + cfunc.getArgType(i).getDeclaration() + ")";
1292 if (cfunc.getArgType(i).isConstCharPointer()) {
1296 if (cfunc.getArgType(i).isEGLHandle() &&
1297 !cfunc.getArgType(i).isPointer()){
1298 out.print(cfunc.getArgName(i)+"_native");
1300 out.print(cfunc.getArgName(i));
1341 cfunc.getArgName(cIndex) +
1344 (cfunc.getArgType(cIndex).isConst() ?
1351 "_" + cfunc.getArgName(cIndex) + "Array";
1355 cfunc.getArgName(cIndex) +
1357 (cfunc.getArgType(cIndex).isConst() ?
1372 String cname = cfunc.getArgName(cIndex);
1387 String baseType = cfunc.getArgType(cIndex).getBaseType().toLowerCase();
1390 "_" + cfunc.getArgName(cIndex) + "Remaining";
1391 offset = numArrays <= 1 ? "offset" : cfunc.getArgName(cIndex) + "Offset";
1397 "jobject " + cfunc.getArgName(cIndex) +
1400 cfunc.getArgName(cIndex) + "[i]);");
1405 cfunc.getArgName(cIndex) +
1407 cfunc.getArgName(cIndex) + "_new);");
1428 if (cfunc.getType().isEGLHandle()) {
1429 String baseType = cfunc.getType().getBaseType().toLowerCase();