natFirstThread.cc (run): Renamed from `run0'.

* java/lang/natFirstThread.cc (run): Renamed from `run0'.  Removed
	dead code.
	* java/lang/FirstThread.java (run0): Renamed to `run'.
	(run): Removed.

From-SVN: r29626
This commit is contained in:
Tom Tromey 1999-09-23 19:05:50 +00:00 committed by Tom Tromey
parent 9b0cb28706
commit f08113ce11
3 changed files with 7 additions and 20 deletions

View File

@ -1,5 +1,10 @@
1999-09-23 Tom Tromey <tromey@cygnus.com>
* java/lang/natFirstThread.cc (run): Renamed from `run0'. Removed
dead code.
* java/lang/FirstThread.java (run0): Renamed to `run'.
(run): Removed.
* prims.cc (main_init): New function.
(JvRunMain): Call it.
(_Jv_RunMain): Likewise.

View File

@ -19,16 +19,7 @@ package java.lang;
final class FirstThread extends Thread
{
public native void run0 ();
public void run ()
{
try {
run0 ();
} catch (Throwable ex) {
System.err.println ("uncaught exception at top level");
ex.printStackTrace ();
}
}
public native void run ();
public FirstThread (ThreadGroup g, Class k, Object o)
{

View File

@ -27,20 +27,11 @@ details. */
typedef void main_func (jobject);
void
java::lang::FirstThread::run0 (void)
java::lang::FirstThread::run (void)
{
Utf8Const* main_signature = _Jv_makeUtf8Const ("([Ljava.lang.String;)V", 22);
Utf8Const* main_name = _Jv_makeUtf8Const ("main", 4);
#if 0
// Note: this turns out to be more painful than useful. Apparently
// many people rely on being able to have main in a non-public
// class.
// This is based on my reading of 12.3.3.
if (! java::lang::reflect::Modifier::isPublic(klass->getModifiers()))
DIE ("class must be public");
#endif
if (klass == NULL)
{
klass = java::lang::Class::forName (klass_name);