diff options
author | Tom Tromey <tromey@redhat.com> | 2001-03-23 19:15:44 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2001-03-23 19:15:44 +0000 |
commit | 83c64db681317c28239f07c5a8e6bb201834f0ba (patch) | |
tree | 28774e5e29803dc3ce69073c0dcf0c60c43a6982 /libjava/resolve.cc | |
parent | e9f4fa71431e33e47b1eab017ee03f937e27b058 (diff) | |
download | gcc-83c64db681317c28239f07c5a8e6bb201834f0ba.zip gcc-83c64db681317c28239f07c5a8e6bb201834f0ba.tar.gz gcc-83c64db681317c28239f07c5a8e6bb201834f0ba.tar.bz2 |
jni.cc (_Jv_JNI_GetAnyFieldID): Handle unresolved fields.
* 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.
From-SVN: r40785
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 4a37365..b0a0565 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. |