This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [Patch] natString.cc: Some fixes for bounds checkingarithmetic.
Ralph Loader writes:
> > I was wondering about a similar thing in kaffe, and it may be saner to
> > write the array index argument checking code once in a final class in
> > Java and/or a static inline method in C++/function in C and let the
> > compiler do the inlining magic.
>
> Sounds good in theory. A couple of issues to deal with in practice:
>
> - sometimes you have start and length, sometimes you have start and
> end. The APIs aren't consistent.
>
> - how good is the java compiler at inlining?
These days it's pretty good, but the bounds checks are done in C++.
Its inliner is pretty good too.
Andrew.