This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: preliminary invocation patch
- To: Per Bothner <per at bothner dot com>
- Subject: Re: preliminary invocation patch
- From: Tom Tromey <tromey at redhat dot com>
- Date: 18 May 2001 13:08:56 -0600
- Cc: java-patches at gcc dot gnu dot org
- References: <m2g0e61hkv.fsf@kelso.bothner.com>
- Reply-To: tromey at redhat dot com
>>>>> "Per" == Per Bothner <per@bothner.com> writes:
Per> If we can get these problems taken care of quickly, we then need
Per> to consider whether to include this in the gcc-3.0 branch.
I'd prefer we not do that. This is a big change to a piece of code
that has been touchy in the past. I think it can wait until 3.1.
Per> +extern void runFirst(::java::lang::Class *klass, ::java::lang::Object *args);
I think functions like this must start with `_Jv_' or must be a static
member of some class. This name is a namespace bug.
Per> +jstring
Per> +java::lang::Thread::gen_name (void)
Per> +{
Per> + JvSynchronize dummy(&java::lang::Thread::class$);
Per> + char buf[20];
Per> + sprintf (buf, "Thread-%d", nextThreadNumber);
Per> + nextThreadNumber++;
Per> + return JvNewStringLatin1 (buf);
Per> +}
Although we have a shocking number of calls to printf() already, I
think we should avoid adding any more. I'd eventually not like to
require printf at all. printf is rather big, and if you can eliminate
its use then embedded executables can be smaller.
Also I think this particular part of the patch is probably a needless
optimization.
Tom