Construction of primitive classes

Artur Biesiadowski abies at
Tue Oct 7 09:31:20 PDT 1997

I'm trying to implement some of the missing native funs for
My question is about creating objects of one of the primitive classes -
Integer, Double, Boolean etc. 
I could created them by calling
execute_java_constructor( many args...)
but this would make quite a lot overhead - all this varargs and checks for
illegal access.
Second options is just to call  
newObject( classptr );
and the set value manually - but this could crash if class is not loaded??
Question: are primitive classes guaranteed to be loaded/compiled at this
time - calls for Field.get/Field.set are not supposed to be taken at
initialization I think.
If not, will it be enough just to check class->state and process it in
case it is not already ? 
Or just forget about speedup and stick to safe vararg constructors ?


More information about the kaffe mailing list