summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-18 06:29:11 +0000
committerbryce <bryce@138bc75d-0d04-0410-961f-82ee72b054a4>2001-05-18 06:29:11 +0000
commit508166a52c028ec30e8990dcccbe955fd8b64484 (patch)
tree0ced9189dbcd2b7509625083e75951dca7a938c4 /libjava
parentdde58e46a5554ed15de2533a9270306e1b22dec1 (diff)
downloadgcc-508166a52c028ec30e8990dcccbe955fd8b64484.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@42248 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog12
-rw-r--r--libjava/gcj/javaprims.h3
-rw-r--r--libjava/gnu/gcj/io/shs.cc4
-rw-r--r--libjava/include/jvm.h3
-rw-r--r--libjava/java/lang/natClass.cc7
5 files changed, 22 insertions, 7 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index d960f1b65ad..024955368ff 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,15 @@
+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>
* Makefile.am (ZIP): The "fastjar" binary is now plain "jar".
diff --git a/libjava/gcj/javaprims.h b/libjava/gcj/javaprims.h
index f16e97db903..e13195c7e77 100644
--- a/libjava/gcj/javaprims.h
+++ b/libjava/gcj/javaprims.h
@@ -11,6 +11,9 @@ details. */
#ifndef __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.
// It is needed to work around system header files that define TRUE
// and FALSE.
diff --git a/libjava/gnu/gcj/io/shs.cc b/libjava/gnu/gcj/io/shs.cc
index 96b4f560352..b9a563c544c 100644
--- a/libjava/gnu/gcj/io/shs.cc
+++ b/libjava/gnu/gcj/io/shs.cc
@@ -10,6 +10,10 @@
* 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 "shs.h"
diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h
index 1e80fbc3218..50af7569fb2 100644
--- a/libjava/include/jvm.h
+++ b/libjava/include/jvm.h
@@ -11,9 +11,6 @@ details. */
#ifndef __JAVA_JVM_H__
#define __JAVA_JVM_H__
-// Force C++ compiler to use Java-style exceptions.
-#pragma GCC java_exceptions
-
#include <gcj/javaprims.h>
#include <java-assert.h>
diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc
index d7c2a54b521..e88bd830967 100644
--- a/libjava/java/lang/natClass.cc
+++ b/libjava/java/lang/natClass.cc
@@ -936,7 +936,7 @@ _Jv_IsAssignableFrom (jclass target, jclass source)
if (__builtin_expect ((if_idt == NULL), false))
return false; // No class implementing TARGET has been loaded.
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];
if (offset < cl_idt->cls.itable_length
@@ -1181,8 +1181,7 @@ _Jv_GenerateITable (jclass klass, _Jv_ifaces *ifaces, jshort *itable_offsets)
{
jclass iface = ifaces->list[i];
itable_offsets[i] = itable_pos;
- itable_pos = _Jv_AppendPartialITable (klass, iface, itable,
- itable_pos);
+ itable_pos = _Jv_AppendPartialITable (klass, iface, itable, itable_pos);
/* Create interface dispatch table for iface */
if (iface->idt == NULL)
@@ -1325,7 +1324,7 @@ _Jv_FindIIndex (jclass *ifaces, jshort *offsets, jshort num)
{
if (j >= num)
goto found;
- if (i > ifaces[j]->idt->iface.ioffsets[0])
+ if (i >= ifaces[j]->idt->iface.ioffsets[0])
continue;
int ioffset = ifaces[j]->idt->iface.ioffsets[i];
/* We can potentially share this position with another class. */