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:
Mark Mitchell 2002-12-28 06:38:52 +00:00 committed by Mark Mitchell
parent 239b7deaef
commit dfe5a36e95
11 changed files with 80 additions and 54 deletions

View File

@ -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>
* exception.cc (PERSONALITY_FUNCTION): Clear least-significant-bit

View File

@ -37,7 +37,7 @@ extern "C"
// These aren't declared in any Boehm GC header.
void GC_finalize_all (void);
ptr_t GC_debug_generic_malloc (size_t size, int k, GC_EXTRA_PARAMS);
};
}
#define MAYBE_MARK(Obj, Top, Limit, Source, Exit) \
Top=GC_MARK_AND_PUSH((GC_PTR)Obj, Top, Limit, (GC_PTR *)Source)

View File

@ -1,6 +1,6 @@
// 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.
@ -29,6 +29,14 @@ public:
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>
class JArray : public __JArray
{
@ -45,7 +53,7 @@ inline T* elements(JArray<T>& x) { return x.data; }
template<class T>
inline T* elements(JArray<T>* x) { return x->data; }
}; // end extern "Java"
} // end extern "Java"
/* These typesdefs match those in JNI. */
typedef __JArray *jarray;

View File

@ -123,7 +123,7 @@ extern "Java"
class ValidatorAndPriority;
class WriteAbortedException;
class Writer;
};
}
namespace lang
{
@ -222,7 +222,7 @@ extern "Java"
class ReferenceQueue;
class SoftReference;
class WeakReference;
};
}
namespace reflect
{
@ -240,8 +240,8 @@ extern "Java"
class Proxy$ProxyType;
class ReflectPermission;
class UndeclaredThrowableException;
};
};
}
}
namespace util
{
@ -369,7 +369,7 @@ extern "Java"
class JarInputStream;
class JarOutputStream;
class Manifest;
};
}
namespace zip
{
@ -393,10 +393,10 @@ extern "Java"
class ZipFile$ZipEntryEnumeration;
class ZipInputStream;
class ZipOutputStream;
};
};
};
};
}
}
}
}
typedef struct java::lang::Object* jobject;
typedef class java::lang::Class* jclass;

View File

@ -1,7 +1,7 @@
// -*- c++ -*-
// 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.
@ -19,7 +19,7 @@ extern "C"
{
JV_MARKOBJ_DECL;
JV_MARKARRAY_DECL;
};
}
// Enough stuff to inline _Jv_AllocObj. Ugly.
#include <gcj/javaprims.h>

View File

@ -211,7 +211,7 @@ extern JNIIMPEXP jint JNICALL JNI_CreateJavaVM (JavaVM **, void **, void *);
extern JNIIMPEXP jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *);
#ifdef __cplusplus
};
}
#endif /* __cplusplus */
typedef union jvalue

View File

@ -162,7 +162,7 @@ namespace gcj
/* Set to true by _Jv_CreateJavaVM. */
extern bool runtimeInitialized;
};
}
/* Type of pointer used as finalizer. */
typedef void _Jv_FinalizerFunc (jobject);

View File

@ -91,7 +91,7 @@ static inline void dupx (_Jv_word *sp, int n, int x)
sp[top-(n+x)-i] = sp[top-i];
}
};
}
// Used to convert from floating types to integral types.
template<typename TO, typename FROM>

View File

@ -333,6 +333,9 @@ private:
inline friend jclass
_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))
_Jv_NewArrayClass (klass, loader);
return klass->arrayclass;

View File

@ -592,15 +592,15 @@ _Jv_NewMultiArray (jclass array_type, jint dimensions, ...)
_Jv_ArrayVTable _Jv_##NAME##VTable; \
java::lang::Class _Jv_##NAME##Class __attribute__ ((aligned (8)));
DECLARE_PRIM_TYPE(byte);
DECLARE_PRIM_TYPE(short);
DECLARE_PRIM_TYPE(int);
DECLARE_PRIM_TYPE(long);
DECLARE_PRIM_TYPE(boolean);
DECLARE_PRIM_TYPE(char);
DECLARE_PRIM_TYPE(float);
DECLARE_PRIM_TYPE(double);
DECLARE_PRIM_TYPE(void);
DECLARE_PRIM_TYPE(byte)
DECLARE_PRIM_TYPE(short)
DECLARE_PRIM_TYPE(int)
DECLARE_PRIM_TYPE(long)
DECLARE_PRIM_TYPE(boolean)
DECLARE_PRIM_TYPE(char)
DECLARE_PRIM_TYPE(float)
DECLARE_PRIM_TYPE(double)
DECLARE_PRIM_TYPE(void)
void
_Jv_InitPrimClass (jclass cl, char *cname, char sig, int len,

View File

@ -128,6 +128,34 @@ private:
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
// need to handle. Reference types are treated specially by the
// 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:
void verify_instructions ()