[kaffe] CVS kaffe (doogie): First set of fixes after using sparse: 0 -> NULL changes.
Kaffe CVS
cvs-commits at kaffe.org
Fri Dec 17 10:46:04 PST 2004
PatchSet 5655
Date: 2004/12/17 17:47:32
Author: doogie
Branch: HEAD
Tag: (none)
Log:
First set of fixes after using sparse: 0 -> NULL changes.
Members:
ChangeLog:1.3200->1.3201
config/i386/linux/xprofile-md.h:1.2->1.3
kaffe/kaffe/main.c:1.70->1.71
kaffe/kaffevm/access.c:1.8->1.9
kaffe/kaffevm/classMethod.c:1.126->1.127
kaffe/kaffevm/classPool.c:1.29->1.30
kaffe/kaffevm/code-analyse.c:1.42->1.43
kaffe/kaffevm/code.c:1.17->1.18
kaffe/kaffevm/exception.c:1.89->1.90
kaffe/kaffevm/locks.h:1.26->1.27
kaffe/kaffevm/jit3/basecode.c:1.8->1.9
kaffe/kaffevm/jit3/icode.c:1.48->1.49
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3200 kaffe/ChangeLog:1.3201
--- kaffe/ChangeLog:1.3200 Fri Dec 17 17:46:21 2004
+++ kaffe/ChangeLog Fri Dec 17 17:47:32 2004
@@ -1,5 +1,15 @@
2004-12-16 Adam Heath <doogieg at brainfood.com>
+ * config/i386/linux/xprofile-md.h, kaffe/kaffe/main.c
+ kaffe/kaffevm/access.c, kaffe/kaffevm/classMethod.c
+ kaffe/kaffevm/classPool.c, kaffe/kaffevm/code-analyse.c
+ kaffe/kaffevm/code.c, kaffe/kaffevm/exception.c
+ kaffe/kaffevm/locks.h, kaffe/kaffevm/jit3/basecode.c
+ kaffe/kaffevm/jit3/icode.c:
+ First set of fixes after using sparse: 0 -> NULL changes.
+
+2004-12-16 Adam Heath <doogieg at brainfood.com>
+
* scripts/sort-warnings.pl, scripts/SparseWarning.pm:
Add support for sparse.
Index: kaffe/config/i386/linux/xprofile-md.h
diff -u kaffe/config/i386/linux/xprofile-md.h:1.2 kaffe/config/i386/linux/xprofile-md.h:1.3
--- kaffe/config/i386/linux/xprofile-md.h:1.2 Tue Feb 11 16:54:44 2003
+++ kaffe/config/i386/linux/xprofile-md.h Fri Dec 17 17:47:34 2004
@@ -20,7 +20,7 @@
*/
static inline struct gmonparam *getGmonParam(void)
{
- return 0;
+ return NULL;
}
#define _MCOUNT_DECL _mcount
Index: kaffe/kaffe/kaffe/main.c
diff -u kaffe/kaffe/kaffe/main.c:1.70 kaffe/kaffe/kaffe/main.c:1.71
--- kaffe/kaffe/kaffe/main.c:1.70 Tue Dec 14 04:00:39 2004
+++ kaffe/kaffe/kaffe/main.c Fri Dec 17 17:47:34 2004
@@ -294,7 +294,7 @@
cls = (*env)->FindClass(env, "java/lang/String");
if (checkException())
goto done;
- args = (*env)->NewObjectArray(env, argc, cls, 0);
+ args = (*env)->NewObjectArray(env, argc, cls, NULL);
if (checkException())
goto done;
for (i = 0; i < argc; i++) {
Index: kaffe/kaffe/kaffevm/access.c
diff -u kaffe/kaffe/kaffevm/access.c:1.8 kaffe/kaffe/kaffevm/access.c:1.9
--- kaffe/kaffe/kaffevm/access.c:1.8 Sat Nov 6 20:02:07 2004
+++ kaffe/kaffe/kaffevm/access.c Fri Dec 17 17:47:35 2004
@@ -26,7 +26,7 @@
char *checkAccessFlags(access_type_t type, accessFlags access_flags)
{
- const char *retval = 0;
+ const char *retval = NULL;
if( (type == ACC_TYPE_CLASS) &&
(access_flags & ACC_INTERFACE) &&
@@ -294,7 +294,7 @@
static
Hjava_lang_Class *findSuperMethod(Hjava_lang_Class *orig_cl, Method *meth)
{
- Hjava_lang_Class *cl, *retval = 0;
+ Hjava_lang_Class *cl, *retval = NULL;
for( cl = orig_cl->superclass; cl && !retval; cl = cl->superclass )
{
@@ -345,7 +345,7 @@
}
else
{
- cl = 0;
+ cl = NULL;
}
}
}
@@ -356,7 +356,7 @@
static
Hjava_lang_Class *findSuperField(Hjava_lang_Class *orig_cl, Field *field)
{
- Hjava_lang_Class *retval = 0;
+ Hjava_lang_Class *retval = NULL;
if( field->clazz != orig_cl )
{
Index: kaffe/kaffe/kaffevm/classMethod.c
diff -u kaffe/kaffe/kaffevm/classMethod.c:1.126 kaffe/kaffe/kaffevm/classMethod.c:1.127
--- kaffe/kaffe/kaffevm/classMethod.c:1.126 Thu Dec 16 06:13:50 2004
+++ kaffe/kaffe/kaffevm/classMethod.c Fri Dec 17 17:47:35 2004
@@ -442,7 +442,7 @@
* If the finalizer is empty, we set class->finalizer to null.
* Find finalizer first without calling findMethod.
*/
- meth = 0;
+ meth = NULL;
for (nclass = class; nclass != 0; nclass = nclass->superclass) {
meth = findMethodLocal(nclass, final_name, void_signature);
if (meth != NULL) {
@@ -468,9 +468,9 @@
if (!object_fin && meth->class == ObjectClass) {
object_fin = meth;
}
- class->finalizer = 0;
+ class->finalizer = NULL;
} else if (meth == object_fin) {
- class->finalizer = 0;
+ class->finalizer = NULL;
} else {
class->finalizer = meth;
}
@@ -510,7 +510,7 @@
DO_CLASS_STATE(CSTATE_COMPLETE) {
JNIEnv *env = THREAD_JNIENV();
- jthrowable exc = 0;
+ jthrowable exc = NULL;
JavaVM *vms[1];
jsize jniworking;
@@ -561,19 +561,19 @@
dprintf("using JNI\n");
)
(*env)->ExceptionClear(env);
- (*env)->CallStaticVoidMethodA(env, class, (jmethodID)meth, 0);
+ (*env)->CallStaticVoidMethodA(env, class, (jmethodID)meth, NULL);
exc = (*env)->ExceptionOccurred(env);
(*env)->ExceptionClear(env);
} else {
DBG(STATICINIT,
dprintf("using callMethodA\n");
)
- callMethodA(meth, METHOD_NATIVECODE(meth), 0, 0, 0, 1);
+ callMethodA(meth, METHOD_NATIVECODE(meth), NULL, NULL, NULL, 1);
}
lockClass(class);
- class->processingThread = 0;
+ class->processingThread = NULL;
if (exc != 0) {
if( soft_instanceof(javaLangException, exc) )
@@ -623,8 +623,8 @@
1) {
METHOD_NATIVECODE(meth) = 0;
KFREE(meth->c.ncode.ncode_start);
- meth->c.ncode.ncode_start = 0;
- meth->c.ncode.ncode_end = 0;
+ meth->c.ncode.ncode_start = NULL;
+ meth->c.ncode.ncode_end = NULL;
}
}
@@ -660,7 +660,7 @@
static int
expandMethods(Hjava_lang_Class *cl, Method *imeth, errorInfo *einfo)
{
- Method *new_methods = 0;
+ Method *new_methods = NULL;
int retval = 0;
/*
@@ -948,17 +948,17 @@
assert(cl->superclass == 0);
cl->superclass = (Hjava_lang_Class*)(uintp)su;
cl->msize = 0;
- CLASS_FIELDS(cl) = 0;
+ CLASS_FIELDS(cl) = NULL;
CLASS_FSIZE(cl) = 0;
cl->accflags = flags;
- cl->vtable = 0;
- cl->interfaces = 0;
+ cl->vtable = NULL;
+ cl->interfaces = NULL;
cl->interface_len = 0;
assert(cl->state < CSTATE_LOADED);
cl->state = CSTATE_LOADED;
cl->loader = loader;
cl->this_index = this_index;
- cl->inner_classes = 0;
+ cl->inner_classes = NULL;
cl->nr_inner_classes = 0;
cl->this_inner_index = -1;
return 1;
@@ -977,12 +977,12 @@
if (pool->tags[c] != CONSTANT_Class) {
postExceptionMessage(einfo, JAVA_LANG(ClassFormatError),
"this class constant pool index is bogus");
- return false;
+ return (NULL);
}
if (!internalSetupClass(cl, WORD2UTF(pool->data[c]), flags, c, s,
loader, einfo))
- return 0;
+ return (NULL);
return (cl);
}
@@ -1122,7 +1122,7 @@
postExceptionMessage(einfo,
JAVA_LANG(ClassFormatError),
"No method name");
- return (0);
+ return (NULL);
}
sc = signature_index;
if (pool->tags[sc] != CONSTANT_Utf8) {
@@ -1132,7 +1132,7 @@
JAVA_LANG(ClassFormatError),
"No signature for method: %s",
WORD2UTF (pool->data[nc])->data);
- return (0);
+ return (NULL);
}
name = WORD2UTF (pool->data[nc]);
signature = WORD2UTF (pool->data[sc]);
@@ -1158,10 +1158,10 @@
mt->class = c;
/* Warning: ACC_CONSTRUCTION match ACC_STRICT */
mt->accflags = access_flags & ACC_MASK;
- mt->c.bcode.code = 0;
+ mt->c.bcode.code = NULL;
mt->stacksz = 0;
mt->localsz = 0;
- mt->exception_table = 0;
+ mt->exception_table = NULL;
mt->idx = -1;
/* Mark constructors as such */
@@ -1195,7 +1195,7 @@
postExceptionMessage(einfo,
JAVA_LANG(ClassFormatError),
"No field name");
- return (0);
+ return (NULL);
}
--CLASS_FSIZE(c); /* holds field count initially */
@@ -1221,7 +1221,7 @@
"No signature name for field: %s",
CLASS_CONST_UTF8(c, nc)->data);
CLASS_NFIELDS(c)++;
- return (0);
+ return (NULL);
}
utf8ConstAssign(ft->name, WORD2UTF(pool->data[nc]));
utf8ConstAssign(ft->signature, CLASS_CONST_UTF8(c, sc));
@@ -1241,7 +1241,7 @@
/* NB: since this class is primitive, getClassFromSignature
* will not fail. Hence it's okay to pass errorInfo as NULL
*/
- FIELD_TYPE(ft) = getClassFromSignature(sig, 0, NULL);
+ FIELD_TYPE(ft) = getClassFromSignature(sig, NULL, NULL);
FIELD_SIZE(ft) = TYPE_PRIM_SIZE(FIELD_TYPE(ft));
}
@@ -1527,7 +1527,7 @@
"%s",
name->data);
}
- return (0);
+ return (NULL);
}
/*
@@ -1546,7 +1546,7 @@
utf8 = utf8ConstNew(name, -1);
if (!utf8) goto bad;
- centry = lookupClassEntry(utf8, 0, &info);
+ centry = lookupClassEntry(utf8, NULL, &info);
if (!centry) goto bad;
utf8ConstRelease(utf8);
@@ -1600,16 +1600,16 @@
utf8 = utf8ConstNew(name, -1);
if (!utf8) {
postOutOfMemory(einfo);
- return 0;
+ return NULL;
}
class = loadClass(utf8, loader, einfo);
utf8ConstRelease(utf8);
- if (class != 0) {
+ if (class != NULL) {
if (processClass(class, CSTATE_COMPLETE, einfo) == true) {
return (class);
}
}
- return (0);
+ return (NULL);
}
/*
@@ -2119,7 +2119,7 @@
class->itable2dtable[j++] = class->interfaces[i];
for (; inm--; imeth++) {
Hjava_lang_Class* ncl;
- Method *cmeth = 0;
+ Method *cmeth = NULL;
/* ignore static methods in interface --- can an
* interface have any beside <clinit>?
@@ -2145,7 +2145,7 @@
}
}
/* not found */
- cmeth = 0;
+ cmeth = NULL;
found:;
@@ -2155,7 +2155,7 @@
if (cmeth && (METHOD_IS_STATIC(cmeth) ||
METHOD_IS_CONSTRUCTOR(cmeth)))
{
- cmeth = 0;
+ cmeth = NULL;
}
/* cmeth == 0 if
@@ -2395,7 +2395,7 @@
resolveString(Hjava_lang_Class* clazz, int idx, errorInfo *info)
{
Utf8Const* utf8;
- Hjava_lang_String* str = 0;
+ Hjava_lang_String* str = NULL;
constants* pool;
int iLockRoot;
@@ -2502,7 +2502,7 @@
fptr++;
}
- return (0);
+ return (NULL);
}
/*
@@ -2548,7 +2548,7 @@
isStatic?"static":"non-static",clp->name->data, name->data);
)
postExceptionMessage(einfo, JAVA_LANG(NoSuchFieldError), "%s", name->data);
- return (0);
+ return (NULL);
}
/*
@@ -2742,14 +2742,14 @@
* construct the array type.
*/
if (c == 0) {
- return (0);
+ return (NULL);
}
/* Build signature for array type */
if (CLASS_IS_PRIMITIVE (c)) {
if (c == voidClass) {
postException(einfo, JAVA_LANG(VerifyError));
- return (0);
+ return (NULL);
}
arr_class = CLASS_ARRAY_CACHE(c);
@@ -2774,12 +2774,12 @@
if (!arr_name) {
postOutOfMemory(einfo);
- return (0);
+ return (NULL);
}
centry = lookupClassEntry(arr_name, c->loader, einfo);
if (centry == 0) {
utf8ConstRelease(arr_name);
- return (0);
+ return (NULL);
}
if (centry->data.cl != 0) {
@@ -2798,7 +2798,7 @@
arr_class = newClass();
if (arr_class == 0) {
postOutOfMemory(einfo);
- centry->data.cl = c = 0;
+ centry->data.cl = c = NULL;
goto bail;
}
@@ -2806,7 +2806,7 @@
if (c->loader == 0) {
if (!gc_add_ref(arr_class)) {
postOutOfMemory(einfo);
- centry->data.cl = c = 0;
+ centry->data.cl = c = NULL;
goto bail;
}
}
@@ -2820,10 +2820,10 @@
if (c->accflags & ACC_PUBLIC) {
arr_flags |= ACC_PUBLIC;
}
- internalSetupClass(arr_class, arr_name, arr_flags, 0, 0, c->loader, 0);
+ internalSetupClass(arr_class, arr_name, arr_flags, 0, 0, c->loader, NULL);
arr_class->superclass = ObjectClass;
if (buildDispatchTable(arr_class, einfo) == false) {
- centry->data.cl = c = 0;
+ centry->data.cl = c = NULL;
goto bail;
}
CLASS_ELEMENT_TYPE(arr_class) = c;
Index: kaffe/kaffe/kaffevm/classPool.c
diff -u kaffe/kaffe/kaffevm/classPool.c:1.29 kaffe/kaffe/kaffevm/classPool.c:1.30
--- kaffe/kaffe/kaffevm/classPool.c:1.29 Thu Dec 16 06:13:50 2004
+++ kaffe/kaffe/kaffevm/classPool.c Fri Dec 17 17:47:35 2004
@@ -51,7 +51,7 @@
return (entry);
}
}
- return (0);
+ return (NULL);
}
/*
@@ -80,12 +80,12 @@
entry = gc_malloc(sizeof(classEntry), KGC_ALLOC_CLASSPOOL);
if (entry == 0) {
postOutOfMemory(einfo);
- return (0);
+ return (NULL);
}
entry->name = name;
entry->loader = loader;
- entry->data.cl = 0;
- entry->next = 0;
+ entry->data.cl = NULL;
+ entry->next = NULL;
/* Lock the class table and insert entry into it (if not already
there) */
@@ -255,7 +255,7 @@
static
nameDependency *findNameDependency(jthread_t jt)
{
- nameDependency *curr, *retval = 0;
+ nameDependency *curr, *retval = NULL;
for( curr = dependencies; curr && !retval; curr = curr->next )
{
@@ -403,7 +403,7 @@
jthread_t jt;
int iLockRoot;
- *out_cl = 0;
+ *out_cl = NULL;
jt = KTHREAD(current)();
while( !done )
{
@@ -462,7 +462,7 @@
Hjava_lang_Class *classMappingLoaded(classEntry *ce, Hjava_lang_Class *cl)
{
- Hjava_lang_Class *retval = 0;
+ Hjava_lang_Class *retval = NULL;
int iLockRoot;
assert(ce != 0);
Index: kaffe/kaffe/kaffevm/code-analyse.c
diff -u kaffe/kaffe/kaffevm/code-analyse.c:1.42 kaffe/kaffe/kaffevm/code-analyse.c:1.43
--- kaffe/kaffe/kaffevm/code-analyse.c:1.42 Sat Jul 17 07:57:13 2004
+++ kaffe/kaffe/kaffevm/code-analyse.c Fri Dec 17 17:47:35 2004
@@ -97,7 +97,7 @@
localuse[lcl].first = 0x7FFFFFFF;
localuse[lcl].last = -1;
localuse[lcl].write = -1;
- localuse[lcl].type = 0;
+ localuse[lcl].type = NULL;
}
DBG(CODEANALYSE,
@@ -2022,7 +2022,7 @@
}
KFREE((*codeInfo)->localuse);
KFREE(*codeInfo);
- *codeInfo = 0;
+ *codeInfo = NULL;
DBG(CODEANALYSE,
dprintf("%s %p: clearing codeInfo %p\n",__FUNCTION__,
THREAD_NATIVE(), codeInfo);
Index: kaffe/kaffe/kaffevm/code.c
diff -u kaffe/kaffe/kaffevm/code.c:1.17 kaffe/kaffe/kaffevm/code.c:1.18
--- kaffe/kaffe/kaffevm/code.c:1.17 Sat Nov 6 15:59:45 2004
+++ kaffe/kaffe/kaffevm/code.c Fri Dec 17 17:47:35 2004
@@ -84,7 +84,7 @@
}
}
else {
- c.exception_table = 0;
+ c.exception_table = NULL;
}
KGC_WRITE(m, c.code);
KGC_WRITE(m, c.exception_table);
Index: kaffe/kaffe/kaffevm/exception.c
diff -u kaffe/kaffe/kaffevm/exception.c:1.89 kaffe/kaffe/kaffevm/exception.c:1.90
--- kaffe/kaffe/kaffevm/exception.c:1.89 Thu Dec 16 06:13:50 2004
+++ kaffe/kaffe/kaffevm/exception.c Fri Dec 17 17:47:35 2004
@@ -61,7 +61,7 @@
vmExcept_jumpToHandler((VmExceptHandler *)(F)); /* Does not return */
#else
-#define DISPATCH_EXCEPTION(F,H,E) thread_data->exceptObj = 0;\
+#define DISPATCH_EXCEPTION(F,H,E) thread_data->exceptObj = NULL;\
CALL_KAFFE_EXCEPTION((F),(H),(E));
#endif /* TRANSLATOR */
@@ -79,17 +79,17 @@
Hjava_lang_Throwable*
error2Throwable(errorInfo* einfo)
{
- Hjava_lang_Throwable *err = 0;
+ Hjava_lang_Throwable *err = NULL;
switch (einfo->type & KERR_CODE_MASK) {
case KERR_EXCEPTION:
if (einfo->mess == 0 || *einfo->mess == '\0') {
err = (Hjava_lang_Throwable*)execute_java_constructor(
- einfo->classname, 0, 0, "()V");
+ einfo->classname, NULL, NULL, "()V");
} else {
err = (Hjava_lang_Throwable*)execute_java_constructor(
einfo->classname,
- 0, 0, "(Ljava/lang/String;)V",
+ NULL, NULL, "(Ljava/lang/String;)V",
checkPtr(stringC2Java(einfo->mess)));
}
break;
@@ -99,7 +99,7 @@
"java/lang/ExceptionInInitializerError") != 0) {
err = (Hjava_lang_Throwable*)execute_java_constructor(
JAVA_LANG(ExceptionInInitializerError),
- 0, 0, "(Ljava/lang/Throwable;)V",
+ NULL, NULL, "(Ljava/lang/Throwable;)V",
einfo->throwable);
break;
}
@@ -137,7 +137,7 @@
einfo->type = KERR_EXCEPTION;
einfo->classname = name;
einfo->mess = "";
- einfo->throwable = 0;
+ einfo->throwable = NULL;
}
void
@@ -162,7 +162,7 @@
einfo->type = KERR_EXCEPTION | KERR_FREE_MESSAGE;
einfo->classname = fullname;
einfo->mess = msgBuf;
- einfo->throwable = 0;
+ einfo->throwable = NULL;
}
/*
@@ -261,7 +261,7 @@
(Hjava_lang_VMThrowable*)newObject(javaLangVMThrowable);
unhand(eobj)->vmState = vmstate;
}
- backtrace = buildStackTrace(0);
+ backtrace = buildStackTrace(NULL);
unhand(vmstate)->backtrace = backtrace;
dispatchException(eobj, (stackTraceInfo*)backtrace);
}
@@ -280,7 +280,7 @@
ABORT();
EXIT(1);
}
- dispatchException(eobj, (stackTraceInfo*)buildStackTrace(0));
+ dispatchException(eobj, (stackTraceInfo*)buildStackTrace(NULL));
}
#if 0
@@ -373,7 +373,7 @@
/* Find the sync. object */
if ((frame->meth->accflags & ACC_SYNCHRONISED)==0) {
- obj = 0;
+ obj = NULL;
} else if (frame->meth->accflags & ACC_STATIC) {
obj = &frame->meth->class->head;
} else {
@@ -392,7 +392,7 @@
/* If not here, exit monitor if synchronised. */
if (frame->meth->accflags & ACC_SYNCHRONISED) {
- locks_internal_slowUnlockMutexIfHeld(&obj->lock, (void *)frame->fp, 0);
+ locks_internal_slowUnlockMutexIfHeld(&obj->lock, (void *)frame->fp, NULL);
}
/* If method found and profiler enable, fix self+children time */
@@ -418,7 +418,7 @@
Hjava_lang_Class* class;
/* Clear held exception object */
- THREAD_DATA()->exceptObj = 0;
+ THREAD_DATA()->exceptObj = NULL;
class = OBJECT_CLASS(&eobj->base);
cname = CLASS_CNAME(class);
@@ -443,7 +443,7 @@
"option on kaffe.\n");
}
}
- printStackTrace((Hjava_lang_Throwable*)eobj, 0, 1);
+ printStackTrace((Hjava_lang_Throwable*)eobj, NULL, 1);
ABORT();
}
Index: kaffe/kaffe/kaffevm/locks.h
diff -u kaffe/kaffe/kaffevm/locks.h:1.26 kaffe/kaffe/kaffevm/locks.h:1.27
--- kaffe/kaffe/kaffevm/locks.h:1.26 Thu Dec 16 06:13:50 2004
+++ kaffe/kaffe/kaffevm/locks.h Fri Dec 17 17:47:35 2004
@@ -21,11 +21,11 @@
struct _iLock;
#define LOCKOBJECT struct _iLock**
-#define lockMutex(O) (KTHREAD(disable_stop)(), locks_internal_lockMutex(&(O)->lock, &iLockRoot, 0))
-#define unlockMutex(O) do { locks_internal_unlockMutex(&(O)->lock, &iLockRoot, 0); KTHREAD(enable_stop)(); } while (0)
-#define waitCond(O,T) locks_internal_waitCond(&(O)->lock, (T), 0)
-#define signalCond(O) locks_internal_signalCond(&(O)->lock, 0)
-#define broadcastCond(O) locks_internal_broadcastCond(&(O)->lock, 0)
+#define lockMutex(O) (KTHREAD(disable_stop)(), locks_internal_lockMutex(&(O)->lock, &iLockRoot, NULL))
+#define unlockMutex(O) do { locks_internal_unlockMutex(&(O)->lock, &iLockRoot, NULL); KTHREAD(enable_stop)(); } while (0)
+#define waitCond(O,T) locks_internal_waitCond(&(O)->lock, (T), NULL)
+#define signalCond(O) locks_internal_signalCond(&(O)->lock, NULL)
+#define broadcastCond(O) locks_internal_broadcastCond(&(O)->lock, NULL)
#define lockStaticMutex(THING) (KTHREAD(disable_stop)(), locks_internal_lockMutex(&(THING)->lock, &iLockRoot, &(THING)->heavyLock))
#define unlockStaticMutex(THING) do { locks_internal_unlockMutex(&(THING)->lock, &iLockRoot, &(THING)->heavyLock); KTHREAD(enable_stop)(); } while(0)
Index: kaffe/kaffe/kaffevm/jit3/basecode.c
diff -u kaffe/kaffe/kaffevm/jit3/basecode.c:1.8 kaffe/kaffe/kaffevm/jit3/basecode.c:1.9
--- kaffe/kaffe/kaffevm/jit3/basecode.c:1.8 Sat Dec 11 03:59:55 2004
+++ kaffe/kaffe/kaffevm/jit3/basecode.c Fri Dec 17 17:47:35 2004
@@ -27,7 +27,7 @@
SlotData* sdata;
if (data == 0) {
- seq->u[slot].slot = 0;
+ seq->u[slot].slot = NULL;
return;
}
sdata = data->slot;
@@ -68,7 +68,7 @@
SlotData* sdata;
if (data == 0) {
- seq->u[slot].slot = 0;
+ seq->u[slot].slot = NULL;
return;
}
@@ -184,7 +184,7 @@
{
sequence* seq;
#if defined(TWO_OPERAND)
- SlotInfo* olddst = 0;
+ SlotInfo* olddst = NULL;
/* Two operand systems cannot handle three operand ops.
* We need to fix it so the dst is one of the source ops.
@@ -231,7 +231,7 @@
/* Two operand systems cannot handle three operand ops.
* We need to fixit so the dst is one of the source ops.
*/
- SlotInfo* olddst = 0;
+ SlotInfo* olddst = NULL;
if (s1 != 0 && s2 != 0 && dst != 0) {
if (s2 == dst) {
olddst = dst;
@@ -268,7 +268,7 @@
/* Two operand systems cannot handle three operand ops.
* We need to fixit so the dst is one of the source ops.
*/
- SlotInfo* olddst = 0;
+ SlotInfo* olddst = NULL;
if (s1 != 0 && s2 != 0 && dst != 0) {
if (s2 == dst) {
olddst = dst;
@@ -305,7 +305,7 @@
/* Two operand systems cannot handle three operand ops.
* We need to fixit so the dst is one of the source ops.
*/
- SlotInfo* olddst = 0;
+ SlotInfo* olddst = NULL;
if (s1 != 0 && s2 != 0 && dst != 0) {
if (s2 == dst) {
olddst = dst;
Index: kaffe/kaffe/kaffevm/jit3/icode.c
diff -u kaffe/kaffe/kaffevm/jit3/icode.c:1.48 kaffe/kaffe/kaffevm/jit3/icode.c:1.49
--- kaffe/kaffe/kaffevm/jit3/icode.c:1.48 Sat Dec 11 07:07:21 2004
+++ kaffe/kaffe/kaffevm/jit3/icode.c Fri Dec 17 17:47:35 2004
@@ -194,14 +194,14 @@
void
copyslots(SlotInfo* dst, SlotInfo* src, int type)
{
- slot_slot_slot(dst, 0, src, slotAlias, Tcopy);
+ slot_slot_slot(dst, NULL, src, slotAlias, Tcopy);
activeSeq->u[1].value.i = type;
}
void
copylslots(SlotInfo* dst, SlotInfo* src, int type)
{
- lslot_lslot_lslot(dst, 0, src, slotAlias, Tcopy);
+ lslot_lslot_lslot(dst, NULL, src, slotAlias, Tcopy);
activeSeq->u[1].value.i = type;
}
@@ -228,8 +228,8 @@
setupArgumentRegisters();
/* Emit prologue code */
- slot_const_const(0, (jword)l, (jword)meth, HAVE_prologue, Tnull);
- slot_const_const(0, (jword)createSpillMask(), SR_START, doReload, Tnull);
+ slot_const_const(NULL, (jword)l, (jword)meth, HAVE_prologue, Tnull);
+ slot_const_const(NULL, (jword)createSpillMask(), SR_START, doReload, Tnull);
#if defined(ENABLE_JVMPI)
{
@@ -261,7 +261,7 @@
l->to = (uintp)c;
l->from = 0;
- slot_slot_const(0, stack_limit, (jword)l, HAVE_check_stack_limit_constpool, Tnull);
+ slot_slot_const(NULL, stack_limit, (jword)l, HAVE_check_stack_limit_constpool, Tnull);
#elif defined(HAVE_check_stack_limit)
label* l;
@@ -271,7 +271,7 @@
l->to = (uintp)soft_stackoverflow;
l->from = 0;
- slot_slot_const(0, stack_limit, (jword)l, HAVE_check_stack_limit, Tnull);
+ slot_slot_const(NULL, stack_limit, (jword)l, HAVE_check_stack_limit, Tnull);
#endif
#endif /* STACK_LIMIT */
}
@@ -288,8 +288,8 @@
l->from = 0;
/* Emit exception prologue code */
- slot_const_const(0, (jword)l, 0, HAVE_exception_prologue, Tnull);
- slot_const_const(0, (jword)createSpillMask(), SR_EXCEPTION, doReload, Tnull);
+ slot_const_const(NULL, (jword)l, 0, HAVE_exception_prologue, Tnull);
+ slot_const_const(NULL, (jword)createSpillMask(), SR_EXCEPTION, doReload, Tnull);
}
void
@@ -311,7 +311,7 @@
}
#endif
- slot_const_const(0, (jword)l, 0, HAVE_epilogue, Tnull);
+ slot_const_const(NULL, (jword)l, 0, HAVE_epilogue, Tnull);
}
void
@@ -352,12 +352,12 @@
l->to = (uintp)slowLockObject;
l->from = 0;
if (METHOD_IS_STATIC(meth) == 0) {
- meth = 0;
+ meth = NULL;
}
else {
- obj = 0;
+ obj = NULL;
}
- slot_slot_slot_const_const(0, 0, obj, (jword)meth, (jword)l, HAVE_mon_enter, Tnull);
+ slot_slot_slot_const_const(NULL, NULL, obj, (jword)meth, (jword)l, HAVE_mon_enter, Tnull);
end_func_sync();
}
#else
@@ -392,12 +392,12 @@
l->to = (uintp)slowUnlockObject;
l->from = 0;
if (METHOD_IS_STATIC(meth) == 0) {
- meth = 0;
+ meth = NULL;
}
else {
- obj = 0;
+ obj = NULL;
}
- slot_slot_slot_const_const(0, 0, obj, (jword)meth, (jword)l, HAVE_mon_exit, Tnull);
+ slot_slot_slot_const_const(NULL, NULL, obj, (jword)meth, (jword)l, HAVE_mon_exit, Tnull);
end_func_sync();
}
#else
@@ -425,7 +425,7 @@
l->at = 0;
l->to = (uintp)slowLockObject;
l->from = 0;
- slot_slot_slot_const_const(0, 0, mon, 0, (jword)l, HAVE_mon_enter, Tnull);
+ slot_slot_slot_const_const(NULL, NULL, mon, 0, (jword)l, HAVE_mon_enter, Tnull);
#else
pusharg_ref(mon, 0);
call_soft(lockObject);
@@ -444,7 +444,7 @@
l->at = 0;
l->to = (uintp)slowUnlockObject;
l->from = 0;
- slot_slot_slot_const_const(0, 0, mon, 0, (jword)l, HAVE_mon_exit, Tnull);
+ slot_slot_slot_const_const(NULL, NULL, mon, 0, (jword)l, HAVE_mon_exit, Tnull);
#else
pusharg_ref(mon, 0);
call_soft(unlockObject);
@@ -474,14 +474,14 @@
void
_start_sub_block(void)
{
- slot_const_const(0, (jword)createSpillMask(), SR_SUBBASIC, doReload, Tnull);
+ slot_const_const(NULL, (jword)createSpillMask(), SR_SUBBASIC, doReload, Tnull);
setupSlotsForBasicBlock();
}
void
_start_basic_block(void)
{
- slot_const_const(0, (jword)createSpillMask(), SR_BASIC, doReload, Tnull);
+ slot_const_const(NULL, (jword)createSpillMask(), SR_BASIC, doReload, Tnull);
setupSlotsForBasicBlock();
}
@@ -489,26 +489,26 @@
_end_sub_block(void)
{
mark_all_writes();
- slot_const_const(0, (jword)createSpillMask(), SR_SUBBASIC, doSpill, Tnull);
+ slot_const_const(NULL, (jword)createSpillMask(), SR_SUBBASIC, doSpill, Tnull);
}
void
_end_basic_block(void)
{
mark_all_writes();
- slot_const_const(0, (jword)createSpillMask(), SR_BASIC, doSpill, Tnull);
+ slot_const_const(NULL, (jword)createSpillMask(), SR_BASIC, doSpill, Tnull);
}
void
_syncRegisters(uintp stk UNUSED, uintp temp UNUSED)
{
- slot_const_const(0, (jword)createSpillMask(), SR_SYNC, doSpill, Tnull);
+ slot_const_const(NULL, (jword)createSpillMask(), SR_SYNC, doSpill, Tnull);
}
void
_start_instruction(uintp _pc)
{
- slot_const_const(0, 0, _pc, startInsn, Tnull);
+ slot_const_const(NULL, 0, _pc, startInsn, Tnull);
}
void
@@ -531,7 +531,7 @@
begin_sync(void)
{
assert(lastSpill == 0);
- slot_const_const(0, 0, SR_BASIC, doSpill, Tnull);
+ slot_const_const(NULL, 0, SR_BASIC, doSpill, Tnull);
lastSpill = activeSeq;
}
@@ -541,7 +541,7 @@
/* Make sure a sync is in progress */
assert(lastSpill != 0);
lastSpill->u[1].smask = createSpillMask();
- lastSpill = 0;
+ lastSpill = NULL;
mark_all_writes();
}
@@ -549,7 +549,7 @@
begin_func_sync(void)
{
assert(lastSpill == 0);
- slot_const_const(0, 0, SR_FUNCTION, doSpill, Tnull);
+ slot_const_const(NULL, 0, SR_FUNCTION, doSpill, Tnull);
lastSpill = activeSeq;
/* If we might throw and catch and exception we better make everything
@@ -571,10 +571,10 @@
/* Save the slots to spill */
assert(lastSpill != 0);
lastSpill->u[1].smask = mask;
- lastSpill = 0;
+ lastSpill = NULL;
/* Create a reload and save the slots to reload */
- slot_const_const(0, (jword)mask, SR_FUNCTION, doReload, Tnull);
+ slot_const_const(NULL, (jword)mask, SR_FUNCTION, doReload, Tnull);
}
@@ -587,7 +587,7 @@
{
#if defined(HAVE_move_int_const)
if (HAVE_move_int_const_rangecheck(val)) {
- slot_slot_const(dst, 0, val, HAVE_move_int_const, Tconst);
+ slot_slot_const(dst, NULL, val, HAVE_move_int_const, Tconst);
}
else
#endif
@@ -621,7 +621,7 @@
{
#if defined(HAVE_move_ref_const)
if (HAVE_move_ref_const_rangecheck(val)) {
- slot_slot_const(dst, 0, (jword)val, HAVE_move_ref_const, Tconst);
+ slot_slot_const(dst, NULL, (jword)val, HAVE_move_ref_const, Tconst);
}
else
#endif
@@ -730,7 +730,7 @@
{
#if defined(HAVE_move_float_const)
if (HAVE_move_float_const_rangecheck(val)) {
- slot_slot_fconst(dst, 0, val, HAVE_move_float_const, Tconst);
+ slot_slot_fconst(dst, NULL, val, HAVE_move_float_const, Tconst);
}
else
#endif
@@ -746,7 +746,7 @@
l->from = 0;
#if defined(HAVE_load_constpool_float)
- slot_slot_const(dst, 0, (jword)l, HAVE_load_constpool_float, Tnull);
+ slot_slot_const(dst, NULL, (jword)l, HAVE_load_constpool_float, Tnull);
#else
{
SlotInfo* tmp;
@@ -764,7 +764,7 @@
{
#if defined(HAVE_move_double_const)
if (HAVE_move_double_const_rangecheck(val)) {
- lslot_slot_fconst(dst, 0, val, HAVE_move_double_const, Tconst);
+ lslot_slot_fconst(dst, NULL, val, HAVE_move_double_const, Tconst);
}
else
#endif
@@ -800,7 +800,7 @@
if (dst == src) {
}
else if (isGlobal(dst->slot)) {
- slot_slot_slot(dst, 0, src, HAVE_move_any, Tcopy);
+ slot_slot_slot(dst, NULL, src, HAVE_move_any, Tcopy);
}
else {
copyslots(dst, src, Rref);
@@ -820,7 +820,7 @@
}
#endif
else if (isGlobal(dst->slot)) {
- slot_slot_slot(dst, 0, src, HAVE_move_int, Tcopy);
+ slot_slot_slot(dst, NULL, src, HAVE_move_int, Tcopy);
}
else {
copyslots(dst, src, Rint);
@@ -839,7 +839,7 @@
}
#endif
else if (isGlobal(dst->slot)) {
- slot_slot_slot(dst, 0, src, HAVE_move_ref, Tcopy);
+ slot_slot_slot(dst, NULL, src, HAVE_move_ref, Tcopy);
}
else {
copyslots(dst, src, Rref);
*** Patch too long, truncated ***
More information about the kaffe
mailing list