[kaffe] CVS kaffe (stack): Fix silly bug introduced by jittemp alloc checkin
Kaffe CVS
Kaffe Mailing List <kaffe@kaffe.org>
Wed Sep 17 14:16:02 2003
PatchSet 4044
Date: 2003/09/17 21:14:07
Author: stack
Branch: HEAD
Tag: (none)
Log:
Fix silly bug introduced by jittemp alloc checkin
Members:
ChangeLog:1.1640->1.1641
kaffe/kaffevm/jit3/constpool.c:1.5->1.6
kaffe/kaffevm/jit3/labels.c:1.10->1.11
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.1640 kaffe/ChangeLog:1.1641
--- kaffe/ChangeLog:1.1640 Wed Sep 17 14:57:39 2003
+++ kaffe/ChangeLog Wed Sep 17 21:14:07 2003
@@ -1,5 +1,11 @@
2003-09-17 Timothy S. Stack <stack@cs.utah.edu>
+ * kaffe/kaffevm/jit3/labels.c,
+ kaffe/kaffevm/jit3/constpool.c:
+ Fix for the last allocation fix.
+
+2003-09-17 Timothy S. Stack <stack@cs.utah.edu>
+
* libraries/clib/net/InetAddressImpl.c:
Fix a compilation error.
Index: kaffe/kaffe/kaffevm/jit3/constpool.c
diff -u kaffe/kaffe/kaffevm/jit3/constpool.c:1.5 kaffe/kaffe/kaffevm/jit3/constpool.c:1.6
--- kaffe/kaffe/kaffevm/jit3/constpool.c:1.5 Tue Sep 16 19:23:38 2003
+++ kaffe/kaffe/kaffevm/jit3/constpool.c Wed Sep 17 21:14:08 2003
@@ -98,7 +98,7 @@
lastConst = &cpc->data[ALLOCCONSTNR-1];
/* Link elements into list */
- for (i = 0; i < ALLOCCONSTNR - 2; i++) {
+ for (i = 0; i < ALLOCCONSTNR - 1; i++) {
cpc->data[i].next = &cpc->data[i+1];
}
}
@@ -182,10 +182,11 @@
constpoolchunk *cpc = poolchunks;
poolchunks = cpc->next;
- gc_free(poolchunks);
+ gc_free(cpc);
}
if( poolchunks != NULL )
{
poolchunks->data[ALLOCCONSTNR - 1].next = NULL;
+ lastConst = &poolchunks->data[ALLOCCONSTNR - 1];
}
}
Index: kaffe/kaffe/kaffevm/jit3/labels.c
diff -u kaffe/kaffe/kaffevm/jit3/labels.c:1.10 kaffe/kaffe/kaffevm/jit3/labels.c:1.11
--- kaffe/kaffe/kaffevm/jit3/labels.c:1.10 Tue Sep 16 19:23:38 2003
+++ kaffe/kaffe/kaffevm/jit3/labels.c Wed Sep 17 21:14:08 2003
@@ -71,11 +71,12 @@
labelchunk *lc = labelchunks;
labelchunks = lc->next;
- gc_free(labelchunks);
+ gc_free(lc);
}
if( labelchunks != NULL )
{
labelchunks->data[ALLOCLABELNR - 1].next = NULL;
+ lastLabel = &labelchunks->data[ALLOCLABELNR - 1];
}
}
@@ -259,7 +260,7 @@
lastLabel = &lc->data[ALLOCLABELNR-1];
/* Link elements into list */
- for (i = 0; i < ALLOCLABELNR - 2; i++) {
+ for (i = 0; i < ALLOCLABELNR - 1; i++) {
#if defined(KAFFE_VMDEBUG)
sprintf(lc->data[i].name, "L%d", labelCount + i);
#endif