-/* native.h - table of native functions
+/* native/native.h - table of native functions
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
- M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
- P. Tomsich, J. Wenninger
+ Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
+ R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
+ C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, J. Wenninger,
+ Institut f. Computersprachen - TU Wien
This file is part of CACAO.
Authors: Reinhard Grafl
- $Id: native.h 1465 2004-11-08 11:09:01Z twisti $
+ $Id: native.h 1735 2004-12-07 14:33:27Z twisti $
*/
#define _NATIVE_H
-#include "jni.h"
-#include "nat/java_lang_String.h"
-#include "nat/java_lang_ClassLoader.h"
-#include "nat/java_lang_Throwable.h"
+#include "native/jni.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_ClassLoader.h"
+#include "native/include/java_lang_Throwable.h"
/* table for locating native methods */
java_objectarray *builtin_asm_createclasscontextarray(classinfo **end,classinfo **start);
java_lang_ClassLoader *builtin_asm_getclassloader(classinfo **end,classinfo **start);
+/*----- For Static Analysis of Natives by parseRT -----*/
+
+/*---------- global variables ---------------------------*/
+typedef struct classMeth classMeth;
+typedef struct nativeCall nativeCall;
+typedef struct methodCall methodCall;
+typedef struct nativeMethod nativeMethod;
+
+typedef struct nativeCompCall nativeCompCall;
+typedef struct methodCompCall methodCompCall;
+typedef struct nativeCompMethod nativeCompMethod;
+
+/*---------- Define Constants ---------------------------*/
+#define MAXCALLS 30
+
+struct classMeth {
+ int i_class;
+ int j_method;
+ int methCnt;
+};
+
+struct methodCall{
+ char *classname;
+ char *methodname;
+ char *descriptor;
+};
+
+struct nativeMethod {
+ char *methodname;
+ char *descriptor;
+ struct methodCall methodCalls[MAXCALLS];
+};
+
+
+struct nativeCall {
+ char *classname;
+ struct nativeMethod methods[MAXCALLS];
+ int methCnt;
+ int callCnt[MAXCALLS];
+};
+
+
+struct methodCompCall {
+ utf *classname;
+ utf *methodname;
+ utf *descriptor;
+};
+
+
+struct nativeCompMethod {
+ utf *methodname;
+ utf *descriptor;
+ struct methodCompCall methodCalls[MAXCALLS];
+};
+
+
+struct nativeCompCall {
+ utf *classname;
+ struct nativeCompMethod methods[MAXCALLS];
+ int methCnt;
+ int callCnt[MAXCALLS];
+};
+
+
+bool natcall2utf(bool);
+void printNativeCall(nativeCall);
+void markNativeMethodsRT(utf *, utf* , utf* );
+
#endif /* _NATIVE_H */