[kaffe] CVS kaffe (dalibor): Moved verifier to its own module
Kaffe CVS
cvs-commits at kaffe.org
Mon Jun 21 09:39:03 PDT 2004
PatchSet 4852
Date: 2004/06/21 16:15:30
Author: dalibor
Branch: HEAD
Tag: (none)
Log:
Moved verifier to its own module
2004-06-21 Dalibor Topic <robilad at kaffe.org>
Moved verifier to its own module.
* kaffe/kaffevm/verify-block.c,
kaffe/kaffevm/verify-block.h,
kaffe/kaffevm/verify-debug.c,
kaffe/kaffevm/verify-debug.h,
kaffe/kaffevm/verify-errors.h,
kaffe/kaffevm/verify-sigstack.c,
kaffe/kaffevm/verify-sigstack.h,
kaffe/kaffevm/verify-type.c,
kaffe/kaffevm/verify-type.h,
kaffe/kaffevm/verify-uninit.c,
kaffe/kaffevm/verify-uninit.h,
kaffe/kaffevm/verify.c,
kaffe/kaffevm/verify.h,
kaffe/kaffevm/verify2.c:
Removed. Moved over to own module in verifier.
* kaffe/kaffevm/verifier/verify-block.c,
kaffe/kaffevm/verifier/verify-block.h,
kaffe/kaffevm/verifier/verify-debug.c,
kaffe/kaffevm/verifier/verify-debug.h,
kaffe/kaffevm/verifier/verify-errors.h,
kaffe/kaffevm/verifier/verify-sigstack.c,
kaffe/kaffevm/verifier/verify-sigstack.h,
kaffe/kaffevm/verifier/verify-type.c,
kaffe/kaffevm/verifier/verify-type.h,
kaffe/kaffevm/verifier/verify-uninit.c,
kaffe/kaffevm/verifier/verify-uninit.h,
kaffe/kaffevm/verifier/verify.c,
kaffe/kaffevm/verifier/verify.h,
kaffe/kaffevm/verifier/verify2.c,
kaffe/kaffevm/verifier/Makefile.am,
kaffe/kaffevm/verifier/Makefile.in:
New files.
* configure.ac:
Output kaffe/kaffevm/verifier/Makefile.
* configure,
kaffe/kaffevm/Makefile.in:
Regenerated.
* kaffe/kaffevm/Makefile.am:
(SUBDIRS, DIST_SUBDIRS) Added verifier.
(AM_CPPFLAGS) Added verifier directory.
(libkaffevm_la_DEPENDENCIES) Added verifier library.
Reported by: Rob Gonzalez <rob at kaffe.org>
Members:
ChangeLog:1.2419->1.2420
configure:1.332->1.333
configure.ac:1.31->1.32
kaffe/kaffevm/Makefile.am:1.60->1.61
kaffe/kaffevm/Makefile.in:1.154->1.155
kaffe/kaffevm/verify-block.c:1.2->1.3(DEAD)
kaffe/kaffevm/verify-block.h:1.2->1.3(DEAD)
kaffe/kaffevm/verify-debug.c:1.3->1.4(DEAD)
kaffe/kaffevm/verify-debug.h:1.4->1.5(DEAD)
kaffe/kaffevm/verify-errors.h:1.1->1.2(DEAD)
kaffe/kaffevm/verify-sigstack.c:1.1->1.2(DEAD)
kaffe/kaffevm/verify-sigstack.h:1.2->1.3(DEAD)
kaffe/kaffevm/verify-type.c:1.2->1.3(DEAD)
kaffe/kaffevm/verify-type.h:1.1->1.2(DEAD)
kaffe/kaffevm/verify-uninit.c:1.1->1.2(DEAD)
kaffe/kaffevm/verify-uninit.h:1.3->1.4(DEAD)
kaffe/kaffevm/verify.c:1.77->1.78(DEAD)
kaffe/kaffevm/verify.h:1.11->1.12(DEAD)
kaffe/kaffevm/verify2.c:1.1->1.2(DEAD)
kaffe/kaffevm/verifier/Makefile.am:INITIAL->1.1
kaffe/kaffevm/verifier/Makefile.in:INITIAL->1.1
kaffe/kaffevm/verifier/verify-block.c:INITIAL->1.1
kaffe/kaffevm/verifier/verify-block.h:INITIAL->1.1
kaffe/kaffevm/verifier/verify-debug.c:INITIAL->1.1
kaffe/kaffevm/verifier/verify-debug.h:INITIAL->1.1
kaffe/kaffevm/verifier/verify-errors.h:INITIAL->1.1
kaffe/kaffevm/verifier/verify-sigstack.c:INITIAL->1.1
kaffe/kaffevm/verifier/verify-sigstack.h:INITIAL->1.1
kaffe/kaffevm/verifier/verify-type.c:INITIAL->1.1
kaffe/kaffevm/verifier/verify-type.h:INITIAL->1.1
kaffe/kaffevm/verifier/verify-uninit.c:INITIAL->1.1
kaffe/kaffevm/verifier/verify-uninit.h:INITIAL->1.1
kaffe/kaffevm/verifier/verify.c:INITIAL->1.1
kaffe/kaffevm/verifier/verify.h:INITIAL->1.1
kaffe/kaffevm/verifier/verify2.c:INITIAL->1.1
Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2419 kaffe/ChangeLog:1.2420
--- kaffe/ChangeLog:1.2419 Sat Jun 19 21:13:42 2004
+++ kaffe/ChangeLog Mon Jun 21 16:15:30 2004
@@ -1,3 +1,55 @@
+2004-06-21 Dalibor Topic <robilad at kaffe.org>
+
+ Moved verifier to its own module.
+
+ * kaffe/kaffevm/verify-block.c,
+ kaffe/kaffevm/verify-block.h,
+ kaffe/kaffevm/verify-debug.c,
+ kaffe/kaffevm/verify-debug.h,
+ kaffe/kaffevm/verify-errors.h,
+ kaffe/kaffevm/verify-sigstack.c,
+ kaffe/kaffevm/verify-sigstack.h,
+ kaffe/kaffevm/verify-type.c,
+ kaffe/kaffevm/verify-type.h,
+ kaffe/kaffevm/verify-uninit.c,
+ kaffe/kaffevm/verify-uninit.h,
+ kaffe/kaffevm/verify.c,
+ kaffe/kaffevm/verify.h,
+ kaffe/kaffevm/verify2.c:
+ Removed. Moved over to own module in verifier.
+
+ * kaffe/kaffevm/verifier/verify-block.c,
+ kaffe/kaffevm/verifier/verify-block.h,
+ kaffe/kaffevm/verifier/verify-debug.c,
+ kaffe/kaffevm/verifier/verify-debug.h,
+ kaffe/kaffevm/verifier/verify-errors.h,
+ kaffe/kaffevm/verifier/verify-sigstack.c,
+ kaffe/kaffevm/verifier/verify-sigstack.h,
+ kaffe/kaffevm/verifier/verify-type.c,
+ kaffe/kaffevm/verifier/verify-type.h,
+ kaffe/kaffevm/verifier/verify-uninit.c,
+ kaffe/kaffevm/verifier/verify-uninit.h,
+ kaffe/kaffevm/verifier/verify.c,
+ kaffe/kaffevm/verifier/verify.h,
+ kaffe/kaffevm/verifier/verify2.c,
+ kaffe/kaffevm/verifier/Makefile.am,
+ kaffe/kaffevm/verifier/Makefile.in:
+ New files.
+
+ * configure.ac:
+ Output kaffe/kaffevm/verifier/Makefile.
+
+ * configure,
+ kaffe/kaffevm/Makefile.in:
+ Regenerated.
+
+ * kaffe/kaffevm/Makefile.am:
+ (SUBDIRS, DIST_SUBDIRS) Added verifier.
+ (AM_CPPFLAGS) Added verifier directory.
+ (libkaffevm_la_DEPENDENCIES) Added verifier library.
+
+ Reported by: Rob Gonzalez <rob at kaffe.org>
+
2004-06-17 Julian Scheid <julian at sektor37.de>
* configure.ac,
Index: kaffe/configure
diff -u kaffe/configure:1.332 kaffe/configure:1.333
--- kaffe/configure:1.332 Sat Jun 19 21:13:44 2004
+++ kaffe/configure Mon Jun 21 16:15:33 2004
@@ -54537,6 +54537,8 @@
ac_config_files="$ac_config_files kaffe/kaffevm/systems/unix-pthreads/Makefile"
+ ac_config_files="$ac_config_files kaffe/kaffevm/verifier/Makefile"
+
ac_config_files="$ac_config_files kaffe/kaffe/Makefile"
ac_config_files="$ac_config_files kaffe/kaffeh/Makefile"
@@ -55411,6 +55413,7 @@
"kaffe/kaffevm/systems/oskit-pthreads/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/oskit-pthreads/Makefile" ;;
"kaffe/kaffevm/systems/beos-native/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/beos-native/Makefile" ;;
"kaffe/kaffevm/systems/unix-pthreads/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/systems/unix-pthreads/Makefile" ;;
+ "kaffe/kaffevm/verifier/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffevm/verifier/Makefile" ;;
"kaffe/kaffe/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffe/Makefile" ;;
"kaffe/kaffeh/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/kaffeh/Makefile" ;;
"kaffe/xprof/Makefile" ) CONFIG_FILES="$CONFIG_FILES kaffe/xprof/Makefile" ;;
Index: kaffe/configure.ac
diff -u kaffe/configure.ac:1.31 kaffe/configure.ac:1.32
--- kaffe/configure.ac:1.31 Sat Jun 19 21:13:50 2004
+++ kaffe/configure.ac Mon Jun 21 16:15:58 2004
@@ -1943,6 +1943,7 @@
AC_CONFIG_FILES([kaffe/kaffevm/systems/oskit-pthreads/Makefile])
AC_CONFIG_FILES([kaffe/kaffevm/systems/beos-native/Makefile])
AC_CONFIG_FILES([kaffe/kaffevm/systems/unix-pthreads/Makefile])
+AC_CONFIG_FILES([kaffe/kaffevm/verifier/Makefile])
AC_CONFIG_FILES([kaffe/kaffe/Makefile])
AC_CONFIG_FILES([kaffe/kaffeh/Makefile])
AC_CONFIG_FILES([kaffe/xprof/Makefile])
Index: kaffe/kaffe/kaffevm/Makefile.am
diff -u kaffe/kaffe/kaffevm/Makefile.am:1.60 kaffe/kaffe/kaffevm/Makefile.am:1.61
--- kaffe/kaffe/kaffevm/Makefile.am:1.60 Sat Jun 19 21:13:56 2004
+++ kaffe/kaffe/kaffevm/Makefile.am Mon Jun 21 16:16:06 2004
@@ -1,13 +1,16 @@
-# Makefile.in for kaffevm - a Java(tm) compatible virtual machine.
+# Makefile.am for kaffevm - a Java(tm) compatible virtual machine.
#
# Copyright (c) 1996, 1997, 1998, 1999
# Transvirtual Technologies, Inc. All rights reserved.
#
+# Copyright (c) 2004
+# Kaffe.org contributors, see ChangeLogs for details. All rights reserved.
+#
# See the file "license.terms" for information on usage and redistribution
# of this file.
-SUBDIRS = $(ENGINE_NAME) systems gcj
-DIST_SUBDIRS = intrp jit jit3 systems gcj
+SUBDIRS = $(ENGINE_NAME) systems gcj verifier
+DIST_SUBDIRS = intrp jit jit3 systems gcj verifier
EXTRA_DIST = \
kaffe.def \
@@ -20,7 +23,15 @@
systems/win32/winthread.h
@engine_frag@
-AM_CPPFLAGS = -I$(top_srcdir)/kaffe/kaffevm/$(THREAD_DIR) $(ENGINE_INCLUDES) -I$(top_srcdir)/libltdl $(ENGINE_DEFS) -I$(top_srcdir)/kaffe/jvmpi -I$(top_srcdir)/kaffe/xprof -I$(top_builddir)/include
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/kaffe/kaffevm/$(THREAD_DIR) \
+ $(ENGINE_INCLUDES) \
+ -I$(top_srcdir)/libltdl \
+ $(ENGINE_DEFS) \
+ -I$(top_srcdir)/kaffe/jvmpi \
+ -I$(top_srcdir)/kaffe/xprof \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/kaffe/kaffevm/verifier
native_LTLIBRARIES = libkaffevm.la
@@ -43,7 +54,8 @@
$(LIBLTDL) \
$(ENGINE_NAME)/libengine.la \
$(libgcj) \
- systems/$(THREAD_SYSTEM)/libkthread.la
+ systems/$(THREAD_SYSTEM)/libkthread.la \
+ verifier/libkaffeverifier.la
libkaffevm_la_LIBADD = \
$(libkaffevm_la_DEPENDENCIES) \
@@ -93,13 +105,6 @@
utf8const.c \
gcFuncs.c \
gcRefs.c \
- verify.c \
- verify2.c \
- verify-block.c \
- verify-debug.c \
- verify-sigstack.c \
- verify-type.c \
- verify-uninit.c \
../../binreloc/prefix.c
noinst_HEADERS = \
@@ -142,13 +147,6 @@
thread.h \
threadData.h \
utf8const.h \
- verify.h \
- verify-block.h \
- verify-debug.h \
- verify-sigstack.h \
- verify-type.h \
- verify-uninit.h \
- verify-errors.h \
../../binreloc/prefix.h
gc-mem.c: stamp-h01
Index: kaffe/kaffe/kaffevm/Makefile.in
diff -u kaffe/kaffe/kaffevm/Makefile.in:1.154 kaffe/kaffe/kaffevm/Makefile.in:1.155
--- kaffe/kaffe/kaffevm/Makefile.in:1.154 Sat Jun 19 21:13:57 2004
+++ kaffe/kaffe/kaffevm/Makefile.in Mon Jun 21 16:16:07 2004
@@ -14,11 +14,14 @@
@SET_MAKE@
-# Makefile.in for kaffevm - a Java(tm) compatible virtual machine.
+# Makefile.am for kaffevm - a Java(tm) compatible virtual machine.
#
# Copyright (c) 1996, 1997, 1998, 1999
# Transvirtual Technologies, Inc. All rights reserved.
#
+# Copyright (c) 2004
+# Kaffe.org contributors, see ChangeLogs for details. All rights reserved.
+#
# See the file "license.terms" for information on usage and redistribution
# of this file.
@@ -78,7 +81,8 @@
am__DEPENDENCIES_1 =
@HAVE_GCJ_SUPPORT_TRUE at am__DEPENDENCIES_2 = gcj/libgcj.la
am__DEPENDENCIES_3 = $(am__DEPENDENCIES_1) $(ENGINE_NAME)/libengine.la \
- $(am__DEPENDENCIES_2) systems/$(THREAD_SYSTEM)/libkthread.la
+ $(am__DEPENDENCIES_2) systems/$(THREAD_SYSTEM)/libkthread.la \
+ verifier/libkaffeverifier.la
am_libkaffevm_la_OBJECTS = access.lo baseClasses.lo classMethod.lo \
classPool.lo methodCache.lo code-analyse.lo code.lo \
constants.lo debug.lo exception.lo external.lo file.lo \
@@ -86,8 +90,7 @@
jar.lo jni.lo ksem.lo locks.lo lookup.lo object.lo \
readClass.lo soft.lo stackTrace.lo stats.lo string.lo \
stringParsing.lo support.lo thread.lo utf8const.lo gcFuncs.lo \
- gcRefs.lo verify.lo verify2.lo verify-block.lo verify-debug.lo \
- verify-sigstack.lo verify-type.lo verify-uninit.lo prefix.lo
+ gcRefs.lo prefix.lo
am__objects_1 = gc-mem.lo md.lo
nodist_libkaffevm_la_OBJECTS = $(am__objects_1)
libkaffevm_la_OBJECTS = $(am_libkaffevm_la_OBJECTS) \
@@ -116,13 +119,7 @@
@AMDEP_TRUE@ ./$(DEPDIR)/stats.Plo ./$(DEPDIR)/string.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/stringParsing.Plo \
@AMDEP_TRUE@ ./$(DEPDIR)/support.Plo ./$(DEPDIR)/thread.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/utf8const.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/verify-block.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/verify-debug.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/verify-sigstack.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/verify-type.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/verify-uninit.Plo \
- at AMDEP_TRUE@ ./$(DEPDIR)/verify.Plo ./$(DEPDIR)/verify2.Plo
+ at AMDEP_TRUE@ ./$(DEPDIR)/utf8const.Plo
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
@@ -386,8 +383,8 @@
target_alias = @target_alias@
toolslibdir = @toolslibdir@
with_engine = @with_engine@
-SUBDIRS = $(ENGINE_NAME) systems gcj
-DIST_SUBDIRS = intrp jit jit3 systems gcj
+SUBDIRS = $(ENGINE_NAME) systems gcj verifier
+DIST_SUBDIRS = intrp jit jit3 systems gcj verifier
EXTRA_DIST = \
kaffe.def \
mem/gc-incremental.c \
@@ -398,7 +395,16 @@
systems/win32/winthread.c \
systems/win32/winthread.h
-AM_CPPFLAGS = -I$(top_srcdir)/kaffe/kaffevm/$(THREAD_DIR) $(ENGINE_INCLUDES) -I$(top_srcdir)/libltdl $(ENGINE_DEFS) -I$(top_srcdir)/kaffe/jvmpi -I$(top_srcdir)/kaffe/xprof -I$(top_builddir)/include
+AM_CPPFLAGS = \
+ -I$(top_srcdir)/kaffe/kaffevm/$(THREAD_DIR) \
+ $(ENGINE_INCLUDES) \
+ -I$(top_srcdir)/libltdl \
+ $(ENGINE_DEFS) \
+ -I$(top_srcdir)/kaffe/jvmpi \
+ -I$(top_srcdir)/kaffe/xprof \
+ -I$(top_builddir)/include \
+ -I$(top_srcdir)/kaffe/kaffevm/verifier
+
native_LTLIBRARIES = libkaffevm.la
@HAVE_GCJ_SUPPORT_FALSE at libgcj = #
@HAVE_GCJ_SUPPORT_TRUE at libgcj = gcj/libgcj.la
@@ -411,7 +417,8 @@
$(LIBLTDL) \
$(ENGINE_NAME)/libengine.la \
$(libgcj) \
- systems/$(THREAD_SYSTEM)/libkthread.la
+ systems/$(THREAD_SYSTEM)/libkthread.la \
+ verifier/libkaffeverifier.la
libkaffevm_la_LIBADD = \
$(libkaffevm_la_DEPENDENCIES) \
@@ -461,13 +468,6 @@
utf8const.c \
gcFuncs.c \
gcRefs.c \
- verify.c \
- verify2.c \
- verify-block.c \
- verify-debug.c \
- verify-sigstack.c \
- verify-type.c \
- verify-uninit.c \
../../binreloc/prefix.c
noinst_HEADERS = \
@@ -510,13 +510,6 @@
thread.h \
threadData.h \
utf8const.h \
- verify.h \
- verify-block.h \
- verify-debug.h \
- verify-sigstack.h \
- verify-type.h \
- verify-uninit.h \
- verify-errors.h \
../../binreloc/prefix.h
CLEANFILES = so_locations
@@ -628,13 +621,6 @@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/support.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/thread.Plo at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/utf8const.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/verify-block.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/verify-debug.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/verify-sigstack.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/verify-type.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/verify-uninit.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/verify.Plo at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/verify2.Plo at am__quote@
.c.o:
@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
===================================================================
Checking out kaffe/kaffe/kaffevm/verify-block.c
RCS: /home/cvs/kaffe/kaffe/kaffe/kaffevm/Attic/verify-block.c,v
VERS: 1.2
***************
--- kaffe/kaffe/kaffevm/verify-block.c Mon Jun 21 16:30:09 2004
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,121 +0,0 @@
-/*
- * verify-block.c
- *
- * Copyright 2004
- * Kaffe.org contributors. See ChangeLog for details. All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- *
- * Code for handing of blocks in the verifier.
- */
-
-#include "debug.h"
-#include "verify-block.h"
-
-/*
- * allocate memory for a block info and fill in with default values
- */
-BlockInfo*
-createBlock(const Method* method)
-{
- int i;
-
- BlockInfo* binfo = checkPtr((BlockInfo*)gc_malloc(sizeof(BlockInfo), GC_ALLOC_VERIFIER));
-
- binfo->startAddr = 0;
- binfo->status = IS_INSTRUCTION | START_BLOCK; /* not VISITED or CHANGED */
-
- /* allocate memory for locals */
- if (method->localsz > 0) {
- binfo->locals = checkPtr(gc_malloc(method->localsz * sizeof(Type), GC_ALLOC_VERIFIER));
-
- for (i = 0; i < method->localsz; i++) {
- binfo->locals[i] = *TUNSTABLE;
- }
- } else {
- binfo->locals = NULL;
- }
-
-
- /* allocate memory for operand stack */
- binfo->stacksz = 0;
- if (method->stacksz > 0) {
- binfo->opstack = checkPtr(gc_malloc(method->stacksz * sizeof(Type), GC_ALLOC_VERIFIER));
-
- for (i = 0; i < method->stacksz; i++) {
- binfo->opstack[i] = *TUNSTABLE;
- }
- } else {
- binfo->opstack = NULL;
- }
-
- return binfo;
-}
-
-/*
- * frees the memory of a basic block
- */
-void
-freeBlock(BlockInfo* binfo)
-{
- if (binfo == NULL) return;
-
- if (binfo->locals != NULL)
- gc_free(binfo->locals);
- if (binfo->opstack != NULL)
- gc_free(binfo->opstack);
-
- gc_free(binfo);
-}
-
-/*
- * copies information from one stack of basic blocks to another
- */
-void
-copyBlockData(const Method* method, BlockInfo* fromBlock, BlockInfo* toBlock)
-{
- toBlock->startAddr = fromBlock->startAddr;
- toBlock->lastAddr = fromBlock->lastAddr;
-
- copyBlockState(method, fromBlock, toBlock);
-}
-
-/*
- * copies the local variables, operand stack, status, and context
- * from one block to another.
- */
-void
-copyBlockState(const Method* method, BlockInfo* fromBlock, BlockInfo* toBlock)
-{
- uint32 n;
-
- toBlock->status = fromBlock->status;
-
- for (n = 0; n < method->localsz; n++) {
- toBlock->locals[n] = fromBlock->locals[n];
- }
-
- toBlock->stacksz = fromBlock->stacksz;
- for (n = 0; n < method->stacksz; n++) {
- toBlock->opstack[n] = fromBlock->opstack[n];
- }
-}
-
-/*
- * returns which block the given pc is in
- */
-BlockInfo*
-inWhichBlock(uint32 pc, BlockInfo** blocks, uint32 numBlocks)
-{
- uint32 i;
- for (i = 0; i < numBlocks; i++) {
- if (pc < blocks[i]->startAddr) continue;
- if (pc <= blocks[i]->lastAddr) return blocks[i];
- }
-
- /* shouldn't ever get here unless the specified PC is messed up */
- DBG(VERIFY3, dprintf("inWhichBlock(...): pc = %d out of range...weird.\n", pc); );
-
- return NULL;
-}
===================================================================
Checking out kaffe/kaffe/kaffevm/verify-block.h
RCS: /home/cvs/kaffe/kaffe/kaffe/kaffevm/Attic/verify-block.h,v
VERS: 1.2
***************
--- kaffe/kaffe/kaffevm/verify-block.h Mon Jun 21 16:30:10 2004
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,84 +0,0 @@
-/*
- * verify-block.h
- *
- * Copyright 2004
- * Kaffe.org contributors. See ChangeLog for details. All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- *
- * Interface to code for handing of blocks in the verifier.
- */
-
-#if !defined(VERIFY_BLOCK_H)
-#define VERIFY_BLOCK_H
-
-#include "gtypes.h"
-#include "verify-type.h"
-
-/*
- * basic block header information
- */
-typedef struct block_info
-{
- /* address of start of block */
- uint32 startAddr;
- uint32 lastAddr; /* whether it be the address of a GOTO, etc. */
-
- /* status of block...
- * changed (needs to be re-evaluated), visited, etc.
- */
- uint32 status;
-
- /* array of local variables */
- Type* locals;
-
- /* simulated operand stack */
- uint32 stacksz;
- Type* opstack;
-} BlockInfo;
-
-/* status flags for a basic block.
- * these also pertain to the status[] array for the entire instruction array
- */
-#define CHANGED 1
-#define VISITED 2
-#define IS_INSTRUCTION 4
-
-/* if the instruction is preceeded by WIDE */
-#define WIDE_MODDED 8
-
-/* used at the instruction status level to find basic blocks */
-#define START_BLOCK 16
-#define END_BLOCK 32
-
-#define EXCEPTION_HANDLER 64
-
-/*
- * allocate memory for a block info and fill in with default values
- */
-extern BlockInfo* createBlock(const Method* method);
-
-/*
- * frees the memory of a basic block
- */
-extern void freeBlock(BlockInfo* binfo);
-
-/*
- * copies information from one stack of basic blocks to another
- */
-extern void copyBlockData(const Method* method, BlockInfo* fromBlock, BlockInfo* toBlock);
-
-/*
- * copies the local variables, operand stack, status, and context
- * from one block to another.
- */
-extern void copyBlockState(const Method* method, BlockInfo* fromBlock, BlockInfo* toBlock);
-
-/*
- * returns which block the given pc is in
- */
-extern BlockInfo* inWhichBlock(uint32 pc, BlockInfo** blocks, uint32 numBlocks);
-
-#endif /* !defined(VERIFY_BLOCK_H) */
-
===================================================================
Checking out kaffe/kaffe/kaffevm/verify-debug.c
RCS: /home/cvs/kaffe/kaffe/kaffe/kaffevm/Attic/verify-debug.c,v
VERS: 1.3
***************
--- kaffe/kaffe/kaffevm/verify-debug.c Mon Jun 21 16:30:10 2004
+++ /dev/null Sun Aug 4 19:57:58 2002
@@ -1,518 +0,0 @@
-/*
- * verify-debug.c
- *
- * Copyright 2004
- * Kaffe.org contributors. See ChangeLog for details. All rights reserved.
- *
- * See the file "license.terms" for information on usage and redistribution
- * of this file.
- *
- * Debugging code for the verifier.
- */
-
-#include "debug.h"
-#include "verify.h"
-#include "verify-uninit.h"
-
-/* for debugging */
-#if !(defined(NDEBUG) || !defined(KAFFE_VMDEBUG))
-
-const char* indent = " ";
-const char* indent2 = " ";
-
-uint32
-printConstantPoolEntry(const Hjava_lang_Class* class, uint32 idx)
-{
- const constants* pool = CLASS_CONSTANTS(class);
-
- switch (pool->tags[idx]) {
- case CONSTANT_Utf8:
- DBG(VERIFY2, dprintf(" UTF8: %s", CONST_UTF2CHAR(idx, pool)) );
- break;
-
-
- case CONSTANT_Long:
- case CONSTANT_Double:
- idx++;
- case CONSTANT_Integer:
- case CONSTANT_Float:
- DBG(VERIFY2, dprintf(" NUMERICAL"); );
- break;
-
-
- case CONSTANT_ResolvedString:
- case CONSTANT_ResolvedClass:
- DBG(VERIFY2, dprintf(" RESOLVED: %s",
- ((Hjava_lang_Class*)pool->data[idx])->name->data); );
- break;
-
-
-
- case CONSTANT_Class:
- DBG(VERIFY2, dprintf(" UNRESOLVED CLASS: %s", CLASS_NAMED(idx, pool)); );
- break;
-
- case CONSTANT_String:
- DBG(VERIFY2, dprintf(" STRING: %s", CONST_STRING_NAMED(idx, pool)); );
- break;
-
-
-
- case CONSTANT_Fieldref:
- DBG(VERIFY2, dprintf(" FIELDREF: %s --type-- %s",
- FIELDREF_NAMED(idx, pool), FIELDREF_SIGD(idx, pool)); );
- break;
-
- case CONSTANT_Methodref:
- DBG(VERIFY2, dprintf(" METHODREF: %s --type-- %s",
- METHODREF_NAMED(idx, pool), METHODREF_SIGD(idx, pool)); );
- break;
-
-
- case CONSTANT_InterfaceMethodref:
- DBG(VERIFY2, dprintf(" INTERFACEMETHODREF: %s --type-- %s",
- INTERFACEMETHODREF_NAMED(idx, pool), INTERFACEMETHODREF_SIGD(idx, pool)); );
- break;
-
-
- case CONSTANT_NameAndType:
- DBG(VERIFY2, dprintf(" NAMEANDTYPE: %s --and-- %s",
- NAMEANDTYPE_NAMED(idx, pool), NAMEANDTYPE_SIGD(idx, pool)); );
- break;
-
- default:
- DBG(VERIFY2, dprintf(" *** UNRECOGNIZED CONSTANT POOL ENTRY in class %s *** ",
- CLASS_CNAME(class)); );
- }
-
- return idx;
-}
-
-void
-printConstantPool(const Hjava_lang_Class* class)
-{
- uint32 idx;
- const constants *pool = CLASS_CONSTANTS(class);
-
- DBG(VERIFY2, dprintf(" CONSTANT POOL FOR %s\n", class->name->data); );
-
- for (idx = 1; idx < pool->size; idx++) {
- DBG(VERIFY2, dprintf(" %d", idx); );
-
- idx = printConstantPoolEntry(class, idx);
-
- DBG(VERIFY2, dprintf("\n"); );
- }
-}
-
-/*
- * printInstruction()
- * prints out a string representation of the instruction.
- *
- * TODO: print out extra information with the instruction.
- */
-void
-printInstruction(const int opcode)
-{
-#define PRINT(_OP) dprintf("%s", _OP); return;
-
- switch(opcode) {
- case 0: PRINT("NOP");
-
- case 1: PRINT("ACONST-null");
-
- case 2: PRINT("ICONST_M1");
- case 3: PRINT("ICONST_0");
- case 4: PRINT("ICONST_1");
- case 5: PRINT("ICONST_2");
- case 6: PRINT("ICONST_3");
- case 7: PRINT("ICONST_4");
- case 8: PRINT("ICONST_5");
-
- case 9: PRINT("LCONST_0");
- case 10: PRINT("LCONST_1");
-
- case 11: PRINT("FCONST_0");
- case 12: PRINT("FCONST_1");
- case 13: PRINT("FCONST_2");
-
- case 14: PRINT("DCONST_0");
- case 15: PRINT("DCONST_1");
-
- case 16: PRINT("BIPUSH");
- case 17: PRINT("SIPUSH");
-
- case 18: PRINT("LDC");
- case 19: PRINT("LDC_W");
- case 20: PRINT("LDC2_W");
-
- case 21: PRINT("ILOAD");
- case 22: PRINT("LLOAD");
- case 23: PRINT("FLOAD");
- case 24: PRINT("DLOAD");
- case 25: PRINT("ALOAD");
-
- case 26: PRINT("ILOAD_0");
- case 27: PRINT("ILOAD_1");
- case 28: PRINT("ILOAD_2");
- case 29: PRINT("ILOAD_3");
-
- case 30: PRINT("LLOAD_0");
- case 31: PRINT("LLOAD_1");
- case 32: PRINT("LLOAD_2");
- case 33: PRINT("LLOAD_3");
-
- case 34: PRINT("FLOAD_0");
- case 35: PRINT("FLOAD_1");
- case 36: PRINT("FLOAD_2");
- case 37: PRINT("FLOAD_3");
-
- case 38: PRINT("DLOAD_0");
- case 39: PRINT("DLOAD_1");
- case 40: PRINT("DLOAD_2");
- case 41: PRINT("DLOAD_3");
-
- case 42: PRINT("ALOAD_0");
- case 43: PRINT("ALOAD_1");
- case 44: PRINT("ALOAD_2");
- case 45: PRINT("ALOAD_3");
-
- case 46: PRINT("IALOAD");
- case 47: PRINT("LALOAD");
- case 48: PRINT("FALOAD");
- case 49: PRINT("DALOAD");
- case 50: PRINT("AALOAD");
- case 51: PRINT("BALOAD");
- case 52: PRINT("CALOAD");
- case 53: PRINT("SALOAD");
-
- case 54: PRINT("ISTORE");
- case 55: PRINT("LSTORE");
- case 56: PRINT("FSTORE");
- case 57: PRINT("DSTORE");
- case 58: PRINT("ASTORE");
-
- case 59: PRINT("ISTORE_0");
- case 60: PRINT("ISTORE_1");
- case 61: PRINT("ISTORE_2");
- case 62: PRINT("ISTORE_3");
-
- case 63: PRINT("LSTORE_0");
- case 64: PRINT("LSTORE_1");
- case 65: PRINT("LSTORE_2");
- case 66: PRINT("LSTORE_3");
-
- case 67: PRINT("FSTORE_0");
- case 68: PRINT("FSTORE_1");
- case 69: PRINT("FSTORE_2");
- case 70: PRINT("FSTORE_3");
-
- case 71: PRINT("DSTORE_0");
- case 72: PRINT("DSTORE_1");
- case 73: PRINT("DSTORE_2");
- case 74: PRINT("DSTORE_3");
-
- case 75: PRINT("ASTORE_0");
- case 76: PRINT("ASTORE_1");
- case 77: PRINT("ASTORE_2");
- case 78: PRINT("ASTORE_3");
-
- case 79: PRINT("IASTORE");
- case 80: PRINT("LASTORE");
- case 81: PRINT("FASTORE");
- case 82: PRINT("DASTORE");
- case 83: PRINT("AASTORE");
- case 84: PRINT("BASTORE");
- case 85: PRINT("CASTORE");
- case 86: PRINT("SASTORE");
-
- case 87: PRINT("POP");
- case 88: PRINT("POP_W");
-
- case 89: PRINT("DUP");
- case 90: PRINT("DUP_X1");
- case 91: PRINT("DUP_X2");
- case 92: PRINT("DUP2");
- case 93: PRINT("DUP2_X1");
- case 94: PRINT("DUP2_X2");
-
- case 95: PRINT("SWAP");
-
- case 96: PRINT("IADD");
- case 97: PRINT("LADD");
- case 98: PRINT("FADD");
- case 99: PRINT("DADD");
-
- case 100: PRINT("ISUB");
- case 101: PRINT("LSUB");
- case 102: PRINT("FSUB");
- case 103: PRINT("DSUB");
-
- case 104: PRINT("IMUL");
- case 105: PRINT("LMUL");
- case 106: PRINT("FMUL");
- case 107: PRINT("DMUL");
-
- case 108: PRINT("IDIV");
- case 109: PRINT("LDIV");
- case 110: PRINT("FDIV");
- case 111: PRINT("DDIV");
-
- case 112: PRINT("IREM");
- case 113: PRINT("LREM");
- case 114: PRINT("FREM");
- case 115: PRINT("DREM");
-
- case 116: PRINT("INEG");
- case 117: PRINT("LNEG");
- case 118: PRINT("FNEG");
- case 119: PRINT("DNEG");
-
- case 120: PRINT("ISHL");
- case 121: PRINT("LSHL");
- case 122: PRINT("FSHL");
- case 123: PRINT("DSHL");
-
- case 124: PRINT("IUSHR");
- case 125: PRINT("LUSHR");
-
- case 126: PRINT("IAND");
- case 127: PRINT("LAND");
-
- case 128: PRINT("IOR");
- case 129: PRINT("LOR");
-
- case 130: PRINT("IXOR");
- case 131: PRINT("LXOR");
-
- case 132: PRINT("IINC");
-
- case 133: PRINT("I2L");
- case 134: PRINT("I2F");
- case 135: PRINT("I2D");
- case 136: PRINT("L2I");
- case 137: PRINT("L2F");
- case 138: PRINT("L2D");
- case 139: PRINT("F2I");
- case 140: PRINT("F2L");
- case 141: PRINT("F2D");
- case 142: PRINT("D2I");
- case 143: PRINT("D2L");
- case 144: PRINT("D2F");
- case 145: PRINT("I2B");
- case 146: PRINT("I2C");
- case 147: PRINT("I2S");
-
- case 148: PRINT("LCMP");
- case 149: PRINT("FCMPL");
- case 150: PRINT("FCMPG");
- case 151: PRINT("DCMPL");
- case 152: PRINT("DCMPG");
-
- case 153: PRINT("IFEQ");
- case 154: PRINT("IFNE");
- case 155: PRINT("IFLT");
- case 156: PRINT("IFGE");
- case 157: PRINT("IFGT");
- case 158: PRINT("IFLE");
-
- case 159: PRINT("IF_ICMPEQ");
- case 160: PRINT("IF_ICMPNE");
- case 161: PRINT("IF_ICMPLT");
- case 162: PRINT("IF_ICMPGE");
- case 163: PRINT("IF_ICMPGT");
- case 164: PRINT("IF_ICMPLE");
- case 165: PRINT("IF_ACMPEQ");
- case 166: PRINT("IF_ACMPNE");
-
- case 167: PRINT("GOTO");
-
- case 168: PRINT("JSR");
- case 169: PRINT("RET");
-
- case 170: PRINT("TABLESWITCH");
- case 171: PRINT("LOOKUPSWITCH");
-
- case 172: PRINT("IRETURN");
- case 173: PRINT("LRETURN");
- case 174: PRINT("FRETURN");
- case 175: PRINT("DRETURN");
- case 176: PRINT("ARETURN");
- case 177: PRINT("RETURN");
-
- case 178: PRINT("GETSTATIC");
- case 179: PRINT("PUTSTATIC");
-
- case 180: PRINT("GETFIELD");
- case 181: PRINT("PUTFIELD");
-
- case 182: PRINT("INVOKEVIRTUAL");
- case 183: PRINT("INVOKESPECIAL");
- case 184: PRINT("INVOKESTATIC");
- case 185: PRINT("INVOKEINTERFACE");
-
- case 187: PRINT("NEW");
-
- case 188: PRINT("NEWARRAY");
- case 189: PRINT("ANEWARRAY");
- case 190: PRINT("ARRAYLENGTH");
-
- case 191: PRINT("ATHROW");
-
- case 192: PRINT("CHECKCAST");
- case 193: PRINT("INSTANCEOF");
-
- case 194: PRINT("MONITORENTER");
- case 195: PRINT("MONITOREXIT");
*** Patch too long, truncated ***
More information about the kaffe
mailing list