* src/vm/jit/parse.cpp,
[cacao.git] / src / vm / jit / inline / inline.c
index e44fe63200c11cf335c289dead37fbfa85da831f..bb056dbe881ce0fa3401a3ae5a9d7a69e8f2247b 100644 (file)
 
 #include "mm/memory.h"
 
-#include "threads/lock-common.h"
-#include "threads/threads-common.h"
+#include "threads/lock.hpp"
+#include "threads/mutex.hpp"
+#include "threads/thread.hpp"
 
 #include "toolbox/logging.h"
 
-#include "vm/builtin.h"
+#include "vm/jit/builtin.hpp"
+#include "vm/class.hpp"
 #include "vm/global.h"
-#include "vm/initialize.h"
+#include "vm/initialize.hpp"
+#include "vm/method.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
 
-#include "vm/jit/jit.h"
-#include "vm/jit/parse.h"
+#include "vm/jit/jit.hpp"
+#include "vm/jit/parse.hpp"
 #include "vm/jit/reg.h"
-#include "vm/jit/show.h"
+#include "vm/jit/show.hpp"
 #include "vm/jit/stack.h"
 
 #include "vm/jit/inline/inline.h"
 
 #include "vm/jit/verify/typecheck.h"
 
-#include "vmcore/class.h"
-#include "vmcore/method.h"
-#include "vmcore/options.h"
-#include "vmcore/statistics.h"
-
 
 /* algorithm tuning constants *************************************************/
 
@@ -309,7 +309,7 @@ static bool inline_jit_compile_intern(jitdata *jd)
 
        /* call parse pass */
 
-       DOLOG( log_message_class("Parsing ", m->class) );
+       DOLOG( log_message_class("Parsing ", m->clazz) );
        if (!parse(jd)) {
                return false;
        }
@@ -338,7 +338,7 @@ static bool inline_jit_compile(inline_node *iln)
 
        /* enter a monitor on the method */
 
-       LOCK_MONITOR_ENTER(m);
+       Mutex_lock(m->mutex);
 
        /* allocate jitdata structure and fill it */
 
@@ -381,7 +381,7 @@ static bool inline_jit_compile(inline_node *iln)
 
        /* leave the monitor */
 
-       LOCK_MONITOR_EXIT(m);
+       Mutex_unlock(m->mutex);
 
        return r;
 }
@@ -1077,7 +1077,7 @@ static void inline_generate_sync_builtin(inline_node *iln,
                syncvar = inline_new_temp_variable(iln->ctx->resultjd, TYPE_ADR);
 
                n_ins = inline_instruction(iln, ICMD_ACONST, o_iptr);
-               n_ins->sx.val.c.cls = callee->m->class;
+               n_ins->sx.val.c.cls = callee->m->clazz;
                n_ins->dst.varindex = syncvar;
                n_ins->flags.bits |= INS_FLAG_CLASS;
        }
@@ -1956,7 +1956,7 @@ static void inline_write_exception_handlers(inline_node *master, inline_node *il
                n_ins = master->inlined_iinstr_cursor++;
                if (iln->m->flags & ACC_STATIC) {
                        n_ins->opc = ICMD_ACONST;
-                       n_ins->sx.val.c.cls = iln->m->class;
+                       n_ins->sx.val.c.cls = iln->m->clazz;
                        n_ins->flags.bits = INS_FLAG_CLASS;
                }
                else {
@@ -2156,9 +2156,6 @@ static bool inline_transform(inline_node *iln, jitdata *jd)
        /* we need bigger free memory stacks (XXX these should not be allocated in reg_setup) */
 
        n_jd->rd->freemem = DMNEW(s4, iln->ctx->maxinoutdepth + 1000) /* XXX max vars/block */;
-#if defined(HAS_4BYTE_STACKSLOT)
-       n_jd->rd->freemem_2 = DMNEW(s4, iln->ctx->maxinoutdepth + 1000) /* XXX max vars/block */;
-#endif
 
 #if defined(ENABLE_INLINING_DEBUG) || !defined(NDEBUG)
        if (   (n_jd->instructioncount >= opt_InlineMinSize)