This is the mail archive of the java-patches@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: PATCH: Constant-time interface dispatch, type checking, inlining...


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]