Changes: Edwin Steiner
Christian Thalinger
- $Id: builtin.h 3133 2005-08-23 14:34:49Z cacao $
+ $Id: builtin.h 3613 2005-11-07 17:57:56Z twisti $
*/
#ifndef _BUILTIN_H
#define _BUILTIN_H
-#include "arch.h"
#include "config.h"
+
+#include "arch.h"
#include "toolbox/logging.h"
#if defined(USE_THREADS)
/* NOT AN OP */
s4 builtin_checkcast(java_objectheader *obj, classinfo *class);
/* NOT AN OP */
-s4 builtin_arrayinstanceof(java_objectheader *obj, vftbl_t *target);
+s4 builtin_arrayinstanceof(java_objectheader *o, classinfo *targetclass);
#define BUILTIN_arrayinstanceof (functionptr) builtin_arrayinstanceof
-s4 builtin_arraycheckcast(java_objectheader *o, vftbl_t *target);
+s4 builtin_arraycheckcast(java_objectheader *o, classinfo *targetclass);
#define BUILTIN_arraycheckcast (functionptr) builtin_arraycheckcast
java_objectheader *builtin_throw_exception(java_objectheader *exception);
java_objectheader *builtin_trace_exception(java_objectheader *xptr,
methodinfo *m,
void *pos,
- s4 line,
- s4 noindent);
+ s4 indent);
/* NOT AN OP */
java_objectheader *builtin_new(classinfo *c);
#define BUILTIN_new (functionptr) builtin_new
-java_arrayheader *builtin_newarray(s4 size, vftbl_t *arrayvftbl);
+java_arrayheader *builtin_newarray(s4 size, classinfo *arrayclass);
#define BUILTIN_newarray (functionptr) builtin_newarray
-java_objectarray *builtin_anewarray(s4 size, classinfo *component);
+java_objectarray *builtin_anewarray(s4 size, classinfo *componentclass);
#define BUILTIN_anewarray (functionptr) builtin_anewarray
java_booleanarray *builtin_newarray_boolean(s4 size);
java_longarray *builtin_newarray_long(s4 size);
#define BUILTIN_newarray_long (functionptr) builtin_newarray_long
-java_arrayheader *builtin_multianewarray(int n, vftbl_t *arrayvftbl, long *dims);
+java_arrayheader *builtin_multianewarray(int n, classinfo *arrayclass,
+ long *dims);
#define BUILTIN_multianewarray (functionptr) builtin_multianewarray
-s4 builtin_canstore(java_objectarray *a, java_objectheader *o);
+s4 builtin_canstore(java_objectarray *oa, java_objectheader *o);
#define BUILTIN_canstore (functionptr) builtin_canstore
#if defined(TRACE_ARGS_NUM)
java_arrayheader *builtin_clone_array(void *env, java_arrayheader *o);
/* NOT AN OP */
-/* conversion helper functions */
-inline float intBitsToFloat(s4 i);
-inline float longBitsToDouble(s8 l);
-
/* this is a wrapper for calls from asmpart */
java_objectheader **builtin_asm_get_exceptionptrptr(void);
#if defined(USE_THREADS) && defined(NATIVE_THREADS)
static inline java_objectheader **builtin_get_exceptionptrptr(void);
-static inline u1 *builtin_get_dontfillinexceptionstacktrace(void);
-/* NOT AN OP */
-static inline methodinfo **builtin_get_threadrootmethod(void);
-/* NOT AN OP */
inline java_objectheader **builtin_get_exceptionptrptr(void)
{
return &THREADINFO->_exceptionptr;
}
-
-inline u1 *builtin_get_dontfillinexceptionstacktrace(void)
-{
- return &THREADINFO->_dontfillinexceptionstacktrace;
-}
-
-inline methodinfo **builtin_get_threadrootmethod(void)
-{
- return &THREADINFO->_threadrootmethod;
-}
#endif
-
-/* returns the root method of a thread. this is used in asmpart.S and delivers the abort condition
- for the stack unwinding for getClassContext and getClassLoader. For the main thread this is the main function.
- Otherwhise it is the thread's run method (at least that's how I see it) (jowenn) */
-methodinfo *builtin_asm_get_threadrootmethod(void);
-
-/* returns the current top element of the stack frame info list (needed for unwinding across native functions) */
-/* on i386 this is a pointer to a structure
- ------------------------------------------------
- | return adress out of native stub |
- | pointer to method info | either i have to save an arbitrary adress within this native stub or the pointer to the method info, both are equaly costly, I have chosen the method info (JOWENN)
- | pointer to thread specific top of this list |<----stack frame begin
-points here---->| previous element in list |
- ------------------------------------------------
-*/
-void *builtin_asm_get_stackframeinfo(void);
-stacktraceelement *builtin_stacktrace_copy(stacktraceelement **el,
- stacktraceelement *begin,
- stacktraceelement *end);
-
#endif /* _BUILTIN_H */