/* src/vm/exceptions.cpp - exception related functions
- Copyright (C) 1996-2005, 2006, 2007, 2008
+ Copyright (C) 1996-2011
CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
This file is part of CACAO.
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
-#include <sys/mman.h>
#include "vm/types.h"
#include "md-abi.h"
-#include "mm/memory.h"
+#include "mm/memory.hpp"
-#include "native/jni.h"
#include "native/llni.h"
-#include "native/native.h"
+#include "native/native.hpp"
-#include "threads/lock-common.h"
+#include "threads/lock.hpp"
#include "threads/thread.hpp"
#include "toolbox/util.h"
-#include "vm/builtin.h"
+#include "vm/jit/builtin.hpp"
+#include "vm/class.hpp"
#include "vm/exceptions.hpp"
#include "vm/global.h"
+#include "vm/globals.hpp"
+#include "vm/javaobjects.hpp"
+#include "vm/loader.hpp"
+#include "vm/method.hpp"
+#include "vm/options.h"
+#include "vm/os.hpp"
#include "vm/string.hpp"
#include "vm/vm.hpp"
#include "vm/jit/asmpart.h"
-#include "vm/jit/jit.h"
+#include "vm/jit/jit.hpp"
#include "vm/jit/methodheader.h"
-#include "vm/jit/patcher-common.h"
-#include "vm/jit/show.h"
+#include "vm/jit/patcher-common.hpp"
+#include "vm/jit/show.hpp"
#include "vm/jit/stacktrace.hpp"
#include "vm/jit/trace.hpp"
-#include "vmcore/class.h"
-#include "vmcore/globals.hpp"
-#include "vmcore/javaobjects.hpp"
-#include "vmcore/loader.h"
-#include "vmcore/method.h"
-#include "vmcore/options.h"
-#include "vmcore/os.hpp"
-
#if defined(ENABLE_VMLOG)
#include <vmlog_cacao.h>
#endif
log_finish();
- vm_abort("Aborting...");
+ os::abort("Aborting...");
}
java_handle_t *s;
java_handle_t *o;
- if (vm->is_initializing()) {
+ if (VM::get_current()->is_initializing()) {
/* This can happen when global class variables are used which
are not initialized yet. */
classinfo *c;
java_handle_t *o;
- if (vm->is_initializing())
+ if (VM::get_current()->is_initializing())
exceptions_abort(classname, NULL);
c = load_class_bootstrap(classname);
java_handle_t *o;
classinfo *c;
- if (vm->is_initializing())
+ if (VM::get_current()->is_initializing())
exceptions_abort(classname, NULL);
c = load_class_bootstrap(classname);
classinfo *c;
java_handle_t *o;
- if (vm->is_initializing())
+ if (VM::get_current()->is_initializing())
exceptions_abort(classname, message);
c = load_class_bootstrap(classname);
classinfo *c;
methodinfo *m;
- if (vm->is_initializing())
+ if (VM::get_current()->is_initializing())
exceptions_abort(classname, NULL);
java_lang_Throwable jlt(cause);
java_handle_t *o;
methodinfo *m;
- if (vm->is_initializing())
+ if (VM::get_current()->is_initializing())
exceptions_abort(classname, NULL);
c = load_class_bootstrap(classname);
static void exceptions_throw_utf_cause(utf *classname, java_handle_t *cause)
{
- if (vm->is_initializing())
+ if (VM::get_current()->is_initializing())
exceptions_abort(classname, NULL);
java_lang_Throwable jltcause(cause);
false);
if (m == NULL)
- vm_abort("exceptions_print_stacktrace: printStackTrace()V not found");
+ os::abort("exceptions_print_stacktrace: printStackTrace()V not found");
/* Print message. */
need it afterwards. */
t = thread_get_current();
- to = (java_lang_Thread *) thread_get_object(t);
+ to = (java_lang_Thread *) LLNI_WRAP(t->object);
if (to != NULL) {
fprintf(stderr, "in thread \"");