Merged branch subtype-trunk into default.
[cacao.git] / src / vm / jit / intrp / engine.c
index 555562bbf8b93ab2b9b40f5cdec687e79c2c1085..118883f720c09c21215ae8d55979395389073968 100644 (file)
@@ -1,9 +1,7 @@
 /* src/vm/jit/intrp/engine.c - #included by engine1.c and engine2.c
 
-   Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel,
-   C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
-   E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
-   J. Wenninger, Institut f. Computersprachen - TU Wien
+   Copyright (C) 1996-2005, 2006, 2007, 2008
+   CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO
 
    This file is part of CACAO.
 
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   Contact: cacao@cacaojvm.org
-
-   Authors: Christian Thalinger
-            Anton Ertl
-
-   Changes: Edwin Steiner
-
-   $Id: engine.c 5702 2006-10-05 20:18:41Z edwin $
 */
 
 
-#define VM_DEBUG
+/* #define VM_DEBUG */
 
 #include "config.h"
 
 #include <assert.h>
 
+#include "vm/types.h"
+
 #include "arch.h"
+
 #include "vm/jit/intrp/intrp.h"
 
 #include "md-abi.h"                           /* required for TRACE_ARGS_NUM */
 
-#include "vm/builtin.h"
-#include "vm/exceptions.h"
-#include "vm/loader.h"
+#include "mm/memory.hpp"
+
+#include "threads/thread.hpp"
+
+#include "vm/jit/builtin.hpp"
+#include "vm/loader.hpp"
 #include "vm/options.h"
+
 #include "vm/jit/methodheader.h"
 #include "vm/jit/patcher.h"
+#include "vm/jit/stacktrace.hpp"
+
 
 #if defined(ENABLE_THREADS)
-# ifndef USE_FAKE_ATOMIC_INSTRUCTIONS
-#  include "machine-instr.h"
-# else
-#  include "threads/native/generic-primitives.h"
-# endif
+# include "threads/atomic.hpp"
 #endif
 
 #if !defined(STORE_ORDER_BARRIER) && !defined(ENABLE_THREADS)
@@ -250,8 +245,8 @@ engine(Inst *ip0, Cell * sp0, Cell * fp)
   Label throw_classcastexception                        = &&throw_classcastexception1;  
   Label throw_nullpointerexception                  = &&throw_nullpointerexception1;
   Label throw_arraystoreexception            = &&throw_arraystoreexception1;
-  java_objectheader *classcastexception_object;
-  s4 arrayindexoutofbounds_index; /* pass the index to the throw code */
+  java_objectheader *classcastexception_object = NULL;
+  s4 arrayindexoutofbounds_index = 0; /* pass the index to the throw code */
 
   if (vm_debug)
       fprintf(vm_out,"entering engine(%p,%p,%p)\n",ip0,sp,fp);