diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-23 19:15:44 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-23 19:15:44 +0000 |
commit | e87dd429b4f2649989226014cd6a282f41417e26 (patch) | |
tree | 28774e5e29803dc3ce69073c0dcf0c60c43a6982 /libjava/resolve.cc | |
parent | 46b4391221355bb4dd57ecdc685e8f9c0cca9fa2 (diff) | |
download | gcc-e87dd429b4f2649989226014cd6a282f41417e26.tar.gz |
* jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
* java/lang/reflect/natField.cc (getType): Use _Jv_ResolveField
unconditionally.
* include/jvm.h (_Jv_ResolveField): Declare.
* include/java-interp.h (_Jv_ResolveField): Don't declare.
* resolve.cc (_Jv_ResolveField): No longer conditional on
INTERPRETER.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40785 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/resolve.cc')
-rw-r--r-- | libjava/resolve.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/libjava/resolve.cc b/libjava/resolve.cc index 4a37365c94a..b0a0565e32e 100644 --- a/libjava/resolve.cc +++ b/libjava/resolve.cc @@ -1,6 +1,6 @@ // resolve.cc - Code for linking and resolving classes and pool entries. -/* Copyright (C) 1999, 2000 Free Software Foundation +/* Copyright (C) 1999, 2000, 2001 Free Software Foundation This file is part of libgcj. @@ -32,6 +32,17 @@ details. */ #include <java/lang/IncompatibleClassChangeError.h> #include <java/lang/reflect/Modifier.h> +void +_Jv_ResolveField (_Jv_Field *field, java::lang::ClassLoader *loader) +{ + if (! field->isResolved ()) + { + _Jv_Utf8Const *sig = (_Jv_Utf8Const*)field->type; + field->type = _Jv_FindClassFromSignature (sig->data, loader); + field->flags &= ~_Jv_FIELD_UNRESOLVED_FLAG; + } +} + #ifdef INTERPRETER static void throw_internal_error (char *msg) @@ -361,17 +372,6 @@ _Jv_SearchMethodInClass (jclass cls, jclass klass, return 0; } -void -_Jv_ResolveField (_Jv_Field *field, java::lang::ClassLoader *loader) -{ - if (! field->isResolved ()) - { - _Jv_Utf8Const *sig = (_Jv_Utf8Const*)field->type; - field->type = _Jv_FindClassFromSignature (sig->data, loader); - field->flags &= ~_Jv_FIELD_UNRESOLVED_FLAG; - } -} - /** FIXME: this is a terribly inefficient algorithm! It would improve things if compiled classes to know vtable offset, and _Jv_Method had a field for this. |