Commit ca1906ff by Bryce McKinlay

[multiple changes]

2001-05-18  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* include/jvm.h: Move "#pragma GCC java_exceptions" to ...
	* gcj/javaprims.h: ... here.
	* gnu/gcj/io/shs.cc: Add "#pragma GCC java_exceptions".

2001-05-17  Martin Kahlert  <martin.kahlert@infineon.com>

	* java/lang/natClass.cc (_Jv_FindIIndex): Fix an off by one error
	with length of ioffset table.
	(_Jv_IsAssignableFrom): Likewise.

From-SVN: r42248
parent 6fd72f81
2001-05-18 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
* include/jvm.h: Move "#pragma GCC java_exceptions" to ...
* gcj/javaprims.h: ... here.
* gnu/gcj/io/shs.cc: Add "#pragma GCC java_exceptions".
2001-05-17 Martin Kahlert <martin.kahlert@infineon.com>
* java/lang/natClass.cc (_Jv_FindIIndex): Fix an off by one error
with length of ioffset table.
(_Jv_IsAssignableFrom): Likewise.
2001-05-17 Per Bothner <per@bothner.com> 2001-05-17 Per Bothner <per@bothner.com>
* Makefile.am (ZIP): The "fastjar" binary is now plain "jar". * Makefile.am (ZIP): The "fastjar" binary is now plain "jar".
......
...@@ -11,6 +11,9 @@ details. */ ...@@ -11,6 +11,9 @@ details. */
#ifndef __JAVAPRIMS_H__ #ifndef __JAVAPRIMS_H__
#define __JAVAPRIMS_H__ #define __JAVAPRIMS_H__
// Force C++ compiler to use Java-style exceptions.
#pragma GCC java_exceptions
// FIXME: this is a hack until we get a proper gcjh. // FIXME: this is a hack until we get a proper gcjh.
// It is needed to work around system header files that define TRUE // It is needed to work around system header files that define TRUE
// and FALSE. // and FALSE.
......
...@@ -10,6 +10,10 @@ ...@@ -10,6 +10,10 @@
* Comments to pgut1@cs.aukuni.ac.nz * Comments to pgut1@cs.aukuni.ac.nz
*/ */
// Force C++ compiler to use Java-style EH, so we don't have to link with
// libstdc++.
#pragma GCC java_exceptions
#include <string.h> #include <string.h>
#include "shs.h" #include "shs.h"
......
...@@ -11,9 +11,6 @@ details. */ ...@@ -11,9 +11,6 @@ details. */
#ifndef __JAVA_JVM_H__ #ifndef __JAVA_JVM_H__
#define __JAVA_JVM_H__ #define __JAVA_JVM_H__
// Force C++ compiler to use Java-style exceptions.
#pragma GCC java_exceptions
#include <gcj/javaprims.h> #include <gcj/javaprims.h>
#include <java-assert.h> #include <java-assert.h>
......
...@@ -936,7 +936,7 @@ _Jv_IsAssignableFrom (jclass target, jclass source) ...@@ -936,7 +936,7 @@ _Jv_IsAssignableFrom (jclass target, jclass source)
if (__builtin_expect ((if_idt == NULL), false)) if (__builtin_expect ((if_idt == NULL), false))
return false; // No class implementing TARGET has been loaded. return false; // No class implementing TARGET has been loaded.
jshort cl_iindex = cl_idt->cls.iindex; jshort cl_iindex = cl_idt->cls.iindex;
if (cl_iindex <= if_idt->iface.ioffsets[0]) if (cl_iindex < if_idt->iface.ioffsets[0])
{ {
jshort offset = if_idt->iface.ioffsets[cl_iindex]; jshort offset = if_idt->iface.ioffsets[cl_iindex];
if (offset < cl_idt->cls.itable_length if (offset < cl_idt->cls.itable_length
...@@ -1181,8 +1181,7 @@ _Jv_GenerateITable (jclass klass, _Jv_ifaces *ifaces, jshort *itable_offsets) ...@@ -1181,8 +1181,7 @@ _Jv_GenerateITable (jclass klass, _Jv_ifaces *ifaces, jshort *itable_offsets)
{ {
jclass iface = ifaces->list[i]; jclass iface = ifaces->list[i];
itable_offsets[i] = itable_pos; itable_offsets[i] = itable_pos;
itable_pos = _Jv_AppendPartialITable (klass, iface, itable, itable_pos = _Jv_AppendPartialITable (klass, iface, itable, itable_pos);
itable_pos);
/* Create interface dispatch table for iface */ /* Create interface dispatch table for iface */
if (iface->idt == NULL) if (iface->idt == NULL)
...@@ -1325,7 +1324,7 @@ _Jv_FindIIndex (jclass *ifaces, jshort *offsets, jshort num) ...@@ -1325,7 +1324,7 @@ _Jv_FindIIndex (jclass *ifaces, jshort *offsets, jshort num)
{ {
if (j >= num) if (j >= num)
goto found; goto found;
if (i > ifaces[j]->idt->iface.ioffsets[0]) if (i >= ifaces[j]->idt->iface.ioffsets[0])
continue; continue;
int ioffset = ifaces[j]->idt->iface.ioffsets[i]; int ioffset = ifaces[j]->idt->iface.ioffsets[i];
/* We can potentially share this position with another class. */ /* We can potentially share this position with another class. */
......
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