This is the mail archive of the java-patches@gcc.gnu.org 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: preliminary invocation patch


"Anthony Green" <green@redhat.com> writes:

> I don't agree - because we're not just worrying about the size of printf.
> printf has to deal with floating point coinversions which we don't use.

On an embedded system that uses floating point, we will need
floating point conversions.  In that case, it would be better to
use an implementation of printf that can be shared with Java
- or use a slimmed-down version of printf.

On an embedded system where you don't use floating-point at all,
again no problem:  Use a version of printf that doesn't handle
floating-point.

Actually, I thik it would be useful to have a new helper:

int _Jv_FormatInt (jchar *buf, int i)

This writes the value of 'i' as a decimal into 'buf', returning
the number of characters written.  This can be used by gen_name,
but more importantly other routines like StringBuffer::append(int)
and Integer.toString().  These should not need to allocate
temporary buffers.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/per/


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