27e934d8ba
* configure: Rebuilt. * configure.in: Build include/Makefile. * Makefile.in: Rebuilt. * Makefile.am (SUBDIRS): Added gcj and include. (install-data-local): New target. (extra_headers): New macro. * include/Makefile.in: New file. * include/Makefile.am: New file. * interpret.cc: Don't include gcj/field.h or gcj/cni.h. * java/lang/reflect/natField.cc: Don't include gcj/field.h or gcj/cni.h. * boehm.cc: Don't include java-threads.h or gcj/field.h. * resolve.cc: Include config.h. * defineclass.cc: Include config.h. * include/java-interp.h: Don't include config.h. * include/jvm.h: Include java-threads.h, Object.h, java-gc.h, cni.h. * gcj/javaprims.h: Regenerated namespace decls. * classes.pl (scan): Don't put `;' after closing brace. * Makefile.in: Rebuilt. * Makefile.am (INCLUDES): Added -I for top_srcdir. * configure.in: Create gcj/Makefile. * gcj/Makefile.in: New file. * gcj/Makefile.am: New file. * java/lang/Object.h: Don't include any other headers. * gcj/array.h: Renamed from include/java-array.h. * gcj/field.h: Renamed from include/java-field.h. * gcj/method.h: Renamed from include/java-method.h. * gcj/cni.h, gcj/javaprims.h: Moved from include/. Updated all files to reflect new include structure. From-SVN: r29278
77 lines
1.9 KiB
C++
77 lines
1.9 KiB
C++
// Object.h - Header file for java.lang.Object. -*- c++ -*-
|
|
|
|
/* Copyright (C) 1998, 1999 Cygnus Solutions
|
|
|
|
This file is part of libgcj.
|
|
|
|
This software is copyrighted work licensed under the terms of the
|
|
Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
|
|
details. */
|
|
|
|
#ifndef __JAVA_LANG_OBJECT_H__
|
|
#define __JAVA_LANG_OBJECT_H__
|
|
|
|
#pragma interface
|
|
|
|
#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.
|
|
|
|
struct _JvObjectPrefix
|
|
{
|
|
protected:
|
|
// This is disguised as the C++ vtbl.
|
|
// _Jv_VTable* vtable;
|
|
|
|
virtual void finalize () = 0;
|
|
};
|
|
|
|
class java::lang::Object : public _JvObjectPrefix
|
|
{
|
|
public:
|
|
// Order must match order in Object.java.
|
|
jclass getClass (void);
|
|
virtual jint hashCode (void);
|
|
void notify (void);
|
|
void notifyAll (void);
|
|
void wait (jlong timeout, jint nanos);
|
|
virtual jboolean equals (jobject obj);
|
|
Object (void);
|
|
virtual jstring toString (void);
|
|
void wait (void);
|
|
void wait (jlong timeout);
|
|
|
|
friend jint _Jv_MonitorEnter (jobject obj);
|
|
friend jint _Jv_MonitorExit (jobject obj);
|
|
friend void _Jv_InitializeSyncMutex (void);
|
|
friend void _Jv_FinalizeObject (jobject obj);
|
|
|
|
#ifdef JV_MARKOBJ_DECL
|
|
friend JV_MARKOBJ_DECL;
|
|
#endif
|
|
#ifdef JV_MARKARRAY_DECL
|
|
friend JV_MARKARRAY_DECL;
|
|
#endif
|
|
|
|
protected:
|
|
virtual jobject clone (void);
|
|
virtual void finalize (void);
|
|
|
|
private:
|
|
// This does not actually refer to a Java object. Instead it is a
|
|
// placeholder for a piece of internal data (the synchronization
|
|
// information).
|
|
jobject sync_info;
|
|
|
|
// Initialize the sync_info field.
|
|
void sync_init (void);
|
|
|
|
static void hack12_6 (jobject f);
|
|
};
|
|
|
|
#endif /* __JAVA_LANG_OBJECT_H__ */
|