[kaffe] CVS kaffe (doogie): Sparse NULL-constant fixes.
Kaffe CVS
cvs-commits at kaffe.org
Sun Dec 19 16:59:12 PST 2004
PatchSet 5672
Date: 2004/12/20 00:55:11
Author: doogie
Branch: HEAD
Tag: (none)
Log:
Sparse NULL-constant fixes.
Members:
ChangeLog:1.3217->1.3218
config/i386/jit.h:1.24->1.25
kaffe/kaffevm/jit/basecode.c:1.4->1.5
kaffe/kaffevm/jit/funcs.c:1.5->1.6
kaffe/kaffevm/jit/icode.c:1.31->1.32
kaffe/kaffevm/jit/labels.c:1.11->1.12
kaffe/kaffevm/jit/machine.c:1.71->1.72
kaffe/kaffevm/jit/registers.c:1.4->1.5
kaffe/kaffevm/jit/slots.c:1.5->1.6
kaffe/kaffevm/jit/slots.h:1.2->1.3
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3217 kaffe/ChangeLog:1.3218
--- kaffe/ChangeLog:1.3217 Mon Dec 20 00:13:14 2004
+++ kaffe/ChangeLog Mon Dec 20 00:55:11 2004
@@ -1,4 +1,12 @@
2004-12-19 Adam Heath <doogie at brainfood.com>
+ * M config/i386/jit.h, kaffe/kaffevm/jit/basecode.c,
+ kaffe/kaffevm/jit/funcs.c, kaffe/kaffevm/jit/icode.c,
+ kaffe/kaffevm/jit/labels.c, kaffe/kaffevm/jit/machine.c,
+ kaffe/kaffevm/jit/registers.c, kaffe/kaffevm/jit/slots.c,
+ kaffe/kaffevm/jit/slots.h:
+ Sparse NULL-constant fixes.
+
+2004-12-19 Adam Heath <doogie at brainfood.com>
* kaffe/kaffevm/jni/jni-arrays.c, kaffe/kaffevm/jni/jni-base.c
kaffe/kaffevm/jni/jni-callmethod.c, kaffe/kaffevm/jni/jni-fields.c,
Index: kaffe/config/i386/jit.h
diff -u kaffe/config/i386/jit.h:1.24 kaffe/config/i386/jit.h:1.25
--- kaffe/config/i386/jit.h:1.24 Wed Jun 23 15:36:44 2004
+++ kaffe/config/i386/jit.h Mon Dec 20 00:55:13 2004
@@ -86,15 +86,15 @@
/* Define the register set */
#define REGISTER_SET \
- { /* eax */ 0, 0, Rint|Rsubint|Rref,0, 0, 0 }, \
- { /* ecx */ 0, 0, Rint|Rsubint|Rref,0, 0, 1 }, \
- { /* edx */ 0, 0, Rint|Rsubint|Rref,0, 0, 2 }, \
- { /* ebx */ 0, 0, Rint|Rsubint|Rref,Rglobal|Rnosaveoncall, 0, 3 },\
- { /* esp */ 0, 0, Reserved, 0, 0, 4 }, \
- { /* ebp */ 0, 0, Reserved, 0, 0, 5 }, \
- { /* esi */ 0, 0, Rint|Rref, Rglobal|Rnosaveoncall, 0, 6 },\
- { /* edi */ 0, 0, Rint|Rref, Rglobal|Rnosaveoncall, 0, 7 },\
- { /* f0 */ 0, 0, Rfloat|Rdouble, Rreadonce, 0, 8 },
+ { /* eax */ NULL, 0, Rint|Rsubint|Rref,0, 0, 0 }, \
+ { /* ecx */ NULL, 0, Rint|Rsubint|Rref,0, 0, 1 }, \
+ { /* edx */ NULL, 0, Rint|Rsubint|Rref,0, 0, 2 }, \
+ { /* ebx */ NULL, 0, Rint|Rsubint|Rref,Rglobal|Rnosaveoncall, 0, 3 },\
+ { /* esp */ NULL, 0, Reserved, 0, 0, 4 }, \
+ { /* ebp */ NULL, 0, Reserved, 0, 0, 5 }, \
+ { /* esi */ NULL, 0, Rint|Rref, Rglobal|Rnosaveoncall, 0, 6 },\
+ { /* edi */ NULL, 0, Rint|Rref, Rglobal|Rnosaveoncall, 0, 7 },\
+ { /* f0 */ NULL, 0, Rfloat|Rdouble, Rreadonce, 0, 8 },
/* Number of registers in the register set */
#define NR_REGISTERS 9
Index: kaffe/kaffe/kaffevm/jit/basecode.c
diff -u kaffe/kaffe/kaffevm/jit/basecode.c:1.4 kaffe/kaffe/kaffevm/jit/basecode.c:1.5
--- kaffe/kaffe/kaffevm/jit/basecode.c:1.4 Tue Dec 22 07:43:09 1998
+++ kaffe/kaffe/kaffevm/jit/basecode.c Mon Dec 20 00:55:14 2004
@@ -76,12 +76,12 @@
{
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.
*/
- if (s1 != 0 && s2 != 0 && dst != 0) {
+ if (s1 != NULL && s2 != NULL && dst != NULL) {
if (type == Tcomm) {
if (s2 == dst) {
s2 = s1;
@@ -107,7 +107,7 @@
seq->func = f;
#if defined(TWO_OPERAND)
- if (olddst != 0) {
+ if (olddst != NULL) {
move_any(olddst, dst);
}
#endif
@@ -121,8 +121,8 @@
/* Two operand systems cannot handle three operand ops.
* We need to fixit so the dst is one of the source ops.
*/
- SlotInfo* olddst = 0;
- if (s1 != 0 && s2 != 0 && dst != 0) {
+ SlotInfo* olddst = NULL;
+ if (s1 != NULL && s2 != NULL && dst != NULL) {
if (s2 == dst) {
olddst = dst;
slot_alloc2tmp(dst);
@@ -142,7 +142,7 @@
seq->func = f;
#if defined(TWO_OPERAND)
- if (olddst != 0) {
+ if (olddst != NULL) {
move_anylong(olddst, dst);
}
#endif
@@ -156,8 +156,8 @@
/* Two operand systems cannot handle three operand ops.
* We need to fixit so the dst is one of the source ops.
*/
- SlotInfo* olddst = 0;
- if (s1 != 0 && s2 != 0 && dst != 0) {
+ SlotInfo* olddst = NULL;
+ if (s1 != NULL && s2 != NULL && dst != NULL) {
if (s2 == dst) {
olddst = dst;
slot_alloctmp(dst);
@@ -177,7 +177,7 @@
seq->func = f;
#if defined(TWO_OPERAND)
- if (olddst != 0) {
+ if (olddst != NULL) {
move_any(olddst, dst);
}
#endif
@@ -191,8 +191,8 @@
/* Two operand systems cannot handle three operand ops.
* We need to fixit so the dst is one of the source ops.
*/
- SlotInfo* olddst = 0;
- if (s1 != 0 && s2 != 0 && dst != 0) {
+ SlotInfo* olddst = NULL;
+ if (s1 != NULL && s2 != NULL && dst != NULL) {
if (s2 == dst) {
olddst = dst;
slot_alloctmp(dst);
@@ -212,7 +212,7 @@
seq->func = f;
#if defined(TWO_OPERAND)
- if (olddst != 0) {
+ if (olddst != NULL) {
move_any(olddst, dst);
}
#endif
Index: kaffe/kaffe/kaffevm/jit/funcs.c
diff -u kaffe/kaffe/kaffevm/jit/funcs.c:1.5 kaffe/kaffe/kaffevm/jit/funcs.c:1.6
--- kaffe/kaffe/kaffevm/jit/funcs.c:1.5 Thu Aug 19 19:29:03 2004
+++ kaffe/kaffe/kaffevm/jit/funcs.c Mon Dec 20 00:55:14 2004
@@ -41,7 +41,7 @@
static
void printCodeLabels(void)
{
- label *il, *curr = 0;
+ label *il, *curr = NULL;
while( (il = getInternalLabel(&curr, CODEPC)) )
{
Index: kaffe/kaffe/kaffevm/jit/icode.c
diff -u kaffe/kaffe/kaffevm/jit/icode.c:1.31 kaffe/kaffe/kaffevm/jit/icode.c:1.32
--- kaffe/kaffe/kaffevm/jit/icode.c:1.31 Thu Aug 26 06:41:43 2004
+++ kaffe/kaffe/kaffevm/jit/icode.c Mon Dec 20 00:55:14 2004
@@ -201,7 +201,7 @@
l->from = 0;
/* Emit prologue code */
- slot_const_const(0, (jword)l, (jword)meth, HAVE_prologue, Tnull);
+ slot_const_const(NULL, (jword)l, (jword)meth, HAVE_prologue, Tnull);
}
void
@@ -216,13 +216,13 @@
l->from = 0;
/* Emit exception prologue code */
- slot_const_const(0, (jword)l, 0, HAVE_exception_prologue, Tnull);
+ slot_const_const(NULL, (jword)l, 0, HAVE_exception_prologue, Tnull);
}
void
epilogue(void)
{
- slot_slot_slot(0, 0, 0, HAVE_epilogue, Tnull);
+ slot_slot_slot(NULL, NULL, NULL, HAVE_epilogue, Tnull);
}
void
@@ -285,7 +285,7 @@
{
int i;
- _slot_const_const(0, 0, 0, startBlock, Tnull);
+ _slot_const_const(NULL, 0, 0, startBlock, Tnull);
for (i = maxslot - 1; i >= 0; i--) {
slotinfo[i].info = SI_SLOT;
@@ -295,19 +295,19 @@
void
_end_basic_block(uintp stk, uintp temp)
{
- _slot_const_const(0, stk, temp, endBlock, Tnull);
+ _slot_const_const(NULL, stk, temp, endBlock, Tnull);
}
void
_start_sub_block(void)
{
- _slot_const_const(0, 0, 0, startSubBlock, Tnull);
+ _slot_const_const(NULL, 0, 0, startSubBlock, Tnull);
}
void
_end_sub_block(uintp stk, uintp temp)
{
- _slot_const_const(0, stk, temp, endSubBlock, Tnull);
+ _slot_const_const(NULL, stk, temp, endSubBlock, Tnull);
}
void
@@ -315,7 +315,7 @@
{
void startInsn(sequence*);
- _slot_const_const(0, 0, pc, startInsn, Tnull);
+ _slot_const_const(NULL, 0, pc, startInsn, Tnull);
}
void
@@ -332,13 +332,13 @@
void
_fixup_function_call(void)
{
- _slot_const_const(0, 0, 0, fixupFunctionCall, Tnull);
+ _slot_const_const(NULL, 0, 0, fixupFunctionCall, Tnull);
}
void
_prepare_function_call(uintp stk, uintp temp)
{
- _slot_const_const(0, stk, temp, prepareFunctionCall, Tnull);
+ _slot_const_const(NULL, stk, temp, prepareFunctionCall, Tnull);
}
void
@@ -350,7 +350,7 @@
void
_syncRegisters(uintp stk, uintp temp)
{
- _slot_const_const(0, stk, temp, syncRegisters, Tnull);
+ _slot_const_const(NULL, stk, temp, syncRegisters, Tnull);
}
@@ -363,7 +363,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
@@ -391,7 +391,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
@@ -473,7 +473,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
@@ -501,7 +501,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
@@ -528,7 +528,7 @@
void
move_any(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(dst, 0, src, HAVE_move_any, Tcopy);
+ slot_slot_slot(dst, NULL, src, HAVE_move_any, Tcopy);
}
#endif
@@ -536,21 +536,21 @@
void
move_int(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(dst, 0, src, HAVE_move_int, Tcopy);
+ slot_slot_slot(dst, NULL, src, HAVE_move_int, Tcopy);
}
#endif
void
move_ref(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(dst, 0, src, HAVE_move_ref, Tcopy);
+ slot_slot_slot(dst, NULL, src, HAVE_move_ref, Tcopy);
}
void
move_anylong(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_move_anylong)
- lslot_lslot_lslot(dst, 0, src, HAVE_move_anylong, Tcopy);
+ lslot_lslot_lslot(dst, NULL, src, HAVE_move_anylong, Tcopy);
#else
assert(LSLOT(dst) != HSLOT(src));
move_any(LSLOT(dst), LSLOT(src));
@@ -562,7 +562,7 @@
move_long(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_move_long)
- lslot_lslot_lslot(dst, 0, src, HAVE_move_long, Tcopy);
+ lslot_lslot_lslot(dst, NULL, src, HAVE_move_long, Tcopy);
#else
assert(LSLOT(dst) != HSLOT(src));
move_int(LSLOT(dst), LSLOT(src));
@@ -574,7 +574,7 @@
void
move_float(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(dst, 0, src, HAVE_move_float, Tcopy);
+ slot_slot_slot(dst, NULL, src, HAVE_move_float, Tcopy);
}
#endif
@@ -582,7 +582,7 @@
void
move_double(SlotInfo* dst, SlotInfo* src)
{
- lslot_lslot_lslot(dst, 0, src, HAVE_move_double, Tcopy);
+ lslot_lslot_lslot(dst, NULL, src, HAVE_move_double, Tcopy);
}
#endif
@@ -590,7 +590,7 @@
void
move_label_const(SlotInfo* dst, label* lab)
{
- slot_slot_const(dst, 0, (jword)lab, HAVE_move_label_const, Tnull);
+ slot_slot_const(dst, NULL, (jword)lab, HAVE_move_label_const, Tnull);
}
#endif
@@ -1092,7 +1092,7 @@
neg_float(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_neg_float)
- slot_slot_slot(dst, 0, src, HAVE_neg_float, Tcomplex);
+ slot_slot_slot(dst, NULL, src, HAVE_neg_float, Tcomplex);
#else
SlotInfo* zero;
slot_alloctmp(zero);
@@ -1106,7 +1106,7 @@
neg_double(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_neg_double)
- lslot_lslot_lslot(dst, 0, src, HAVE_neg_double, Tcomplex);
+ lslot_lslot_lslot(dst, NULL, src, HAVE_neg_double, Tcomplex);
#else
SlotInfo* zero;
slot_alloc2tmp(zero);
@@ -1405,7 +1405,7 @@
void
load_int(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(dst, 0, src, HAVE_load_int, Tload);
+ slot_slot_slot(dst, NULL, src, HAVE_load_int, Tload);
}
#endif
@@ -1445,7 +1445,7 @@
void
load_ref(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(dst, 0, src, HAVE_load_ref, Tload);
+ slot_slot_slot(dst, NULL, src, HAVE_load_ref, Tload);
}
#endif
@@ -1509,7 +1509,7 @@
void
load_float(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(dst, 0, src, HAVE_load_float, Tload);
+ slot_slot_slot(dst, NULL, src, HAVE_load_float, Tload);
}
#endif
@@ -1527,7 +1527,7 @@
void
load_double(SlotInfo* dst, SlotInfo* src)
{
- lslot_lslot_slot(dst, 0, src, HAVE_load_double, Tload);
+ lslot_lslot_slot(dst, NULL, src, HAVE_load_double, Tload);
}
#endif
@@ -1545,7 +1545,7 @@
load_byte(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_load_byte)
- slot_slot_slot(dst, 0, src, HAVE_load_byte, Tload);
+ slot_slot_slot(dst, NULL, src, HAVE_load_byte, Tload);
#else
load_int(dst, src);
lshl_int_const(dst, dst, 8 * (sizeof(jint) - sizeof(jbyte)));
@@ -1557,7 +1557,7 @@
load_char(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_load_char)
- slot_slot_slot(dst, 0, src, HAVE_load_char, Tload);
+ slot_slot_slot(dst, NULL, src, HAVE_load_char, Tload);
#else
load_int(dst, src);
and_int_const(dst, dst, (1 << (8 * sizeof(jchar))) - 1);
@@ -1568,7 +1568,7 @@
load_short(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_load_short)
- slot_slot_slot(dst, 0, src, HAVE_load_short, Tload);
+ slot_slot_slot(dst, NULL, src, HAVE_load_short, Tload);
#else
load_int(dst, src);
lshl_int_const(dst, dst, 8 * (sizeof(jint) - sizeof(jshort)));
@@ -1842,7 +1842,7 @@
void
store_int(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(0, dst, src, HAVE_store_int, Tstore);
+ slot_slot_slot(NULL, dst, src, HAVE_store_int, Tstore);
}
#endif
@@ -1882,7 +1882,7 @@
void
store_ref(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(0, dst, src, HAVE_store_ref, Tstore);
+ slot_slot_slot(NULL, dst, src, HAVE_store_ref, Tstore);
}
#endif
@@ -1922,7 +1922,7 @@
store_long(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_store_long)
- lslot_lslot_lslot(0, dst, src, HAVE_store_long, Tstore);
+ lslot_lslot_lslot(NULL, dst, src, HAVE_store_long, Tstore);
#else
SlotInfo* tmp;
@@ -1968,7 +1968,7 @@
void
store_float(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_slot(0, dst, src, HAVE_store_float, Tstore);
+ slot_slot_slot(NULL, dst, src, HAVE_store_float, Tstore);
}
#endif
@@ -2008,7 +2008,7 @@
void
store_double(SlotInfo* dst, SlotInfo* src)
{
- slot_slot_lslot(0, dst, src, HAVE_store_double, Tstore);
+ slot_slot_lslot(NULL, dst, src, HAVE_store_double, Tstore);
}
#endif
@@ -2048,7 +2048,7 @@
store_byte(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_store_byte)
- slot_slot_slot(0, dst, src, HAVE_store_byte, Tstore);
+ slot_slot_slot(NULL, dst, src, HAVE_store_byte, Tstore);
#else
/* FIXME -- this is unlikely to work as-is as it doesn't
allow for alignment requirements on the integer load. */
@@ -2102,7 +2102,7 @@
store_char(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_store_char)
- slot_slot_slot(0, dst, src, HAVE_store_char, Tstore);
+ slot_slot_slot(NULL, dst, src, HAVE_store_char, Tstore);
#else
/* FIXME -- this is unlikely to work as-is as it doesn't
allow for alignment requirements on the integer load. */
@@ -2156,7 +2156,7 @@
store_short(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_store_short)
- slot_slot_slot(0, dst, src, HAVE_store_short, Tstore);
+ slot_slot_slot(NULL, dst, src, HAVE_store_short, Tstore);
#else
/* FIXME -- this is unlikely to work as-is as it doesn't
allow for alignment requirements on the integer load. */
@@ -2347,7 +2347,7 @@
{
#if defined(HAVE_pusharg_int_const)
if (HAVE_pusharg_int_const_rangecheck(val)) {
- slot_const_const(0, val, idx, HAVE_pusharg_int_const, Tnull);
+ slot_const_const(NULL, val, idx, HAVE_pusharg_int_const, Tnull);
argcount += 1;
}
else
@@ -2365,7 +2365,7 @@
void
pusharg_int(SlotInfo* src, int idx)
{
- slot_slot_const(0, src, idx, HAVE_pusharg_int, Tnull);
+ slot_slot_const(NULL, src, idx, HAVE_pusharg_int, Tnull);
argcount += 1;
}
#endif
@@ -2374,7 +2374,7 @@
void
pusharg_ref(SlotInfo* src, int idx)
{
- slot_slot_const(0, src, idx, HAVE_pusharg_ref, Tnull);
+ slot_slot_const(NULL, src, idx, HAVE_pusharg_ref, Tnull);
argcount += 1;
}
#endif
@@ -2384,7 +2384,7 @@
{
#if defined(HAVE_pusharg_ref_const)
if (HAVE_pusharg_ref_const_rangecheck((jword)val)) {
- slot_const_const(0, (jword)val, idx, HAVE_pusharg_ref_const, Tnull);
+ slot_const_const(NULL, (jword)val, idx, HAVE_pusharg_ref_const, Tnull);
argcount += 1;
}
else
@@ -2422,7 +2422,7 @@
void
pusharg_float(SlotInfo* src, int idx)
{
- slot_slot_const(0, src, idx, HAVE_pusharg_float, Tnull);
+ slot_slot_const(NULL, src, idx, HAVE_pusharg_float, Tnull);
argcount += 1;
}
#endif
@@ -2431,7 +2431,7 @@
void
pusharg_double(SlotInfo* src, int idx)
{
- lslot_lslot_const(0, src, idx, HAVE_pusharg_double, Tnull);
+ lslot_lslot_const(NULL, src, idx, HAVE_pusharg_double, Tnull);
argcount += pusharg_long_idx_inc;
}
#endif
@@ -2440,7 +2440,7 @@
pusharg_long(SlotInfo* src, int idx)
{
#if defined(HAVE_pusharg_long)
- lslot_lslot_const(0, src, idx, HAVE_pusharg_long, Tnull);
+ lslot_lslot_const(NULL, src, idx, HAVE_pusharg_long, Tnull);
argcount += pusharg_long_idx_inc;
#else
/* Don't use LSLOT & HSLOT here */
@@ -2454,7 +2454,7 @@
{
if (argcount != 0) {
#if defined(HAVE_popargs)
- slot_slot_const(0, 0, argcount, HAVE_popargs, Tnull);
+ slot_slot_const(NULL, NULL, argcount, HAVE_popargs, Tnull);
#endif
if (argcount > maxPush) {
maxPush = argcount;
@@ -2473,7 +2473,7 @@
void
branch(label* dst, int type)
{
- slot_const_const(0, (jword)dst, type, HAVE_branch, Tnull);
+ slot_const_const(NULL, (jword)dst, type, HAVE_branch, Tnull);
}
#endif
@@ -2481,10 +2481,10 @@
cbranch_int(SlotInfo* s1, SlotInfo* s2, label* dst, int type)
{
#if defined(HAVE_cbranch_int)
- slot_slot_slot_const_const(0, s1, s2, (jword)dst, type,
+ slot_slot_slot_const_const(NULL, s1, s2, (jword)dst, type,
HAVE_cbranch_int, Tcomplex);
#else
- cmp_int(0, s1, s2);
+ cmp_int(NULL, s1, s2);
branch(dst, type);
#endif
}
@@ -2494,7 +2494,7 @@
{
#if defined(HAVE_cbranch_int_const)
if (HAVE_cbranch_int_const_rangecheck(val)) {
- slot_slot_const_const_const(0, s1, val, (jword)dst, type,
+ slot_slot_const_const_const(NULL, s1, val, (jword)dst, type,
HAVE_cbranch_int_const, Tcomplex);
}
else
@@ -2506,7 +2506,7 @@
slot_freetmp(tmp);
}
#else
- cmp_int_const(0, s1, val);
+ cmp_int_const(NULL, s1, val);
branch(dst, type);
#endif
}
@@ -2515,10 +2515,10 @@
cbranch_ref(SlotInfo* s1, SlotInfo* s2, label* dst, int type)
{
#if defined(HAVE_cbranch_ref)
- slot_slot_slot_const_const(0, s1, s2, (jword)dst, type,
+ slot_slot_slot_const_const(NULL, s1, s2, (jword)dst, type,
HAVE_cbranch_ref, Tcomplex);
#else
- cmp_ref(0, s1, s2);
+ cmp_ref(NULL, s1, s2);
branch(dst, type);
#endif
}
@@ -2528,7 +2528,7 @@
{
#if defined(HAVE_cbranch_ref_const)
if (HAVE_cbranch_ref_const_rangecheck((jword)val)) {
- slot_slot_const_const_const(0, s1, (jword)val, (jword)dst, type,
+ slot_slot_const_const_const(NULL, s1, (jword)val, (jword)dst, type,
HAVE_cbranch_ref_const, Tcomplex);
}
else
@@ -2540,7 +2540,7 @@
slot_freetmp(tmp);
}
#else
- cmp_ref_const(0, s1, val);
+ cmp_ref_const(NULL, s1, val);
branch(dst, type);
#endif
}
@@ -2549,7 +2549,7 @@
branch_indirect(SlotInfo* dst)
{
#if defined(HAVE_branch_indirect)
- slot_slot_const(0, dst, ba, HAVE_branch_indirect, Tnull);
+ slot_slot_const(NULL, dst, ba, HAVE_branch_indirect, Tnull);
#else
load_ref(dst, dst);
call(dst);
@@ -2560,7 +2560,7 @@
void
call(SlotInfo* dst)
{
- slot_slot_const(0, dst, ba, HAVE_call, Tnull);
+ slot_slot_const(NULL, dst, ba, HAVE_call, Tnull);
}
#endif
@@ -2572,7 +2572,7 @@
ptr = PMETHOD_NATIVECODE(meth);
#if defined(HAVE_call_indirect_const)
- slot_const_const(0, (jword)ptr, ba, HAVE_call_indirect_const, Tnull);
+ slot_const_const(NULL, (jword)ptr, ba, HAVE_call_indirect_const, Tnull);
#else
{
SlotInfo *tmp;
@@ -2605,7 +2605,7 @@
l->to = (uintp)routine; /* What place does it goto */
l->from = 0;
- slot_const_const(0, (jword)l, ba, HAVE_call_ref, Tnull);
+ slot_const_const(NULL, (jword)l, ba, HAVE_call_ref, Tnull);
#else
label* l;
constpool* c;
@@ -2631,7 +2631,7 @@
void
return_int(SlotInfo* dst)
{
- slot_slot_slot(dst, 0, 0, HAVE_return_int, Tnull);
+ slot_slot_slot(dst, NULL, NULL, HAVE_return_int, Tnull);
}
#endif
@@ -2639,7 +2639,7 @@
void
return_ref(SlotInfo* dst)
{
- slot_slot_slot(dst, 0, 0, HAVE_return_ref, Tnull);
+ slot_slot_slot(dst, NULL, NULL, HAVE_return_ref, Tnull);
}
#endif
@@ -2647,7 +2647,7 @@
void
return_long(SlotInfo* dst)
{
- lslot_lslot_lslot(dst, 0, 0, HAVE_return_long, Tnull);
+ lslot_lslot_lslot(dst, NULL, NULL, HAVE_return_long, Tnull);
}
#endif
@@ -2655,7 +2655,7 @@
void
return_float(SlotInfo* dst)
{
- slot_slot_slot(dst, 0, 0, HAVE_return_float, Tnull);
+ slot_slot_slot(dst, NULL, NULL, HAVE_return_float, Tnull);
}
#endif
@@ -2663,7 +2663,7 @@
void
return_double(SlotInfo* dst)
{
- lslot_lslot_lslot(dst, 0, 0, HAVE_return_double, Tnull);
+ lslot_lslot_lslot(dst, NULL, NULL, HAVE_return_double, Tnull);
}
#endif
@@ -2671,7 +2671,7 @@
void
returnarg_int(SlotInfo* src)
{
- slot_slot_slot(0, 0, src, HAVE_returnarg_int, Tcopy);
+ slot_slot_slot(NULL, NULL, src, HAVE_returnarg_int, Tcopy);
}
#endif
@@ -2679,7 +2679,7 @@
void
returnarg_ref(SlotInfo* src)
{
- slot_slot_slot(0, 0, src, HAVE_returnarg_ref, Tcopy);
+ slot_slot_slot(NULL, NULL, src, HAVE_returnarg_ref, Tcopy);
}
#endif
@@ -2687,7 +2687,7 @@
void
returnarg_long(SlotInfo* src)
{
- lslot_lslot_lslot(0, 0, src, HAVE_returnarg_long, Tcopy);
+ lslot_lslot_lslot(NULL, NULL, src, HAVE_returnarg_long, Tcopy);
}
#endif
@@ -2695,7 +2695,7 @@
void
returnarg_float(SlotInfo* src)
{
- slot_slot_slot(0, 0, src, HAVE_returnarg_float, Tcopy);
+ slot_slot_slot(NULL, NULL, src, HAVE_returnarg_float, Tcopy);
}
#endif
@@ -2703,7 +2703,7 @@
void
returnarg_double(SlotInfo* src)
{
- lslot_lslot_lslot(0, 0, src, HAVE_returnarg_double, Tcopy);
+ lslot_lslot_lslot(NULL, NULL, src, HAVE_returnarg_double, Tcopy);
}
#endif
@@ -2728,7 +2728,7 @@
}
else {
l = labtab[n];
- labtab[n] = 0;
+ labtab[n] = NULL;
}
return (l);
}
@@ -2760,7 +2760,7 @@
}
else {
l = labtab[n];
- labtab[n] = 0;
+ labtab[n] = NULL;
}
return (l);
}
@@ -2788,13 +2788,13 @@
labtab[n]->at = 0;
labtab[n]->from = 0;
labtab[n]->to = 0;
- slot_slot_const(0, 0, (jword)labtab[n], HAVE_set_label, Tnull);
+ slot_slot_const(NULL, NULL, (jword)labtab[n], HAVE_set_label, Tnull);
}
else {
assert(labtab[n]->type == Lnull);
labtab[n]->type = Linternal;
- slot_slot_const(0, 0, (jword)labtab[n], HAVE_set_label, Tnull);
- labtab[n] = 0;
+ slot_slot_const(NULL, NULL, (jword)labtab[n], HAVE_set_label, Tnull);
+ labtab[n] = NULL;
}
}
#endif
@@ -2810,7 +2810,7 @@
pos[2] * 0x00000100 + pos[3] * 0x00000001);
l = reference_code_label(pc+offset);
- slot_slot_const(0, 0, (jword)l, HAVE_build_code_ref, Tnull);
+ slot_slot_const(NULL, NULL, (jword)l, HAVE_build_code_ref, Tnull);
return (l);
}
#endif
@@ -2822,7 +2822,7 @@
jint val = (pos[0] * 0x01000000 + pos[1] * 0x00010000 +
pos[2] * 0x00000100 + pos[3] * 0x00000001);
- slot_slot_const(0, 0, val, HAVE_build_key, Tnull);
+ slot_slot_const(NULL, NULL, val, HAVE_build_key, Tnull);
}
#endif
@@ -2982,7 +2982,7 @@
cvt_int_float(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_cvt_int_float)
- slot_slot_slot(dst, 0, src, HAVE_cvt_int_float, Tcomplex);
+ slot_slot_slot(dst, NULL, src, HAVE_cvt_int_float, Tcomplex);
#else
end_sub_block();
pusharg_int(src, 0);
@@ -2997,7 +2997,7 @@
cvt_int_double(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_cvt_int_double)
- lslot_lslot_slot(dst, 0, src, HAVE_cvt_int_double, Tcomplex);
+ lslot_lslot_slot(dst, NULL, src, HAVE_cvt_int_double, Tcomplex);
#else
end_sub_block();
pusharg_int(src, 0);
@@ -3018,7 +3018,7 @@
cvt_long_float(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_cvt_long_float)
- slot_slot_lslot(dst, 0, src, HAVE_cvt_long_float, Tcomplex);
+ slot_slot_lslot(dst, NULL, src, HAVE_cvt_long_float, Tcomplex);
#else
end_sub_block();
pusharg_long(src, 0);
@@ -3033,7 +3033,7 @@
cvt_long_double(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_cvt_long_double)
- lslot_lslot_lslot(dst, 0, src, HAVE_cvt_long_double, Tcomplex);
+ lslot_lslot_lslot(dst, NULL, src, HAVE_cvt_long_double, Tcomplex);
#else
end_sub_block();
pusharg_long(src, 0);
@@ -3110,7 +3110,7 @@
cvt_float_double(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_cvt_float_double)
- lslot_lslot_slot(dst, 0, src, HAVE_cvt_float_double, Tcomplex);
+ lslot_lslot_slot(dst, NULL, src, HAVE_cvt_float_double, Tcomplex);
#else
end_sub_block();
pusharg_float(src, 0);
@@ -3126,7 +3126,7 @@
{
used_ieee_rounding = true;
#if defined(HAVE_cvt_double_int)
- slot_slot_lslot(dst, 0, src, HAVE_cvt_double_int, Tcomplex);
+ slot_slot_lslot(dst, NULL, src, HAVE_cvt_double_int, Tcomplex);
#elif defined(HAVE_cvt_double_int_ieee)
{
SlotInfo *tmp;
@@ -3190,7 +3190,7 @@
cvt_double_float(SlotInfo* dst, SlotInfo* src)
{
#if defined(HAVE_cvt_double_float)
- slot_slot_lslot(dst, 0, src, HAVE_cvt_double_float, Tcomplex);
+ slot_slot_lslot(dst, NULL, src, HAVE_cvt_double_float, Tcomplex);
#else
end_sub_block();
pusharg_double(src, 0);
Index: kaffe/kaffe/kaffevm/jit/labels.c
diff -u kaffe/kaffe/kaffevm/jit/labels.c:1.11 kaffe/kaffe/kaffevm/jit/labels.c:1.12
--- kaffe/kaffe/kaffevm/jit/labels.c:1.11 Sat Jul 17 13:56:07 2004
+++ kaffe/kaffe/kaffevm/jit/labels.c Mon Dec 20 00:55:14 2004
@@ -177,7 +177,7 @@
ret[i].next = &ret[i+1];
}
- ret[ALLOCLABELNR-1].next = 0;
+ ret[ALLOCLABELNR-1].next = NULL;
}
currLabel = ret->next;
#if defined(KAFFE_VMDEBUG)
@@ -189,11 +189,11 @@
label*
getInternalLabel(label **lptr, uintp pc)
{
- label *curr, *retval = 0;
+ label *curr, *retval = NULL;
- assert(lptr != 0);
+ assert(lptr != NULL);
- if( *lptr == 0 )
+ if( *lptr == NULL )
{
/* Start at the head of the list. */
*lptr = firstLabel;
Index: kaffe/kaffe/kaffevm/jit/machine.c
diff -u kaffe/kaffe/kaffevm/jit/machine.c:1.71 kaffe/kaffe/kaffevm/jit/machine.c:1.72
--- kaffe/kaffe/kaffevm/jit/machine.c:1.71 Sun Dec 19 23:45:09 2004
+++ kaffe/kaffe/kaffevm/jit/machine.c Mon Dec 20 00:55:14 2004
@@ -72,7 +72,7 @@
jitflags willcatch;
#define EXPLICIT_CHECK_NULL(_i, _s, _n) \
- cbranch_ref_const_ne((_s), 0, reference_label(_i, _n)); \
+ cbranch_ref_const_ne((_s), NULL, reference_label(_i, _n)); \
softcall_nullpointer(); \
set_label(_i, _n)
/* Define CREATE_NULLPOINTER_CHECKS in md.h when your machine cannot use the
@@ -204,7 +204,7 @@
int iLockRoot;
- static Method* jitting = 0; /* DEBUG */
+ static Method* jitting = NULL; /* DEBUG */
lockClass(meth->class);
@@ -418,11 +418,11 @@
profiler_get_clicks(end);
meth->jitClicks = end - meth->jitClicks;
- globalMethod = 0;
+ globalMethod = NULL;
}
#endif
done2:
- jitting = 0; /* DEBUG */
+ jitting = NULL; /* DEBUG */
stopTiming(&jit_time);
leaveTranslator();
done3:
Index: kaffe/kaffe/kaffevm/jit/registers.c
diff -u kaffe/kaffe/kaffevm/jit/registers.c:1.4 kaffe/kaffe/kaffevm/jit/registers.c:1.5
--- kaffe/kaffe/kaffevm/jit/registers.c:1.4 Wed Dec 27 06:21:04 2000
+++ kaffe/kaffe/kaffevm/jit/registers.c Mon Dec 20 00:55:14 2004
@@ -27,7 +27,7 @@
*/
kregs reginfo[MAXREG+1] = {
REGISTER_SET
- { /* BAD */ 0, 0, 0, 0, 0, 0 }
+ { /* BAD */ NULL, 0, 0, 0, 0, 0 }
};
/* This is horrible but necessary at the moment. Sometime we need to
Index: kaffe/kaffe/kaffevm/jit/slots.c
diff -u kaffe/kaffe/kaffevm/jit/slots.c:1.5 kaffe/kaffe/kaffevm/jit/slots.c:1.6
--- kaffe/kaffe/kaffevm/jit/slots.c:1.5 Tue Jul 6 17:16:21 2004
+++ kaffe/kaffe/kaffevm/jit/slots.c Mon Dec 20 00:55:14 2004
@@ -56,6 +56,6 @@
/* Setup various slot pointers */
slotinfo = &basicslots[0];
- localinfo = 0;
- tempinfo = 0;
+ localinfo = NULL;
+ tempinfo = NULL;
}
Index: kaffe/kaffe/kaffevm/jit/slots.h
diff -u kaffe/kaffe/kaffevm/jit/slots.h:1.2 kaffe/kaffe/kaffevm/jit/slots.h:1.3
--- kaffe/kaffe/kaffevm/jit/slots.h:1.2 Mon Jun 14 00:12:38 1999
+++ kaffe/kaffe/kaffevm/jit/slots.h Mon Dec 20 00:55:14 2004
*** Patch too long, truncated ***
More information about the kaffe
mailing list