Commit 715bdd81 by Andrew Haley Committed by Andrew Haley

interpret.cc: Don't include fdlibm.h.

2000-02-10  Andrew Haley  <aph@cygnus.com>

	* interpret.cc: Don't include fdlibm.h.
	Replace #if with #ifdef throughout.
	Declare extern __ieee754_fmod.
	(continue1): Remove op_getfield, op_getstatic, op_putfield,
	op_putstatic insns.
	* resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
	Search class hierarchy for superclass vtable.

	* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
	off the end of a pointer list.

	* java/lang/natThread.cc (stop): Don't abort, throw an exception
	instead.
	(suspend): Ditto.

From-SVN: r31897
parent ae0a06c5
2000-02-10 Andrew Haley <aph@cygnus.com>
* interpret.cc: Don't include fdlibm.h.
Replace #if with #ifdef throughout.
Declare extern __ieee754_fmod.
(continue1): Remove op_getfield, op_getstatic, op_putfield,
op_putstatic insns.
* resolve.cc (_Jv_PrepareClass): Use imeth as method pointer.
Search class hierarchy for superclass vtable.
* java/lang/natClassLoader.cc (_Jv_UnregisterClass): Don't fall
off the end of a pointer list.
* java/lang/natThread.cc (stop): Don't abort, throw an exception
instead.
(suspend): Ditto.
2000-02-09 Tom Tromey <tromey@cygnus.com>
* java/lang/natRuntime.cc (_load): Call add_library.
......
......@@ -368,12 +368,15 @@ _Jv_UnregisterClass (jclass the_class)
}
_Jv_LoaderInfo **info = &(initiated_classes[hash]);
for ( ; *info; info = &((*info)->next))
for ( ; ; info = &((*info)->next))
{
while ((*info)->klass == the_class)
while (*info && (*info)->klass == the_class)
{
*info = (*info)->next;
}
if (*info == NULL)
break;
}
_Jv_MonitorExit (&ClassClass);
......
......@@ -19,6 +19,7 @@ details. */
#include <java/lang/Thread.h>
#include <java/lang/ThreadGroup.h>
#include <java/lang/IllegalArgumentException.h>
#include <java/lang/UnsupportedOperationException.h>
#include <java/lang/IllegalThreadStateException.h>
#include <java/lang/InterruptedException.h>
#include <java/lang/NullPointerException.h>
......@@ -306,14 +307,16 @@ java::lang::Thread::start (void)
void
java::lang::Thread::stop (java::lang::Throwable *)
{
JvFail ("java::lang::Thread::stop unimplemented");
_Jv_Throw (new UnsupportedOperationException
(JvNewStringLatin1 ("java::lang::Thread::stop unimplemented")));
}
void
java::lang::Thread::suspend (void)
{
checkAccess ();
JvFail ("java::lang::Thread::suspend unimplemented");
_Jv_Throw (new UnsupportedOperationException
(JvNewStringLatin1 ("java::lang::Thread::suspend unimplemented")));
}
void
......
......@@ -576,7 +576,7 @@ _Jv_PrepareClass(jclass klass)
}
else if (imeth != 0) // it could be abstract
{
_Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (im);
_Jv_InterpMethod *im = reinterpret_cast<_Jv_InterpMethod *> (imeth);
clz->methods[i].ncode = im->ncode ();
}
}
......@@ -650,10 +650,20 @@ _Jv_PrepareClass(jclass klass)
+ (sizeof (void*) * (vtable_count)));
vtable->clas = clz;
/* copy super class' vtable entries (index 0 goes unused). */
memcpy ((void*)&vtable->method[1],
(void*)&super_class->vtable->method[1],
sizeof (void*) * super_class->vtable_method_count);
{
jclass effective_superclass = super_class;
/* If super_class is abstract or an interface it has no vtable.
We need to find a real one... */
while (effective_superclass && effective_superclass->vtable == NULL)
effective_superclass = effective_superclass->superclass;
/* copy super class' vtable entries (index 0 goes unused). */
if (effective_superclass && effective_superclass->vtable)
memcpy ((void*)&vtable->method[1],
(void*)&effective_superclass->vtable->method[1],
sizeof (void*) * effective_superclass->vtable_method_count);
}
/* now, install our own vtable entries, reprise... */
for (int i = 0; i < clz->method_count; i++)
......
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