Lines Matching defs:jfunc

71         JFunc jfunc;
76 jfunc = JFunc.convert(cfunc, true);
81 signature = jfunc.toString();
90 emitNativeDeclaration(jfunc, javaImplStream);
91 emitJavaCode(jfunc, javaImplStream);
94 emitJavaInterfaceCode(jfunc, javaInterfaceStream);
97 emitJniCode(jfunc, cStream);
101 jfunc = JFunc.convert(cfunc, false);
103 signature = jfunc.toString();
112 emitNativeDeclaration(jfunc, javaImplStream);
115 emitJavaInterfaceCode(jfunc, javaInterfaceStream);
118 emitJavaCode(jfunc, javaImplStream);
119 emitJniCode(jfunc, cStream);
123 public void emitNativeDeclaration(JFunc jfunc, PrintStream out) {
124 out.println(" // C function " + jfunc.getCFunc().getOriginal());
127 emitFunction(jfunc, out, true, false);
130 public void emitJavaInterfaceCode(JFunc jfunc, PrintStream out) {
131 emitFunction(jfunc, out, false, true);
134 public void emitJavaCode(JFunc jfunc, PrintStream out) {
135 emitFunction(jfunc, out, false, false);
138 boolean isPointerFunc(JFunc jfunc) {
139 String name = jfunc.getName();
141 && jfunc.getCFunc().hasPointerArg();
144 void emitFunctionCall(JFunc jfunc, PrintStream out, String iii, boolean grabArray) {
145 boolean isVoid = jfunc.getType().isVoid();
146 boolean isPointerFunc = isPointerFunc(jfunc);
150 jfunc.getType() + " _returnValue;");
154 jfunc.getName() +
158 int numArgs = jfunc.getNumArgs();
160 String argName = jfunc.getArgName(i);
161 JType argType = jfunc.getArgType(i);
415 boolean hasNonConstArg(JFunc jfunc, CFunc cfunc, List<Integer> nonPrimitiveArgs) {
419 int cIndex = jfunc.getArgCIndex(idx);
420 if (jfunc.getArgType(idx).isArray()) {
424 } else if (jfunc.getArgType(idx).isBuffer()) {
444 void emitFunction(JFunc jfunc, PrintStream out, boolean nativeDecl, boolean interfaceDecl) {
445 boolean isPointerFunc = isPointerFunc(jfunc);
459 jfunc.getType() + " " +
460 jfunc.getName() +
467 jfunc.getType() + " " +
468 jfunc.getName() +
472 int numArgs = jfunc.getNumArgs();
474 String argName = jfunc.getArgName(i);
475 JType argType = jfunc.getArgType(i);
497 // emitBoundsChecks(jfunc, out, iii);
498 emitFunctionCall(jfunc, out, iii, false);
506 String fname = jfunc.getName();
578 boolean isVoid = jfunc.getType().isVoid();
654 public void emitJniCode(JFunc jfunc, PrintStream out) {
655 CFunc cfunc = jfunc.getCFunc();
673 String outName = "android_" + jfunc.getName();
674 boolean isPointerFunc = isPointerFunc(jfunc);
678 !jfunc.getCFunc().hasPointerArg();
684 out.println(getJniType(jfunc.getType()));
687 String rsignature = getJniName(jfunc.getType());
690 int numArgs = jfunc.getNumArgs();
692 JType argType = jfunc.getArgType(i);
713 jfunc.getName() +
736 JType argType = jfunc.getArgType(i);
745 if (jfunc.getArgType(i).isBuffer()) {
746 int cIndex = jfunc.getArgCIndex(i);
758 out.print(getJniType(argType) + " " + jfunc.getArgName(i) + suffix);
770 JType argType = jfunc.getArgType(idx);
835 hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs);
878 int cIndex = jfunc.getArgCIndex(idx);
881 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
883 if (jfunc.getArgType(idx).isArray()) {
887 jfunc.getArgName(idx) +
897 jfunc.getArgName(idx) +
908 int cIndex = jfunc.getArgCIndex(idx);
921 int cIndex = jfunc.getArgCIndex(idx);
924 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx));
945 int cIndex = jfunc.getArgCIndex(idx);
953 if (jfunc.getArgType(idx).isArray()) {
997 jfunc.getArgName(idx) +
1116 int cIndex = jfunc.getArgCIndex(idx);
1117 if (jfunc.getArgType(idx).isArray()) {
1123 "if (" + jfunc.getArgName(idx) + "_base) {");
1128 jfunc.getArgName(idx) + "_ref, " +
1137 } else if (jfunc.getArgType(idx).isBuffer()) {
1160 int cIndex = jfunc.getArgCIndex(idx);