[kaffe] CVS kaffe (dalibor): Replaced macro by static inline function
PatchSet 4422 Date: 2004/02/15 14:24:29 Author: dalibor Branch: HEAD Tag: (none) Log: Replaced macro by static inline function 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c (verifyErrorInVerifyMethod3b): New static inline function. (VERIFY_ERROR) Removed. Replaced use of VERIFY_ERROR by verifyErrorInVerifyMethod3b. Members: ChangeLog:1.2005-1.2006 kaffe/kaffevm/verify.c:1.38-1.39 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.2005 kaffe/ChangeLog:1.2006 --- kaffe/ChangeLog:1.2005 Sat Feb 14 18:50:20 2004 +++ kaffe/ChangeLog Sun Feb 15 14:24:29 2004 @@ -1,3 +1,10 @@ +2004-02-15 Dalibor Topic [EMAIL PROTECTED] + +* kaffe/kaffevm/verify.c +(verifyErrorInVerifyMethod3b): New static inline function. +(VERIFY_ERROR) Removed. +Replaced use of VERIFY_ERROR by verifyErrorInVerifyMethod3b. + 2004-02-14 Guilhem Lavaux [EMAIL PROTECTED] * libraries/javalib/kjc.jar: Regenerated. Index: kaffe/kaffe/kaffevm/verify.c diff -u kaffe/kaffe/kaffevm/verify.c:1.38 kaffe/kaffe/kaffevm/verify.c:1.39 --- kaffe/kaffe/kaffevm/verify.c:1.38 Fri Feb 13 09:57:03 2004 +++ kaffe/kaffe/kaffevm/verify.cSun Feb 15 14:24:30 2004 @@ -2019,6 +2019,22 @@ /* + * Helper function for error reporting in verifyMethod3b + */ +static inline +bool +verifyErrorInVerifyMethod3b(errorInfo* einfo, const Method* method, BlockInfo* curBlock, const char * msg) +{ +KFREE(curBlock); +if (einfo-type == 0) { + postExceptionMessage(einfo, JAVA_LANG(VerifyError), +in method \%s.%s\: %s, +CLASS_CNAME(method-class), METHOD_NAMED(method), msg); + } + return(false); +} + +/* * verifyMethod3b() *The Data-flow Analyzer * @@ -2080,18 +2096,8 @@ uint32 curIndex; BlockInfo* curBlock; - BlockInfo* nextBlock; - -#define VERIFY_ERROR(_MSG) \ -KFREE(curBlock); \ -if (einfo-type == 0) { \ - postExceptionMessage(einfo, JAVA_LANG(VerifyError), \ -in method \%s.%s\: %s, \ -CLASS_CNAME(method-class), METHOD_NAMED(method), _MSG); \ - } \ - return(false) - - + BlockInfo* nextBlock; + uint32 pc = 0, newpc = 0, n = 0; int32 high = 0, low = 0; /* for the switching instructions */ @@ -2127,12 +2133,12 @@ copyBlockData(method, blocks[curIndex], curBlock); if (curBlock-status EXCEPTION_HANDLER curBlock-stacksz 0) { - VERIFY_ERROR(it's possible to reach an exception handler with a nonempty stack); + return verifyErrorInVerifyMethod3b(einfo, method, curBlock, it's possible to reach an exception handler with a nonempty stack); } if (!verifyBasicBlock(einfo, method, curBlock, sigs, uninits)) { - VERIFY_ERROR(failure to verify basic block); + return verifyErrorInVerifyMethod3b(einfo, method, curBlock, failure to verify basic block); } @@ -2153,7 +2159,7 @@ nextBlock = inWhichBlock(newpc, blocks, numBlocks); if (!merge(einfo, method, curBlock, nextBlock)) { - VERIFY_ERROR(error merging operand stacks); + return verifyErrorInVerifyMethod3b(einfo, method, curBlock, error merging operand stacks); } break; @@ -2163,7 +2169,7 @@ nextBlock = inWhichBlock(newpc, blocks, numBlocks); if (!merge(einfo, method, curBlock, nextBlock)) { - VERIFY_ERROR(error merging operand stacks); + return verifyErrorInVerifyMethod3b(einfo, method, curBlock, error merging operand stacks); } break; @@ -2178,7 +2184,7 @@ nextBlock = inWhichBlock(newpc, blocks, numBlocks); if (!merge(einfo, method, curBlock, nextBlock)) { - VERIFY_ERROR(jsr: error merging operand stacks); + return verifyErrorInVerifyMethod3b(einfo, method, curBlock, jsr: error merging operand stacks); } /* @@ -2197,7 +2203,7 @@
[kaffe] sharing classpath
Hello! I'm new here. This is a optimization proposal for kaffe. The main idea is to share all the classpath in a server, running at localhost (or remote) that shares the classpath for all the VMs running on the same machine / network. By this way we don't have to load all the classes for every VM. Only one time for all VM. Of course that's only the classpath, because, every VM have their own memory space. Using this scheme kaffe will only load 1 time all the classes, and will share this classes to all the clients. What do you think about that? -- Software is like violence. Is better if it's free. -- ___ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] CVS kaffe (dalibor): Replaced macro by static inline function
PatchSet 4424 Date: 2004/02/15 15:50:50 Author: dalibor Branch: HEAD Tag: (none) Log: Replaced macro by static inline function 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c (verifyErrorInMerge): New static inline function. (VERIFY_ERROR) Removed. Replaced use of VERIFY_ERROR by verifyErrorInMerge. Members: ChangeLog:1.2007-1.2008 kaffe/kaffevm/verify.c:1.40-1.41 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.2007 kaffe/ChangeLog:1.2008 --- kaffe/ChangeLog:1.2007 Sun Feb 15 14:48:52 2004 +++ kaffe/ChangeLog Sun Feb 15 15:50:50 2004 @@ -1,6 +1,13 @@ 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c +(verifyErrorInMerge): New static inline function. +(VERIFY_ERROR) Removed. +Replaced use of VERIFY_ERROR by verifyErrorInMerge. + +2004-02-15 Dalibor Topic [EMAIL PROTECTED] + +* kaffe/kaffevm/verify.c Removed undef for unused macro RETURN_3b. 2004-02-15 Dalibor Topic [EMAIL PROTECTED] Index: kaffe/kaffe/kaffevm/verify.c diff -u kaffe/kaffe/kaffevm/verify.c:1.40 kaffe/kaffe/kaffevm/verify.c:1.41 --- kaffe/kaffe/kaffevm/verify.c:1.40 Sun Feb 15 14:48:54 2004 +++ kaffe/kaffe/kaffevm/verify.cSun Feb 15 15:50:52 2004 @@ -2344,6 +2344,24 @@ /* + * Helper function for error reporting in merge. + */ +static inline +bool +verifyErrorInMerge(errorInfo* einfo, + const Method* method, + const char * msg) +{ +if (einfo-type == 0) { + postExceptionMessage(einfo, JAVA_LANG(VerifyError), +in method \%s.%s\: %s, +CLASS_CNAME(method-class), METHOD_NAMED(method), msg); + } + return(false); +} + + +/* * merges two operand stacks. just to repeat what the JVML 2 spec says about this: * Merge the state of the operand stack and local variable array at the end of the * execution of the current instruction into each of the successor instructions. In @@ -2379,15 +2397,6 @@ BlockInfo* fromBlock, BlockInfo* toBlock) { -#define VERIFY_ERROR(_MSG) \ -if (einfo-type == 0) { \ - postExceptionMessage(einfo, JAVA_LANG(VerifyError), \ -in method \%s.%s\: %s, \ -CLASS_CNAME(method-class), METHOD_NAMED(method), _MSG); \ - } \ - return(false) - - uint32 n; @@ -2397,12 +2406,12 @@ if (toBlock-startAddr fromBlock-startAddr) { for (n = 0; n method-localsz; n++) { if (fromBlock-locals[n].tinfo TINFO_UNINIT) { - VERIFY_ERROR(uninitialized object reference in a local variable during a backwards branch); + return verifyErrorInMerge(einfo, method, uninitialized object reference in a local variable during a backwards branch); } } for (n = 0; n fromBlock-stacksz; n++) { if (fromBlock-opstack[n].tinfo TINFO_UNINIT) { - VERIFY_ERROR(uninitialized object reference on operand stack during a backwards branch); + return verifyErrorInMerge(einfo, method, uninitialized object reference on operand stack during a backwards branch); } } } @@ -2462,7 +2471,6 @@ return(true); -#undef VERIFY_ERROR } ___ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] CVS kaffe (dalibor): Replaced macro by static inline function
PatchSet 4425 Date: 2004/02/15 16:40:44 Author: dalibor Branch: HEAD Tag: (none) Log: Replaced macro by static inline function 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c (verifyErrorInVerifyBasicBlock): New static inline function. (VERIFY_ERROR) Removed. Replaced use of VERIFY_ERROR by verifyErrorInVerifyBasicBlock. Members: ChangeLog:1.2008-1.2009 kaffe/kaffevm/verify.c:1.41-1.42 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.2008 kaffe/ChangeLog:1.2009 --- kaffe/ChangeLog:1.2008 Sun Feb 15 15:50:50 2004 +++ kaffe/ChangeLog Sun Feb 15 16:40:44 2004 @@ -1,6 +1,13 @@ 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c +(verifyErrorInVerifyBasicBlock): New static inline function. +(VERIFY_ERROR) Removed. +Replaced use of VERIFY_ERROR by verifyErrorInVerifyBasicBlock. + +2004-02-15 Dalibor Topic [EMAIL PROTECTED] + +* kaffe/kaffevm/verify.c (verifyErrorInMerge): New static inline function. (VERIFY_ERROR) Removed. Replaced use of VERIFY_ERROR by verifyErrorInMerge. Index: kaffe/kaffe/kaffevm/verify.c diff -u kaffe/kaffe/kaffevm/verify.c:1.41 kaffe/kaffe/kaffevm/verify.c:1.42 --- kaffe/kaffe/kaffevm/verify.c:1.41 Sun Feb 15 15:50:52 2004 +++ kaffe/kaffe/kaffevm/verify.cSun Feb 15 16:40:45 2004 @@ -2473,8 +2473,23 @@ return(true); } - - +/* + * Helper function for error reporting in verifyBasicBlock. + */ +static inline +bool +verifyErrorInVerifyBasicBlock(errorInfo* einfo, + const Method* method, + Hjava_lang_Class* this, + const char * msg) +{ + if (einfo-type == 0) { + postExceptionMessage(einfo, JAVA_LANG(VerifyError), +in method \%s.%s\: %s, +CLASS_CNAME(this), METHOD_NAMED(method), msg); + } + return(false); +} /* * verifyBasicBlock() @@ -2521,13 +2536,6 @@ * - those dealing with locals variables * - those dealing with the operand stack **/ -#define VERIFY_ERROR(_MSG) \ - if (einfo-type == 0) { \ - postExceptionMessage(einfo, JAVA_LANG(VerifyError), \ -in method \%s.%s\: %s, \ -CLASS_CNAME(this), METHOD_NAMED(method), _MSG); \ - } \ - return(false) #define GET_IDX \ idx = code[pc + 1] @@ -2540,26 +2548,26 @@ #define ENSURE_LOCAL_TYPE(_N, _TINFO) \ if (!typecheck(einfo, this, (_TINFO), block-locals[_N])) { \ if (block-locals[_N].data.class == TUNSTABLE-data.class) { \ - VERIFY_ERROR(attempt to access an unstable local variable); \ + return verifyErrorInVerifyBasicBlock(einfo, method, this, attempt to access an unstable local variable); \ } else { \ - VERIFY_ERROR(attempt to access a local variable not of the correct type); \ + return verifyErrorInVerifyBasicBlock(einfo, method, this, attempt to access a local variable not of the correct type); \ } \ } /* only use with TLONG and TDOUBLE */ #define ENSURE_LOCAL_WTYPE(_N, _TINFO) \ if (block-locals[_N].data.class != (_TINFO)-data.class) { \ - VERIFY_ERROR(local variable not of correct type); \ + return verifyErrorInVerifyBasicBlock(einfo, method, this, local variable not of correct type); \ } \ else if (block-locals[_N + 1].data.class != TWIDE-data.class) { \ - VERIFY_ERROR(accessing a long or double in a local where the following local has been corrupted); \ + return verifyErrorInVerifyBasicBlock(einfo, method, this, accessing a long or double in a local where the following local has been corrupted); \ } #define ENSURE_OPSTACK_SIZE(_N) \ if (block-stacksz (_N)) { \ DBG(VERIFY3, dprintf(here's the stack: \n); printBlock(method, block, ); ); \ - VERIFY_ERROR(not enough items on stack for operation); \ + return verifyErrorInVerifyBasicBlock(einfo, method, this, not enough items on stack for operation); \ } #define CHECK_STACK_OVERFLOW(_N) \ @@ -2567,7 +2575,7 @@ DBG(VERIFY3, dprintf(block-stacksz: %d :: N = %d :: method-stacksz = %d\n, \ block-stacksz, _N, method-stacksz); ); \ DBG(VERIFY3, dprintf(here's the stack: \n); printBlock(method, block, ); ); \ - VERIFY_ERROR(stack overflow); \ + return
[kaffe] CVS kaffe (dalibor): Replaced part of macro by static inline function
PatchSet 4426 Date: 2004/02/15 18:23:21 Author: dalibor Branch: HEAD Tag: (none) Log: Replaced part of macro by static inline function 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c (ensureLocalTypeErrorInVerifyBasicBlock): New static inline function. (ENSURE_LOCAL_TYPE) Use ensureLocalTypeErrorInVerifyBasicBlock. Removed unnecessary undef for VERIFY_ERROR. Members: ChangeLog:1.2009-1.2010 kaffe/kaffevm/verify.c:1.42-1.43 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.2009 kaffe/ChangeLog:1.2010 --- kaffe/ChangeLog:1.2009 Sun Feb 15 16:40:44 2004 +++ kaffe/ChangeLog Sun Feb 15 18:23:21 2004 @@ -1,6 +1,13 @@ 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c +(ensureLocalTypeErrorInVerifyBasicBlock): New static inline function. +(ENSURE_LOCAL_TYPE) Use ensureLocalTypeErrorInVerifyBasicBlock. + Removed unnecessary undef for VERIFY_ERROR. + +2004-02-15 Dalibor Topic [EMAIL PROTECTED] + +* kaffe/kaffevm/verify.c (verifyErrorInVerifyBasicBlock): New static inline function. (VERIFY_ERROR) Removed. Replaced use of VERIFY_ERROR by verifyErrorInVerifyBasicBlock. Index: kaffe/kaffe/kaffevm/verify.c diff -u kaffe/kaffe/kaffevm/verify.c:1.42 kaffe/kaffe/kaffevm/verify.c:1.43 --- kaffe/kaffe/kaffevm/verify.c:1.42 Sun Feb 15 16:40:45 2004 +++ kaffe/kaffe/kaffevm/verify.cSun Feb 15 18:23:23 2004 @@ -2014,7 +2014,6 @@ #undef GET_WIDX #undef CHECK_POOL_IDX #undef ENSURE_NON_WIDE -#undef VERIFY_ERROR } @@ -2492,6 +2491,24 @@ } /* + * Helper function for error reporting in ENSURE_LOCAL_TYPE macro in verifyBasicBlock. + */ +static inline +bool +ensureLocalTypeErrorInVerifyBasicBlock(errorInfo* einfo, + const Method* method, + BlockInfo* block, + Hjava_lang_Class* this, + unsigned int n) +{ + if (block-locals[n].data.class == TUNSTABLE-data.class) { + return verifyErrorInVerifyBasicBlock(einfo, method, this, attempt to access an unstable local variable); + } else { + return verifyErrorInVerifyBasicBlock(einfo, method, this, attempt to access a local variable not of the correct type); + } +} + +/* * verifyBasicBlock() * Simulates execution of a basic block by modifying its simulated operand stack and local variable array. */ @@ -2547,11 +2564,7 @@ /* checks whether the specified local variable is of the specified type. */ #define ENSURE_LOCAL_TYPE(_N, _TINFO) \ if (!typecheck(einfo, this, (_TINFO), block-locals[_N])) { \ - if (block-locals[_N].data.class == TUNSTABLE-data.class) { \ - return verifyErrorInVerifyBasicBlock(einfo, method, this, attempt to access an unstable local variable); \ - } else { \ - return verifyErrorInVerifyBasicBlock(einfo, method, this, attempt to access a local variable not of the correct type); \ - } \ + return ensureLocalTypeErrorInVerifyBasicBlock(einfo, method, block, this, _N); \ } /* only use with TLONG and TDOUBLE */ ___ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
Re: [kaffe] Reminder - release this weekend
[Oops. I forgot to cc: the list. I'll resend it.] On Thu, 05 Feb 2004 22:33:52 +0100 Matthias Pfisterer [EMAIL PROTECTED] wrote: Hi, the build problem I reported a while ago is still reproducible with the latest CVS: Making all in libraries/javalib make[1]: Entering directory `/home/matthias/java/kaffe/libraries/javalib' rm -rf lib mkdir lib /bin/sh ./rebuildLib @essential.files Compiling classes from @essential.files using /home/matthias/java/kaffe/kaffe/kaffe/kaffe-bin -verbosegc -mx 256M at.dms.kjc.Main [ start compilation in verbose mode ] [ parsed gnu/classpath/Configuration.java in 483 ms ] GC: heap 5124K, total before 4782K, after 3607K (51604/39461 objs) 29.6% free, alloced 34839K (#106873), marked 615K, swept 1175K (#12143) 393 objs (9K) awaiting finalization ...and the computer hangs with 100 % CPU load. This was blocking me as well. I discovered that the configure script was detecting and bringing in libasound, which is linked against libpthread. This is bad when Kaffe is being built with jthreads (the default). I tried --without-alsa and --without-sound, but those options didn't have the desired effect. I'm going to have to do some work on the configure script. Cheers, - Jim ___ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe
[kaffe] CVS kaffe (dalibor): Replaced part of macro by static inline function
PatchSet 4427 Date: 2004/02/15 19:19:58 Author: dalibor Branch: HEAD Tag: (none) Log: Replaced part of macro by static inline function 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c (ensureOpstackSizeErrorInVerifyBasicBlock): New static inline function. (ENSURE_OPSTACK_SIZE) Use ensureOpstackSizeErrorInVerifyBasicBlock. Members: ChangeLog:1.2010-1.2011 kaffe/kaffevm/verify.c:1.43-1.44 Index: kaffe/ChangeLog diff -u kaffe/ChangeLog:1.2010 kaffe/ChangeLog:1.2011 --- kaffe/ChangeLog:1.2010 Sun Feb 15 18:23:21 2004 +++ kaffe/ChangeLog Sun Feb 15 19:19:58 2004 @@ -1,6 +1,12 @@ 2004-02-15 Dalibor Topic [EMAIL PROTECTED] * kaffe/kaffevm/verify.c +(ensureOpstackSizeErrorInVerifyBasicBlock): New static inline function. +(ENSURE_OPSTACK_SIZE) Use ensureOpstackSizeErrorInVerifyBasicBlock. + +2004-02-15 Dalibor Topic [EMAIL PROTECTED] + +* kaffe/kaffevm/verify.c (ensureLocalTypeErrorInVerifyBasicBlock): New static inline function. (ENSURE_LOCAL_TYPE) Use ensureLocalTypeErrorInVerifyBasicBlock. Removed unnecessary undef for VERIFY_ERROR. Index: kaffe/kaffe/kaffevm/verify.c diff -u kaffe/kaffe/kaffevm/verify.c:1.43 kaffe/kaffe/kaffevm/verify.c:1.44 --- kaffe/kaffe/kaffevm/verify.c:1.43 Sun Feb 15 18:23:23 2004 +++ kaffe/kaffe/kaffevm/verify.cSun Feb 15 19:19:59 2004 @@ -2509,6 +2509,23 @@ } /* + * Helper function for error reporting in ENSURE_OPSTACK_SIZE macro in verifyBasicBlock. + */ +static inline +bool +ensureOpstackSizeErrorInVerifyBasicBlock(errorInfo* einfo, +const Method* method, +BlockInfo* block, +Hjava_lang_Class* this) +{ + DBG(VERIFY3, + dprintf(here's the stack: \n); + printBlock(method, block, ); + ); + return verifyErrorInVerifyBasicBlock(einfo, method, this, not enough items on stack for operation); +} + +/* * verifyBasicBlock() * Simulates execution of a basic block by modifying its simulated operand stack and local variable array. */ @@ -2579,8 +2596,7 @@ #define ENSURE_OPSTACK_SIZE(_N) \ if (block-stacksz (_N)) { \ -DBG(VERIFY3, dprintf(here's the stack: \n); printBlock(method, block, ); ); \ - return verifyErrorInVerifyBasicBlock(einfo, method, this, not enough items on stack for operation); \ + return ensureOpstackSizeErrorInVerifyBasicBlock(einfo, method, block, this); \ } #define CHECK_STACK_OVERFLOW(_N) \ ___ kaffe mailing list [EMAIL PROTECTED] http://kaffe.org/cgi-bin/mailman/listinfo/kaffe