This is the mail archive of the
java-patches@sourceware.cygnus.com
mailing list for the Java project.
Re: PATCH: Constant-time interface dispatch, type checking, inlining...
- To: Bryce McKinlay <bryce at albatross dot co dot nz>
- Subject: Re: PATCH: Constant-time interface dispatch, type checking, inlining...
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Sat, 11 Dec 1999 09:31:02 -0800 (PST)
- Cc: java-patches at sourceware dot cygnus dot com, per at bothner dot com
- References: <38509764.B964DC4C@albatross.co.nz>
Hey Bryce. I have some questions & comments about the patch:
* Why introduce the JV_CLASS macro? Why not just make Object.getClass
an inline function?
* _Jv_LoookupInterfaceMethod just calls _Jv_LoookupInterfaceMethod0
with the same arguments. Can't we get rid of one of these?
* _Jv_IsAssignableFrom should return jboolean, not int.
* In _Jv_IsAssignableFrom, formatting is wrong. Put "||" at
the start of a line, not the end. Likewise "&&".
* A real nit: _Jv_CheckCast should return "void *", not "void*".
(another formatting cleanup)
* Functions should probably use jshort and not short.
* Isn't there a race if _Jv_FindIIndex is called from two different
threads before it has initialized? Or do we know this will be run
during initialization (when there is only a single thread)? If so,
we should add a comment to that effect.
* I notice the JvNew<prim>Array functions no longer have C linkage.
Does anybody know why they had C linkage in the first place?
(This probably isn't a real problem.)
Anyway, it looks good to me. Other gating factors:
* Getting exceptions thrown at the right time
* Fixing the interpreter
* And, of course, the compiler changes
Once these things are cleaned up I think it is good to go in.
Thanks a lot! This is really awesome stuff!
Tom