This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: preliminary invocation patch
- To: <green at redhat dot com>
- Subject: Re: preliminary invocation patch
- From: Per Bothner <per at bothner dot com>
- Date: 18 May 2001 14:26:06 -0700
- Cc: <java-patches at gcc dot gnu dot org>
- References: <NEBBKJDPKLNNENPPIHCPOECPLFAA.green@redhat.com>
"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/