Lines Matching refs:jfunc

74         JFunc jfunc;  in emitCode()  local
79 jfunc = JFunc.convert(cfunc, true); in emitCode()
84 signature = jfunc.toString(); in emitCode()
93 emitNativeDeclaration(jfunc, javaImplStream); in emitCode()
94 emitJavaCode(jfunc, javaImplStream); in emitCode()
97 emitJavaInterfaceCode(jfunc, javaInterfaceStream); in emitCode()
100 emitJniCode(jfunc, cStream); in emitCode()
108 jfunc = JFunc.convert(cfunc, false); in emitCode()
110 signature = jfunc.toString(); in emitCode()
119 emitNativeDeclaration(jfunc, javaImplStream); in emitCode()
122 emitJavaInterfaceCode(jfunc, javaInterfaceStream); in emitCode()
125 emitJavaCode(jfunc, javaImplStream); in emitCode()
126 emitJniCode(jfunc, cStream); in emitCode()
130 public void emitNativeDeclaration(JFunc jfunc, PrintStream out) { in emitNativeDeclaration() argument
132 out.println(" /* @hide C function " + jfunc.getCFunc().getOriginal() + " */"); in emitNativeDeclaration()
135 out.println(" // C function " + jfunc.getCFunc().getOriginal()); in emitNativeDeclaration()
139 emitFunction(jfunc, out, true, false); in emitNativeDeclaration()
142 public void emitJavaInterfaceCode(JFunc jfunc, PrintStream out) { in emitJavaInterfaceCode() argument
143 emitFunction(jfunc, out, false, true); in emitJavaInterfaceCode()
146 public void emitJavaCode(JFunc jfunc, PrintStream out) { in emitJavaCode() argument
147 emitFunction(jfunc, out, false, false); in emitJavaCode()
150 boolean isPointerFunc(JFunc jfunc) { in isPointerFunc() argument
151 String name = jfunc.getName(); in isPointerFunc()
153 && jfunc.getCFunc().hasPointerArg(); in isPointerFunc()
156 void emitFunctionCall(JFunc jfunc, PrintStream out, String iii, boolean grabArray) { in emitFunctionCall() argument
157 boolean isVoid = jfunc.getType().isVoid(); in emitFunctionCall()
158 boolean isPointerFunc = isPointerFunc(jfunc); in emitFunctionCall()
162 jfunc.getType() + " _returnValue;"); in emitFunctionCall()
166 jfunc.getName() + in emitFunctionCall()
170 int numArgs = jfunc.getNumArgs(); in emitFunctionCall()
172 String argName = jfunc.getArgName(i); in emitFunctionCall()
173 JType argType = jfunc.getArgType(i); in emitFunctionCall()
540 boolean hasNonConstArg(JFunc jfunc, CFunc cfunc, List<Integer> nonPrimitiveArgs) { in hasNonConstArg() argument
544 int cIndex = jfunc.getArgCIndex(idx); in hasNonConstArg()
545 if (jfunc.getArgType(idx).isArray()) { in hasNonConstArg()
549 } else if (jfunc.getArgType(idx).isBuffer()) { in hasNonConstArg()
569 void emitFunction(JFunc jfunc, PrintStream out, boolean nativeDecl, boolean interfaceDecl) { in emitFunction() argument
570 boolean isPointerFunc = isPointerFunc(jfunc); in emitFunction()
584 jfunc.getType() + " " + in emitFunction()
585 jfunc.getName() + in emitFunction()
592 jfunc.getType() + " " + in emitFunction()
593 jfunc.getName() + in emitFunction()
597 int numArgs = jfunc.getNumArgs(); in emitFunction()
599 String argName = jfunc.getArgName(i); in emitFunction()
600 JType argType = jfunc.getArgType(i); in emitFunction()
623 emitFunctionCall(jfunc, out, iii, false); in emitFunction()
631 String fname = jfunc.getName(); in emitFunction()
703 boolean isVoid = jfunc.getType().isVoid(); in emitFunction()
779 public void emitJniCode(JFunc jfunc, PrintStream out) { in emitJniCode() argument
780 CFunc cfunc = jfunc.getCFunc(); in emitJniCode()
798 String outName = "android_" + jfunc.getName(); in emitJniCode()
799 boolean isPointerFunc = isPointerFunc(jfunc); in emitJniCode()
813 && !jfunc.getCFunc().hasPointerArg(); in emitJniCode()
819 out.println(getJniType(jfunc.getType())); in emitJniCode()
822 String rsignature = getJniName(jfunc.getType()); in emitJniCode()
825 int numArgs = jfunc.getNumArgs(); in emitJniCode()
827 JType argType = jfunc.getArgType(i); in emitJniCode()
850 jfunc.getName() + in emitJniCode()
874 JType argType = jfunc.getArgType(i); in emitJniCode()
883 if (jfunc.getArgType(i).isBuffer()) { in emitJniCode()
884 int cIndex = jfunc.getArgCIndex(i); in emitJniCode()
887 bufferArgTypes.add(jfunc.getArgType(i)); in emitJniCode()
896 out.print(getJniType(argType) + " " + jfunc.getArgName(i) + suffix); in emitJniCode()
908 JType argType = jfunc.getArgType(idx); in emitJniCode()
986 && (hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs) in emitJniCode()
1048 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1051 if (jfunc.getArgType(idx).isBuffer() in emitJniCode()
1052 || jfunc.getArgType(idx).isArray() in emitJniCode()
1053 || !jfunc.getArgType(idx).isEGLHandle()) in emitJniCode()
1056 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx)); in emitJniCode()
1062 "GetHandleID, " + jfunc.getArgName(idx) + in emitJniCode()
1087 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1090 if (!jfunc.getArgType(idx).isBuffer() && !jfunc.getArgType(idx).isArray()) in emitJniCode()
1093 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx)); in emitJniCode()
1095 if (jfunc.getArgType(idx).isArray() && !jfunc.getArgType(idx).isClass()) { in emitJniCode()
1099 jfunc.getArgName(idx) + in emitJniCode()
1109 jfunc.getArgName(idx) + in emitJniCode()
1121 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1141 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1147 CType type = cfunc.getArgType(jfunc.getArgCIndex(idx)); in emitJniCode()
1182 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1193 if (jfunc.getArgType(idx).isArray() in emitJniCode()
1194 && !jfunc.getArgType(idx).isEGLHandle()) { in emitJniCode()
1242 String arrayGetter = jfunc.getArgType(idx).getArrayGetterForPrimitiveArray(); in emitJniCode()
1247 jfunc.getArgName(idx) + in emitJniCode()
1261 } else if (jfunc.getArgType(idx).isArray() in emitJniCode()
1262 && jfunc.getArgType(idx).isEGLHandle()) { in emitJniCode()
1302 jfunc.getArgName(idx) + " = new " + in emitJniCode()
1311 } else if (jfunc.getArgType(idx).isBuffer()) { in emitJniCode()
1373 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1375 if(!jfunc.getArgType(idx).isBuffer() || isPointerFunc) continue; in emitJniCode()
1390 JType argType = jfunc.getArgType(idx); in emitJniCode()
1482 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1483 if (jfunc.getArgType(idx).isArray() && !jfunc.getArgType(idx).isClass()) { in emitJniCode()
1489 "if (" + jfunc.getArgName(idx) + "_base) {"); in emitJniCode()
1490 … String arrayReleaser = jfunc.getArgType(idx).getArrayReleaserForPrimitiveArray(); in emitJniCode()
1495 jfunc.getArgName(idx) + "_ref, " + in emitJniCode()
1496 … "(j" + jfunc.getArgType(idx).getBaseType() + "*)" + cfunc.getArgName(cIndex) + in emitJniCode()
1503 } else if (jfunc.getArgType(idx).isBuffer()) { in emitJniCode()
1505 JType argType = jfunc.getArgType(idx); in emitJniCode()
1541 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1556 int cIndex = jfunc.getArgCIndex(idx); in emitJniCode()
1558 if (jfunc.getArgType(idx).isArray() && jfunc.getArgType(idx).isClass()) { in emitJniCode()
1563 "if (" + jfunc.getArgName(idx) + ") {"); in emitJniCode()
1580 "delete[] " + jfunc.getArgName(idx) + ";"); in emitJniCode()
1605 getJniType(jfunc.getType()) + ")_returnValue;"); in emitJniCode()