Authors: Reinhard Grafl
- $Id: native.h 1089 2004-05-27 15:41:37Z twisti $
+ $Id: native.h 1296 2004-07-10 17:02:15Z stefan $
*/
#include "nat/java_lang_Throwable.h"
+/* table for locating native methods */
+
+typedef struct nativeref nativeref;
+typedef struct nativecompref nativecompref;
+
+struct nativeref {
+ char *classname;
+ char *methodname;
+ char *descriptor;
+ bool isstatic;
+ functionptr func;
+};
+
+/* table for fast string comparison */
+
+struct nativecompref {
+ utf *classname;
+ utf *methodname;
+ utf *descriptor;
+ bool isstatic;
+ functionptr func;
+};
+
+
/* searchpath for classfiles */
+
extern char *classpath;
extern classinfo *class_java_lang_Class;
extern classinfo *class_java_lang_Integer;
-/* system exception classes required while compiling */
+/* system exception classes required in cacao */
extern classinfo *class_java_lang_Throwable;
+extern classinfo *class_java_lang_Exception;
+extern classinfo *class_java_lang_Error;
/* exception/error super class */
void init_system_exceptions();
void compile_all_class_methods(classinfo *c);
-/* throw an exception and exit */
+/* exception throwing functions */
+void throw_exception();
void throw_exception_exit();
+void throw_main_exception();
+void throw_main_exception_exit();
+
void throw_cacao_exception_exit(char *exception, char *message);
/* initialize new exceptions */
/* dispose a javastring */
void literalstring_free(java_objectheader*);
-void copy_vftbl(vftbl **dest, vftbl *src);
+void copy_vftbl(vftbl_t **dest, vftbl_t *src);
utf *create_methodsig(java_objectarray* types, char *retType);
classinfo *get_type(char **utf_ptr,char *desc_end, bool skip);