Declare functions with (void).
authortwisti <none@none>
Tue, 21 Dec 2004 10:14:35 +0000 (10:14 +0000)
committertwisti <none@none>
Tue, 21 Dec 2004 10:14:35 +0000 (10:14 +0000)
src/mm/boehm.h
src/mm/memory.h
src/toolbox/chain.h
src/toolbox/logging.h
src/vm/builtin.h
src/vm/jit/inline/sets.h
src/vm/loader.h
src/vm/tables.h

index f427997c23ef2e67843908b0c7cdbf7a262ab75d..d8687e78a9be6cc06ad21f2a728f9df5afdf159c 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Christian Thalinger
 
-   $Id: boehm.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: boehm.h 1793 2004-12-21 10:14:35Z twisti $
 
 */
 
@@ -52,18 +52,19 @@ struct otherstackcall {
 /* function prototypes */
 
 void *heap_alloc_uncollectable(u4 bytelength);
-void runboehmfinalizer(void *o, void *p);
+void  runboehmfinalizer(void *o, void *p);
 void *heap_allocate (u4 bytelength, bool references, methodinfo *finalizer);
 void *heap_reallocate(void *p, u4 bytelength);
-void heap_free(void *p);
-void gc_init(u4 heapmaxsize, u4 heapstartsize);
-void gc_call();
-s8 gc_get_heap_size();
-s8 gc_get_free_bytes();
-s8 gc_get_max_heap_size();
-void gc_invoke_finalizers();
-void gc_finalize_all();
-void *gc_out_of_memory();
+void  heap_free(void *p);
+
+void  gc_init(u4 heapmaxsize, u4 heapstartsize);
+void  gc_call(void);
+s8    gc_get_heap_size(void);
+s8    gc_get_free_bytes(void);
+s8    gc_get_max_heap_size(void);
+void  gc_invoke_finalizers(void);
+void  gc_finalize_all(void);
+void *gc_out_of_memory(void);
 
 #endif /* _BOEHM_H */
 
index 5a4baa8532c21dd11921962ff3fef43baf5618ab..0f1429ba940ad98e8d7d7ebc955a6ba11b89249e 100644 (file)
@@ -1,4 +1,4 @@
-/* toolbox/memory.h - macros for memory management
+/* mm/memory.h - macros for memory management
 
    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: memory.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: memory.h 1793 2004-12-21 10:14:35Z twisti $
 
 */
 
@@ -170,7 +170,7 @@ void *mem_realloc(void *src, s4 len1, s4 len2);
 
 void *dump_alloc(s4 size);
 void *dump_realloc(void *src, s4 len1, s4 len2);
-s4    dump_size();
+s4    dump_size(void);
 void  dump_release(s4 size);
 
 #endif /* _MEMORY_H */
index 4397de2ea1b1101959fc143bfe0f42abe5ba3a59..a95b2395905879055574e5cb96b5df5026575851 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: chain.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: chain.h 1793 2004-12-21 10:14:35Z twisti $
 
 */
 
@@ -50,8 +50,8 @@ typedef struct chain {                    /* structure for list */
 
 
 /* function prototypes */
-chain *chain_new();
-chain *chain_dnew();
+chain *chain_new(void);
+chain *chain_dnew(void);
 void chain_free(chain *c);
 
 void chain_addafter(chain *c, void *element);
index 98f6844805661ac453e0307c6e134d188718a272..2f4dfad650f7374d83298b54773ba9e45ef3cdf8 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: logging.h 1761 2004-12-15 15:48:43Z twisti $
+   $Id: logging.h 1793 2004-12-21 10:14:35Z twisti $
 
 */
 
 
 #define MAXLOGTEXT 500
 
-/* function prototypes */
+/* function prototypes ********************************************************/
 
 void log_init(char *fname);
 void log_text(char *txt);
 void log_plain(char *txt); /* same as log_text without "LOG: " and newline */
-void log_flush();          /* fflush logfile */
-void log_nl();             /* newline and fflush */
+void log_flush(void);      /* fflush logfile */
+void log_nl(void);         /* newline and fflush */
 
-void log_cputime();
+void log_cputime(void);
 
 void log_message_class(const char *msg, classinfo *c);
 void log_message_method(const char *msg, methodinfo *m);
 
 void dolog(char *txt, ...);
-void dolog_plain(char *txt, ...); /* same as dolog without "LOG: " and newline */
+void dolog_plain(char *txt, ...); /* same as dolog without "LOG: " and newline*/
 void error(char *txt, ...);
 
 /* XXX this is just a quick hack on darwin */
@@ -63,7 +63,7 @@ void error(char *txt, ...);
 void panic(char *txt);
 #endif
 
-FILE *get_logfile(); /* return the current logfile */
+FILE *get_logfile(void);                        /* return the current logfile */
 
 #endif /* _LOGGING_H */
 
index c21a3c292864514e909295c33cea0ec034741320..ca1cf5bb43f6f11915508297f66d3b3f958df446 100644 (file)
@@ -28,7 +28,7 @@
 
    Changes: Edwin Steiner
 
-   $Id: builtin.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: builtin.h 1793 2004-12-21 10:14:35Z twisti $
 
 */
 
@@ -370,7 +370,7 @@ java_arrayheader *builtin_clone_array(void *env, java_arrayheader *o);
 /* NOT AN OP */
 
 /* builtin_dummy just panics if it is executed. */
-s4 builtin_dummy();
+s4 builtin_dummy(void);
 /* NOT AN OP */
 
 /* conversion helper functions */
@@ -378,20 +378,20 @@ inline float intBitsToFloat(s4 i);
 inline float longBitsToDouble(s8 l);
 
 /* this is a wrapper for calls from asmpart */
-java_objectheader **builtin_asm_get_exceptionptrptr();
+java_objectheader **builtin_asm_get_exceptionptrptr(void);
 
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
-static inline java_objectheader **builtin_get_exceptionptrptr();
+static inline java_objectheader **builtin_get_exceptionptrptr(void);
 /* NOT AN OP */
-static inline methodinfo **builtin_get_threadrootmethod();
+static inline methodinfo **builtin_get_threadrootmethod(void);
 /* NOT AN OP */
 
-inline java_objectheader **builtin_get_exceptionptrptr()
+inline java_objectheader **builtin_get_exceptionptrptr(void)
 {
        return &THREADINFO->_exceptionptr;
 }
 
-inline methodinfo **builtin_get_threadrootmethod()
+inline methodinfo **builtin_get_threadrootmethod(void)
 {
        return &THREADINFO->_threadrootmethod;
 }
@@ -401,7 +401,7 @@ inline methodinfo **builtin_get_threadrootmethod()
 /* returns the root method of a thread. this is used in asmpart.S and delivers the abort condition
    for the stack unwinding for getClassContext and getClassLoader. For the main thread this is the main function.
    Otherwhise it is the thread's run method (at least that's how I see it) (jowenn) */
-methodinfo *builtin_asm_get_threadrootmethod();
+methodinfo *builtin_asm_get_threadrootmethod(void);
 
 /* returns the current top element of the stack frame info list (needed for unwinding across native functions) */
 /* on i386 this is a pointer to a structure 
@@ -412,7 +412,7 @@ methodinfo *builtin_asm_get_threadrootmethod();
 points here---->| previous element in list                     |
                ------------------------------------------------
 */
-void *builtin_asm_get_stackframeinfo();
+void *builtin_asm_get_stackframeinfo(void);
 stacktraceelement *builtin_stacktrace_copy(stacktraceelement **,stacktraceelement *begin, stacktraceelement *end);
 #endif /* _BUILTIN_H */
 
index c6f91f1ed4930bf2aeab7f7a5e863c4a635af992..b12d41553da00b7e878c75e95dba0e4b5ce03dc6 100644 (file)
@@ -1,4 +1,4 @@
-/* jit/sets.h -
+/* vm/jit/sets.h -
 
    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
@@ -26,7 +26,7 @@
 
    Authors: Carolyn Oates
 
-   $Id: sets.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: sets.h 1793 2004-12-21 10:14:35Z twisti $
 
 */
 
@@ -96,7 +96,7 @@ struct fldSetNode {
 fldSetNode *inFldSet (fldSetNode *, fieldinfo *);
 fldSetNode *addFldRef(fldSetNode *, fieldinfo *);
 fldSet *add2FldSet(fldSet *, fieldinfo *, bool, bool);
-fldSet *createFldSet();
+fldSet *createFldSet(void);
 int printFldSet(fldSetNode *);
 int printFieldSet(fldSet *);
 
@@ -124,7 +124,7 @@ struct methSetNode {
 int inMethSet (methSetNode *, methodinfo *);
 methSetNode *addMethRef(methSetNode *, methodinfo *);
 methSet *add2MethSet(methSet    *, methodinfo *);
-methSet *createMethSet();
+methSet *createMethSet(void);
 int printMethSet   (methSetNode *);
 int printMethodSet (methSet *);
 
@@ -151,7 +151,7 @@ struct classSetNode {
 int inSet(classSetNode *, classinfo *);
 classSetNode *addElement(classSetNode *,  classinfo *);
 classSet *add2ClassSet(classSet *,  classinfo *);
-classSet *createClassSet();
+classSet *createClassSet(void);
 int inRange(classSetNode *, classinfo *);
 classSetNode *addClassCone(classSetNode *,  classinfo *);
 classSetNode *intersectSubtypesWithSet(classinfo *, classSetNode *); 
index 6909bdae4656d4c424acfa7260d0077197655099..ee323d9167bf09f870f9d537bc68a7ae368f44b0 100644 (file)
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: loader.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: loader.h 1793 2004-12-21 10:14:35Z twisti $
 */
 
 
 
 typedef struct classbuffer {
        classinfo *class;                   /* pointer to classinfo structure     */
-       u1 *data;                           /* pointer to byte code               */
-       s4 size;                            /* size of the byte code              */
-       u1 *pos;                            /* current read position              */
+       u1        *data;                    /* pointer to byte code               */
+       s4         size;                    /* size of the byte code              */
+       u1         *pos;                    /* current read position              */
 } classbuffer;
 
 
 /* export variables */
 
-#ifdef USE_THREADS
+#if defined(USE_THREADS)
 extern int blockInts;
 #endif
 
@@ -99,17 +99,17 @@ extern utf *array_packagename;
 
 /************************ prototypes ******************************************/
 
-/* initialize laoder, load important systemclasses */
-void loader_init();
+/* initialize loader, load important systemclasses */
+void loader_init(u1 *stackbottom);
 
 void suck_init(char *cpath);
-void create_all_classes();
+void create_all_classes(void);
 void suck_stop(classbuffer *cb);
 
 /* free resources */
-void loader_close();
+void loader_close(void);
 
-void loader_compute_subclasses();
+void loader_compute_subclasses(classinfo *c);
 
 /* retrieve constantpool element */
 voidptr class_getconstant(classinfo *class, u4 pos, u4 ctype);
@@ -190,8 +190,8 @@ void field_display(fieldinfo *f);
 void method_display(methodinfo *m);
 void method_display_w_class(methodinfo *m);
 
-utf* clinit_desc();
-utf* clinit_name();
+utf* clinit_desc(void);
+utf* clinit_name(void);
 
 
 /******************************** CLASSPATH handling *******************/
index 7c19b1baf53924038720b37abc4631cd74a129b4..590a731ad136f00f17bad19f3dd34b6f5d892d3c 100644 (file)
@@ -1,4 +1,4 @@
-/* tables.h - 
+/* vm/tables.h - 
 
    Copyright (C) 1996-2005 R. Grafl, A. Krall, C. Kruegel, C. Oates,
    R. Obermaisser, M. Platter, M. Probst, S. Ring, E. Steiner,
@@ -26,7 +26,7 @@
 
    Authors: Reinhard Grafl
 
-   $Id: tables.h 1735 2004-12-07 14:33:27Z twisti $
+   $Id: tables.h 1793 2004-12-21 10:14:35Z twisti $
 
 */
 
@@ -35,7 +35,9 @@
 #define _TABLES_H
 
 #include <stdio.h>
-#include "global.h" /* for unicode. -- phil */
+
+#include "vm/global.h"
+
 
 #define CLASS(name)     (unicode_getclasslink(unicode_new_char(name)))
 
@@ -50,10 +52,10 @@ extern list unlinkedclasses;   /* this is only used for eager class loading   */
 
 
 /* creates hashtables for symboltables */
-void tables_init();
+void tables_init(void);
 
 /* free memory for hashtables */ 
-void tables_close();
+void tables_close(void);
 
 /* check if a UTF-8 string is valid */
 bool is_valid_utf(char *utf_ptr, char *end_pos);
@@ -84,7 +86,7 @@ utf *utf_new_char(char *text);
 utf *utf_new_char_classname(char *text);
 
 /* show utf-table */
-void utf_show();
+void utf_show(void);
 
 /* get next unicode character of a utf-string */
 u2 utf_nextu2(char **utf);
@@ -123,8 +125,8 @@ classinfo *class_get(utf *u);
 bool class_remove(classinfo *c);
 
 #if defined(USE_THREADS) && defined(NATIVE_THREADS)
-void tables_lock();
-void tables_unlock();
+void tables_lock(void);
+void tables_unlock(void);
 #endif
 
 #endif /* _TABLES_H */