All files with updated copyright.
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) From-SVN: r39032
This commit is contained in:
parent
dc08e60389
commit
2feccc205e
6 changed files with 121 additions and 73 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue