X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=src%2Fcacaoh%2Fheaders.c;h=930d47a01b4ff3394b2a36a26a418e50d0beaafa;hb=68be4e127dea085c13de7ec2eb5069c524ca3236;hp=e3c2305a36cce77c99554d52054eed236d305950;hpb=d138e1f7ce3007fa4bd00db8ca37e96f66a2d40c;p=cacao.git diff --git a/src/cacaoh/headers.c b/src/cacaoh/headers.c index e3c2305a3..930d47a01 100644 --- a/src/cacaoh/headers.c +++ b/src/cacaoh/headers.c @@ -25,13 +25,12 @@ Contact: cacao@cacaojvm.org Authors: Reinhard Grafl - - Changes: Mark Probst + Mark Probst Philipp Tomsich Christian Thalinger - Edwin Steiner + Edwin Steiner - $Id: headers.c 5340 2006-09-05 21:15:02Z twisti $ + $Id: headers.c 5973 2006-11-12 15:01:14Z edwin $ */ @@ -53,7 +52,7 @@ # include #endif -#include "mm/boehm.h" +#include "mm/gc-common.h" #include "mm/memory.h" #include "native/include/java_lang_String.h" #include "native/include/java_lang_Throwable.h" @@ -72,7 +71,7 @@ /* Invocation API variables ***************************************************/ _Jv_JavaVM *_Jv_jvm; /* denotes a Java VM */ - +char *_Jv_bootclasspath; #if defined(ENABLE_INTRP) /* dummy interpreter stack to keep the compiler happy */ @@ -81,6 +80,12 @@ u1 *intrp_main_stack; #endif +#if !defined(NDEBUG) +/* dummy variable */ +bool inline_debug_log = false; +#endif + + /* for raising exceptions from native methods *********************************/ #if !defined(ENABLE_THREADS) @@ -109,6 +114,16 @@ java_objectheader *vm_call_method(methodinfo *m, java_objectheader *o, ...) void vm_abort(const char *text, ...) { + va_list ap; + + /* print the log message */ + + va_start(ap, text); + vfprintf(stderr, text, ap); + va_end(ap); + + /* now abort the VM */ + abort(); } @@ -143,13 +158,14 @@ u1* asm_initialize_thread_stack(void *func, u1 *stack) { return NULL; } void *asm_switchstackandcall(void *stack, void *func, void **stacktopsave, void * p) { return NULL; } void asm_handle_builtin_exception(classinfo *c) {} -void asm_abstractmethoderror(void) {} #if defined(ENABLE_JIT) +void asm_abstractmethoderror(void) {} void asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out) {} #endif #if defined(ENABLE_INTRP) +void intrp_asm_abstractmethoderror(void) {} void intrp_asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out) {} #endif @@ -179,12 +195,16 @@ bool typeinfo_init_class(typeinfo *info,classref_or_classinfo c) } void typeinfo_print(FILE *file,typeinfo *info,int indent) {} +void typeinfo_print_short(FILE *file,typeinfo *info) {} void exceptions_print_exception(java_objectheader *xptr) {} +void stacktrace_dump_trace(threadobject *thread) {} void stacktrace_print_trace(java_objectheader *xptr) {} java_objectarray *stacktrace_getClassContext() { return NULL; } void code_free_code_of_method(methodinfo *m) {} +void jit_invalidate_code(methodinfo *m) {} + /* exception functions ********************************************************/ @@ -481,7 +501,7 @@ void exceptions_throw_negativearraysizeexception(void) } -java_objectheader *new_nullpointerexception(void) +java_objectheader *exceptions_new_nullpointerexception(void) { fprintf(stderr, "%s", string_java_lang_NullPointerException); exit(1); @@ -494,7 +514,7 @@ java_objectheader *new_nullpointerexception(void) void exceptions_throw_nullpointerexception(void) { - (void) new_nullpointerexception(); + (void) exceptions_new_nullpointerexception(); } @@ -554,7 +574,7 @@ static void addoutputsize (int len) u4 newsize,i; if (!dopadding) return; - newsize = ALIGN(outputsize, len); + newsize = MEMORY_ALIGN(outputsize, len); for (i = outputsize; i < newsize; i++) fprintf(file, " u1 pad%d\n", (int) i); outputsize = newsize;