Modifier.java (ALL_FLAGS): New constant.

* java/lang/reflect/Modifier.java (ALL_FLAGS): New constant.
	* resolve.cc: Removed constants defined by
	java.lang.reflect.Modifier.
	Include <java/lang/reflect/Modifier.h>.
	(_Jv_ResolvePoolEntry): Use values from Modifier.
	(_Jv_DetermineVTableIndex): Likewise.
	(_Jv_PrepareClass): Likewise.
	(ncode): Likewise.
	* defineclass.cc (_Jv_ClassReader): Removed constants defined by
	java.lang.reflect.Modifier.
	Include <java/lang/reflect/Modifier.h>.
	(checkExtends): Use values from Modifier.
	(checkImplements): Likewise.
	(handleField): Likewise.
	(handleConstantValueAttribute): Likewise.
	(handleFieldsEnd): Likewise.
	(handleMethod ): Likewise.
	(handleMethodsEnd): Likewise.
	(handleClassBegin): Likewise.
	* interpret.cc: Removed constants defined by
	java.lang.reflect.Modifier.
	(continue1): Use values from Modifier.
	* java/lang/natClassLoader.cc: Removed constants defined by
	java.lang.reflect.Modifier.

From-SVN: r29037
This commit is contained in:
Tom Tromey 1999-09-01 22:02:20 +00:00 committed by Tom Tromey
parent c7f9c6f5e3
commit e409a2c8f4
6 changed files with 122 additions and 105 deletions

View file

@ -53,19 +53,6 @@ gnu::gcj::runtime::MethodInvocation::continue1 (gnu::gcj::RawData *,
#define ClassError _CL_Q34java4lang5Error
extern java::lang::Class ClassError;
static const int PUBLIC = 0x001;
static const int PRIVATE = 0x002;
static const int PROTECTED = 0x004;
static const int STATIC = 0x008;
static const int FINAL = 0x010;
static const int SYNCHRONIZED = 0x020;
static const int VOLATILE = 0x040;
static const int TRANSIENT = 0x080;
static const int NATIVE = 0x100;
static const int INTERFACE = 0x200;
static const int ABSTRACT = 0x400;
static const int ALL_FLAGS = 0x7FF;
static _Jv_Utf8Const *init_name = _Jv_makeUtf8Const ("<init>", 6);
static void throw_internal_error (char *msg)
@ -426,6 +413,8 @@ gnu::gcj::runtime::MethodInvocation::continue1 (gnu::gcj::RawData *meth,
void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
{
using namespace java::lang::reflect;
register _Jv_word *sp = inv->sp;
register unsigned char *pc PC_REGISTER_ASM = inv->pc;
_Jv_word *locals = inv->local_base ();
@ -2001,7 +1990,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
_Jv_ResolvePoolEntry (defining_class, fieldref_index);
_Jv_Field *field = pool_data[fieldref_index].field;
if ((field->flags & STATIC) == 0)
if ((field->flags & Modifier::STATIC) == 0)
throw_incompatible_class_change_error
(JvNewStringLatin1 ("field no longer static"));
@ -2048,7 +2037,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
_Jv_ResolvePoolEntry (defining_class, fieldref_index);
_Jv_Field *field = pool_data[fieldref_index].field;
if ((field->flags & STATIC) != 0)
if ((field->flags & Modifier::STATIC) != 0)
throw_incompatible_class_change_error
(JvNewStringLatin1 ("field is static"));
@ -2104,7 +2093,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
jclass type = field->type;
// ResolvePoolEntry cannot check this
if ((field->flags & STATIC) == 0)
if ((field->flags & Modifier::STATIC) == 0)
throw_incompatible_class_change_error
(JvNewStringLatin1 ("field no longer static"));
@ -2153,7 +2142,7 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv)
jclass type = field->type;
if ((field->flags & STATIC) != 0)
if ((field->flags & Modifier::STATIC) != 0)
throw_incompatible_class_change_error
(JvNewStringLatin1 ("field is static"));