diff options
author | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-15 08:11:40 +0000 |
---|---|---|
committer | apbianco <apbianco@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-01-15 08:11:40 +0000 |
commit | 331e4168e90ee0b3d9b905c4ab51d5a8c659a14f (patch) | |
tree | 0f67eae624079d38f268d0277b1b5f7310768fa4 /libjava/java/lang/Object.h | |
parent | 6599bf3a0c329e6b77955d670683bf672f1c19df (diff) | |
download | gcc-331e4168e90ee0b3d9b905c4ab51d5a8c659a14f.tar.gz |
2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
All files with updated copyright.
* prims.cc (class _Jv_PrimClass): Removed.
(init_prim_class): New function.
(DECLARE_PRIM_TYPE): Rewritten. `java::lang::Class' replaces
`_Jv_PrimClass' in primitive type declarations. Assign to the
value returned by `init_prim_class.'
* gcj/array.h: `java::lang::Class' replaces `_Jv_PrimClass' in
primitive type declarations.
(JvPrimClass): Cast to `jclass' removed.
* java/lang/Class.h (Class): New constructor.
(Class): New copy constructor.
(initializePrim): New prototype.
(_Jv_PrimClass): Field removed.
* java/lang/Object.h (struct _JvObjectPrefix): New virtuals
nacd_1 and nacd_2 (for compatibility with the new C++ ABI.)
(class java::lang::Object): `finalize' moved up front.
* java/lang/natClass.cc
(isAssignableFrom): Turned outline.
(isInstance): Likewise.
(isInterface): Likewise, fixed indentation.
(initializePrim): New function.
(New C++ ABI compatibility patch:
http://sources.redhat.com/ml/java-patches/2001-q1/msg00065.html)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@39032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java/lang/Object.h')
-rw-r--r-- | libjava/java/lang/Object.h | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/libjava/java/lang/Object.h b/libjava/java/lang/Object.h index 21e8fb0918f..81b5a66dfb6 100644 --- a/libjava/java/lang/Object.h +++ b/libjava/java/lang/Object.h @@ -1,6 +1,6 @@ // Object.h - Header file for java.lang.Object. -*- c++ -*- -/* Copyright (C) 1998, 1999, 2000 Free Software Foundation +/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. @@ -15,23 +15,22 @@ details. */ #include <gcj/javaprims.h> -// This class is mainly here as a kludge to get G++ to allocate -// vtable pointer as the *first* word of each Object, instead of -// the second word (following sync_info). Note that various pieces of -// code know that finalize() is the first method. For instance, -// Object.java knows this, as does _Jv_AllocObject. +// This class is mainly here as a kludge to get G++ to allocate two +// extra entries in the vtable. We will use them to store data. This +// allows us to support the new C++ ABI. struct _JvObjectPrefix { protected: - // This is disguised as the C++ vtbl. - // _Jv_VTable* vtable; - - virtual void finalize () = 0; + // New ABI Compatibility Dummy, #1 and 2. + virtual void nacd_1 (void) {}; + virtual void nacd_2 (void) {}; }; class java::lang::Object : public _JvObjectPrefix { +protected: + virtual void finalize (void); public: // Order must match order in Object.java. jclass getClass (void); @@ -61,7 +60,6 @@ public: protected: virtual jobject clone (void); - virtual void finalize (void); private: // This does not actually refer to a Java object. Instead it is a |