-/* jit/parse.c - parser for JavaVM to intermediate code translation
+/* vm/jit/parse.c - parser for JavaVM to intermediate code translation
- Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
- R. Grafl, A. Krall, C. Kruegel, C. Oates, R. Obermaisser,
- M. Probst, S. Ring, E. Steiner, C. Thalinger, D. Thuernbeck,
- P. Tomsich, J. Wenninger
+ Copyright (C) 1996-2005 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
This file is part of CACAO.
Changes: Carolyn Oates
Edwin Steiner
+ Joseph Wenninger
- $Id: parse.c 1557 2004-11-22 12:01:16Z carolyn $
+ $Id: parse.c 1735 2004-12-07 14:33:27Z twisti $
*/
#include <string.h>
-#include "parse.h"
-#include "global.h"
-#include "jit.h"
-#include "parseRT.h"
-#include "inline.h"
-#include "loop/loop.h"
+
+#include "config.h"
#include "types.h"
-#include "builtin.h"
-#include "exceptions.h"
-#include "tables.h"
-#include "native.h"
-#include "loader.h"
-#include "options.h"
-#include "statistics.h"
-#include "toolbox/memory.h"
+#include "mm/memory.h"
+#include "native/native.h"
#include "toolbox/logging.h"
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/global.h"
+#include "vm/loader.h"
+#include "vm/options.h"
+#include "vm/statistics.h"
+#include "vm/tables.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/parse.h"
+#include "vm/jit/inline/parseRT.h"
+#include "vm/jit/inline/inline.h"
+#include "vm/jit/loop/loop.h"
+
#define METHINFO(mm) \
{ \
label_index, &b_count, inline_env);
s_count = 1 + m->exceptiontablelength; /* initialize stack element counter */
-#ifdef USE_THREADS
+#if defined(USE_THREADS)
if (checksync && (m->flags & ACC_SYNCHRONIZED)) {
m->isleafmethod = false;
inline_env->method->isleafmethod = false;
}
- OP(ICMD_INLINE_START);
+ OP1(ICMD_INLINE_START,tmpinlinf->level);
if (inlinfo->inlinedmethods == NULL) {
gp = -1;
printf("Parse p=%i<%i<%i< opcode=<%i> %s\n",
p, gp, inline_env->jcodelength, opcode, opcode_names[opcode]);
if (label_index)
- printf("label_index[%ld]=%ld\n",p,label_index[p]);
+ printf("label_index[%d]=%d\n",p,label_index[p]);
}
/*
printf("basicblockindex[gp=%i]=%i=%p ipc=%i=%p shifted ipc=%i=%p\n",
break;
case JAVA_MONITORENTER:
-#ifdef USE_THREADS
+#if defined(USE_THREADS)
if (checksync) {
BUILTIN1(BUILTIN_monitorenter, TYPE_VOID,currentline);
} else
break;
case JAVA_MONITOREXIT:
-#ifdef USE_THREADS
+#if defined(USE_THREADS)
if (checksync) {
BUILTIN1(BUILTIN_monitorexit, TYPE_VOID,currentline);
OP(ICMD_CHECKEXCEPTION);
if (p != m->jcodelength) {
- printf("p (%ld) != m->jcodelength (%ld)\n",p,m->jcodelength);
+ printf("p (%d) != m->jcodelength (%d)\n",p,m->jcodelength);
panic("Command-sequence crosses code-boundary");
}
if (!blockend) {
if (m->basicblockindex[p] & 1) {
/* check if this block starts at the beginning of an instruction */
if (!instructionstart[p]) {
- printf("Basic Block beginn: %ld\n",p);
+ printf("Basic Block beginn: %d\n",p);
panic("Branch into middle of instruction");
}
/* allocate the block */