[kaffe] CVS kaffe (dalibor): Use getNextPC consistenly
Kaffe CVS
cvs-commits at kaffe.org
Sat Feb 28 08:56:04 PST 2004
PatchSet 4471
Date: 2004/02/28 16:52:30
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Use getNextPC consistenly
2004-02-28 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/verify.c
Use getNextPC consistently.
Members:
ChangeLog:1.2051->1.2052
kaffe/kaffevm/verify.c:1.63->1.64
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2051 kaffe/ChangeLog:1.2052
--- kaffe/ChangeLog:1.2051 Sat Feb 28 14:39:13 2004
+++ kaffe/ChangeLog Sat Feb 28 16:52:30 2004
@@ -1,6 +1,11 @@
2004-02-28 Dalibor Topic <robilad at kaffe.org>
* kaffe/kaffevm/verify.c
+ Use getNextPC consistently.
+
+2004-02-28 Dalibor Topic <robilad at kaffe.org>
+
+ * kaffe/kaffevm/verify.c
(getNextPC): New static inline function.
(NEXTPC) Removed.
Replaced use of NEXTPC by getNextPC.
Index: kaffe/kaffe/kaffevm/verify.c
diff -u kaffe/kaffe/kaffevm/verify.c:1.63 kaffe/kaffe/kaffevm/verify.c:1.64
--- kaffe/kaffe/kaffevm/verify.c:1.63 Sat Feb 28 14:39:16 2004
+++ kaffe/kaffe/kaffevm/verify.c Sat Feb 28 16:52:31 2004
@@ -1493,7 +1493,7 @@
DBG(VERIFY3, dprintf(" instruction: (%d) ", pc); printInstruction(code[pc]); dprintf("\n"); );
- if (codelen - pc < insnLen[code[pc]]) {
+ if (codelen < getNextPC(code, pc)) {
return verifyErrorInVerifyMethod3a(einfo, method, "last operand in code array is cut off");
}
@@ -2214,8 +2214,8 @@
* merge this block's information into the next block
*/
pc = curBlock->lastAddr;
- if (code[pc] == WIDE && code[pc + insnLen[code[pc]]] == RET)
- pc += insnLen[code[pc]];
+ if (code[pc] == WIDE && code[getNextPC(code, pc)] == RET)
+ pc = getNextPC(code, pc);
switch(code[pc])
{
case GOTO:
@@ -3383,7 +3383,7 @@
ENSURE_LOCAL_TYPE(idx, TINT);
- pc += insnLen[code[pc]];
+ pc = getNextPC(code, pc);
if (wide == true) {
pc += 2;
wide = false;
@@ -3736,7 +3736,7 @@
block->stacksz++;
type = getOpstackTop(block);
type->tinfo = TINFO_ADDR;
- type->data.addr = pc + insnLen[code[pc]];
+ type->data.addr = getNextPC(code, pc);
break;
case RET:
@@ -3980,7 +3980,7 @@
case WIDE:
wide = true;
- pc += insnLen[code[pc]];
+ pc = getNextPC(code, pc);
continue;
default:
@@ -3989,7 +3989,7 @@
}
- pc += insnLen[code[pc]];
+ pc = getNextPC(code, pc);
if (wide == true) {
wide = false;
pc++;
More information about the kaffe
mailing list