* Merged gcj-abi-2-dev-branch to trunk.

(Actual changes too large to list in the commit message;
see ChangeLog.)

From-SVN: r91270
This commit is contained in:
Tom Tromey 2004-11-25 03:47:08 +00:00
parent ec0641f612
commit 367390404d
70 changed files with 11301 additions and 3355 deletions

View file

@ -1,6 +1,6 @@
// java-interp.h - Header file for the bytecode interpreter. -*- c++ -*-
/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation
/* Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation
This file is part of libgcj.
@ -36,7 +36,8 @@ _Jv_IsInterpretedClass (jclass c)
struct _Jv_ResolvedMethod;
void _Jv_InitInterpreter ();
void _Jv_DefineClass (jclass, jbyteArray, jint, jint);
void _Jv_DefineClass (jclass, jbyteArray, jint, jint,
java::security::ProtectionDomain *);
void _Jv_InitField (jobject, jclass, int);
void * _Jv_AllocMethodInvocation (jsize size);
@ -88,11 +89,7 @@ protected:
// Size of raw arguments.
_Jv_ushort args_raw_size;
// Chain of addresses to fill in. See _Jv_Defer_Resolution.
void *deferred;
friend void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
friend void _Jv_PrepareClass(jclass);
friend class _Jv_InterpreterEngine;
public:
_Jv_Method *get_method ()
@ -150,10 +147,9 @@ class _Jv_InterpMethod : public _Jv_MethodBase
friend class _Jv_BytecodeVerifier;
friend class gnu::gcj::runtime::NameFinder;
friend class gnu::gcj::runtime::StackTrace;
friend class _Jv_InterpreterEngine;
friend void _Jv_PrepareClass(jclass);
#ifdef JV_MARKOBJ_DECL
friend JV_MARKOBJ_DECL;
#endif
@ -166,43 +162,15 @@ class _Jv_InterpClass
friend class _Jv_ClassReader;
friend class _Jv_InterpMethod;
friend void _Jv_PrepareClass(jclass);
friend void _Jv_PrepareMissingMethods (jclass base2, jclass iface_class);
friend class _Jv_InterpreterEngine;
friend void _Jv_InitField (jobject, jclass, int);
#ifdef JV_MARKOBJ_DECL
friend JV_MARKOBJ_DECL;
#endif
friend _Jv_MethodBase ** _Jv_GetFirstMethod (_Jv_InterpClass *klass);
friend void _Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **);
};
// We have an interpreted class CL and we're trying to find the
// address of the ncode of a method METH. That interpreted class
// hasn't yet been prepared, so we defer fixups until they are ready.
// To do this, we create a chain of fixups that will be resolved by
// _Jv_PrepareClass.
extern inline void
_Jv_Defer_Resolution (void *cl, _Jv_Method *meth, void **address)
{
int i;
jclass self = (jclass) cl;
_Jv_InterpClass *interp_cl = (_Jv_InterpClass*) self->aux_info;
for (i = 0; i < self->method_count; i++)
{
_Jv_Method *m = &self->methods[i];
if (m == meth)
{
_Jv_MethodBase *imeth = interp_cl->interpreted_methods[i];
*address = imeth->deferred;
imeth->deferred = address;
return;
}
}
return;
}
extern inline _Jv_MethodBase **
_Jv_GetFirstMethod (_Jv_InterpClass *klass)
{
@ -240,7 +208,11 @@ class _Jv_JNIMethod : public _Jv_MethodBase
void *ncode ();
friend class _Jv_ClassReader;
friend void _Jv_PrepareClass(jclass);
friend class _Jv_InterpreterEngine;
#ifdef JV_MARKOBJ_DECL
friend JV_MARKOBJ_DECL;
#endif
public:
// FIXME: this is ugly.