Commit f08113ce by Tom Tromey Committed by Tom Tromey

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
parent 9b0cb287
1999-09-23 Tom Tromey <tromey@cygnus.com> 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. * prims.cc (main_init): New function.
(JvRunMain): Call it. (JvRunMain): Call it.
(_Jv_RunMain): Likewise. (_Jv_RunMain): Likewise.
......
...@@ -19,16 +19,7 @@ package java.lang; ...@@ -19,16 +19,7 @@ package java.lang;
final class FirstThread extends Thread final class FirstThread extends Thread
{ {
public native void run0 (); public native void run ();
public void run ()
{
try {
run0 ();
} catch (Throwable ex) {
System.err.println ("uncaught exception at top level");
ex.printStackTrace ();
}
}
public FirstThread (ThreadGroup g, Class k, Object o) public FirstThread (ThreadGroup g, Class k, Object o)
{ {
......
...@@ -27,20 +27,11 @@ details. */ ...@@ -27,20 +27,11 @@ details. */
typedef void main_func (jobject); typedef void main_func (jobject);
void void
java::lang::FirstThread::run0 (void) java::lang::FirstThread::run (void)
{ {
Utf8Const* main_signature = _Jv_makeUtf8Const ("([Ljava.lang.String;)V", 22); Utf8Const* main_signature = _Jv_makeUtf8Const ("([Ljava.lang.String;)V", 22);
Utf8Const* main_name = _Jv_makeUtf8Const ("main", 4); 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) if (klass == NULL)
{ {
klass = java::lang::Class::forName (klass_name); klass = java::lang::Class::forName (klass_name);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment