large Class.forName() patch
Tue Feb 1 00:08:29 PST 2000
Jason Baker wrote:
> ./developers/fixup.c: addSymbol("_Jv_intClass", CLASS, "int", "", "");
That code is actually commented out already. Godmar will have to
chime in on its intent.
> ./kaffe/kaffevm/itypes.c: initPrimClass(&intClass, "int", 'I', 4);
I suggest using some completely bogus, yet human-readable name in this
context. The primitive types should never be looked up by name, so
"[int]" or ";primitive int" or ... hmm, looking in the VM spec (for
invalid name ideas), I noticed actually it says in S2.2 Identifiers:
"An identifier must not be ... a keyword in the Java programming
language." So, maybe a class with name 'int' is bogus.... Something
that most JVMs don't seem to check, it seems.
> ./libraries/javalib/java/lang/Integer.java: final public static Class TYPE = Class.getPrimitiveClass("int");
As Jason pointed out, this is an internal hack for Kaffe. The
argument could just as easily be Class.PRIMITIVE_INT_MAGIC
----- ----- ---- --- --- -- - - - - -
Pat Tullmann firstname.lastname@example.org
That which does not kill you just didn't try hard enough.
More information about the kaffe