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.
> 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?
- there's 3 different exception classes, IndexOutOfBoundsException,
ArrayIndex... and StringIndex... Again, the APIs don't seem
particularly consistent about which should get thrown.
Ralph.