* src/vm/jit/inline/inline.c (emit_inlining_prolog): Set javaindex
[cacao.git] / src / cacaoh / headers.c
index dc48a2ff76e5c03d0125de9e687da6d997a80aa4..a4a21570908ab2246fa6196b9976f638d841efbe 100644 (file)
    Contact: cacao@cacaojvm.org
 
    Authors: Reinhard Grafl
-
-   Changes: Mark Probst
+            Mark Probst
             Philipp Tomsich
             Christian Thalinger
-                       Edwin Steiner
+            Edwin Steiner
 
-   $Id: headers.c 5739 2006-10-11 19:43:12Z edwin $
+   $Id: headers.c 5935 2006-11-08 20:27:37Z twisti $
 
 */
 
@@ -53,7 +52,7 @@
 # include <ucontext.h>
 #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 */
@@ -109,6 +108,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 +152,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
 
@@ -182,6 +192,7 @@ 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) {}
@@ -482,7 +493,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);
@@ -495,7 +506,7 @@ java_objectheader *new_nullpointerexception(void)
 
 void exceptions_throw_nullpointerexception(void)
 {
-       (void) new_nullpointerexception();
+       (void) exceptions_new_nullpointerexception();
 }
 
 
@@ -555,7 +566,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;