dummyless static methods
Per Bothner
bothner at cygnus.com
Mon Jun 16 22:25:51 PDT 1997
Currently, when Kaffe calls a static method, it passes an extra
dummy first argument. As far as I can tell, this serves no purpose,
except for compatibility with Sun's old deprecated native interface.
The extra argument wastes stack space, and on many architectures wastes
an extra instruction to push the dummy argument. Worse (from my point
of view) is that they complicate interoperability between Kaffe,
Gcc, and Gdb, and between C++ and Java. I could go into detail,
but that could get very long-winded. But I really would like to
get rid of the dummy argument. It would require us to change
many native methods, but it is better to make change sooner rather
than later. (When it comes to compatibility with JNI, that is a
separate issue. My plan is to support both JNI and a more
efficient but less portable interface. I can go into detail
in another message.)
Any good arguments against (or for) getting rid of the dummy argument?
As a transition, a macro like this may help:
#define STATIC_DUMMY_PARAM void *dummy,
--Per Bothner
Cygnus Solutions bothner at cygnus.com http://www.cygnus.com/~bothner
More information about the kaffe
mailing list