Patch: fix for PR libgcj/212

Tom Tromey tromey@cygnus.com
Thu Apr 20 15:23:00 GMT 2000


I'm checking in this patch.  It supposedly fixes PR libgcj/212, but I
don't have an alpha box handy to test it on.  Bryce, can you give this
a try?

2000-04-20  Tom Tromey  <tromey@cygnus.com>

	Fix for PR libgcj/212:
	* gcj/javaprims.h (_Jv_word, _Jv_word2): Removed definitions.
	* include/jvm.h (_Jv_word, _Jv_word2): Define.
	* java/lang/Class.h (_Jv_word): Declare.

Tom

Index: gcj/javaprims.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/gcj/javaprims.h,v
retrieving revision 1.8
diff -u -r1.8 javaprims.h
--- javaprims.h	2000/03/26 20:33:04	1.8
+++ javaprims.h	2000/04/20 22:04:35
@@ -1,6 +1,6 @@
 // javaprims.h - Main external header file for libgcj.  -*- c++ -*-
 
-/* Copyright (C) 1998, 1999  Free Software Foundation
+/* Copyright (C) 1998, 1999, 2000  Free Software Foundation
 
    This file is part of libgcj.
 
@@ -277,36 +277,6 @@
 
 typedef unsigned short _Jv_ushort __attribute__((__mode__(__HI__)));
 typedef unsigned int _Jv_uint __attribute__((__mode__(__SI__)));
-
-typedef union {
-  jobject o;
-  jint i;			// Also stores smaller integral types.
-  jfloat f;
-  jint ia[1];			// Half of _Jv_word2.
-  void* p;
-
-  // We use __LP64__ and not SIZEOF_VOID_P here because we want
-  // something that will be predefined by the compiler.  FIXME -- this
-  // definition probably shouldn't appear here anyway.
-#ifdef __LP64__
-  // We can safely put a long or a double in here without increasing
-  // the size of _Jv_Word; we take advantage of this in the interpreter.
-  jlong l;
-  jdouble d;
-#endif
-
-  jclass                     clazz;
-  jstring                    string;
-  struct _Jv_Field          *field;
-  struct _Jv_Utf8Const      *utf8;
-  struct _Jv_ResolvedMethod *rmethod;
-} _Jv_word;
-
-typedef union {
-  jint ia[2];
-  jlong l;
-  jdouble d;
-} _Jv_word2;                              
 
 struct _Jv_Utf8Const
 {
Index: include/jvm.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/include/jvm.h,v
retrieving revision 1.21
diff -u -r1.21 jvm.h
--- jvm.h	2000/04/03 23:36:49	1.21
+++ jvm.h	2000/04/20 22:04:36
@@ -31,6 +31,35 @@
   void *method[1];
 };
 
+union _Jv_word
+{
+  jobject o;
+  jint i;			// Also stores smaller integral types.
+  jfloat f;
+  jint ia[1];			// Half of _Jv_word2.
+  void* p;
+
+#if SIZEOF_VOID_P == 8
+  // We can safely put a long or a double in here without increasing
+  // the size of _Jv_Word; we take advantage of this in the interpreter.
+  jlong l;
+  jdouble d;
+#endif
+
+  jclass                     clazz;
+  jstring                    string;
+  struct _Jv_Field          *field;
+  struct _Jv_Utf8Const      *utf8;
+  struct _Jv_ResolvedMethod *rmethod;
+};
+
+union _Jv_word2
+{
+  jint ia[2];
+  jlong l;
+  jdouble d;
+};                              
+
 /* Extract a character from a Java-style Utf8 string.
  * PTR points to the current character.
  * LIMIT points to the end of the Utf8 string.
Index: java/lang/Class.h
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/Class.h,v
retrieving revision 1.18
diff -u -r1.18 Class.h
--- Class.h	2000/03/07 19:55:26	1.18
+++ Class.h	2000/04/20 22:04:38
@@ -50,6 +50,7 @@
 
 struct _Jv_Field;
 struct _Jv_VTable;
+union _Jv_word;
 
 struct _Jv_Constants
 {


More information about the Java-patches mailing list