Authors: Reinhard Grafl
- $Id: loader.h 705 2003-12-07 17:26:52Z twisti $
+ $Id: loader.h 757 2003-12-13 22:27:31Z twisti $
*/
#include <stdio.h>
-/************************* program switches ***********************************/
-
-extern bool loadverbose; /* Print debug messages during loading */
-extern bool linkverbose;
-extern bool initverbose; /* Log class initialization */
-extern bool makeinitializations; /* Initialize classes automatically */
-
-extern bool getloadingtime;
-extern long int loadingtime; /* CPU time for class loading */
+/* export variables */
+extern list unloadedclasses; /* list of all referenced but not loaded classes */
extern list unlinkedclasses; /* List containing all unlinked classes */
extern list linkedclasses; /* List containing all linked classes */
/* search for a method with a specified name and descriptor */
methodinfo *class_findmethod(classinfo *c, utf *name, utf *desc);
+methodinfo *class_fetchmethod(classinfo *c, utf *name, utf *desc);
methodinfo *class_resolvemethod(classinfo *c, utf *name, utf *dest);
/* search for a method with specified name and arguments (returntype ignored) */
void print_arraydescriptor(FILE *file, arraydescriptor *desc);
classinfo *loader_load(utf *topname);
+classinfo *loader_load_sysclass(classinfo **top,utf *topname);
/* set buffer for reading classdata */
void classload_buffer(u1 *buf, int len);
/* return the class indicated by the given descriptor */
-#define CLASSLOAD_SKIP 0
-#define CLASSLOAD_NEW 1
-#define CLASSLOAD_LOAD 2
-
-#if 0
-#define CLASSLOAD_NEW 0x0000 /* default */
-#define CLASSLOAD_LOAD 0x0001
-#define CLASSLOAD_SKIP 0x0002
-#define CLASSLOAD_PANIC 0x0000 /* default */
-#define CLASSLOAD_NOPANIC 0x0010
-#define CLASSLOAD_PRIMITIVE 0x0000 /* default */
-#define CLASSLOAD_VOID 0x0000 /* default */
-#define CLASSLOAD_NOVOID 0x0020
-#endif
+/* (see loader.c for documentation) */
+#define CLASSLOAD_NEW 0 /* default */
+#define CLASSLOAD_LOAD 0x0001
+#define CLASSLOAD_SKIP 0x0002
+#define CLASSLOAD_PANIC 0 /* default */
+#define CLASSLOAD_NOPANIC 0x0010
+#define CLASSLOAD_PRIMITIVE 0 /* default */
+#define CLASSLOAD_NULLPRIMITIVE 0x0020
+#define CLASSLOAD_VOID 0 /* default */
+#define CLASSLOAD_NOVOID 0x0040
+#define CLASSLOAD_NOCHECKEND 0 /* default */
+#define CLASSLOAD_CHECKEND 0x1000
classinfo *class_from_descriptor(char *utf_ptr,char *end_ptr,char **next,int mode);
+int type_from_descriptor(classinfo **cls,char *utf_ptr,char *end_ptr,char **next,int mode);
/* (used by class_new, don't use directly) */
void class_new_array(classinfo *c);