[kaffe] CVS kaffe (doogie): Make the DBG macro a proper statement, using do { ... } while(0).

Kaffe CVS cvs-commits at kaffe.org
Sat Dec 18 22:33:29 PST 2004


PatchSet 5662 
Date: 2004/12/19 06:25:01
Author: doogie
Branch: HEAD
Tag: (none) 
Log:
Make the DBG macro a proper statement, using do { ... } while(0).

Members: 
	ChangeLog:1.3207->1.3208 
	config/i386/jit3-i386.def:1.27->1.28 
	kaffe/kaffevm/baseClasses.c:1.55->1.56 
	kaffe/kaffevm/classMethod.c:1.127->1.128 
	kaffe/kaffevm/classPool.c:1.30->1.31 
	kaffe/kaffevm/code-analyse.c:1.43->1.44 
	kaffe/kaffevm/debug.c:1.58->1.59 
	kaffe/kaffevm/debug.h:1.38->1.39 
	kaffe/kaffevm/exception.c:1.90->1.91 
	kaffe/kaffevm/external.c:1.70->1.71 
	kaffe/kaffevm/findInJar.c:1.60->1.61 
	kaffe/kaffevm/gcFuncs.c:1.58->1.59 
	kaffe/kaffevm/itypes.c:1.31->1.32 
	kaffe/kaffevm/locks.c:1.52->1.53 
	kaffe/kaffevm/lookup.c:1.40->1.41 
	kaffe/kaffevm/object.c:1.29->1.30 
	kaffe/kaffevm/soft.c:1.70->1.71 
	kaffe/kaffevm/thread.c:1.84->1.85 
	kaffe/kaffevm/utf8const.c:1.42->1.43 
	kaffe/kaffevm/jit3/machine.c:1.60->1.61 
	kaffe/kaffevm/jit3/registers.c:1.16->1.17 
	kaffe/kaffevm/kaffe-gc/gc-incremental.c:1.13->1.14 
	kaffe/kaffevm/kaffe-gc/gc-mem.c:1.18->1.19 
	kaffe/kaffevm/kaffe-gc/gc-refs.c:1.5->1.6 
	kaffe/kaffevm/systems/unix-jthreads/jthread.c:1.124->1.125 
	kaffe/kaffevm/systems/unix-pthreads/lock-impl.c:1.12->1.13 
	kaffe/kaffevm/systems/unix-pthreads/thread-impl.c:1.59->1.60 
	kaffe/kaffevm/verifier/verify-block.c:1.3->1.4 
	libraries/clib/native/Object.c:1.11->1.12 
	libraries/clib/native/Thread.c:1.20->1.21 
	libraries/clib/net/PlainDatagramSocketImpl.c:1.48->1.49 
	libraries/clib/net/PlainSocketImpl.c:1.49->1.50 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3207 kaffe/ChangeLog:1.3208
--- kaffe/ChangeLog:1.3207	Sat Dec 18 14:51:46 2004
+++ kaffe/ChangeLog	Sun Dec 19 06:25:01 2004
@@ -1,3 +1,26 @@
+2004-12-19  Adam Heath  <doogie at brainfood.com>
+
+	* config/i386/jit3-i386.def, kaffe/kaffevm/baseClasses.c,
+	  kaffe/kaffevm/classMethod.c, kaffe/kaffevm/classPool.c,
+	  kaffe/kaffevm/code-analyse.c, kaffe/kaffevm/debug.c,
+	  kaffe/kaffevm/debug.h, kaffe/kaffevm/exception.c,
+	  kaffe/kaffevm/external.c, kaffe/kaffevm/findInJar.c,
+	  kaffe/kaffevm/gcFuncs.c, kaffe/kaffevm/itypes.c,
+	  kaffe/kaffevm/jit3/machine.c, kaffe/kaffevm/jit3/registers.c,
+	  kaffe/kaffevm/kaffe-gc/gc-incremental.c,
+	  kaffe/kaffevm/kaffe-gc/gc-mem.c, kaffe/kaffevm/kaffe-gc/gc-refs.c,
+	  kaffe/kaffevm/locks.c, kaffe/kaffevm/lookup.c,
+	  kaffe/kaffevm/object.c, kaffe/kaffevm/soft.c,
+	  kaffe/kaffevm/systems/unix-jthreads/jthread.c,
+	  kaffe/kaffevm/systems/unix-pthreads/lock-impl.c,
+	  kaffe/kaffevm/systems/unix-pthreads/thread-impl.c,
+	  kaffe/kaffevm/thread.c, kaffe/kaffevm/utf8const.c,
+	  kaffe/kaffevm/verifier/verify-block.c, libraries/clib/native/Object.c,
+	  libraries/clib/native/Thread.c,
+	  libraries/clib/net/PlainDatagramSocketImpl.c,
+	  libraries/clib/net/PlainSocketImpl.c:
+	  Make the DBG macro a proper statement, using do { ... } while(0).
+
 2004-12-18  Guilhem Lavaux  <guilhem at kaffe.org>
 
 	* config/mips/irix5/jit3-md.h: Fixed a path.
Index: kaffe/config/i386/jit3-i386.def
diff -u kaffe/config/i386/jit3-i386.def:1.27 kaffe/config/i386/jit3-i386.def:1.28
--- kaffe/config/i386/jit3-i386.def:1.27	Sat Dec 11 03:59:54 2004
+++ kaffe/config/i386/jit3-i386.def	Sun Dec 19 06:25:07 2004
@@ -1652,7 +1652,7 @@
 {
 DBG(REGFORCE,
     dprintf ("return_int()\n");
-    )
+    );
 	set_slot_register(seq_dst(s), REG_eax, Rint);
 }
 
@@ -1660,7 +1660,7 @@
 {
 DBG(REGFORCE,
     dprintf ("return_long()\n");
-    )
+    );
 	set_slot_register(seq_dst(s), REG_eax, Rint);
 	set_slot_register(seq_dst(s)+1, REG_edx, Rint);
 }
@@ -1669,7 +1669,7 @@
 {
 DBG(REGFORCE,
     dprintf ("return_float()\n");
-    )
+    );
 	set_slot_register(seq_dst(s), REG_flt0, Rfloat);
 }
 
@@ -1677,7 +1677,7 @@
 {
 DBG(REGFORCE,
     dprintf ("return_double()\n");
-    )
+    );
 	set_slot_register(seq_dst(s), REG_dbl0, Rdouble);
 }
 
@@ -2535,7 +2535,7 @@
 {
 DBG(REGFORCE,
     dprintf ("kill_readonce_register(%s)\n", regname(s->regno));
-    )
+    );
 	if (((reginfo[s->regno].ctype & Rdouble) && (s->regno == REG_dbl0)) ||
 	    ((reginfo[s->regno].ctype & Rfloat) && (s->regno == REG_flt0))) {
 	    	OUT(0xDD);
Index: kaffe/kaffe/kaffevm/baseClasses.c
diff -u kaffe/kaffe/kaffevm/baseClasses.c:1.55 kaffe/kaffe/kaffevm/baseClasses.c:1.56
--- kaffe/kaffe/kaffevm/baseClasses.c:1.55	Sun Sep  5 12:24:48 2004
+++ kaffe/kaffe/kaffevm/baseClasses.c	Sun Dec 19 06:25:07 2004
@@ -182,7 +182,7 @@
 #endif
 
 	/* Create the initialise and finalize names and signatures. */
-	DBG(INIT, dprintf("create names and signatures\n"); )
+	DBG(INIT, dprintf("create names and signatures\n"); );
 
 	init_name = utf8ConstNew("<clinit>", -1);
 	final_name = utf8ConstNew("finalize", -1);
@@ -204,7 +204,7 @@
 		ABORT();
 	}
 
-	DBG(INIT, dprintf("done\n"); )
+	DBG(INIT, dprintf("done\n"); );
 
 #if defined(HAVE_GCJ_SUPPORT)
 	/* Init GCJ support */
@@ -265,7 +265,7 @@
         initTypes();
 	initVerifierPrimTypes();
 
-        DBG(INIT, dprintf("initBaseClasses()\n"); )
+        DBG(INIT, dprintf("initBaseClasses()\n"); );
 
         /* The base types */
         loadStaticClass(&ObjectClass, OBJECTCLASS);
@@ -308,7 +308,7 @@
 	loadStaticClass(&javaLangStackOverflowError, "java/lang/StackOverflowError");
 	loadStaticClass(&javaIoIOException, "java/io/IOException");
 
-	DBG(INIT, dprintf("initBaseClasses() done\n"); )
+	DBG(INIT, dprintf("initBaseClasses() done\n"); );
 
 	/* Fixup primitive types */
 	finishTypes();
Index: kaffe/kaffe/kaffevm/classMethod.c
diff -u kaffe/kaffe/kaffevm/classMethod.c:1.127 kaffe/kaffe/kaffevm/classMethod.c:1.128
--- kaffe/kaffe/kaffevm/classMethod.c:1.127	Fri Dec 17 17:47:35 2004
+++ kaffe/kaffe/kaffevm/classMethod.c	Sun Dec 19 06:25:07 2004
@@ -149,7 +149,7 @@
 	dprintf("%p entering process class %s %d->%d\n",
 		KTHREAD(current)(), class->name->data,
 		class->state, tostate);
-    )
+    );
 
 retry:
 	/* If the initialization of that class failed once before, don't
@@ -526,7 +526,7 @@
 		}
 
 DBG(STATICINIT, dprintf("Initialising %s static %d\n", class->name->data,
-			CLASS_FSIZE(class)); 	)
+			CLASS_FSIZE(class)); 	);
 		meth = findMethodLocal(class, init_name, void_signature);
 		if (meth == NULL) {
 			SET_CLASS_STATE(CSTATE_COMPLETE);
@@ -559,7 +559,7 @@
 		if (jniworking) {
 DBG(STATICINIT,
 			dprintf("using JNI\n");
-)
+);
 			(*env)->ExceptionClear(env);
 			(*env)->CallStaticVoidMethodA(env, class, (jmethodID)meth, NULL);
 			exc = (*env)->ExceptionOccurred(env);
@@ -567,7 +567,7 @@
 		} else {
 DBG(STATICINIT,
 			dprintf("using callMethodA\n");
-    )
+    );
 			callMethodA(meth, METHOD_NATIVECODE(meth), NULL, NULL, NULL, 1);
 		}
 
@@ -653,7 +653,7 @@
 	dprintf("%p leaving process class %s -> %s\n",
 		KTHREAD(current)(), class->name->data,
 		success ? "success" : "failure");
-    )
+    );
 	return (success);
 }
 
@@ -1118,7 +1118,7 @@
 	nc = name_index;
 	if (pool->tags[nc] != CONSTANT_Utf8) {
 		/* XXX fill in einfo! */
-DBG(RESERROR,	dprintf("addMethod: no method name.\n");		)
+DBG(RESERROR,	dprintf("addMethod: no method name.\n");		);
 		postExceptionMessage(einfo,
 				     JAVA_LANG(ClassFormatError),
 				     "No method name");
@@ -1127,7 +1127,7 @@
 	sc = signature_index;
 	if (pool->tags[sc] != CONSTANT_Utf8) {
 		/* XXX fill in einfo! */
-DBG(RESERROR,	dprintf("addMethod: no signature name.\n");	)
+DBG(RESERROR,	dprintf("addMethod: no signature name.\n");	);
 		postExceptionMessage(einfo,
 				     JAVA_LANG(ClassFormatError),
 				     "No signature for method: %s",
@@ -1147,7 +1147,7 @@
 
 DBG(CLASSFILE,
 	dprintf("Adding method %s:%s%s (%x)\n", c->name->data, name->data, signature->data, access_flags);
-    )
+    );
 
 	mt = &CLASS_METHODS(c)[CLASS_NMETHODS(c)];
 	utf8ConstAssign(mt->name, name);
@@ -1191,7 +1191,7 @@
 
 	nc = name_index;
 	if (pool->tags[nc] != CONSTANT_Utf8) {
-DBG(RESERROR,	dprintf("addField: no field name.\n");			)
+DBG(RESERROR,	dprintf("addField: no field name.\n");			);
 		postExceptionMessage(einfo,
 				     JAVA_LANG(ClassFormatError),
 				     "No field name");
@@ -1211,11 +1211,11 @@
 DBG(CLASSFILE,
 	dprintf("Adding field %s:%s\n",
 		CLASS_CNAME(c), CLASS_CONST_UTF8(c, nc)->data);
-    )
+    );
 
 	sc = signature_index;
 	if (pool->tags[sc] != CONSTANT_Utf8) {
-DBG(RESERROR,	dprintf("addField: no signature name.\n");		)
+DBG(RESERROR,	dprintf("addField: no signature name.\n");		);
 		postExceptionMessage(einfo,
 				     JAVA_LANG(ClassFormatError),
 				     "No signature name for field: %s",
@@ -1451,7 +1451,7 @@
 	dprintf("Calling user-defined class loader %s - loadClass(%s)\n",
 		CLASS_CNAME(OBJECT_CLASS(&loader->base)),
 		ce->name->data);
-)
+);
 
 					/* Use a user defined loader. */
 					retval = userLoadClass(ce,
@@ -1464,7 +1464,7 @@
 	/* Announce when VM calls class loaders.. */
 	dprintf("Calling internal class loader for %s\n",
 		ce->name->data);
-)
+);
 
 					/* Use the primordial loader. */
 					retval = findClass(ce, einfo);
@@ -1558,7 +1558,7 @@
 	/* Announce when VM calls class loaders.. */
 	dprintf("Calling internal class loader for startup class %s\n",
 		name);
-)
+);
 
 		clazz = findClass(centry, &info);
 		if (clazz == 0) {
@@ -1750,7 +1750,7 @@
 
 DBG(GCPRECISE,
 	dprintf("GCLayout for %s:\n", CLASS_CNAME(class));
-    )
+    );
 
 	/* Now work out the gc layout */
 	fld = CLASS_IFIELDS(class);
@@ -1782,7 +1782,7 @@
 		dprintf(" offset=%3d nbits=%2d ", offset, nbits);
 		BITMAP_DUMP(map, nbits+1)
 		dprintf(" fsize=%3d (%s)\n", fsize, fld->name->data);
-    )
+    );
 		offset += fsize;
 	}
 	return (true);
@@ -2546,7 +2546,7 @@
 DBG(RESERROR,
 	dprintf("lookupClassField for %s failed %s:%s\n",
 		isStatic?"static":"non-static",clp->name->data, name->data);
-    )
+    );
 	postExceptionMessage(einfo, JAVA_LANG(NoSuchFieldError), "%s", name->data);
 	return (NULL);
 }
Index: kaffe/kaffe/kaffevm/classPool.c
diff -u kaffe/kaffe/kaffevm/classPool.c:1.30 kaffe/kaffe/kaffevm/classPool.c:1.31
--- kaffe/kaffe/kaffevm/classPool.c:1.30	Fri Dec 17 17:47:35 2004
+++ kaffe/kaffe/kaffevm/classPool.c	Sun Dec 19 06:25:07 2004
@@ -214,7 +214,7 @@
 DBG(CLASSGC,
 				dprintf("removing %s l=%p/c=%p\n",
 				    entry->name->data, loader, entry->data.cl);
-    )
+    );
 				/* release reference to name */
 				utf8ConstRelease(entry->name);
 				(*entryp) = entry->next;
Index: kaffe/kaffe/kaffevm/code-analyse.c
diff -u kaffe/kaffe/kaffevm/code-analyse.c:1.43 kaffe/kaffe/kaffevm/code-analyse.c:1.44
--- kaffe/kaffe/kaffevm/code-analyse.c:1.43	Fri Dec 17 17:47:35 2004
+++ kaffe/kaffe/kaffevm/code-analyse.c	Sun Dec 19 06:25:07 2004
@@ -59,7 +59,7 @@
 DBG(CODEANALYSE,
 	dprintf("%s %p: %s.%s\n", __FUNCTION__, THREAD_NATIVE(), 
 		meth->class->name->data, meth->name->data);
-    )
+    );
 
 	if( meth->c.bcode.code == 0 )
 	{
@@ -102,7 +102,7 @@
 
 DBG(CODEANALYSE,
 	dprintf("%s %p: codeInfo = %p\n", __FUNCTION__, THREAD_NATIVE(), codeInfo);	
-    )
+    );
 
 	/* Allocate code info. block */
 	codeInfo->localsz = meth->localsz;
@@ -2026,7 +2026,7 @@
 DBG(CODEANALYSE,
 	dprintf("%s %p: clearing codeInfo %p\n",__FUNCTION__, 
 		THREAD_NATIVE(), codeInfo);
-    )
+    );
 }
 
 static
Index: kaffe/kaffe/kaffevm/debug.c
diff -u kaffe/kaffe/kaffevm/debug.c:1.58 kaffe/kaffe/kaffevm/debug.c:1.59
--- kaffe/kaffe/kaffevm/debug.c:1.58	Sat Dec 18 07:33:19 2004
+++ kaffe/kaffe/kaffevm/debug.c	Sun Dec 19 06:25:07 2004
@@ -337,7 +337,7 @@
 	 * this is a hook for catching exits from GDB.
 	 * make this dependent on the selection of this option
 	 */
-	DBG(BREAKONEXIT, DBGGDBBREAK())
+	DBG(BREAKONEXIT, DBGGDBBREAK());
 }
 
 /*
Index: kaffe/kaffe/kaffevm/debug.h
diff -u kaffe/kaffe/kaffevm/debug.h:1.38 kaffe/kaffe/kaffevm/debug.h:1.39
--- kaffe/kaffe/kaffevm/debug.h:1.38	Sat Dec 18 07:33:19 2004
+++ kaffe/kaffe/kaffevm/debug.h	Sun Dec 19 06:25:07 2004
@@ -141,14 +141,14 @@
  *	if debugging is enabled, resolve to statement.
  *	shortcut for #if KAFFE_VMDEBUG ... #endif
  */
-# define DBGIF(statement) { ((void)0); }
+# define DBGIF(statement) do { ((void)0); } while (0)
 
 /*
  * DBG:
  * 	if debugging is disabled, resolves to nothing.
  *	if debugging is enabled, statement is executed if mask matches.
  */
-# define DBG(mask, statement) { ((void)0); }
+# define DBG(mask, statement) do { ((void)0); } while (0)
 
 /*
  * DBGEXPR:
@@ -169,7 +169,7 @@
  * 	insert if you want gdb to gain control.
  * 	causes an exception in debugging mode.
  */
-# define DBGGDBBREAK() { ((void)0); }
+# define DBGGDBBREAK() do { ((void)0); } while (0)
 
 #else
 /* --- Debugging is enabled --- */
@@ -177,21 +177,21 @@
 /* Defines what debugging output is seen. Needs to be 64-bit. */
 extern debugmask_t kaffevmDebugMask;
 
-# define DBGIF(statement)  statement
+# define DBGIF(statement)  do { statement; } while (0)
 
 /* Debug macros that are selected with the above flags. */
 
-# define DBG(mask, statement) {			\
+# define DBG(mask, statement) do {			\
 	if ((DBG_##mask)&(kaffevmDebugMask)) {	\
 		statement;			\
 	}					\
-	}
+	} while (0)
 
 # define DBGEXPR(mask, expr, default)			\
 	(((DBG_##mask)&(kaffevmDebugMask))?(expr):(default))
 
 /* Do something that would cause GDB to gain control. */
-# define DBGGDBBREAK() { (*(int*)0) = 42; }
+# define DBGGDBBREAK() do { (*(int*)0) = 42; } while (0)
 
 #endif /* defined(NDEBUG) || !defined(KAFFE_VMDEBUG) */
 
Index: kaffe/kaffe/kaffevm/exception.c
diff -u kaffe/kaffe/kaffevm/exception.c:1.90 kaffe/kaffe/kaffevm/exception.c:1.91
--- kaffe/kaffe/kaffevm/exception.c:1.90	Fri Dec 17 17:47:35 2004
+++ kaffe/kaffe/kaffevm/exception.c	Sun Dec 19 06:25:08 2004
@@ -325,7 +325,7 @@
 
 	/* Search down exception stack for a match */
 	DBG(ELOOKUP,
-	    dprintf ("dispatchException(): %s\n", ((Hjava_lang_Object*)eobj)->vtable->class->name->data);)
+	    dprintf ("dispatchException(): %s\n", ((Hjava_lang_Object*)eobj)->vtable->class->name->data););
 
 	/*
 	 * find the last jni frame
@@ -455,7 +455,7 @@
 {
 DBG(INIT,
 	dprintf("initExceptions()\n");
-    )
+    );
 	/* Catch signals we need to convert to exceptions */
 	KTHREAD(initexceptions)(nullException, floatingException, stackOverflowException);
 }
@@ -542,7 +542,7 @@
 	/* Right method - look for exception */
 	if (ptr->exception_table == 0) {
 DBG(ELOOKUP,
-		dprintf("%s.%s has no handlers.\n", ptr->class->name->data, ptr->name->data); )
+		dprintf("%s.%s has no handlers.\n", ptr->class->name->data, ptr->name->data); );
 		return (false);
 	}
 
@@ -551,7 +551,7 @@
 DBG(ELOOKUP,
 	dprintf("%s.%s has %d handlers (throw was pc=%#lx):\n",
 		ptr->class->name->data, ptr->name->data,
-		ptr->exception_table->length, (long) _pc); )
+		ptr->exception_table->length, (long) _pc); );
 
 	for (i = 0; i < ptr->exception_table->length; i++) {
 		uintp start_pc = eptr[i].start_pc;
@@ -559,7 +559,7 @@
 		uintp handler_pc = eptr[i].handler_pc;
 
 DBG(ELOOKUP,	dprintf("  Handler %d covers %#lx-%#lx\n", i, 
-			(long) start_pc, (long) end_pc); )
+			(long) start_pc, (long) end_pc); );
 		if (_pc < start_pc || _pc >= end_pc) {
 			continue;
 		}
@@ -568,13 +568,13 @@
 		if (eptr[i].catch_idx == 0) {
 			*handler = handler_pc;
 DBG(ELOOKUP,		dprintf("  Found handler @ %#lx: catches all exceptions.\n", 
-				(long) handler_pc); )
+				(long) handler_pc); );
 			return (true);
 		}
 		/* Did I try to resolve that catch type before */
 		if (eptr[i].catch_type == UNRESOLVABLE_CATCHTYPE) {
 DBG(ELOOKUP,		dprintf("  Found handler @ %#lx: Unresolvable catch type.\n", 
-				(long) handler_pc); )
+				(long) handler_pc); );
 			return (false);
 		}
 		/* Resolve catch class if necessary */
@@ -596,7 +596,7 @@
 			if (eptr[i].catch_type == NULL) {
 DBG(ELOOKUP|DBG_RESERROR,
 				dprintf("Couldn't resolve catch class @ cp idx=%d\n",
-					eptr[i].catch_idx); )
+					eptr[i].catch_idx); );
 				eptr[i].catch_type = UNRESOLVABLE_CATCHTYPE;
 				throwError(&info);
 				return (false);
@@ -605,13 +605,13 @@
                 for (cptr = class; cptr != 0; cptr = cptr->superclass) {
                         if (cptr == eptr[i].catch_type) {
 DBG(ELOOKUP,	dprintf("  Found matching handler at %#lx: Handles %s.\n",
-			(long) handler_pc, CLASS_CNAME(eptr[i].catch_type)); )
+			(long) handler_pc, CLASS_CNAME(eptr[i].catch_type)); );
                                 *handler = handler_pc;
                                 return (true);
                         }
                 }
 DBG(ELOOKUP,	dprintf("  Handler at %#lx (handles %s), does not match.\n",
-			(long) handler_pc, CLASS_CNAME(eptr[i].catch_type)); )
+			(long) handler_pc, CLASS_CNAME(eptr[i].catch_type)); );
 	}
 	return (false);
 }
Index: kaffe/kaffe/kaffevm/external.c
diff -u kaffe/kaffe/kaffevm/external.c:1.70 kaffe/kaffe/kaffevm/external.c:1.71
--- kaffe/kaffe/kaffevm/external.c:1.70	Tue Dec 14 02:04:25 2004
+++ kaffe/kaffe/kaffevm/external.c	Sun Dec 19 06:25:08 2004
@@ -93,7 +93,7 @@
         	i,
         	lt_dlgetinfo(libHandle[i].desc) == NULL ? "unknown" : lt_dlgetinfo(libHandle[i].desc)->name);
     }
-)
+);
 
     ++i;
   }
@@ -140,7 +140,7 @@
 	char* ptr;
 	unsigned int len;
 
-	DBG(INIT, dprintf("initNative()\n"); )
+	DBG(INIT, dprintf("initNative()\n"); );
 
 	lpath = (char*)Kaffe_JavaVMArgs.libraryhome;
 	if (lpath == 0) {
@@ -180,7 +180,7 @@
 	strcat (libraryPath, JNI_LIBRARY_PATH);
 #endif
 
-	DBG(INIT, dprintf("got lpath %s and libraryPath %s\n", lpath, libraryPath); )
+	DBG(INIT, dprintf("got lpath %s and libraryPath %s\n", lpath, libraryPath); );
 
 	KaffeLib_Init();
 
@@ -204,10 +204,10 @@
 		strcat(lib, NATIVELIBRARY);
 		strcat(lib, LIBRARYSUFFIX);
 
-	       	DBG(INIT, dprintf("trying to load %s\n", lib); )
+	       	DBG(INIT, dprintf("trying to load %s\n", lib); );
 
 		if (loadNativeLibrary(lib, NULL, 0) >= 0) {
-			DBG(INIT, dprintf("initNative() done\n"); )
+			DBG(INIT, dprintf("initNative() done\n"); );
 			return;
 		}
 	}
@@ -254,13 +254,13 @@
 			dprintf("Native lib %s\n"
 			    "\tLOAD desc=%p index=%d ++ref=%d\n",
 			    lib->name, lib->desc, libIndex, lib->ref);
-    )
+    );
 			return libIndex;
 		}
 	}
 	if (errbuf != 0) {
 		assert(errsiz > 0);
-		DBG(NATIVELIB, dprintf("Too many open libraries\n"); )
+		DBG(NATIVELIB, dprintf("Too many open libraries\n"); );
 		strncpy(errbuf, "Too many open libraries", errsiz);
 		errbuf[errsiz - 1] = '\0';
 	}
@@ -290,7 +290,7 @@
 			{
 				const char *err = KaffeLib_GetError();
 
-				DBG(NATIVELIB, dprintf("Error loading %s: %s\n", path, err); )
+				DBG(NATIVELIB, dprintf("Error loading %s: %s\n", path, err); );
 				
 				/* XXX Bleh, silly guessing system. */
 				if( err == 0 )
@@ -340,7 +340,7 @@
 	dprintf("Native lib %s\n"
 	    "\tLOAD desc=%p index=%d ++ref=%d\n",
 	    lib->name, lib->desc, libIndex, lib->ref);
-    )
+    );
 #if defined(KAFFE_FEEDBACK)
 	feedbackLibrary(path, true);
 #endif
@@ -372,7 +372,7 @@
 	dprintf("Native lib %s\n"
 	    "\tUNLOAD desc=%p index=%d --ref=%d\n",
 	    lib->name, lib->desc, libIndex, lib->ref - 1);
-    )
+    );
 
 	assert(lib->desc != 0);
 	assert(lib->ref > 0);
@@ -413,7 +413,7 @@
         	i,
 		libHandle[i].name);
     }
-)
+);
 
     ++i;
   }
@@ -535,7 +535,7 @@
 	dprintf("Method = %s.%s%s\n", m->class->name->data, 
 		m->name->data, METHOD_SIGD(m));
 	dprintf("Native stub = '%s'\n", stub);
-    )
+    );
 
 	/* Find the native method */
 	func = loadNativeLibrarySym(stub);
@@ -552,7 +552,7 @@
 DBG(NATIVELIB,
 	dprintf("Failed to locate native function:\n\t%s.%s%s\n",
 		m->class->name->data, m->name->data, METHOD_SIGD(m));
-    )
+    );
 	postExceptionMessage(einfo, JAVA_LANG(UnsatisfiedLinkError),
 		"Failed to locate native function:\t%s.%s%s",
 		m->class->name->data, m->name->data, METHOD_SIGD(m));
Index: kaffe/kaffe/kaffevm/findInJar.c
diff -u kaffe/kaffe/kaffevm/findInJar.c:1.60 kaffe/kaffe/kaffevm/findInJar.c:1.61
--- kaffe/kaffe/kaffevm/findInJar.c:1.60	Mon Jul  5 16:40:35 2004
+++ kaffe/kaffe/kaffevm/findInJar.c	Sun Dec 19 06:25:08 2004
@@ -103,7 +103,7 @@
 		}
 DBG(GCJ,	dprintf(__FUNCTION__": adding class %s to pool@%p\n",
 			cname, centry);
-    )
+    );
 		class->centry = centry;
 		assert(CLASS_GCJ(class));
 		return (class);
@@ -112,7 +112,7 @@
 
 	/* Look for the class */
 DBG(CLASSLOOKUP,
-	dprintf("Scanning for class %s\n", cname);		)
+	dprintf("Scanning for class %s\n", cname);		);
 
 	buf = checkPtr(KMALLOC(strlen(cname) + 8));
 	sprintf(buf, "%s.class", cname);
@@ -199,14 +199,14 @@
 	lockStaticMutex(&jarlock);
 
 	for (ptr = classpath; ptr != 0; ptr = ptr->next) {
-DBG(CLASSLOOKUP,dprintf("Processing classpath entry '%s'\n", ptr->path); )
+DBG(CLASSLOOKUP,dprintf("Processing classpath entry '%s'\n", ptr->path); );
 		switch (ptr->type) {
 		case CP_ZIPFILE:
 		{
 			jarEntry* entry;
 			const char* data;
 
-DBG(CLASSLOOKUP,	dprintf("Opening JAR file %s for %s\n", ptr->path, cname); )
+DBG(CLASSLOOKUP,	dprintf("Opening JAR file %s for %s\n", ptr->path, cname); );
 			if (ptr->u.jar == 0) {
 				ptr->u.jar = openJarFile(ptr->path);
 				if (ptr->u.jar == 0) {
@@ -252,7 +252,7 @@
 			    + strlen(file_separator) + strlen(cname) + 1));
 			sprintf(buf, "%s%s%s",
 			    ptr->path, file_separator, cname);
-DBG(CLASSLOOKUP,	dprintf("Opening java file %s for %s\n", buf, cname); )
+DBG(CLASSLOOKUP,	dprintf("Opening java file %s for %s\n", buf, cname); );
 			rc = KOPEN(buf, O_RDONLY|O_BINARY, 0, &fp);
 			KFREE(buf);
 			/* if we can't open the file, we keep looking */
@@ -350,7 +350,7 @@
 	size_t len;
 	classpathEntry* ptr;
 
-	DBG(INIT, dprintf("initClasspath()\n"); )
+	DBG(INIT, dprintf("initClasspath()\n"); );
 
 	cp = (char*)Kaffe_JavaVMArgs.bootClasspath;
 	hm = (char*)Kaffe_JavaVMArgs.classhome;
@@ -395,7 +395,7 @@
 	
 	realClassPath = (char *)Kaffe_JavaVMArgs.classpath;
 
-	DBG(INIT, dprintf("initClasspath() done, got %s\n", realBootClassPath); )
+	DBG(INIT, dprintf("initClasspath() done, got %s\n", realBootClassPath); );
 }
 
 void
@@ -423,7 +423,7 @@
 	char* end;
 
 DBG(INITCLASSPATH,
-    	dprintf("initClasspath(): '%s'\n", cp); )
+    	dprintf("initClasspath(): '%s'\n", cp); );
 
 	for (;;) {
 		end = strstr(cp, path_separator);
@@ -514,7 +514,7 @@
 #endif
 
 DBG(INITCLASSPATH,
-	dprintf("insertClasspath(): '%s' %spend\n", cp, prepend ? "pre" : "ap"); )
+	dprintf("insertClasspath(): '%s' %spend\n", cp, prepend ? "pre" : "ap"); );
 
 	if (*cp == '\0')
 		return (0);
@@ -739,7 +739,7 @@
 		newEntry->type = getClasspathType (newEntry->path);
 		if ((newEntry->type != CP_INVALID) &&
 		    !isEntryInClasspath (newEntry->path)) {
-DBG(CLASSLOOKUP,	dprintf("Entry '%s' added to classpath\n", newEntry->path); )
+DBG(CLASSLOOKUP,	dprintf("Entry '%s' added to classpath\n", newEntry->path); );
 			newEntry->next = ptr->next;
 			ptr->next = newEntry;
 		}
Index: kaffe/kaffe/kaffevm/gcFuncs.c
diff -u kaffe/kaffe/kaffevm/gcFuncs.c:1.58 kaffe/kaffe/kaffevm/gcFuncs.c:1.59
--- kaffe/kaffe/kaffevm/gcFuncs.c:1.58	Wed Oct 20 16:47:13 2004
+++ kaffe/kaffe/kaffevm/gcFuncs.c	Sun Dec 19 06:25:08 2004
@@ -64,7 +64,7 @@
 DBG(CLASSGC,
         dprintf("destroying class %s @ %p\n",
 		clazz->name ? clazz->name->data : "newborn", c);
-   )
+   );
 	assert(!CLASS_IS_PRIMITIVE(clazz)); 
 
 	/* NB: Make sure that we don't unload fully loaded classes without
@@ -278,7 +278,7 @@
 
 DBG(GCPRECISE,
         dprintf("walkClass `%s' state=%d\n", CLASS_CNAME(class), class->state);
-    )
+    );
 
         if (class->state >= CSTATE_PREPARED) {
                 KGC_markObject(collector, gc_info, class->superclass);
@@ -451,7 +451,7 @@
         dprintf("walkObject `%s' ", CLASS_CNAME(clazz));
         BITMAP_DUMP(layout, nbits)
         dprintf(" (nbits=%d) %p-%p\n", nbits, base, ((char *)base) + size);
-    )
+    );
 
         assert(CLASS_FSIZE(clazz) > 0);
         assert(size > 0);
@@ -590,7 +590,7 @@
 {
 	Collector *gc = createGC();
 
-	DBG(INIT, dprintf("initCollector()\n"); )
+	DBG(INIT, dprintf("initCollector()\n"); );
 
 	KGC_registerGcTypeByIndex(gc, KGC_ALLOC_JAVASTRING,
 	    stringWalk, KGC_OBJECT_NORMAL, stringDestroy, "j.l.String");
@@ -645,6 +645,6 @@
 	KGC_registerFixedTypeByIndex(gc, KGC_ALLOC_JIT_CODEBLOCK, "jit-codeblock");
 	KGC_registerFixedTypeByIndex(gc, KGC_ALLOC_JIT_LABELS, "jit-labels");
 
-	DBG(INIT, dprintf("initCollector() done\n"); )
+	DBG(INIT, dprintf("initCollector() done\n"); );
 	return (gc);
 }
Index: kaffe/kaffe/kaffevm/itypes.c
diff -u kaffe/kaffe/kaffevm/itypes.c:1.31 kaffe/kaffe/kaffevm/itypes.c:1.32
--- kaffe/kaffe/kaffevm/itypes.c:1.31	Mon Jul  5 16:40:37 2004
+++ kaffe/kaffe/kaffevm/itypes.c	Sun Dec 19 06:25:08 2004
@@ -93,7 +93,7 @@
 void
 initTypes(void)
 {
-	DBG(INIT, dprintf("initTypes()\n"); )
+	DBG(INIT, dprintf("initTypes()\n"); );
 
 	initPrimClass(&byteClass, "byte", 'B', 1);
 	initPrimClass(&shortClass, "short", 'S', 2);
@@ -126,7 +126,7 @@
 	voidClass->stab_id = STYPE_VOID;
 #endif
 	
-	DBG(INIT, dprintf("initTypes() done\n"); )
+	DBG(INIT, dprintf("initTypes() done\n"); );
 }
 
 /*
@@ -135,7 +135,7 @@
 void
 finishTypes(void)
 {
-	DBG(INIT, dprintf("finishTypes()\n"); )
+	DBG(INIT, dprintf("finishTypes()\n"); );
 
 	byteClass->head.vtable = ClassClass->vtable;
 	shortClass->head.vtable = ClassClass->vtable;
@@ -147,7 +147,7 @@
 	doubleClass->head.vtable = ClassClass->vtable;
 	voidClass->head.vtable = ClassClass->vtable;
 
-	DBG(INIT, dprintf("finishTypes() done\n"); )
+	DBG(INIT, dprintf("finishTypes() done\n"); );
 }
 
 static
Index: kaffe/kaffe/kaffevm/locks.c
diff -u kaffe/kaffe/kaffevm/locks.c:1.52 kaffe/kaffe/kaffevm/locks.c:1.53
--- kaffe/kaffe/kaffevm/locks.c:1.52	Thu Dec 16 06:13:50 2004
+++ kaffe/kaffe/kaffevm/locks.c	Sun Dec 19 06:25:08 2004
@@ -83,7 +83,7 @@
 DBG(SLOWLOCKS,
     	dprintf("  getHeavyLock(**lkp=%p, *lk=%p, th=%p)\n",
 		lkp, *lkp, KTHREAD(current)());
-)
+);
  
 	lk = heavyLock;
 	timeout = 1;
@@ -105,7 +105,7 @@
 		if ((((uintp)old) & 1) == 1) {
 DBG(SLOWLOCKS,
     			dprintf("    got cached lock\n");
-)
+);
 			if (lk != heavyLock) {
 				gc_free (lk);
 			}
@@ -127,7 +127,7 @@
 DBG(SLOWLOCKS,
 			dprintf("    got %s lock\n",
 				(lk != heavyLock) ? "new" : "special");
-)
+);
 			lk->holder = (void*)old;
 			lk->mux = 0;
 			lk->cv = 0;
@@ -149,7 +149,7 @@
 DBG(SLOWLOCKS,
 	dprintf("  putHeavyLock(**lkp=%p, *lk=%p, th=%p)\n", 
 		lkp, lk, KTHREAD(current)());
-)
+);
 
 	if (lk == LOCKFREE) {
 		*lkp = LOCKFREE;
@@ -172,7 +172,7 @@
 DBG(SLOWLOCKS,
     	dprintf("slowLockMutex(**lkp=%p, where=%p, th=%p)\n",
 	       lkp, where, KTHREAD(current)());
-)
+);
 	KTHREAD(disable_stop)(); /* protect the heavy lock, and its queues */
 
 	for (;;) {
@@ -215,7 +215,7 @@
 DBG(SLOWLOCKS,
     	dprintf("slowUnlockMutex(**lkp=%p, where=%p, th=%p)\n",
 	       lkp, where, KTHREAD(current)());
-)
+);
 	KTHREAD(disable_stop)(); /* protect the heavy lock, and its queues */
 	lk = getHeavyLock(lkp, heavyLock);
 
@@ -271,7 +271,7 @@
 DBG(SLOWLOCKS,
     	dprintf("slowUnlockMutexIfHeld(**lkp=%p, where=%p, th=%p)\n",
 	       lkp, where, KTHREAD(current)());
-)
+);
 	holder = *lkp;
 
 	/* nothing to do if the lock is free */
@@ -309,7 +309,7 @@
 DBG(SLOWLOCKS,
     	dprintf("_waitCond(**lkp=%p, timeout=%ld, th=%p)\n",
 	       lkp, (long)timeout, KTHREAD(current)());
-)
+);
 
 	lk = getHeavyLock(lkp, heavyLock);
 	holder = lk->holder;
@@ -367,7 +367,7 @@
 DBG(SLOWLOCKS,
     	dprintf("_signalCond(**lkp=%p, th=%p)\n",
 	       lkp, KTHREAD(current)());
-)
+);
 
 	lk = getHeavyLock(lkp, heavyLock);
 
@@ -396,7 +396,7 @@
 DBG(SLOWLOCKS,
     	dprintf("_broadcastCond(**lkp=%p, th=%p)\n",
 	       lkp, KTHREAD(current)());
-)
+);
 
 	lk = getHeavyLock(lkp, heavyLock);
 
Index: kaffe/kaffe/kaffevm/lookup.c
diff -u kaffe/kaffe/kaffevm/lookup.c:1.40 kaffe/kaffe/kaffevm/lookup.c:1.41
--- kaffe/kaffe/kaffevm/lookup.c:1.40	Sat Dec 11 07:00:50 2004
+++ kaffe/kaffe/kaffevm/lookup.c	Sun Dec 19 06:25:08 2004
@@ -60,7 +60,7 @@
 	pool = CLASS_CONSTANTS(this);
 	if (pool->tags[idx] != CONSTANT_Methodref &&
 	    pool->tags[idx] != CONSTANT_InterfaceMethodref) {
-DBG(RESERROR,	dprintf("No Methodref found for idx=%d\n", idx);	)
+DBG(RESERROR,	dprintf("No Methodref found for idx=%d\n", idx);	);
 		/* shouldn't that be ClassFormatError or something? */
 		postExceptionMessage(einfo, JAVA_LANG(NoSuchMethodError),
 			"method name unknown, tag = %d", pool->tags[idx]);
@@ -140,7 +140,7 @@
 	if (shouldLoadClass) 
 		dprintf("getMethodSignatureClass(%s,%s,%s) -> %s\n",
 			call->class->name->data, name->data, sig->data, 
-			(call->method ? "success" : "failure"));	)
+			(call->method ? "success" : "failure"));	);
 	return (true);
 }
 
@@ -256,7 +256,7 @@
 	
 	pool = CLASS_CONSTANTS(this);
 	if (pool->tags[idx] != CONSTANT_Fieldref) {
-DBG(RESERROR,	dprintf("No Fieldref found\n");				)
+DBG(RESERROR,	dprintf("No Fieldref found\n");				);
 		postExceptionMessage(einfo, JAVA_LANG(NoSuchFieldError),
 			"tag was %d", pool->tags[idx]);
 		return (false);
@@ -279,7 +279,7 @@
 		class->name->data, 
 		WORD2UTF(pool->data[NAMEANDTYPE_NAME(ni, pool)])->data, 
 		WORD2UTF(pool->data[NAMEANDTYPE_SIGNATURE(ni, pool)])->data);
-    )
+    );
 
 	field = lookupClassField(class, WORD2UTF(pool->data[NAMEANDTYPE_NAME(ni, pool)]), isStaticField, einfo);
 	if (field == 0) {
@@ -320,7 +320,7 @@
 		if (utf8ConstEqual (name, mptr->name) && utf8ConstEqual (signature, METHOD_SIG(mptr))) {
 DBG(MLOOKUP,
 			dprintf("findMethodLocal(%s,%s,%s) -> %p\n",
-				class->name->data, name->data, signature->data, mptr); )
+				class->name->data, name->data, signature->data, mptr); );
 
 			return (mptr);
 		}
@@ -328,7 +328,7 @@
 
 DBG(MLOOKUP,
 	dprintf("findMethodLocal(%s,%s,%s) -> NOT FOUND\n",
-		class->name->data, name->data, signature->data); )
+		class->name->data, name->data, signature->data); );
 
 	return NULL;
 }
Index: kaffe/kaffe/kaffevm/object.c
diff -u kaffe/kaffe/kaffevm/object.c:1.29 kaffe/kaffe/kaffevm/object.c:1.30
--- kaffe/kaffe/kaffevm/object.c:1.29	Sat Dec 11 20:49:39 2004
+++ kaffe/kaffe/kaffevm/object.c	Sun Dec 19 06:25:08 2004
@@ -67,7 +67,7 @@
 DBG(NEWOBJECT,
 	dprintf("newObject %p class %s\n", obj,
 		(class ? class->name->data : "<none>"));
-    )
+    );
         return (obj);
 }
 /*
@@ -118,7 +118,7 @@
 done:
 DBG(NEWOBJECT,
 	dprintf("newClass @%p\n", cls);
-    )
+    );
 
         return (cls);
 }
@@ -172,7 +172,7 @@
 DBG(NEWOBJECT,
 	dprintf("newArray %p class %s count %d\n", obj,
 		(class ? class->name->data : "<none>"), count);
-    )
+    );
 	return (obj);
 }
 
Index: kaffe/kaffe/kaffevm/soft.c
diff -u kaffe/kaffe/kaffevm/soft.c:1.70 kaffe/kaffe/kaffevm/soft.c:1.71
--- kaffe/kaffe/kaffevm/soft.c:1.70	Thu Dec 16 06:13:50 2004
+++ kaffe/kaffe/kaffevm/soft.c	Sun Dec 19 06:25:08 2004

*** Patch too long, truncated ***




More information about the kaffe mailing list