mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-18 00:19:38 +08:00
boehm.cc: Remove stray semicolon.
* boehm.cc: Remove stray semicolon. * interpret.cc: Likewise. * prims.cc: Likewise. * verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition earlier to ensure default arguments are processed. * gcj/array.h (JArray): Add forward declaration. (elements): Likewise. * gcj/javaprim.h: Remove stray semicolons. * include/bohm-gc.h: Likewise. * include/jni.h: Likewise. * include/jvm.h: Likewise. * java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass. From-SVN: r60556
This commit is contained in:
parent
239b7deaef
commit
dfe5a36e95
@ -1,3 +1,18 @@
|
|||||||
|
2002-12-27 Mark Mitchell <mark@codesourcery.com>
|
||||||
|
|
||||||
|
* boehm.cc: Remove stray semicolon.
|
||||||
|
* interpret.cc: Likewise.
|
||||||
|
* prims.cc: Likewise.
|
||||||
|
* verify.cc (_Jv_BytecodeVerifier::verify_fail): Move definition
|
||||||
|
earlier to ensure default arguments are processed.
|
||||||
|
* gcj/array.h (JArray): Add forward declaration.
|
||||||
|
(elements): Likewise.
|
||||||
|
* gcj/javaprim.h: Remove stray semicolons.
|
||||||
|
* include/bohm-gc.h: Likewise.
|
||||||
|
* include/jni.h: Likewise.
|
||||||
|
* include/jvm.h: Likewise.
|
||||||
|
* java/lang/Class.h (_Jv_GetArrayClass): Declare _Jv_NewArrayClass.
|
||||||
|
|
||||||
2002-12-23 Jeff Sturm <jsturm@one-point.com>
|
2002-12-23 Jeff Sturm <jsturm@one-point.com>
|
||||||
|
|
||||||
* exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit
|
* exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit
|
||||||
|
@ -37,7 +37,7 @@ extern "C"
|
|||||||
// These aren't declared in any Boehm GC header.
|
// These aren't declared in any Boehm GC header.
|
||||||
void GC_finalize_all (void);
|
void GC_finalize_all (void);
|
||||||
ptr_t GC_debug_generic_malloc (size_t size, int k, GC_EXTRA_PARAMS);
|
ptr_t GC_debug_generic_malloc (size_t size, int k, GC_EXTRA_PARAMS);
|
||||||
};
|
}
|
||||||
|
|
||||||
#define MAYBE_MARK(Obj, Top, Limit, Source, Exit) \
|
#define MAYBE_MARK(Obj, Top, Limit, Source, Exit) \
|
||||||
Top=GC_MARK_AND_PUSH((GC_PTR)Obj, Top, Limit, (GC_PTR *)Source)
|
Top=GC_MARK_AND_PUSH((GC_PTR)Obj, Top, Limit, (GC_PTR *)Source)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
// array.h - Header file for CNI arrays. -*- c++ -*-
|
// array.h - Header file for CNI arrays. -*- c++ -*-
|
||||||
|
|
||||||
/* Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation
|
/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
@ -29,6 +29,14 @@ public:
|
|||||||
friend jsize JvGetArrayLength (__JArray*);
|
friend jsize JvGetArrayLength (__JArray*);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
class JArray;
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
inline T* elements(JArray<T>& x);
|
||||||
|
template<class T>
|
||||||
|
inline T* elements(JArray<T>* x);
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
class JArray : public __JArray
|
class JArray : public __JArray
|
||||||
{
|
{
|
||||||
@ -45,7 +53,7 @@ inline T* elements(JArray<T>& x) { return x.data; }
|
|||||||
template<class T>
|
template<class T>
|
||||||
inline T* elements(JArray<T>* x) { return x->data; }
|
inline T* elements(JArray<T>* x) { return x->data; }
|
||||||
|
|
||||||
}; // end extern "Java"
|
} // end extern "Java"
|
||||||
|
|
||||||
/* These typesdefs match those in JNI. */
|
/* These typesdefs match those in JNI. */
|
||||||
typedef __JArray *jarray;
|
typedef __JArray *jarray;
|
||||||
|
@ -123,7 +123,7 @@ extern "Java"
|
|||||||
class ValidatorAndPriority;
|
class ValidatorAndPriority;
|
||||||
class WriteAbortedException;
|
class WriteAbortedException;
|
||||||
class Writer;
|
class Writer;
|
||||||
};
|
}
|
||||||
|
|
||||||
namespace lang
|
namespace lang
|
||||||
{
|
{
|
||||||
@ -222,7 +222,7 @@ extern "Java"
|
|||||||
class ReferenceQueue;
|
class ReferenceQueue;
|
||||||
class SoftReference;
|
class SoftReference;
|
||||||
class WeakReference;
|
class WeakReference;
|
||||||
};
|
}
|
||||||
|
|
||||||
namespace reflect
|
namespace reflect
|
||||||
{
|
{
|
||||||
@ -240,8 +240,8 @@ extern "Java"
|
|||||||
class Proxy$ProxyType;
|
class Proxy$ProxyType;
|
||||||
class ReflectPermission;
|
class ReflectPermission;
|
||||||
class UndeclaredThrowableException;
|
class UndeclaredThrowableException;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
namespace util
|
namespace util
|
||||||
{
|
{
|
||||||
@ -369,7 +369,7 @@ extern "Java"
|
|||||||
class JarInputStream;
|
class JarInputStream;
|
||||||
class JarOutputStream;
|
class JarOutputStream;
|
||||||
class Manifest;
|
class Manifest;
|
||||||
};
|
}
|
||||||
|
|
||||||
namespace zip
|
namespace zip
|
||||||
{
|
{
|
||||||
@ -393,10 +393,10 @@ extern "Java"
|
|||||||
class ZipFile$ZipEntryEnumeration;
|
class ZipFile$ZipEntryEnumeration;
|
||||||
class ZipInputStream;
|
class ZipInputStream;
|
||||||
class ZipOutputStream;
|
class ZipOutputStream;
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
};
|
}
|
||||||
|
|
||||||
typedef struct java::lang::Object* jobject;
|
typedef struct java::lang::Object* jobject;
|
||||||
typedef class java::lang::Class* jclass;
|
typedef class java::lang::Class* jclass;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// -*- c++ -*-
|
// -*- c++ -*-
|
||||||
// boehm-gc.h - Defines for Boehm collector.
|
// boehm-gc.h - Defines for Boehm collector.
|
||||||
|
|
||||||
/* Copyright (C) 1998, 1999 Free Software Foundation
|
/* Copyright (C) 1998, 1999, 2002 Free Software Foundation
|
||||||
|
|
||||||
This file is part of libgcj.
|
This file is part of libgcj.
|
||||||
|
|
||||||
@ -19,7 +19,7 @@ extern "C"
|
|||||||
{
|
{
|
||||||
JV_MARKOBJ_DECL;
|
JV_MARKOBJ_DECL;
|
||||||
JV_MARKARRAY_DECL;
|
JV_MARKARRAY_DECL;
|
||||||
};
|
}
|
||||||
|
|
||||||
// Enough stuff to inline _Jv_AllocObj. Ugly.
|
// Enough stuff to inline _Jv_AllocObj. Ugly.
|
||||||
#include <gcj/javaprims.h>
|
#include <gcj/javaprims.h>
|
||||||
|
@ -211,7 +211,7 @@ extern JNIIMPEXP jint JNICALL JNI_CreateJavaVM (JavaVM **, void **, void *);
|
|||||||
extern JNIIMPEXP jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
|
extern JNIIMPEXP jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
};
|
}
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
typedef union jvalue
|
typedef union jvalue
|
||||||
|
@ -162,7 +162,7 @@ namespace gcj
|
|||||||
|
|
||||||
/* Set to true by _Jv_CreateJavaVM. */
|
/* Set to true by _Jv_CreateJavaVM. */
|
||||||
extern bool runtimeInitialized;
|
extern bool runtimeInitialized;
|
||||||
};
|
}
|
||||||
|
|
||||||
/* Type of pointer used as finalizer. */
|
/* Type of pointer used as finalizer. */
|
||||||
typedef void _Jv_FinalizerFunc (jobject);
|
typedef void _Jv_FinalizerFunc (jobject);
|
||||||
|
@ -91,7 +91,7 @@ static inline void dupx (_Jv_word *sp, int n, int x)
|
|||||||
sp[top-(n+x)-i] = sp[top-i];
|
sp[top-(n+x)-i] = sp[top-i];
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
}
|
||||||
|
|
||||||
// Used to convert from floating types to integral types.
|
// Used to convert from floating types to integral types.
|
||||||
template<typename TO, typename FROM>
|
template<typename TO, typename FROM>
|
||||||
|
@ -333,6 +333,9 @@ private:
|
|||||||
inline friend jclass
|
inline friend jclass
|
||||||
_Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader)
|
_Jv_GetArrayClass (jclass klass, java::lang::ClassLoader *loader)
|
||||||
{
|
{
|
||||||
|
extern void _Jv_NewArrayClass (jclass element,
|
||||||
|
java::lang::ClassLoader *loader,
|
||||||
|
_Jv_VTable *array_vtable = 0);
|
||||||
if (__builtin_expect (!klass->arrayclass, false))
|
if (__builtin_expect (!klass->arrayclass, false))
|
||||||
_Jv_NewArrayClass (klass, loader);
|
_Jv_NewArrayClass (klass, loader);
|
||||||
return klass->arrayclass;
|
return klass->arrayclass;
|
||||||
|
@ -592,15 +592,15 @@ _Jv_NewMultiArray (jclass array_type, jint dimensions, ...)
|
|||||||
_Jv_ArrayVTable _Jv_##NAME##VTable; \
|
_Jv_ArrayVTable _Jv_##NAME##VTable; \
|
||||||
java::lang::Class _Jv_##NAME##Class __attribute__ ((aligned (8)));
|
java::lang::Class _Jv_##NAME##Class __attribute__ ((aligned (8)));
|
||||||
|
|
||||||
DECLARE_PRIM_TYPE(byte);
|
DECLARE_PRIM_TYPE(byte)
|
||||||
DECLARE_PRIM_TYPE(short);
|
DECLARE_PRIM_TYPE(short)
|
||||||
DECLARE_PRIM_TYPE(int);
|
DECLARE_PRIM_TYPE(int)
|
||||||
DECLARE_PRIM_TYPE(long);
|
DECLARE_PRIM_TYPE(long)
|
||||||
DECLARE_PRIM_TYPE(boolean);
|
DECLARE_PRIM_TYPE(boolean)
|
||||||
DECLARE_PRIM_TYPE(char);
|
DECLARE_PRIM_TYPE(char)
|
||||||
DECLARE_PRIM_TYPE(float);
|
DECLARE_PRIM_TYPE(float)
|
||||||
DECLARE_PRIM_TYPE(double);
|
DECLARE_PRIM_TYPE(double)
|
||||||
DECLARE_PRIM_TYPE(void);
|
DECLARE_PRIM_TYPE(void)
|
||||||
|
|
||||||
void
|
void
|
||||||
_Jv_InitPrimClass (jclass cl, char *cname, char sig, int len,
|
_Jv_InitPrimClass (jclass cl, char *cname, char sig, int len,
|
||||||
|
@ -128,6 +128,34 @@ private:
|
|||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__ ((__noreturn__)) void verify_fail (char *s, jint pc = -1)
|
||||||
|
{
|
||||||
|
using namespace java::lang;
|
||||||
|
StringBuffer *buf = new StringBuffer ();
|
||||||
|
|
||||||
|
buf->append (JvNewStringLatin1 ("verification failed"));
|
||||||
|
if (pc == -1)
|
||||||
|
pc = start_PC;
|
||||||
|
if (pc != -1)
|
||||||
|
{
|
||||||
|
buf->append (JvNewStringLatin1 (" at PC "));
|
||||||
|
buf->append (pc);
|
||||||
|
}
|
||||||
|
|
||||||
|
_Jv_InterpMethod *method = current_method;
|
||||||
|
buf->append (JvNewStringLatin1 (" in "));
|
||||||
|
buf->append (current_class->getName());
|
||||||
|
buf->append ((jchar) ':');
|
||||||
|
buf->append (JvNewStringUTF (method->get_method()->name->data));
|
||||||
|
buf->append ((jchar) '(');
|
||||||
|
buf->append (JvNewStringUTF (method->get_method()->signature->data));
|
||||||
|
buf->append ((jchar) ')');
|
||||||
|
|
||||||
|
buf->append (JvNewStringLatin1 (": "));
|
||||||
|
buf->append (JvNewStringLatin1 (s));
|
||||||
|
throw new java::lang::VerifyError (buf->toString ());
|
||||||
|
}
|
||||||
|
|
||||||
// This enum holds a list of tags for all the different types we
|
// This enum holds a list of tags for all the different types we
|
||||||
// need to handle. Reference types are treated specially by the
|
// need to handle. Reference types are treated specially by the
|
||||||
// type class.
|
// type class.
|
||||||
@ -3064,34 +3092,6 @@ private:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
__attribute__ ((__noreturn__)) void verify_fail (char *s, jint pc = -1)
|
|
||||||
{
|
|
||||||
using namespace java::lang;
|
|
||||||
StringBuffer *buf = new StringBuffer ();
|
|
||||||
|
|
||||||
buf->append (JvNewStringLatin1 ("verification failed"));
|
|
||||||
if (pc == -1)
|
|
||||||
pc = start_PC;
|
|
||||||
if (pc != -1)
|
|
||||||
{
|
|
||||||
buf->append (JvNewStringLatin1 (" at PC "));
|
|
||||||
buf->append (pc);
|
|
||||||
}
|
|
||||||
|
|
||||||
_Jv_InterpMethod *method = current_method;
|
|
||||||
buf->append (JvNewStringLatin1 (" in "));
|
|
||||||
buf->append (current_class->getName());
|
|
||||||
buf->append ((jchar) ':');
|
|
||||||
buf->append (JvNewStringUTF (method->get_method()->name->data));
|
|
||||||
buf->append ((jchar) '(');
|
|
||||||
buf->append (JvNewStringUTF (method->get_method()->signature->data));
|
|
||||||
buf->append ((jchar) ')');
|
|
||||||
|
|
||||||
buf->append (JvNewStringLatin1 (": "));
|
|
||||||
buf->append (JvNewStringLatin1 (s));
|
|
||||||
throw new java::lang::VerifyError (buf->toString ());
|
|
||||||
}
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
void verify_instructions ()
|
void verify_instructions ()
|
||||||
|
Loading…
Reference in New Issue
Block a user