[RELEASED] Kaffe 0.8.2
Daniel Veillard
Daniel.Veillard at imag.fr
Tue Feb 18 09:24:24 PST 1997
>KAFFE v0.8.1 - A JIT and interpreting virtual machine to run Java(tm)* code
Hum, I'm compiling with static-libs enabled and got a pbm at compile-time
------------------------------
gcc -g -DNO_SHARED_LIBRARIES -I. -I/users/veillard/opera/kaffe-0.8.1/kaffe/kaff
evm -I/users/veillard/opera/kaffe-0.8.1/kaffe/kaffevm/../../config
-I../../config -I../../include -DTRANSLATOR -I/users/veillard/opera/kaffe-0.8.1
/kaffe/kaffevm/jit -DKVER=\"0.81\" -c /users/veillard/opera/kaffe-0.8.1/kaffe/
kaffevm/external.c
/users/veillard/opera/kaffe-0.8.1/kaffe/kaffevm/external.c:32:
../../packages/external_native.h: No such file or directory
make[3]: *** [external.o] Error 1
-------------------------------
Here's the diffs between 0.8.1 and 0.8.0 which trigger the error.
-------------------------------
34c32
< #include "../../packages/tjwassoc.demon.co.uk/external_wrappers.h"
---
> #include "../../packages/external_native.h"
-------------------------------
I tried to copy one file into the other, unfortunately the KAFFE_NATIVE
macro is not defined. I guess it should declare default_natives[] and
initialize it.
I am thinking about improving the access to this default_natives, especially
the loop
/*
* If we don't support shared libraries, fall back on the
* wrapped up native method table.
*/
for (i = 0; native_funcs[i].name != 0; i++) {
if (strcmp(native_funcs[i].name, stub) == 0) {
m->ncode = native_funcs[i].func;
return;
}
}
is expensive, I register around 275 functions and doing 130 strcmp
in average before accessing the correct function seems heavy.
I'm thinking about rewriting this part and addNativeMethod to use
a hash table.
Maybe this should go into an new C module.
do you agree ?
Daniel
More information about the kaffe
mailing list