summaryrefslogtreecommitdiff
path: root/libjava/interpret.cc
diff options
context:
space:
mode:
authortromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-01 22:02:20 +0000
committertromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-01 22:02:20 +0000
commit2fc24cee2a68172b9e3f2e993c75ad01769cf136 (patch)
tree938e916f1eee2f10d36f75b0391a97ffba828a5b /libjava/interpret.cc
parent940469e67c53fab90367b2a35905ed4dc5879de5 (diff)
downloadgcc-2fc24cee2a68172b9e3f2e993c75ad01769cf136.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29037 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/interpret.cc')
-rw-r--r--libjava/interpret.cc23
1 files changed, 6 insertions, 17 deletions
diff --git a/libjava/interpret.cc b/libjava/interpret.cc
index 7ea7cbfedb3..ca38d3ba0af 100644
--- a/libjava/interpret.cc
+++ b/libjava/interpret.cc
@@ -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"));