* Merged with default branch at rev 16f3633aaa5a.
authorMichael Starzinger <michi@complang.tuwien.ac.at>
Thu, 30 Aug 2007 21:17:51 +0000 (23:17 +0200)
committerMichael Starzinger <michi@complang.tuwien.ac.at>
Thu, 30 Aug 2007 21:17:51 +0000 (23:17 +0200)
--HG--
branch : exact-gc

598 files changed:
.hgignore [new file with mode: 0644]
ChangeLog-2006 [new file with mode: 0644]
Makefile.am
THIRDPARTY
configure.ac
contrib/Makefile.am
contrib/log2xml.pl [changed mode: 0755->0644]
contrib/mapfile-vers-product [new file with mode: 0644]
contrib/vmlog/COPYING [new file with mode: 0644]
contrib/vmlog/Makefile.am [new file with mode: 0644]
contrib/vmlog/maintain.mk [new file with mode: 0644]
contrib/vmlog/t/Makefile.am [new file with mode: 0644]
contrib/vmlog/t/concat.c [new file with mode: 0644]
contrib/vmlog/t/file.c [new file with mode: 0644]
contrib/vmlog/t/hash.c [new file with mode: 0644]
contrib/vmlog/t/log.c [new file with mode: 0644]
contrib/vmlog/t/memdup.c [new file with mode: 0644]
contrib/vmlog/t/opt.c [new file with mode: 0644]
contrib/vmlog/t/prolog.h [new file with mode: 0644]
contrib/vmlog/t/ring.c [new file with mode: 0644]
contrib/vmlog/t/string.c [new file with mode: 0644]
contrib/vmlog/t/tags.c [new file with mode: 0644]
contrib/vmlog/t/threadhash.c [new file with mode: 0644]
contrib/vmlog/vmlog.c [new file with mode: 0644]
contrib/vmlog/vmlog.h [new file with mode: 0644]
contrib/vmlog/vmlog_cacao.c [new file with mode: 0644]
contrib/vmlog/vmlog_cacao.h [new file with mode: 0644]
contrib/vmlog/vmlog_jamvm.c [new file with mode: 0644]
contrib/vmlog/vmlog_jamvm.h [new file with mode: 0644]
contrib/vmlog/vmlog_jamvm.patch [new file with mode: 0644]
contrib/vmlog/vmlogdiff.c [new file with mode: 0644]
contrib/vmlog/vmlogdump.c [new file with mode: 0644]
contrib/vmlog/vmlogfilter.c [new file with mode: 0644]
contrib/vmlog/vmlogindex.c [new file with mode: 0644]
doc/Makefile.am
doc/handbook/Makefile.am
m4/annotations.m4 [new file with mode: 0644]
m4/cacaoh.m4 [new file with mode: 0644]
m4/classpath.m4
m4/java.m4
m4/jit.m4
m4/jni.m4
m4/jre-layout.m4 [new file with mode: 0644]
m4/libjvm.m4 [new file with mode: 0644]
m4/ltdl.m4 [new file with mode: 0644]
m4/soft.m4
m4/staticvm.m4 [new file with mode: 0644]
m4/threads.m4 [new file with mode: 0644]
m4/zlib.m4 [new file with mode: 0644]
man/Makefile.am
src/Makefile.am
src/cacao/Makefile.am
src/cacao/cacao.c
src/cacaoh/Makefile.am
src/cacaoh/cacaoh.c
src/cacaoh/dummy.c
src/cacaoh/headers.c
src/cacaoh/headers.h
src/fdlibm/Makefile.am
src/lib/Makefile.am
src/lib/cldc1.1/com/sun/cldchi/jvm/FileDescriptor.java [new file with mode: 0644]
src/lib/gnu/gnu/classpath/VMStackWalker.java [new file with mode: 0644]
src/lib/gnu/gnu/classpath/VMSystemProperties.java [new file with mode: 0644]
src/lib/gnu/gnu/java/lang/management/VMMemoryMXBeanImpl.java [new file with mode: 0644]
src/lib/gnu/gnu/java/lang/management/VMRuntimeMXBeanImpl.java [new file with mode: 0644]
src/lib/gnu/java/lang/VMClassLoader.java [new file with mode: 0644]
src/lib/gnu/java/lang/VMString.java [new file with mode: 0644]
src/lib/gnu/java/lang/VMThread.java [new file with mode: 0644]
src/lib/gnu/java/lang/VMThrowable.java [new file with mode: 0644]
src/lib/gnu/java/lang/reflect/Constructor.java [new file with mode: 0644]
src/lib/gnu/java/lang/reflect/Field.java [new file with mode: 0644]
src/lib/gnu/java/lang/reflect/Method.java [new file with mode: 0644]
src/lib/gnu/java/security/VMAccessController.java [new file with mode: 0644]
src/lib/gnu/sun/misc/Unsafe.java [new file with mode: 0644]
src/lib/gnu/sun/reflect/ConstantPool.java [new file with mode: 0644]
src/lib/gnu/sun/reflect/annotation/AnnotationParser.java [new file with mode: 0644]
src/lib/gnu/sun/reflect/annotation/AnnotationType.java [new file with mode: 0644]
src/lib/gnu/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java [new file with mode: 0644]
src/lib/gnu/sun/reflect/annotation/TypeNotPresentExceptionProxy.java [new file with mode: 0644]
src/mm/Makefile.am
src/mm/boehm-gc/callprocs [changed mode: 0755->0644]
src/mm/boehm-gc/cord/de_win.ICO [changed mode: 0755->0644]
src/mm/boehm-gc/doc/README.arm.cross [changed mode: 0755->0644]
src/mm/boehm-gc/win32_threads.c [changed mode: 0755->0644]
src/mm/boehm.c
src/mm/cacao-gc/Makefile.am
src/mm/cacao-gc/compact.c
src/mm/cacao-gc/compact.h
src/mm/cacao-gc/gc.c
src/mm/cacao-gc/gc.h
src/mm/cacao-gc/mark.c
src/mm/gc-common.h
src/mm/memory.c
src/mm/memory.h
src/mm/nogc.c
src/native/Makefile.am
src/native/include/Makefile.am
src/native/jni.c
src/native/jni.h
src/native/jvmti/Makefile.am
src/native/jvmti/cacaodbg.c
src/native/jvmti/cacaodbg.h
src/native/jvmti/cacaodbgserver.c
src/native/jvmti/cacaodbgserver.h
src/native/jvmti/dbg.h
src/native/jvmti/jvmti.c
src/native/jvmti/jvmti.h
src/native/llni.h
src/native/localref.c
src/native/localref.h
src/native/native.c
src/native/native.h
src/native/tools/Makefile.am
src/native/tools/gennativetable.c
src/native/vm/Makefile.am
src/native/vm/cldc1.1/Makefile.am
src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.c
src/native/vm/cldc1.1/com_sun_cldc_io_j2me_socket_Protocol.c
src/native/vm/cldc1.1/com_sun_cldchi_io_ConsoleOutputStream.c
src/native/vm/cldc1.1/com_sun_cldchi_jvm_JVM.c
src/native/vm/cldc1.1/java_lang_Class.c
src/native/vm/cldc1.1/java_lang_Double.c
src/native/vm/cldc1.1/java_lang_Float.c
src/native/vm/cldc1.1/java_lang_Math.c
src/native/vm/cldc1.1/java_lang_Object.c
src/native/vm/cldc1.1/java_lang_Runtime.c
src/native/vm/cldc1.1/java_lang_String.c
src/native/vm/cldc1.1/java_lang_System.c
src/native/vm/cldc1.1/java_lang_Thread.c
src/native/vm/cldc1.1/java_lang_Throwable.c
src/native/vm/gnu/Makefile.am
src/native/vm/gnu/VMjdwp.c
src/native/vm/gnu/VMjdwp.h
src/native/vm/gnu/gnu_classpath_VMStackWalker.c
src/native/vm/gnu/gnu_classpath_VMSystemProperties.c
src/native/vm/gnu/gnu_classpath_jdwp_VMFrame.c
src/native/vm/gnu/gnu_classpath_jdwp_VMMethod.c
src/native/vm/gnu/gnu_classpath_jdwp_VMVirtualMachine.c
src/native/vm/gnu/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c
src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c
src/native/vm/gnu/gnu_java_lang_management_VMRuntimeMXBeanImpl.c
src/native/vm/gnu/gnu_java_lang_management_VMThreadMXBeanImpl.c
src/native/vm/gnu/java_lang_VMClass.c
src/native/vm/gnu/java_lang_VMClassLoader.c
src/native/vm/gnu/java_lang_VMObject.c
src/native/vm/gnu/java_lang_VMRuntime.c
src/native/vm/gnu/java_lang_VMString.c
src/native/vm/gnu/java_lang_VMSystem.c
src/native/vm/gnu/java_lang_VMThread.c
src/native/vm/gnu/java_lang_VMThrowable.c
src/native/vm/gnu/java_lang_management_VMManagementFactory.c
src/native/vm/gnu/java_lang_reflect_Constructor.c
src/native/vm/gnu/java_lang_reflect_Field.c
src/native/vm/gnu/java_lang_reflect_Method.c
src/native/vm/gnu/java_lang_reflect_VMProxy.c
src/native/vm/gnu/java_security_VMAccessController.c
src/native/vm/gnu/java_util_concurrent_atomic_AtomicLong.c
src/native/vm/gnu/sun_reflect_ConstantPool.c
src/native/vm/java_lang_Class.c
src/native/vm/java_lang_Class.h
src/native/vm/java_lang_ClassLoader.c
src/native/vm/java_lang_ClassLoader.h
src/native/vm/java_lang_Object.c
src/native/vm/java_lang_Object.h
src/native/vm/java_lang_Runtime.c
src/native/vm/java_lang_Runtime.h
src/native/vm/java_lang_Thread.c
src/native/vm/java_lang_Thread.h
src/native/vm/java_lang_reflect_Constructor.c [new file with mode: 0644]
src/native/vm/java_lang_reflect_Constructor.h [new file with mode: 0644]
src/native/vm/java_lang_reflect_Method.c
src/native/vm/java_lang_reflect_Method.h
src/native/vm/java_util_concurrent_atomic_AtomicLong.c
src/native/vm/java_util_concurrent_atomic_AtomicLong.h
src/native/vm/nativevm.c
src/native/vm/nativevm.h
src/native/vm/reflect.c
src/native/vm/reflect.h [new file with mode: 0644]
src/native/vm/sun/Makefile.am [new file with mode: 0644]
src/native/vm/sun/jvm.c
src/native/vm/sun_misc_Unsafe.c
src/scripts/Makefile.am
src/scripts/java.in
src/threads/Makefile.am
src/threads/critical.c
src/threads/critical.h
src/threads/lock-common.h [new file with mode: 0644]
src/threads/native/Makefile.am
src/threads/native/generic-primitives.h
src/threads/native/lock.c
src/threads/native/lock.h
src/threads/native/threads.c
src/threads/native/threads.h
src/threads/none/Makefile.am
src/threads/none/lock.h
src/threads/none/threads.h
src/threads/threads-common.c
src/threads/threads-common.h
src/toolbox/Makefile.am
src/toolbox/avl.c
src/toolbox/avl.h
src/toolbox/bitvector.c
src/toolbox/bitvector.h
src/toolbox/chain.c
src/toolbox/chain.h
src/toolbox/hashtable.c
src/toolbox/hashtable.h
src/toolbox/list.c
src/toolbox/list.h
src/toolbox/logging.c
src/toolbox/logging.h
src/toolbox/tree.c
src/toolbox/tree.h
src/toolbox/util.c
src/toolbox/util.h
src/toolbox/worklist.c
src/toolbox/worklist.h
src/vm/Makefile.am
src/vm/access.c
src/vm/access.h
src/vm/array.c
src/vm/array.h
src/vm/builtin.c
src/vm/builtin.h
src/vm/builtintable.inc
src/vm/cycles-stats.c
src/vm/cycles-stats.h
src/vm/exceptions.c
src/vm/exceptions.h
src/vm/finalizer.c
src/vm/finalizer.h
src/vm/global.h
src/vm/initialize.c
src/vm/initialize.h
src/vm/jit/Makefile.am
src/vm/jit/abi-asm.h
src/vm/jit/abi.h
src/vm/jit/allocator/Makefile.am
src/vm/jit/allocator/liveness.c
src/vm/jit/allocator/liveness.h
src/vm/jit/allocator/lsra.c
src/vm/jit/allocator/lsra.h
src/vm/jit/allocator/simplereg.c
src/vm/jit/allocator/simplereg.h
src/vm/jit/alpha/Makefile.am
src/vm/jit/alpha/arch.h
src/vm/jit/alpha/asmpart.S
src/vm/jit/alpha/codegen.c
src/vm/jit/alpha/codegen.h
src/vm/jit/alpha/disass.c
src/vm/jit/alpha/emit.c
src/vm/jit/alpha/freebsd/Makefile.am
src/vm/jit/alpha/freebsd/md-os.c
src/vm/jit/alpha/linux/Makefile.am
src/vm/jit/alpha/linux/md-os.c
src/vm/jit/alpha/md-abi.c
src/vm/jit/alpha/md-abi.h
src/vm/jit/alpha/md-asm.h
src/vm/jit/alpha/md.c
src/vm/jit/alpha/md.h
src/vm/jit/alpha/patcher.c
src/vm/jit/arm/Makefile.am
src/vm/jit/arm/arch.h
src/vm/jit/arm/asmpart.S
src/vm/jit/arm/codegen.c
src/vm/jit/arm/codegen.h
src/vm/jit/arm/disass.c
src/vm/jit/arm/emit.c
src/vm/jit/arm/linux/Makefile.am
src/vm/jit/arm/linux/md-os.c
src/vm/jit/arm/md-abi.c
src/vm/jit/arm/md-abi.h
src/vm/jit/arm/md-asm.h
src/vm/jit/arm/md.c
src/vm/jit/arm/patcher.c
src/vm/jit/asmpart.h
src/vm/jit/cfg.c
src/vm/jit/cfg.h
src/vm/jit/code.c
src/vm/jit/code.h
src/vm/jit/codegen-common.c
src/vm/jit/codegen-common.h
src/vm/jit/disass-common.c
src/vm/jit/disass.h
src/vm/jit/dseg.c
src/vm/jit/dseg.h
src/vm/jit/emit-common.c
src/vm/jit/emit-common.h
src/vm/jit/i386/Makefile.am
src/vm/jit/i386/arch.h
src/vm/jit/i386/asmpart.S
src/vm/jit/i386/codegen.c
src/vm/jit/i386/codegen.h
src/vm/jit/i386/cygwin/Makefile.am
src/vm/jit/i386/cygwin/md-asm.h
src/vm/jit/i386/cygwin/md-os.c
src/vm/jit/i386/darwin/Makefile.am
src/vm/jit/i386/darwin/md-asm.h
src/vm/jit/i386/darwin/md-os.c
src/vm/jit/i386/disass.c
src/vm/jit/i386/emit.c
src/vm/jit/i386/emit.h
src/vm/jit/i386/freebsd/Makefile.am
src/vm/jit/i386/freebsd/md-asm.h
src/vm/jit/i386/freebsd/md-os.c
src/vm/jit/i386/linux/Makefile.am
src/vm/jit/i386/linux/md-asm.h
src/vm/jit/i386/linux/md-os.c
src/vm/jit/i386/md-abi.c
src/vm/jit/i386/md-abi.h
src/vm/jit/i386/md.c
src/vm/jit/i386/patcher.c
src/vm/jit/inline/Makefile.am
src/vm/jit/inline/inline.c
src/vm/jit/inline/inline.h
src/vm/jit/intrp/Makefile.am
src/vm/jit/intrp/asmpart.c
src/vm/jit/intrp/codegen.c
src/vm/jit/intrp/codegen.h
src/vm/jit/intrp/disass.c
src/vm/jit/intrp/dynamic-super.c
src/vm/jit/intrp/engine.c
src/vm/jit/intrp/engine1.c
src/vm/jit/intrp/engine2.c
src/vm/jit/intrp/intrp.h
src/vm/jit/intrp/md.c
src/vm/jit/intrp/patcher.c
src/vm/jit/intrp/peephole-gen [changed mode: 0755->0644]
src/vm/jit/intrp/vmgenx [changed mode: 0755->0644]
src/vm/jit/jit.c
src/vm/jit/jit.h
src/vm/jit/loop/Makefile.am
src/vm/jit/loop/analyze.c
src/vm/jit/loop/analyze.h
src/vm/jit/loop/graph.c
src/vm/jit/loop/graph.h
src/vm/jit/loop/loop.c
src/vm/jit/loop/loop.h
src/vm/jit/loop/tracing.c
src/vm/jit/loop/tracing.h
src/vm/jit/m68k/Makefile.am
src/vm/jit/m68k/arch.h
src/vm/jit/m68k/asmpart.S
src/vm/jit/m68k/codegen.c
src/vm/jit/m68k/disass.c
src/vm/jit/m68k/emit.c
src/vm/jit/m68k/emit.h [new file with mode: 0644]
src/vm/jit/m68k/linux/Makefile.am [new file with mode: 0644]
src/vm/jit/m68k/linux/md-abi.c
src/vm/jit/m68k/linux/md-abi.h
src/vm/jit/m68k/linux/md-asm.h [new file with mode: 0644]
src/vm/jit/m68k/linux/md-os.c
src/vm/jit/m68k/linux/md-os.h
src/vm/jit/m68k/machine-instr.h
src/vm/jit/m68k/md.c
src/vm/jit/m68k/patcher.c
src/vm/jit/md.h
src/vm/jit/methodheader.h
src/vm/jit/mips/Makefile.am
src/vm/jit/mips/arch.h
src/vm/jit/mips/asmpart.S
src/vm/jit/mips/codegen.c
src/vm/jit/mips/codegen.h
src/vm/jit/mips/disass.c
src/vm/jit/mips/emit.c
src/vm/jit/mips/irix/Makefile.am
src/vm/jit/mips/irix/md-os.c
src/vm/jit/mips/linux/Makefile.am
src/vm/jit/mips/linux/md-os.c
src/vm/jit/mips/md-abi.c
src/vm/jit/mips/md-abi.h
src/vm/jit/mips/md-asm.h
src/vm/jit/mips/md.c
src/vm/jit/mips/patcher.c
src/vm/jit/mips/uclinux/Makefile.am [new file with mode: 0644]
src/vm/jit/mips/uclinux/md-os.c [new file with mode: 0644]
src/vm/jit/optimizing/Makefile.am
src/vm/jit/optimizing/dominators.c
src/vm/jit/optimizing/dominators.h
src/vm/jit/optimizing/graph.c
src/vm/jit/optimizing/graph.h
src/vm/jit/optimizing/ifconv.c
src/vm/jit/optimizing/ifconv.h
src/vm/jit/optimizing/lifetimes.c
src/vm/jit/optimizing/lifetimes.h
src/vm/jit/optimizing/lsra.c
src/vm/jit/optimizing/lsra.h
src/vm/jit/optimizing/profile.c
src/vm/jit/optimizing/profile.h
src/vm/jit/optimizing/recompile.c
src/vm/jit/optimizing/recompile.h
src/vm/jit/optimizing/reorder.c
src/vm/jit/optimizing/reorder.h
src/vm/jit/optimizing/ssa.c
src/vm/jit/optimizing/ssa.h
src/vm/jit/parisc/Makefile.am
src/vm/jit/parisc/arch.h
src/vm/jit/parisc/linux/Makefile.am
src/vm/jit/parisc/md-abi.h
src/vm/jit/parisc/md.c
src/vm/jit/parse.c
src/vm/jit/parse.h
src/vm/jit/patcher-common.c [new file with mode: 0644]
src/vm/jit/patcher-common.h [new file with mode: 0644]
src/vm/jit/patcher.h
src/vm/jit/powerpc/Makefile.am
src/vm/jit/powerpc/arch.h
src/vm/jit/powerpc/asmpart.S
src/vm/jit/powerpc/codegen.c
src/vm/jit/powerpc/codegen.h
src/vm/jit/powerpc/darwin/Makefile.am
src/vm/jit/powerpc/darwin/md-abi.c
src/vm/jit/powerpc/darwin/md-abi.h
src/vm/jit/powerpc/darwin/md-asm.h
src/vm/jit/powerpc/darwin/md-os.c
src/vm/jit/powerpc/disass.c
src/vm/jit/powerpc/emit.c
src/vm/jit/powerpc/linux/Makefile.am
src/vm/jit/powerpc/linux/md-abi.c
src/vm/jit/powerpc/linux/md-abi.h
src/vm/jit/powerpc/linux/md-asm.h
src/vm/jit/powerpc/linux/md-os.c
src/vm/jit/powerpc/md.c
src/vm/jit/powerpc/netbsd/Makefile.am
src/vm/jit/powerpc/netbsd/md-abi.c
src/vm/jit/powerpc/netbsd/md-abi.h
src/vm/jit/powerpc/netbsd/md-asm.h
src/vm/jit/powerpc/netbsd/md-os.c
src/vm/jit/powerpc/patcher.c
src/vm/jit/powerpc64/Makefile.am
src/vm/jit/powerpc64/arch.h
src/vm/jit/powerpc64/asmpart.S
src/vm/jit/powerpc64/codegen.c
src/vm/jit/powerpc64/codegen.h
src/vm/jit/powerpc64/disass.c
src/vm/jit/powerpc64/emit.c
src/vm/jit/powerpc64/linux/Makefile.am
src/vm/jit/powerpc64/linux/md-abi.c
src/vm/jit/powerpc64/linux/md-abi.h
src/vm/jit/powerpc64/linux/md-asm.h
src/vm/jit/powerpc64/linux/md-os.c
src/vm/jit/powerpc64/md.c
src/vm/jit/powerpc64/patcher.c
src/vm/jit/reg.c
src/vm/jit/reg.h
src/vm/jit/replace.c
src/vm/jit/replace.h
src/vm/jit/s390/Makefile.am
src/vm/jit/s390/arch.h
src/vm/jit/s390/asmpart.S
src/vm/jit/s390/codegen.c
src/vm/jit/s390/codegen.h
src/vm/jit/s390/disass.c
src/vm/jit/s390/emit.c
src/vm/jit/s390/emit.h
src/vm/jit/s390/md-abi.c
src/vm/jit/s390/md-abi.h
src/vm/jit/s390/md-asm.h
src/vm/jit/s390/md.c
src/vm/jit/s390/patcher.c
src/vm/jit/s390/tests/Makefile [new file with mode: 0644]
src/vm/jit/s390/tests/jasmin.status [new file with mode: 0644]
src/vm/jit/schedule/Makefile.am
src/vm/jit/schedule/schedule.c
src/vm/jit/schedule/schedule.h
src/vm/jit/show.c
src/vm/jit/show.h
src/vm/jit/sparc64/Makefile.am
src/vm/jit/sparc64/arch.h
src/vm/jit/sparc64/asmpart.S
src/vm/jit/sparc64/codegen.c
src/vm/jit/sparc64/codegen.h
src/vm/jit/sparc64/disass.c
src/vm/jit/sparc64/emit-arch.h [new file with mode: 0644]
src/vm/jit/sparc64/emit.c
src/vm/jit/sparc64/emit.h [new file with mode: 0644]
src/vm/jit/sparc64/linux/Makefile.am
src/vm/jit/sparc64/linux/md-os.c
src/vm/jit/sparc64/md-abi.c
src/vm/jit/sparc64/md-abi.h
src/vm/jit/sparc64/md-asm.h
src/vm/jit/sparc64/md.c
src/vm/jit/sparc64/patcher.c
src/vm/jit/sparc64/solaris/Makefile.am
src/vm/jit/sparc64/solaris/macro_rename.h [new file with mode: 0644]
src/vm/jit/sparc64/solaris/md-os.c
src/vm/jit/stack.c
src/vm/jit/stack.h
src/vm/jit/stacktrace.c
src/vm/jit/stacktrace.h
src/vm/jit/trace.c
src/vm/jit/trace.h
src/vm/jit/verify/Makefile.am
src/vm/jit/verify/generate.pl [changed mode: 0755->0644]
src/vm/jit/verify/icmds.c
src/vm/jit/verify/typecheck-builtins.inc
src/vm/jit/verify/typecheck-common.c
src/vm/jit/verify/typecheck-common.h
src/vm/jit/verify/typecheck-fields.inc
src/vm/jit/verify/typecheck-invoke.inc
src/vm/jit/verify/typecheck-multianewarray.inc
src/vm/jit/verify/typecheck-stackbased.c
src/vm/jit/verify/typecheck-typeinferer.c
src/vm/jit/verify/typecheck-typeinferer.h
src/vm/jit/verify/typecheck.c
src/vm/jit/verify/typecheck.h
src/vm/jit/verify/typeinfo.c
src/vm/jit/verify/typeinfo.h
src/vm/jit/x86_64/Makefile.am
src/vm/jit/x86_64/arch.h
src/vm/jit/x86_64/asmpart.S
src/vm/jit/x86_64/codegen.c
src/vm/jit/x86_64/codegen.h
src/vm/jit/x86_64/disass.c
src/vm/jit/x86_64/emit.c
src/vm/jit/x86_64/emit.h
src/vm/jit/x86_64/freebsd/Makefile.am
src/vm/jit/x86_64/freebsd/md-os.c
src/vm/jit/x86_64/linux/Makefile.am
src/vm/jit/x86_64/linux/md-os.c
src/vm/jit/x86_64/md-abi.c
src/vm/jit/x86_64/md-abi.h
src/vm/jit/x86_64/md-asm.h
src/vm/jit/x86_64/md.c
src/vm/jit/x86_64/patcher.c
src/vm/jit_interface.h
src/vm/primitive.c
src/vm/primitive.h
src/vm/properties.c
src/vm/properties.h
src/vm/resolve.c
src/vm/resolve.h
src/vm/signal.c
src/vm/signallocal.h
src/vm/string.c
src/vm/stringlocal.h
src/vm/types.h
src/vm/vm.c
src/vm/vm.h
src/vmcore/Makefile.am
src/vmcore/annotation.c
src/vmcore/annotation.h
src/vmcore/class.c
src/vmcore/class.h
src/vmcore/classcache.c
src/vmcore/classcache.h
src/vmcore/descriptor.c
src/vmcore/descriptor.h
src/vmcore/field.c
src/vmcore/field.h
src/vmcore/linker.c
src/vmcore/linker.h
src/vmcore/loader.c
src/vmcore/loader.h
src/vmcore/method.c
src/vmcore/method.h
src/vmcore/options.c
src/vmcore/options.h
src/vmcore/primitivecore.c [new file with mode: 0644]
src/vmcore/references.h
src/vmcore/rt-timing.c
src/vmcore/rt-timing.h
src/vmcore/stackmap.c
src/vmcore/stackmap.h
src/vmcore/statistics.c
src/vmcore/statistics.h
src/vmcore/suck.c
src/vmcore/suck.h
src/vmcore/utf8.c
src/vmcore/utf8.h
src/vmcore/zip.c
src/vmcore/zip.h
tests/Makefile.am
tests/exception_restore_registers.java [new file with mode: 0644]
tests/exception_restore_registers.output [new file with mode: 0644]
tests/regression/Makefile.am
tests/regression/MinimalClassReflection.java
tests/regression/TestAnnotations.java [new file with mode: 0644]
tests/regression/TestAnnotations.output [new file with mode: 0644]
tests/regression/codepatching/Makefile.am
tests/regression/fptest.java
tests/regression/jasmin/Makefile.am
tests/regression/jasmin/runtest [changed mode: 0755->0644]
tests/regression/jasmin/show [changed mode: 0755->0644]
tests/regression/jctest.java
tests/regression/native/Makefile.am
tests/regression/native/checkjni.c
tests/regression/native/checkjni.java
tests/regression/native/test.c
tests/regression/native/test.java
tests/regression/native/testarguments.c
tests/regression/native/testarguments.java
tests/regression/native/testgetobjectclass0.c
tests/regression/native/testgetobjectclass0.java
tests/regression/resolving/Makefile.am
tests/regression/resolving/classes1/Makefile.am
tests/regression/resolving/classes2/Makefile.am
tests/regression/resolving/classes3/Makefile.am

diff --git a/.hgignore b/.hgignore
new file mode 100644 (file)
index 0000000..edb04bc
--- /dev/null
+++ b/.hgignore
@@ -0,0 +1,35 @@
+syntax: glob
+.deps
+.libs
+*~
+*.la
+*.lo
+*.a
+*.o
+Makefile
+Makefile.in
+TAGS
+aclocal.m4
+autom4te.cache
+config.h
+config.h.in
+config.log
+config.status
+configure
+libtool
+stamp-h1
+compile
+config.guess
+config.sub
+depcomp
+install-sh
+ltmain.sh
+missing
+contrib/setenvinstalled
+contrib/setenvsource
+src/cacao/cacao
+src/cacaoh/cacaoh
+src/lib/classes/
+src/lib/vm.zip
+src/native/include/*.h
+src/scripts/java
diff --git a/ChangeLog-2006 b/ChangeLog-2006
new file mode 100644 (file)
index 0000000..179abc0
--- /dev/null
@@ -0,0 +1,17620 @@
+2006-12-31 17:57  edwin
+
+       * src/vm/jit/inline/inline.c (test_inlining): Deactivated typechecking
+       of inlined result.
+
+2006-12-28 21:21  twisti
+
+       * src/vm/jit/alpha/disass.c (regs): Removed.
+       * src/vm/jit/alpha/md-abi.c (regs): Added.
+
+2006-12-28 20:56  twisti
+
+       * src/vm/jit/i386/disass.c (regs): Removed.
+       * src/vm/jit/i386/md-abi.c (regs): Added.
+
+2006-12-28 20:50  twisti
+
+       * src/vm/jit/x86_64/disass.c (regs): Removed.
+       * src/vm/jit/x86_64/md-abi.c (regs): Added.
+
+2006-12-28 15:38  twisti
+
+       * src/native/include/Makefile.am (NO_GEN_JAVASE_HEADER_FILES): Removed
+       java_lang_Object.h.
+       (JAVASE_HEADER_FILES): Added java_lang_Object.h.
+       * src/native/include/.cvsignore: Likewise.
+       * src/native/include/java_lang_VMObject.h: Removed.
+
+2006-12-28 13:43  twisti
+
+       * tests/regression/Makefile.am,
+       tests/regression/codepatching/Makefile.am,
+       tests/regression/jasmin/Makefile.am,
+       tests/regression/native/Makefile.am (JAVAFLAGS) [WITH_CLASSPATH_GNU]:
+       Set differently for GNU Classpath.
+
+2006-12-28 12:30  twisti
+
+       * src/mm/memory.c (memory_mmap_anon): Fixed indentation and a debug
+       typo.
+       * src/vm/signal.c (signal_init): Removed unused variable.
+
+2006-12-28 11:57  twisti
+
+       * src/fdlibm/fdlibm.h (exception): Commented since it was already
+       defined on
+       IRIX (don't know where).
+
+2006-12-28 00:19  twisti
+
+       * src/threads/native/threads.c (threads_attach_current_thread): Fixed
+       compiler warning.
+       (threads_detach_thread): Likewise.
+       (threads_find_non_daemon_thread): Fixed bug, we returned the wrong
+       threads.
+
+2006-12-27 23:54  twisti
+
+       * src/threads/native/threads.c (threads_init): Fixed another typo.
+
+2006-12-27 23:42  twisti
+
+       * src/threads/native/threads.c (threads_init): Fixed typo.
+       
+       * src/native/jni.c (native/include/java_lang_ClassLoader.h): Added.
+       * src/native/vm/gnu/java_lang_VMRuntime.c: Likewise.
+
+2006-12-27 23:15  twisti
+
+       * src/vm/class.c [ENABLE_JAVASE] (arrayclass_java_lang_Object): Added
+       #ifdef.
+       * src/vm/class.h: Likewise.
+       
+       * src/vm/loader.c: Java ME changes.
+       
+       * src/vm/finalizer.c (finalizer_start_thread): Set flags.
+       * src/vm/jit/optimizing/recompile.c (recompile_start_thread):
+       Likewise.
+       
+       * src/vm/jit/stacktrace.c [ENABLE_JAVASE] (stacktrace_getStack): Added
+       #ifdef.
+       
+       * src/vm/jit/codegen-common.c (codegen_start_native_call)
+       [ENABLE_JAVASE]: #ifdef'ed the local references table stuff (maybe we
+       need to change that for cacao-gc).
+       (codegen_finish_native_call): Likewise.
+       
+       * src/vm/exceptions.c (exceptions_asm_new_abstractmethoderror)
+       [!ENABLE_JAVASE]: In the meantime we throw a VirtualMachineError.
+       * src/vm/exceptions.h: Likewise.
+       
+       * src/vm/linker.c: Java ME changes.
+       
+       * src/native/native.c: Likewise.
+       * src/native/native.h: Likewise.
+       
+       * src/threads/native/threads.h (THREAD_FLAG_DAEMON): Added.
+       (threadobject): Changed flags to u4.
+       * src/threads/native/threads.c: A lot of Java ME changes.
+
+2006-12-27 23:05  twisti
+
+       * src/vm/jit/powerpc/emit.c (emit_verbosecall_enter) [!NDEBUG]: We
+       also define the function with NDEBUG, but empty.
+       (emit_verbosecall_exit): Likewise.
+       * src/vm/jit/powerpc/codegen.c (codegen): Removed
+       JITDATA_HAS_FLAG_VERBOSECALL from emit_verbosecall calls.
+
+2006-12-27 23:00  twisti
+
+       * src/vm/properties.c (properties_init) [ENABLE_JAVAME_CLDC1_1]: Set
+       values as Sun's JVM does.
+
+2006-12-27 22:39  twisti
+
+       * src/vm/jit/stacktrace.c: Java ME changes.
+       * src/vm/jit/stacktrace.h: Likewise.
+
+2006-12-27 22:31  twisti
+
+       * tests/regression/Makefile.am: Renamed CLASSPATH_GLIBJ_ZIP to
+       CLASSPATH_CLASSES.
+       * tests/regression/codepatching/Makefile.am: Likewise.
+       * tests/regression/jasmin/Makefile.am: Likewise.
+       * tests/regression/native/Makefile.am: Likewise.
+
+2006-12-27 21:13  ajordan
+
+       * src/vm/jit/sparc64/asmpart.S: Some fixes for exception handling.
+       * src/vm/jit/sparc64/codegen.c: Likewise.
+
+2006-12-27 15:22  twisti
+
+       * contrib/setenvinstalled.in: Renamed CLASSPATH_GLIBJ_ZIP to
+       CLASSPATH_CLASSES.
+       * contrib/setenvsource.in: Likewise.
+
+2006-12-27 15:15  twisti
+
+       * src/vm/class.c: Java ME changes.
+       * src/vm/class.h: Likewise.
+       * src/vm/exceptions.c: Likewise.
+       (exceptions_new_virtualmachineerror): New function.
+       (exceptions_throw_virtualmachineerror):
+       * src/vm/exceptions.h: Likewise.
+       * src/vm/resolve.c: Likewise.
+       * src/vm/utf8.c: Likewise.
+       * src/vm/utf8.h: Likewise.
+       * src/cacaoh/headers.c: Likewise.
+
+2006-12-27 13:56  twisti
+
+       * configure.ac (--with-classpath-glibj-zip): Renamed to
+       --with-classpath-classes.
+       
+       * m4/ac_prog_javac.m4 (AC_PROG_JAVAC): Renamed CLASSPATH_GLIBJ_ZIP to
+       CLASSPATH_CLASSES.
+       
+       * src/Makefile.am (VM_DIR): Added.
+       (SUBDIRS): Use VM_DIR.
+       
+       * src/native/include/Makefile.am [WITH_CLASSPATH_GNU] (CLASSPATH): Set
+       differently for non-gnu classpaths.
+       
+       * src/cacaoh/cacaoh.c (main) [WITH_CLASSPATH_GNU]: Likewise.
+       * src/vm/vm.c (vm_create): Likewise.
+
+2006-12-27 00:08  twisti
+
+       * src/fdlibm/fdlibm.h [!MAXFLOAT] (MAXFLOAT): Only define if not
+       already defined.
+       * src/fdlibm/k_tan.c: Commented pragma.
+
+2006-12-26 23:42  twisti
+
+       * src/vm/resolve.h (vm/class.h): Added.
+       (vm/method.h): Likewise.
+
+2006-12-26 23:41  twisti
+
+       * src/vm/exceptions.c (native/jni.h): Added.
+       (exceptions_init): Java ME changes.
+       (exceptions_print_exception): Likewise.
+       * src/vm/exceptions.h (native/jni.h): Added.
+
+2006-12-26 23:39  twisti
+
+       * src/vm/properties.c [ENABLE_JAVASE]
+       (native/include/java_util_Properties.h): Include conditionally.
+       * src/vm/properties.h: Likewise.
+
+2006-12-26 23:34  twisti
+
+       * src/native/include/Makefile.am (CLEANFILES): Added
+       JAVASE_HEADER_FILES and JAVAME_CLDC1_1_HEADER_FILES.
+       (cleanall): New target to clean all header files.
+
+2006-12-26 23:26  twisti
+
+       * src/native/include/Makefile.am: Java ME changes.
+       * src/native/include/.cvsignore: Likewise.
+
+2006-12-26 23:21  twisti
+
+       * src/native/Makefile.am [ENABLE_JAVASE] (JNI_SOURCES): Added.
+       (libnative_la_SOURCES): Added JNI_SOURCES.
+
+2006-12-26 23:16  twisti
+
+       * configure.ac (--with-classpath): Added cldc1.1 target.
+       (AC_CONFIG_FILES): Added src/native/vm/cldc1.1/Makefile.
+
+2006-12-26 23:14  twisti
+
+       * src/native/vm/java_lang_Thread.h,
+       src/native/vm/java_lang_Class.c,
+       src/native/vm/java_lang_Object.c,
+       src/native/vm/java_lang_Thread.c,
+       src/native/vm/java_lang_Class.h,
+       src/native/vm/java_lang_Object.h: Java ME changes.
+
+2006-12-26 23:13  twisti
+
+       * src/native/vm/Makefile.am (DIST_SUBDIRS): Added cldc1.1.
+       (NATIVEVM_LIB): Renamed to libnativevmcore.
+       * src/native/vm/gnu/Makefile.am (noinst_LTLIBRARIES): Likewise.
+       (libnativevmgnu_la_SOURCES): Renamed to libnativevmcore_la_SOURCES.
+
+2006-12-26 23:09  twisti
+
+       * src/native/vm/cldc1.1/.cvsignore: Added.
+       * src/native/vm/cldc1.1/com_sun_cldchi_io_ConsoleOutputStream.c,
+       src/native/vm/cldc1.1/java_lang_Runtime.c,
+       src/native/vm/cldc1.1/java_lang_System.c,
+       src/native/vm/cldc1.1/java_lang_Class.c,
+       src/native/vm/cldc1.1/java_lang_Float.c,
+       src/native/vm/cldc1.1/java_lang_Object.c,
+       src/native/vm/cldc1.1/java_lang_String.c,
+       src/native/vm/cldc1.1/Makefile.am,
+       src/native/vm/cldc1.1/java_lang_Thread.c,
+       src/native/vm/cldc1.1/java_lang_Throwable.c,
+       src/native/vm/cldc1.1/java_lang_Math.c,
+       src/native/vm/cldc1.1/java_lang_Double.c: New file.
+
+2006-12-26 23:05  twisti
+
+       * src/fdlibm/Makefile.am [ENABLE_JAVAME_CLDC1_1]
+       (libfdlibm_la_SOURCES): Added the following files.
+       
+       * src/fdlibm/k_cos.c,
+       src/fdlibm/s_ceil.c,
+       src/fdlibm/k_sin.c,
+       src/fdlibm/s_floor.c,
+       src/fdlibm/s_tan.c,
+       src/fdlibm/s_cos.c,
+       src/fdlibm/s_sin.c,
+       src/fdlibm/w_sqrt.c,
+       src/fdlibm/e_rem_pio2.c,
+       src/fdlibm/k_rem_pio2.c,
+       src/fdlibm/k_tan.c,
+       src/fdlibm/e_sqrt.c: New file.
+
+2006-12-26 22:33  twisti
+
+       * src/fdlibm/s_finite.c,
+       src/fdlibm/fdlibm.h,
+       src/fdlibm/ieeefp.h,
+       src/fdlibm/e_fmod.c,
+       src/fdlibm/mprec.h,
+       src/fdlibm/w_fmod.c,
+       src/fdlibm/s_copysign.c: Updated from GNU Classpath.
+
+2006-12-26 19:56  twisti
+
+       * src/threads/native/threads.c: Rewritten such that threadobject
+       extends a java.lang.Thread object instead of java.lang.VMThread.
+       * src/threads/native/threads.h: Likewise.
+       
+       * src/vm/finalizer.c (finalizer_vmthread): Renamed to thread_finalizer
+       and changed type to threadobject*.
+       (lock_finalizer_thread): Renamed to lock_thread_finalizer.
+       (finalizer_init): Changed variable names.
+       (finalizer_start_thread): Thread-code changes.
+       
+       * src/vm/jit/optimizing/recompile.c (recompile_vmthread): Renamed to
+       thread_recompile and changed type to threadobject*.
+       (lock_recompile_thread): Renamed to lock_thread_recompile.
+       (recompile_init): Changed variable names.
+       (recompile_thread): Likewise.
+       (recompile_queue_method): Likewise.
+       (recompile_start_thread): Thread-code changes.
+       
+       * src/vm/utf8.c (utf_addThread): Added.
+       * src/vm/utf8.h: Likewise.
+       
+       * src/lib/vm/reference/java/lang/VMThread.java (create): Set vmThread
+       before calling start.
+       
+       * src/native/vm/gnu/java_lang_VMThread.c: Call _Jv_java_lang_Thread
+       functions.
+       
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       java_lang_Thread.[ch].
+       * src/native/vm/java_lang_Thread.c: New file.
+       * src/native/vm/java_lang_Thread.h: Likewise.
+
+2006-12-26 19:41  twisti
+
+       * src/vm/annotation.c
+       (annotation_load_attribute_runtimevisibleannotations): Renamed aev to
+       element_value.
+
+2006-12-26 19:40  twisti
+
+       * src/native/include/java_lang_Thread.h: Updated to current GNU
+       Classpath head.
+       * src/native/include/java_lang_VMThread.h: Likewise.
+
+2006-12-26 19:30  twisti
+
+       * src/threads/native/lock.c (lock_wait_for_object): Renamed t to
+       thread.
+       (lock_notify_object): Likewise.
+       (lock_notify_all_object): Likewise.
+
+2006-12-23 23:52  twisti
+
+       * configure.ac (--with-classpath): Added.
+
+2006-12-21 15:59  twisti
+
+       * src/native/vm/java_lang_Object.c (wait): Removed debugging output.
+
+2006-12-21 15:56  twisti
+
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       java_lang_Class.h and java_lang_Object.[ch].
+       
+       * src/native/vm/java_lang_Object.c: New file.
+       * src/native/vm/java_lang_Object.h: Likewise.
+       
+       * src/native/vm/gnu/java_lang_VMObject.c: Call _Jv_java_lang_Object
+       functions.
+
+2006-12-19 19:20  twisti
+
+       * src/mm/memory.c (memory_mmap_anon): New function.
+       (memory_cnew): Use memory_mmap_anon.
+       * src/mm/memory.h (memory_mmap_anon): Added.
+       * src/vm/signal.c (signal_init): Use memory_mmap_anon.
+
+2006-12-19 19:12  twisti
+
+       * src/native/vm/java_lang_Class.h
+       (_Jv_java_lang_Class_getEnclosingConstructor): Removed #if 0.
+
+2006-12-18 18:21  twisti
+
+       * src/vm/class.c (vm/suck.h): Added.
+       (class_load_attribute_sourcefile): New function.
+       (class_load_attribute_enclosingmethod): Likewise.
+       (class_load_attributes): Likewise.
+       
+       * src/vm/loader.c [ENABLE_JAVASE] (vm/annotation.h, vm/stackmap.h):
+       Added.
+       (skipattributebody): Renamed to loader_skip_attribute_body, made
+       non-static.
+       (skipattributes): Removed.
+       (loader_load_attribute_signature): New function.
+       (load_field): Use loader_load_attribute_signature.
+       (load_method): Renamed to loader_load_method, call
+       stackmap_load_attribute_stackmaptable and
+       loader_load_attribute_signature.
+       (load_attributes): Removed.
+       (load_class_from_classbuffer): Renamed load_method to
+       loader_load_method and load_attributes to class_load_attributes.
+       * src/vm/loader.h (loader_skip_attribute_body): Added.
+       [ENABLE_JAVASE] (loader_load_attribute_signature): Likewise.
+       
+       * src/vm/method.h [ENABLE_JAVASE] (vm/stackmap.h): Added.
+       (methodinfo) [ENABLE_JAVASE]: Added signature and stack_map.
+       
+       * src/vm/statistics.c (size_stack_map): Added.
+       (print_stats): Print stack_map size.
+       * src/vm/statistics.h (size_stack_map): Likewise.
+       
+       * src/vm/global.h (JAVA_VERSION): Changed to "1.5.0".
+       (CLASS_VERSION): Changed to "50.0".
+       (MAJOR_VERSION): Changed to 50.
+       
+       * src/vm/utf8.c [ENABLE_JAVASE] (utf_EnclosingMethod)
+       (utf_RuntimeVisibleAnnotations, utf_StackMapTable): Added.
+       (utf8_init) [ENABLE_JAVASE]: Init utf_EnclosingMethod,
+       utf_RuntimeVisibleAnnotations and utf_StackMapTable.
+       * src/vm/utf8.h [ENABLE_JAVASE] (utf_EnclosingMethod)
+       (utf_RuntimeVisibleAnnotations, utf_StackMapTable): Added.
+       
+       * src/vm/properties.c (properties_init): Changed
+       java.specification.version to 1.5.
+       
+       * src/vm/Makefile.am [ENABLE_JAVASE] (ANNOTATION_OBJ): Renamed to
+       ANNOTATION_SOURCES.
+       [ENABLE_JAVASE] (STACKMAP_SOURCES): Added.
+       [ENABLE_STATISTICS] (STATISTICS_OBJ): Renamed to STATISTICS_SOURCES.
+       (libvmcore_la_SOURCES): Added STACKMAP_SOURCES.
+       * src/vm/stackmap.c: New file.
+       * src/vm/stackmap.h: Likewise.
+
+2006-12-18 18:04  twisti
+
+       * src/native/vm/gnu/.cvsignore: New file.
+
+2006-12-18 17:36  twisti
+
+       * src/vm/class.h (vm/loader.h): Added.
+       (classinfo): Added enclosingclass and enclosingmethod.
+       
+       * configure.ac (AC_CONFIG_FILES): Added src/native/vm/gnu/Makefile.
+       
+       * src/native/native.c (native_class_getname): Removed.
+       * src/native/native.h: Likewise.
+       
+       * src/native/vm/Makefile.am
+       
+       * src/native/vm/java_lang_Class.c: New file, contains the
+       implementation for java.lang.Class functions.
+       * src/native/vm/java_lang_Class.h: Likewise.
+       
+       * src/native/vm/java_security_VMAccessController.c,
+       src/native/vm/VMjdwp.c,
+       src/native/vm/java_lang_VMClass.c,
+       src/native/vm/gnu_java_lang_management_VMRuntimeMXBeanImpl.c,
+       src/native/vm/java_lang_VMThread.c,
+       src/native/vm/VMjdwp.h,
+       src/native/vm/gnu_classpath_jdwp_VMVirtualMachine.c,
+       src/native/vm/gnu_classpath_jdwp_VMMethod.c,
+       src/native/vm/java_lang_VMRuntime.c,
+       src/native/vm/java_lang_reflect_Field.c,
+       src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c,
+       src/native/vm/java_lang_VMThrowable.c,
+       src/native/vm/gnu_java_lang_management_VMThreadMXBeanImpl.c,
+       src/native/vm/gnu_java_lang_management_VMMemoryMXBeanImpl.c,
+       src/native/vm/java_lang_VMClassLoader.c,
+       src/native/vm/java_lang_management_VMManagementFactory.c,
+       src/native/vm/java_lang_VMString.c,
+       src/native/vm/java_lang_VMObject.c,
+       src/native/vm/gnu_classpath_VMSystemProperties.c,
+       src/native/vm/sun_misc_Unsafe.c,
+       src/native/vm/java_lang_reflect_Method.c,
+       src/native/vm/gnu_classpath_VMStackWalker.c,
+       src/native/vm/java_lang_VMSystem.c,
+       src/native/vm/java_lang_reflect_VMProxy.c,
+       src/native/vm/java_lang_reflect_Constructor.c,
+       src/native/vm/gnu_classpath_jdwp_VMFrame.c: Moved to
+       src/native/vm/gnu.
+       
+       * src/native/vm/gnu/gnu_java_lang_management_VMThreadMXBeanImpl.c,
+       src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c,
+       src/native/vm/gnu/java_security_VMAccessController.c,
+       src/native/vm/gnu/java_lang_VMClassLoader.c,
+       src/native/vm/gnu/java_lang_management_VMManagementFactory.c,
+       src/native/vm/gnu/VMjdwp.c,
+       src/native/vm/gnu/gnu_java_lang_management_VMRuntimeMXBeanImpl.c,
+       src/native/vm/gnu/java_lang_VMClass.c,
+       src/native/vm/gnu/java_lang_VMString.c,
+       src/native/vm/gnu/java_lang_VMObject.c,
+       src/native/vm/gnu/VMjdwp.h,
+       src/native/vm/gnu/java_lang_VMThread.c,
+       src/native/vm/gnu/gnu_classpath_jdwp_VMVirtualMachine.c,
+       src/native/vm/gnu/gnu_classpath_VMSystemProperties.c,
+       src/native/vm/gnu/sun_misc_Unsafe.c,
+       src/native/vm/gnu/gnu_classpath_jdwp_VMMethod.c,
+       src/native/vm/gnu/java_lang_reflect_Method.c,
+       src/native/vm/gnu/java_lang_VMRuntime.c,
+       src/native/vm/gnu/Makefile.am,
+       src/native/vm/gnu/java_lang_reflect_Field.c,
+       src/native/vm/gnu/gnu_classpath_VMStackWalker.c,
+       src/native/vm/gnu/java_lang_VMSystem.c,
+       src/native/vm/gnu/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c,
+       src/native/vm/gnu/java_lang_reflect_VMProxy.c,
+       src/native/vm/gnu/java_lang_reflect_Constructor.c,
+       src/native/vm/gnu/gnu_classpath_jdwp_VMFrame.c,
+       src/native/vm/gnu/java_lang_VMThrowable.c: Moved from src/native/vm.
+
+2006-12-18 16:27  twisti
+
+       * src/vm/exceptions.c (exceptions_throw_internalerror): New function.
+       * src/vm/exceptions.h (exceptions_throw_internalerror): Added.
+
+2006-12-16 22:53  edwin
+
+       * src/vm/jit/jit.c (jit_compile_intern): Perform inlining if
+       JITDATA_FLAG_INLINE is set.
+       
+       * src/vm/jit/inline/inline.c: Put the result of inlining into
+       the passed jitdata, instead of using a new one. Do not translate
+       returnAddresses in javalocals. It makes no sense.
+       
+       * src/vm/jit/i386/codegen.h (M_BS): New macro.
+       
+       * src/vm/jit/replace.h (RPLPOINT_FLAG_COUNTDOWN): New constant.
+       (Preparation for count-down replacement).
+       
+       * src/vm/jit/jit.h (JITDATA_FLAG_COUNTDOWN): New flag.
+       (JITDATA_HAS_FLAG_COUNTDOWN): New macro.
+
+2006-12-16 21:16  edwin
+
+       * src/vm/jit/replace.c (replace_patch_class): New function.
+       (replace_patch_class_hierarchy): New function.
+       (replace_patch_future_calls): Fall back to iterating over all loaded
+       classes if the instance of a call is not known.
+
+2006-12-16 21:14  edwin
+
+       * src/vm/classcache.c (classcache_foreach_loaded_class): New function.
+       
+       * src/vm/classcache.h (classcache_foreach_loaded_class): Likewise.
+       (classcache_foreach_functionptr_t): New typedef.
+
+2006-12-16 21:12  edwin
+
+       * src/vm/jit/replace.c (replace_read_executionstate): Fix: Initialize
+       the javalocaltype array for NDEBUG.
+
+2006-12-16 21:11  edwin
+
+       * src/vm/jit/inline/inline.c: Relocate returnAddresses in javalocals
+       and in the s2 operand of ASTORE. Fix handling of in/out variables
+       of TYPE_RET.
+       
+       * src/vm/jit/allocator/simplereg.c (simplereg_new_temp): Assert that
+       constants (currently only TYPE_RET) are not allocated.
+       (simplereg_new_free): Assert that constants (currently only TYPE_RET)
+       are not freed.
+
+2006-12-16 20:59  edwin
+
+       * src/vm/jit/stack.c (stack_reanalyse_block): Zero line and flags of
+       the appended NOP.
+
+2006-12-16 20:57  edwin
+
+       * src/vm/jit/replace.c: Prepared for native frames.
+       
+       * src/vm/jit/replace.h: Likewise.
+       (REPLACEMENT_POINTS_RESET): Added.
+
+2006-12-16 20:51  edwin
+
+       * src/vm/jit/intrp/intrp.h: #include codegen-common.h
+
+2006-12-16 20:50  edwin
+
+       * src/vm/jit/inline/inline.c (create_body_block): Copy bitflags.
+       (test_inlining): Copy code->optlevel. This is a quick fix for a more
+       general problem: inline_inline should not swap the jitdata, but
+       instead
+       modify it in-place.
+       (inline_inline_intern): Activated speculative inlining code.
+
+2006-12-16 13:04  twisti
+
+       * src/vm/annotation.c
+       (annotation_load_attribute_runtimevisibleannotations): Extended
+       comment, removed #ifdef ENABLE_JAVASE.
+
+2006-12-15 23:54  twisti
+
+       * autogen.sh: Check for automake-1.1x.
+
+2006-12-15 23:53  twisti
+
+       * autogen.sh: Check for automake-1.1x.
+
+2006-12-13 23:04  twisti
+
+       * src/vm/signal.c (errno.h): Added.
+       (unistd.h): Likewise.
+       (sys/mman.h): Likewise.
+       [__DARWIN__] (sys/types.h): Likewise.
+       (signal_init): mmap a page at 0x0.
+
+2006-12-12 21:12  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h (replace_build_execution_state):
+       Defined.
+       (replace_free_safestack): Likewise.
+       
+       * src/vm/jit/powerpc/asmpart.S (L_replace_build_execution_state$stub):
+       Added.
+       (L_replace_free_safestack$stub): Likewise.
+
+2006-12-11 23:29  twisti
+
+       * src/vm/jit/mips/mips/emit.c (emit_arithmetic_check): Added iptr and
+       check INSTRUCTION_MUST_CHECK.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_arraystore_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       (emit_exception_check): Likewise.
+       (emit_patcher_stubs): Likewise.
+       
+       * src/vm/jit/mips/mips/md.c (vm/exceptions.h): Added.
+       
+       * src/vm/jit/mips/mips/codegen.c (codegen): Pass iptr to
+       exception-emit functions.
+       
+       * src/vm/jit/mips/mips/irix/md-os.c (vm/jit/codegen-common.h): Added.
+       (md_signal_handler_sigsegv): Call codegen_get_pv_from_pc in
+       error-case.
+
+2006-12-11 20:31  twisti
+
+       * tests/regression/fp.output: Updated to classpath-0.93.
+       * tests/regression/fptest.output: Likewise.
+
+2006-12-11 20:16  twisti
+
+       * src/vm/jit/parse.c (MULTIANEWARRAY): Set check-flag.
+
+2006-12-11 19:55  twisti
+
+       * src/vm/jit/parse.c (CHECKCAST): Set check-flag.
+       [!SUPPORT_HARDWARE_DIVIDE_BY_ZERO] (IDIV, IREM, LDIV, LREM): Set
+       check-flag.
+
+2006-12-11 19:43  twisti
+
+       * src/vm/signal.c (signal_init): Use SUPPORT_HARDWARE_DIVIDE_BY_ZERO.
+       * src/vm/signallocal.h: Likewise.
+       
+       * src/vm/jit/alpha/arch.h (SUPPORT_HARDWARE_DIVIDE_BY_ZERO): Defined.
+       * src/vm/jit/i386/arch.h: Likewise.
+       * src/vm/jit/mips/arch.h: Likewise.
+       * src/vm/jit/powerpc/arch.h: Likewise.
+       * src/vm/jit/powerpc64/arch.h: Likewise.
+       * src/vm/jit/sparc64/arch.h: Likewise.
+       * src/vm/jit/x86_64/arch.h: Likewise.
+
+2006-12-11 04:25  ajordan
+
+       * src/vm/jit/sparc64/asmpart.S: Fixed some exception handling.
+       
+       * src/vm/jit/sparc64/patcher.c: Fixed order of patch words.
+       
+       * src/vm/jit/sparc64/md.c: Disp mask in branch patch was wrong.
+       
+       * src/vm/jit/sparc64/codegen.c: Put in ICMD_CHECKNULL.
+
+2006-12-11 00:28  twisti
+
+       * src/native/vm/java_lang_reflect_Constructor.c (getSignature):
+       Implemented.
+
+2006-12-10 23:20  twisti
+
+       * src/native/jni.h (_Jv_JavaVM): Renamed total_started_thread_count to
+       java_lang_management_ThreadMXBean_ThreadCount, added
+       java_lang_management_ThreadMXBean_PeakThreadCount,
+       java_lang_management_ThreadMXBean_TotalStartedThreadCount.
+       
+       * src/vm/vm.c (vm_run): Set ThreadMXBean variables.
+       * src/threads/native/threads.c (threads_startup_thread): Likewise.
+       
+       * src/native/vm/gnu_java_lang_management_VMThreadMXBeanImpl.c
+       (getPeakThreadCount): Implemented.
+       (getTotalStartedThreadCount): Use renamed variable.
+       (resetPeakThreadCount): Implemented.
+
+2006-12-10 22:17  twisti
+
+       * src/vm/jit/powerpc/emit.c (emit_arrayindexoutofbounds_check): Added
+       iptr and check INSTRUCTION_MUST_CHECK.
+       (emit_nullpointer_check): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Pass iptr to exception-emit
+       functions.
+
+2006-12-10 22:07  twisti
+
+       * src/vm/jit/alpha/emit.c (emit_arithmetic_check): Added iptr and
+       check INSTRUCTION_MUST_CHECK.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Pass iptr to exception-emit
+       functions.
+
+2006-12-10 21:50  twisti
+
+       * src/vm/jit/x86_64/emit.c (emit_arithmetic_check): Added iptr and
+       check INSTRUCTION_MUST_CHECK.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Pass iptr to exception-emit
+       functions.
+
+2006-12-10 21:35  twisti
+
+       * src/vm/jit/emit-common.c (emit_array_checks): Pass iptr to emit
+       functions.
+       
+       * src/vm/jit/emit-common.h (emit_arithmetic_check): Added iptr.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_arraystore_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       (emit_exception_check): Likewise.
+       
+       * src/vm/jit/i386/emit.c (emit_arithmetic_check): Added iptr and check
+       INSTRUCTION_MUST_CHECK.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Pass iptr to exception-emit
+       functions.
+
+2006-12-10 21:27  twisti
+
+       * src/vm/jit/parse.c (ICMD_CHECKNULL): Use OP_CHECK_EXCEPTION.
+       * src/vm/jit/parse.h (OP_CHECK_EXCEPTION): New macro.
+
+2006-12-10 17:19  ajordan
+
+       * src/vm/jit/sparc64/codegen.h: Fixed float register mapping and
+       compare macros.
+       * src/vm/jit/sparc64/emit.c: Likewise.
+       
+       * src/vm/jit/sparc64/md.c: Fixed branch backpatching, was off by one.
+       * src/vm/jit/sparc64/codegen.c: replaced codegen_addreference() with
+       codegen_add_branch_ref().
+       
+       * src/vm/jit/sparc64/patcher.c: Tested and activated invokevirtual
+       patcher.
+
+2006-12-09 23:20  ajordan
+
+       * src/vm/jit/sparc64/codegen.h: Reworked float handling, single
+       precision floats are now stored in the upper half of the double pair.
+       
+       * src/vm/jit/sparc64/codegen.c: Fixes for argument handling and
+       get/put-static.
+       * src/vm/jit/sparc64/emit.c: Likewise.
+       * src/vm/jit/sparc64/md-abi.c: Likewise.
+       
+       * src/vm/jit/sparc64/asmpart.S(asm_call_jit_compiler): Fixed float
+       arg saving.
+
+2006-12-09 00:25  twisti
+
+       * src/vm/jit/powerpc/emit.c (emit_arrayindexoutofbounds_check):
+       Removed hardware-exception code.
+
+2006-12-08 00:39  edwin
+
+       * src/vm/jit/jit.h (JITDATA_FLAG_INLINE): Added.
+
+2006-12-08 00:20  edwin
+
+       * src/vm/jit/powerpc/codegen.c: Ported replacement.
+
+2006-12-08 00:17  edwin
+
+       * src/vm/jit/i386/asmpart.S: Adapted to new execution state layout.
+
+2006-12-08 00:16  edwin
+
+       * src/vm/jit/replace.h: Use a type union replace_val_t for all source
+       state values. Give the registers in the execution state meaningful
+       types. Properly convert float/double values.
+       * src/vm/jit/replace.c: Likewise.
+       
+       * src/vm/jit/powerpc/asmpart.S: Adapted to new execution state layout.
+       * src/vm/jit/i386/asmpart.S: Likewise.
+
+2006-12-08 00:07  edwin
+
+       * src/vm/jit/replace.c: Small cleanups.
+
+2006-12-08 00:06  edwin
+
+       * src/vm/jit/replace.c: Implemented support for linkage area.
+
+2006-12-08 00:04  edwin
+
+       * src/vm/jit/replace.c: Implement alpha-style stack frames (ra is at
+       top of frame, in leaf methods the ra register is used).
+
+2006-12-07 23:59  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Fix: Put the
+       REPLACEMENT_POINT_INVOKE_RETURN macro in the right place.
+
+2006-12-07 23:58  edwin
+
+       * src/vm/jit/alpha/codegen.c: Ported replacement.
+
+2006-12-07 23:57  edwin
+
+       * src/vm/jit/x86_64/codegen.c: Ported replacement.
+
+2006-12-07 23:54  edwin
+
+       * src/vm/jit/replace.h: Added macros for codegens.
+       
+       * src/vm/jit/replace.c: Architecture-independent patching of future
+       calls. Use a safe stack area for the final phase of replacement.
+       
+       * src/vm/jit/asmpart.h (asm_replacement_in): Got an additional
+       argument for the safe stack area.
+       
+       * src/vm/jit/powerpc/asmpart.S: Ported.
+       * src/vm/jit/alpha/asmpart.S: Likewise.
+       * src/vm/jit/i386/asmpart.S: Likewise.
+       * src/vm/jit/x86_64/asmpart.S: Likewise.
+
+2006-12-07 23:44  edwin
+
+       * src/vm/jit/replace.h (replace_safestack_t): Prepared declarations
+       for the safe stack area (not used, yet).
+       (sourceframe_t): Added from/to members.
+       
+       * src/vm/jit/replace.c: Major refactoring.
+
+2006-12-07 23:32  edwin
+
+       * src/vm/jit/replace.h (rplpoint): Removed members outcode, code,
+       mcode. Fixed bitwidth of regalloccount.
+       (replace_activate_replacement_points): Activate rplpoints per
+       codeinfo.
+       (replace_deactivate_replacement_points): Deactivate --''--.
+       * src/vm/jit/replace.c: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+
+2006-12-07 23:17  edwin
+
+       * src/vm/jit/replace.h (rplpoint): Removed `target` member.
+       * src/vm/jit/replace.c: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+
+2006-12-07 23:13  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_finish): Relocate
+       code->replacementstubs, do not use rplpoint.outcode.
+
+2006-12-07 23:02  edwin
+
+       * src/vm/jit/powerpc/md.c (md_patch_replacement_point): Changed to use
+       an external array for saving machine code.
+       * src/vm/jit/sparc64/md.c: Likewise.
+       * src/vm/jit/alpha/md.c: Likewise.
+       * src/vm/jit/mips/md.c: Likewise.
+       * src/vm/jit/powerpc64/md.c: Likewise.
+       * src/vm/jit/i386/md.c: Likewise.
+       * src/vm/jit/x86_64/md.c: Likewise.
+       
+       * src/vm/jit/replace.h (md_patch_replacement_point): Added arguments.
+       * src/vm/jit/replace.c: Likewise.
+
+2006-12-07 22:48  edwin
+
+       * src/vm/jit/powerpc/md.c (md_patch_replacement_point): Deactivate
+       debug print.
+       * src/vm/jit/alpha/md.c: Likewise.
+
+2006-12-07 22:45  edwin
+
+       * src/vm/jit/powerpc/md.c (md_get_method_patch_address): Return NULL
+       if no mptr was specified and the call is dynamically dispatched.
+       * src/vm/jit/sparc64/md.c: Likewise.
+       * src/vm/jit/alpha/md.c: Likewise.
+       * src/vm/jit/mips/md.c: Likewise.
+       * src/vm/jit/i386/md.c: Likewise.
+       * src/vm/jit/powerpc64/md.c: Likewise.
+       * src/vm/jit/x86_64/md.c: Likewise.
+
+2006-12-07 22:30  edwin
+
+       * src/vm/jit/mips/emit.c: #include <assert.h>
+
+2006-12-07 22:29  edwin
+
+       * src/vm/jit/alpha/emit.c: #include <assert.h>
+       * src/vm/jit/x86_64/emit.c (emit_replacement_stubs): Ported.
+
+2006-12-07 22:25  edwin
+
+       * src/vm/jit/powerpc/emit.c (emit_replacement_stubs): Prepared for
+       removal of rplpoint.mcode.
+       * src/vm/jit/alpha/emit.c: Likewise.
+       * src/vm/jit/mips/emit.c: Likewise.
+       * src/vm/jit/i386/emit.c: Likewise.
+       * src/vm/jit/x86_64/emit.c: Likewise.
+
+2006-12-07 22:19  edwin
+
+       * src/vm/jit/powerpc/emit.c (emit_replacement_stubs): Do not
+       set rplp->outcode.
+       * src/vm/jit/alpha/emit.c: Likewise.
+       * src/vm/jit/mips/emit.c: Likewise.
+       * src/vm/jit/i386/emit.c: Likewise.
+       * src/vm/jit/x86_64/emit.c: Likewise.
+
+2006-12-07 20:39  edwin
+
+       * src/vm/jit/code.c (code_find_codeinfo_for_pc): New function.
+       * src/vm/jit/code.h (codeinfo): Added codeinfo flags,
+       replacementstubs,
+       and savedmcode.
+       
+       * src/vm/jit/jit.c (jit_invalidate_code): Use codeinfo flags.
+       (jit_get_current_code): Likewise.
+
+2006-12-07 20:14  edwin
+
+       * src/vm/jit/powerpc/arch.h (REPLACEMENT_PATCH_SIZE): Added.
+       (REPLACEMENT_STUB_SIZE): Added.
+       * src/vm/jit/sparc64/arch.h: Likewise.
+       * src/vm/jit/alpha/arch.h: Likewise.
+       * src/vm/jit/mips/arch.h: Likewise.
+       * src/vm/jit/parisc/arch.h: Likewise.
+       * src/vm/jit/powerpc64/arch.h: Likewise.
+       * src/vm/jit/i386/arch.h: Likewise.
+       * src/vm/jit/x86_64/arch.h: Likewise.
+
+2006-12-07 19:57  ajordan
+
+       * scr/vm/jit/sparc64/emit.c: Fixed M_XOR and iconst, lconst.
+       * src/vm/jit/sparc64/codegen.h: Likewise
+       
+       * src/vm/jit/sparc64/codegen.c: Allocating (ABI defined) param array
+       on stack before builtin call.
+
+2006-12-07 10:59  twisti
+
+       * src/vm/jit/x86_64/emit.c (vm/options.h): Added.
+       (emit_arithmetic_check): New function.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Use emit_*_check functions
+       for exception checks.
+       (IDIV, IREM, LDIV, LREM): Use emit_{load,store} functions.
+       
+       * src/vm/jit/x86_64/codegen.h (gen_nullptr_check): Removed.
+       (gen_bound_check): Likewise.
+       (gen_resolvebranch): Likewise.
+
+2006-12-06 22:15  twisti
+
+       * src/native/vm/java_lang_VMClass.c (forName): Throw NPE if null is
+       passed.
+
+2006-12-06 10:49  twisti
+
+       * src/vm/jit/i386/emit.c (vm/options.h): Added.
+       (emit_arithmetic_check): New function.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Use emit_*_check functions for
+       exception checks.
+       
+       * src/vm/jit/i386/codegen.h (gen_nullptr_check): Removed.
+       (gen_bound_check): Likewise.
+
+2006-12-06 10:37  twisti
+
+       * src/vm/jit/emit-common.c [__ALPHA__ || __POWERPC__]
+       (emit_array_checks): Removed #ifdef's.
+
+2006-12-06 09:53  twisti
+
+       * src/vm/jit/i386/emit.c (emit_verbosecall_enter): Check for
+       JITDATA_HAS_FLAG_VERBOSECALL.
+       (emit_verbosecall_exit): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Removed
+       JITDATA_HAS_FLAG_VERBOSECALL check.
+       (createnativestub): Likewise.
+
+2006-12-06 09:47  twisti
+
+       * src/vm/builtin.c [ENABLE_JIT] (builtintable_replace_function):
+       #ifdef'ed.
+
+2006-12-05 23:58  ajordan
+
+       * src/vm/jit/sparc64/emit.c: stack bias used in emit_load and
+       emit_store.
+       
+       * src/vm/jit/sparc64/md.c (md_stacktrace_get_returnaddress): let it
+       return the original ra (address of the call instruction).
+       
+       * src/vm/jit/sparc64/codegen.h: fixed M_RESTORE instruction.
+       
+       * src/vm/jit/sparc64/codegen.c: fixed datasp argument for
+       codegen_finish_native_call.
+
+2006-12-05 21:10  twisti
+
+       * src/vm/exceptions.h (EXCEPTION_LOAD_DISP_NULLPOINTER)
+       (EXCEPTION_LOAD_DISP_ARITHMETIC)
+       (EXCEPTION_LOAD_DISP_ARRAYINDEXOUTOFBOUNDS)
+       (EXCEPTION_LOAD_DISP_CLASSCAST, EXCEPTION_LOAD_DISP_PATCHER): Defined.
+       
+       * src/vm/signal.c (signal_init): Removed checknull-check.
+       
+       * src/vm/jit/powerpc/emit.c (vm/exceptions.h): Added.
+       (emit_arrayindexoutofbounds_check): Added hardware-exception version.
+       
+       * src/vm/jit/powerpc/darwin/md-os.c (md_signal_handler_sigsegv):
+       Started to handle other hardware-exceptions.
+
+2006-12-04 23:48  twisti
+
+       * src/vm/jit/x86_64/codegen.c (createcompilerstub): Don't generate a
+       codeinfo.
+
+2006-12-04 23:39  twisti
+
+       * src/vm/jit/powerpc64/codegen.c (createcompilerstub): Don't generate
+       a codeinfo.
+
+2006-12-04 23:36  twisti
+
+       * src/vm/jit/powerpc64/linux/md-os.c (vm/jit/profile/profile.h):
+       Changed to vm/jit/optimizing/profile.h.
+
+2006-12-04 23:30  twisti
+
+       * src/vm/jit/alpha/codegen.c (createcompilerstub): Don't generate a
+       codeinfo.
+
+2006-12-04 23:16  twisti
+
+       * src/vm/jit/i386/codegen.c (createcompilerstub): Don't generate a
+       codeinfo.
+
+2006-12-04 22:51  twisti
+
+       * src/vm/jit/powerpc/codegen.c (createcompilerstub): Don't generate a
+       codeinfo.
+
+2006-12-04 22:21  twisti
+
+       * src/vm/jit/code.c (code_init): New function.
+       * src/vm/jit/code.h (code_init): Added.
+       * src/vm/jit/jit.c (jit_init): Added code_init call.
+
+2006-12-04 22:18  twisti
+
+       * src/vm/jit/code.h (vm/global.h): Added.
+
+2006-12-04 14:46  ajordan
+
+       * src/vm/jit/sparc64/codegen.h: updated code to new dseg functions.
+       * src/vm/jit/sparc64/codegen.c: Likewise.
+       * src/vm/jit/sparc64/emit.c: Likewise.
+
+2006-12-04 11:20  twisti
+
+       * src/vm/vm.c (vm_create): Moved properties_postinit after jar-file
+       handling. This fixes an eclipse bug found by mjw and neugens.
+
+2006-12-04 02:05  michi
+
+       * src/mm/cacao-gc/compact.c: Now uses regioninfo; Added
+       compact_thread_classes
+       Fixed compact_move; Disabled some logging.
+       * src/mm/cacao-gc/compact.h: Now uses regioninfo.
+
+2006-12-03 22:45  twisti
+
+       * src/vm/vm.c (version): Print classpath variable.
+
+2006-12-03 17:55  michi
+
+       * src/mm/cacao-gc/compact.c: Added.
+       * src/mm/cacao-gc/compact.h: Added.
+
+2006-12-02 15:01  tbfg
+
+       * configure.ac: Added m68k host_cpu support. Added uclinux host_os
+       support.
+
+2006-12-02 14:54  tbfg
+
+       * src/native/tools/gennativetable.c (main): Renamed nogc_init
+       to gc_init in DISABLE_GC path.
+       
+       * src/native/Makefile.am: Introduced GENNATIVETABLE to
+       make crosscompilation a friendlier experience. Rewrote
+       rule for nativetable.inc accordingly.
+       
+       * src/threads/native/threads.c (threads_cast_stopworld) [!DISABLE_GC]:
+       Depends on GC_signum1 and GC_signum2 which are undefined without
+       garbage collector.
+       (threads_cast_startworld): Likewise.
+       (threads_sigsuspend_handler): Likewise.
+
+2006-12-02 12:22  twisti
+
+       * src/vm/builtin.c (builtin_trace_args): Added missing + for
+       logtextlen, thanks to --enable-memcheck.
+
+2006-12-01 16:51  twisti
+
+       * src/vm/jit/x86_64/codegen.h (vm/jit/x86_64/emit.h): Added.
+
+2006-12-01 11:38  tbfg
+
+       * src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method):
+       Fixed a bug in argument handling when using lwz instead
+       of lwa zeroed out sign extension bits which lead to wrong
+       int->string conversion in exception handling path.
+
+2006-11-29 22:33  edwin
+
+       * tests/regression/jasmin/test_verify_fail_merge_init_nullpointer.j:
+       New test.
+       
+       * tests/regression/jasmin/test_verify_fail_init_nullpointer.j: Pass
+       null pointer without merging.
+       
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-11-29 20:44  twisti
+
+       * src/vm/jit/dseg.h (jumpref, dataref, exceptionref, patchref)
+       (linenumberref): Moved to codegen-common.h.
+       * src/vm/jit/codegen-common.h: Likewise.
+
+2006-11-29 20:34  twisti
+
+       * src/vm/jit/emit-common.c (emit_bc): Commented emit_branch call.
+
+2006-11-29 20:15  twisti
+
+       * src/vm/jit/x86_64/emit.h (config.h): Added.
+       (vm/jit/codegen-common.h): Likewise.
+       (vm/jit/jit.h): Likewise.
+
+2006-11-29 17:08  twisti
+
+       * src/vm/class.h [ENABLE_JAVASE] (vm/annotation.h): Added.
+       [ENABLE_JAVASE] (classinfo): Added runtimevisibleannotationscount,
+       runtimevisibleannotations.
+
+2006-11-29 17:04  twisti
+
+       * src/vm/annotation.c: New file.
+       * src/vm/annotation.h: Likewise.
+       * src/vm/Makefile.am [ENABLE_JAVASE] (ANNOTATION_OBJ): Added.
+
+2006-11-29 17:00  twisti
+
+       * src/vm/resolve.h (vm/field.h): Added.
+
+2006-11-28 22:36  twisti
+
+       * src/vm/jit/emit-common.c (emit_bc): Temporary compile fix
+
+2006-11-28 22:32  twisti
+
+       * src/vm/jit/i386/codegen.h (vm/jit/i386/emit.h): Added.
+
+2006-11-28 22:28  twisti
+
+       * src/vm/statistics.c (count_branches_resolved)
+       (count_branches_unresolved): New variable.
+       (print_stats): Print new variables.
+       
+       * src/vm/statistics.h (count_branches_resolved)
+       (count_branches_unresolved): Added.
+
+2006-11-28 22:25  twisti
+
+       * src/vm/jit/emit-common.c (codegen.h): Added.
+       (vm/options.h): Likewise.
+       [ENABLE_STATISTICS] (vm/statistics.h): Likewise.
+       (emit_bc): New function.
+       (emit_br): Likewise.
+       
+       * src/vm/jit/emit-common.h (emit_branch): Added.
+
+2006-11-28 22:19  twisti
+
+       * src/vm/jit/alpha/codegen.h (BRANCH_NOPS): Defined.
+       * src/vm/jit/i386/codegen.h (BRANCH_NOPS, PATCHER_NOPS): Likewise.
+       * src/vm/jit/mips/codegen.h (BRANCH_NOPS): Likewise.
+       * src/vm/jit/powerpc/codegen.h (BRANCH_NOPS): Likewise.
+       * src/vm/jit/powerpc64/codegen.h (BRANCH_NOPS, PATCHER_CALL_SIZE)
+       (PATCHER_NOPS): Likewise.
+       * src/vm/jit/x86_64/codegen.h (BRANCH_NOPS): Likewise.
+
+2006-11-28 22:04  twisti
+
+       * src/vm/jit/dseg.c (dseg_get_linenumber_from_pc_intern):
+       Short-circuit the common case.
+
+2006-11-28 21:50  twisti
+
+       * src/native/tools/Makefile.am (GC_LIB): Removed.
+
+2006-11-28 19:58  twisti
+
+       * src/vm/jit/emit-common.c (emit_beq, emit_bne, emit_blt, emit_bge)
+       (emit_bgt, emit_ble, emit_bnan): New functions.
+       * src/vm/jit/emit-common.h (emit_beq, emit_bne, emit_blt, emit_bge)
+       (emit_bgt, emit_ble, emit_bnan): Added.
+       
+       * src/vm/jit/codegen-common.h (BRANCH_UNCONDITIONAL, BRANCH_EQ)
+       (BRANCH_NE, BRANCH_LT, BRANCH_GE, BRANCH_GT, BRANCH_LE, BRANCH_NAN):
+       Added.
+
+2006-11-28 19:24  edwin
+
+       *
+       tests/regression/jasmin/test_verify_fail_merge_different_new_objects.j:
+       New test.
+       
+       * tests/regression/jasmin/test_verify_fail_init_nullpointer.j:
+       Likewise.
+       
+       * tests/regression/jasmin/Makefile.am: Added new tests.
+       * src/vm/jit/verify/typeinfo.c (typeinfo_merge_error): Moved debug
+       print into #ifdef TYPEINFO_VERBOSE.
+
+2006-11-28 19:14  twisti
+
+       * src/vm/jit/alpha/codegen.h (PATCHER_CALL_SIZE): Defined.
+
+2006-11-28 15:11  twisti
+
+       * src/native/vm/java_lang_VMThrowable.c
+       (native/include/java_lang_VMClass.h): Removed.
+       (getStackTrace): Use native_class_getname.
+
+2006-11-28 01:07  ajordan
+
+       * src/vm/jit/sparc64/asmpart.S: fixed asm_patcher_wrapper
+       * src/vm/jit/sparc64/patcher.c: updated some patchers and the wrapper
+       * src/vm/jit/sparc64/emit.c: likewise
+       
+       * src/vm/jit/sparc64/codegen.h: fixed M_BRACC
+       
+       * src/vm/jit/sparc64/codegen.c: added reg window workaround for arg
+       register copying.
+       some patch ref updates
+       
+       * src/vm/jit/sparc64/md.c: updated md_codegen_patch_branch()
+
+2006-11-27 20:05  twisti
+
+       * src/vm/jit/powerpc/codegen.h (PATCHER_CALL_SIZE): Defined.
+
+2006-11-27 16:53  edwin
+
+       * src/vm/jit/replace.c: Lazy patching of virtual methods. Cleanup.
+       * src/vm/jit/replace.h: Likewise.
+
+2006-11-27 15:37  edwin
+
+       * src/vm/jit/replace.h (sourceframe_t): Added normalized type
+       of replacement point.
+       
+       * src/vm/jit/replace.c (replace_normalize_type_map): Added
+       normalization table for replacement point types.
+       (replace_read_executionstate): Set normalized type of rplpoint.
+       (replace_find_replacement_point): Match normalized type of rplpoint.
+       (replace_source_frame_println): Print it.
+
+2006-11-27 15:29  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): set marker in line number table
+       _after_ inlining prolog (This fixes the stacktrace for the CHECKNULL
+       in
+       the prolog.)
+       
+       * src/vm/jit/dseg.c (dseg_addlinenumber_inline_start): Document that
+       it is now called with the INLINE_BODY instruction.
+
+2006-11-27 15:24  edwin
+
+       * src/vm/jit/i386/codegen.cn (codegen): Use the new functions for
+       setting replacement point addresses.
+
+2006-11-27 15:23  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_set_replacement_point_notrap):
+       New function.
+       (codegen_set_replacement_point): Likewise.
+       
+       * src/vm/jit/codegen-common.h (codegendata): Added field
+       `replacementpoint`.
+       (codegen_set_replacement_point_notrap): Added prototype.
+       (codegen_set_replacement_point): Likewise.
+       
+       * src/vm/jit/replace.h (RPLPOINT_CHECK): New macro.
+       (RPLPOINT_CHECK_BB): Likewise.
+
+2006-11-27 15:19  edwin
+
+       * src/vm/jit/replace.c
+       (replace_create_inline_start_replacement_point):
+       New function.
+       (replace_create_replacement_points): Cleaned up.
+
+2006-11-27 15:15  edwin
+
+       * src/vm/jit/stack.c (stack_javalocals_store): New function.
+       * src/vm/jit/stack.h (stack_javalocals_store): Likewise.
+       
+       * src/vm/jit/inline/inline.c (inline_clone_instruction): Use
+       stack_javalocals_store.
+       
+       * src/vm/jit/replace.c (replace_create_replacement_points): Use
+       stack_javalocals_store. Other cleanups.
+
+2006-11-27 15:11  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_points): Create
+       non-trappable replacement point for INLINE_BODY.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Handle replacement point
+       for INLINE_BODY.
+
+2006-11-27 15:06  edwin
+
+       * src/vm/jit/replace.h (RPLPOINT_TYPE_BODY): Added.
+       * src/vm/jit/replace.c: Likewise.
+
+2006-11-27 15:03  edwin
+
+       * src/vm/jit/inline/inline.c (emit_inlining_prolog): Do not emit
+       CHECKNULL in prolog for <init> methods.
+
+2006-11-27 15:02  edwin
+
+       * src/vm/jit/inline/inline.c (emit_inlining_prolog): Emit INLINE_BODY
+       instructions at end of prolog.
+
+2006-11-27 14:58  edwin
+
+       * src/vm/jit/icmdtable.inc (INLINE_GOTO): Removed.
+       (INLINE_BODY): Added. This instruction will mark the start of the
+       inlined method body after the prolog.
+       
+       * src/vm/jit/jit.h: Likewise.
+       
+       * src/vm/jit/show.c (show_icmd): Likewise.
+       
+       * src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
+       Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.
+
+2006-11-27 14:48  edwin
+
+       * src/vm/jit/i386/emit.c (emit_memabs): Removed.
+       (emit_alu_imm_memabs): Use emit_mem.
+
+2006-11-27 14:39  edwin
+
+       * src/vm/jit/stack.c (stack_reanalyse_block): Removed bogus cases
+       for INLINE_ instructions. They cannot occur here.
+       (stack_analyse): Likewise.
+
+2006-11-27 14:37  michi
+
+       * src/mm/gc-common.h: Added prototype for heap_init_objectheader.
+       * src/vm/builtin.c (builtin_clone): Object header gets initiated
+       after cloning.
+
+2006-11-27 14:35  edwin
+
+       * src/vm/jit/jit.c (jit_invalidate_code): Do not trap non-trappable
+       replacement points.
+       (jit_request_optimization): New function.
+       (jit_get_current_code): New function.
+       
+       * src/vm/jit/jit.h (jit_request_optimization): Added prototype.
+       (jit_get_current_code): Likewise.
+       
+       * src/vm/jit/replace.h (RPLPOINT_FLAG_NOTRAP): New flag.
+       
+       * src/vm/jit/replace.c (replace_replacement_point_println): Prepared
+       for new flag.
+
+2006-11-27 14:27  edwin
+
+       * src/vm/jit/jit.c (jit_invalidate_code): Do not activate RETURN
+       rplpoints when invalidating code (they cannot be mapped to inlined
+       versions of the code).
+
+2006-11-27 14:26  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_points): Some fixes
+       for inlining.
+
+2006-11-27 14:24  edwin
+
+       * src/vm/jit/replace.c (replace_find_replacement_point): Match parent
+       of replacement point.
+       (replace_me): Keep parent of rplpoint around.
+
+2006-11-27 14:20  edwin
+
+       * src/vm/jit/i386/emit.c (emit_memabs): New function.
+       (emit_alu_imm_memabs): New function.
+       
+       * src/vm/jit/i386/emit.h (emit_alu_imm_memabs): Added prototype.
+       
+       * src/vm/jit/i386/codegen.h (M_ISUB_IMM_MEMABS): New macro.
+
+2006-11-25 16:32  michi
+
+       * src/mm/cacao-gc/gc.h: Added.
+       * src/mm/cacao-gc/gc.c: Debugging with gc_call. Added some
+       development breaks.
+       Added gc_get_heap_size, gc_get_free_bytes, gc_get_total_bytes and
+       gc_get_max_heap_size.
+
+2006-11-22 21:19  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use new dseg_add_* functions,
+       replaced codegen_addreference with codegen_add_branch_ref.
+       (createnativestub): Likewise.
+       * src/vm/jit/x86_64/emit.c (emit_patcher_stubs): Likewise.
+
+2006-11-22 20:24  twisti
+
+       * src/vm/jit/stacktrace.c (linenumbertable_entry): Removed.
+       (stacktrace_add_method_intern): Removed.
+       (stacktrace_add_method): Call dseg_get_linenumber_from_pc.
+       
+       * src/vm/jit/dseg.c (vm/jit/methodheader.h): Added.
+       (dseg_get_linenumber_from_pc_intern): New function.
+       (dseg_get_linenumber_from_pc): Likewise.
+       
+       * src/vm/jit/dseg.h (linenumbertable_entry): Added.
+       (dseg_get_linenumber_from_pc): Likewise.
+       
+       * src/vm/jit/show.c (show_method): Renamed u1ptr to pc.
+       (show_basicblock): Use dseg_get_linenumber_from_pc to diplay line
+       number in disassembly.
+
+2006-11-22 19:00  twisti
+
+       * src/mm/gc-common.h [DISABLE_GC] (nogc_init, nogc_realloc): Removed.
+
+2006-11-22 18:22  edwin
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Do not generate code for
+       ASTORE
+       storing a returnAddress, as 1) the store is dead, and 2) the dest.
+       variable has no valid allocation.
+
+2006-11-22 18:20  edwin
+
+       * src/vm/jit/sparc64/codegen.c (codegen): Do not generate code for
+       ASTORE
+       storing a returnAddress, as 1) the store is dead, and 2) the dest.
+       variable has no valid allocation.
+
+2006-11-22 18:18  edwin
+
+       * src/vm/jit/powerpc64/codegen.c (codegen): Do not generate code for
+       ASTORE
+       storing a returnAddress, as 1) the store is dead, and 2) the dest.
+       variable has no valid allocation.
+
+2006-11-22 18:16  edwin
+
+       * src/vm/jit/mips/codegen.c (codegen): Do not generate code for ASTORE
+       storing a returnAddress, as 1) the store is dead, and 2) the dest.
+       variable has no valid allocation.
+
+2006-11-22 18:12  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Do not generate code for ASTORE
+       storing a returnAddress, as 1) the store is dead, and 2) the dest.
+       variable has no valid allocation.
+
+2006-11-22 18:09  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Do not generate code for
+       ASTORE
+       storing a returnAddress, as 1) the store is dead, and 2) the dest.
+       variable has no valid allocation.
+
+2006-11-22 18:03  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Do not generate code for
+       ASTORE
+       storing a returnAddress, as 1) the store is dead, and 2) the dest.
+       variable has no valid allocation.
+
+2006-11-22 11:05  twisti
+
+       * configure.ac: Added *kfreebsd*-gnu.
+       * src/vm/suck.c (scandir_filter) [_DIRENT_HAVE_D_NAMLEN]: Bugfix.
+
+2006-11-22 10:50  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Use new dseg_add_* functions.
+       (createnativestub): Likewise.
+       * src/vm/jit/i386/emit.c (emit_patcher_stubs): Likewise.
+
+2006-11-21 23:21  twisti
+
+       * native.c (native_class_getname): New function.
+       * native.h (native_class_getname): Added.
+       * vm/java_lang_VMClass.c (getName): Use native_class_getname.
+
+2006-11-21 21:02  twisti
+
+       * src/vm/builtin.c [DISABLE_GC] (builtin_idiv): Added.
+       (builtin_f2i): Likewise.
+       (builtin_d2i): Likewise.
+       
+       * src/vm/vm.c (vm_create): Removed nogc_init call.
+       * src/cacaoh/cacaoh.c (main): Likewise.
+       
+       * src/mm/nogc.c (nogc_realloc): Removed.
+       (nogc_init): Renamed to gc_init.
+       (gc_init): Removed.
+       (gc_get_total_bytes): Added.
+       
+       * src/mm/memory.h [DISABLE_GC] (NEW, FREE, MNEW, MFREE, MREALLOC):
+       Removed.
+
+2006-11-21 16:56  michi
+
+       * src/vm/loader.c (load_class_from_classbuffer) [ENABLE_GC_CACAO]:
+       Fieldinfos
+       are no longer placed onto the heap.
+       
+       * src/vm/class.c (class_free) [ENABLE_GC_CACAO]: Fieldinfos are freed.
+
+2006-11-20 18:57  tbfg
+
+       * src/vm/jit/powerpc64/codegen.c (codegen): Replace dseg_add*
+       by dseg_add_* functions.
+       
+       * src/vm/jit/powerpc64/emit.c: Likewise.
+
+2006-11-20 16:18  twisti
+
+       * src/vm/jit/dseg.h (dseg_adds4, dseg_adds8, dseg_addfloat)
+       (dseg_adddouble, dseg_addaddress, dseg_addtarget): Removed.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Removed remaining old-dseg_add
+       calls.
+       * src/vm/jit/alpha/emit.c (emit_iconst): Replaced dseg_adds4 with
+       dseg_add_s4.
+       (emit_lconst): Replaced dseg_adds8 with dseg_add_s8.
+
+2006-11-20 14:18  michi
+
+       * src/vm/global.h: Added hdrflags to java_objectheader for exact
+       Cacao-GC.
+       * src/threads/native/lock.c: Now uses hdrflags to store the FLC bit.
+
+2006-11-19 18:25  michi
+
+       * src/mm/cacao-gc/Makefile.am: Added mark.c
+       * src/mm/cacao-gc/mark.c: Added
+
+2006-11-19 15:40  edwin
+
+       * src/vm/jit/replace.c: Only recompile if necessary. Count
+       re-compilations.
+
+2006-11-19 15:39  edwin
+
+       * src/vm/jit/replace.c: Added statistics code.
+
+2006-11-19 15:36  edwin
+
+       * src/vm/jit/replace.c (replace_me): Only turn off replacement
+       points for self-replacement. Warn in this case.
+
+2006-11-19 15:33  edwin
+
+       * src/vm/jit/replace.c (replace_write_executionstate): Take
+       synchronization slots from next frame for inline points.
+
+2006-11-19 15:28  edwin
+
+       * src/vm/jit/replace.c: Handle and match returnAddress variables on
+       the java stack.
+
+2006-11-19 15:22  edwin
+
+       * src/vm/jit/stack.c (stack_analyse): Keep TYPE_RET for variables
+       of returnAddress type. Do not create interfaces for this type.
+       Mark block variables of TYPE_RET as PREALLOC to avoid subsequent
+       allocation.
+       
+       * src/vm/jit/icmdtable.inc (ASTORE): Added TYPE_RET (R--) variant.
+       (JSR): Changed destination type to TYPE_RET (R).
+       
+       * src/vm/jit/verify/icmds.c (ICMD_RET): Check local for type
+       TYPE_RET.
+       
+       * src/vm/jit/verify/typeinfo.h (TYPE_IS_RETURNADDRESS): Check type
+       for TYPE_RET.
+       
+       * src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.
+
+2006-11-19 15:10  edwin
+
+       * src/vm/jit/jit.c (jit_invalidate_code): Activate replacement points
+       in reverse order. This avoid creating invalid code when rplpoints
+       within a block overlap each other. It is not a complete solution for
+       overlapping replacement points, however.
+
+2006-11-19 15:08  edwin
+
+       * src/vm/jit/inline/inline.c (translate_javalocals): Adapted to
+       returnAddress variables in javalocals.
+       (inline_clone_instruction): Likewise.
+
+2006-11-19 15:04  edwin
+
+       * src/vm/jit/stack.c (stack_mark_reached): Fix: Do not compare basic
+       block addresses. Compare numbers instead.
+       (stack_mark_reached_from_outvars): Likewise.
+
+2006-11-19 15:03  edwin
+
+       * src/vm/jit/jit.h (INS_FLAG_CLASS): Comment that this flag is also
+       used for PUTFIELDCONST and PUTSTATICCONST.
+       
+       * src/vm/jit/verify/icmds.c (ICMD_PUTFIELDCONST, ICMD_PUTSTATICCONST):
+       Honor the INS_FLAG_CLASS flag and set the right type.
+       
+       * src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.
+
+2006-11-19 14:56  edwin
+
+       * src/vm/jit/stack.c (stack_analyse): Show state after last ICMD in
+       block.
+       (stack_verbose_show_block): Use show_javalocals_array.
+       (stack_verbose_show_state): Likewise. Accept iptr == NULL.
+
+2006-11-19 14:51  edwin
+
+       * src/vm/jit/replace.c (replace_source_frame_println): Fixed printing
+       of source stack.
+
+2006-11-19 14:50  edwin
+
+       * src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
+       Do not clear vv.regoff for ICMD_JSR (we need vv.retaddr later).
+
+2006-11-18 22:16  twisti
+
+       * src/vm/properties.c (properties_add): Use unsynced functions of
+       list.
+       (properties_get): Likewise.
+
+2006-11-17 15:47  twisti
+
+       * src/vm/properties.c (properties_add): Replace entry if it already
+       exists.
+
+2006-11-16 22:14  twisti
+
+       * src/vm/builtin.c (native/native.h)
+       (native/include/java_lang_Cloneable.h)
+       (native/include/java_lang_Object.h)
+       (native/include/java_lang_VMObject.h): Removed.
+       (builtin_clone_array): Renamed to builtin_clone, reimplemented.
+       
+       * src/vm/builtin.h (builtin_clone_array): Renamed to builtin_clone.
+       (BUILTIN_clone): Defined.
+       
+       * src/vm/loader.c (load_newly_created_array): Use BUILTIN_clone.
+       
+       * src/native/vm/java_lang_VMObject.c (clone): Removed implementation
+       and call builtin_clone.
+
+2006-11-16 19:45  twisti
+
+       * src/vm/class.h (classinfo): Typedef added.
+       * src/vm/descriptor.h (typedesc): Likewise.
+       (methoddesc): Likewise.
+       * src/vm/field.h (fieldinfo): Likewise.
+       * src/vm/method.h (methodinfo): Likewise.
+       
+       * src/vm/references.h (config.h, vm/types.h, vm/class.h)
+       (vm/descriptor.h, vm/field.h, vm/method.h): Likewise.
+       (classinfo, methodinfo, fieldinfo, typedesc, methoddesc): Removed.
+       (constant_classref, classref_or_classinfo, parseddesc): Moved.
+
+2006-11-16 15:56  twisti
+
+       * src/vm/vm.c (vm_createjvm): New function.
+       * src/vm/vm.h (vm_createjvm): Added.
+       
+       * src/cacao/cacao.c (main): Resolve and call vm_createjvm instead of
+       JNI_CreateJavaVM.
+       
+       * src/native/jni.c (jni_init_localref_table): Made non-static.
+       (JNI_CreateJavaVM): Moved implementation into vm_createjvm.
+       * src/native/jni.h (jni_init_localref_table): Added.
+
+2006-11-16 00:02  edwin
+
+       * src/vm/jit/stack.c (stack_analyse): Fix: Reset deadcode when
+       re-analysing a block.
+
+2006-11-15 23:45  edwin
+
+       * src/vm/jit/verify/generate.pl: Prepared for LOAD instructions with
+       multiple variants (will be needed for ASTORE).
+
+2006-11-15 23:44  edwin
+
+       * src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
+       Ignore TYPE_RET interface variables. (Preparation.)
+       
+       * src/vm/jit/show.c (show_allocation): Prepared for TYPE_RET
+       variables.
+       (show_variable_intern): Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (STORE_LOCAL): Made the macro safer.
+       (STORE_LOCAL_2_WORD): Likewise.
+       
+       * src/vm/jit/verify/typeinfo.c (typeinfo_print_type): Prepared for
+       TYPE_RET variables.
+       
+       * src/vm/jit/replace.c (replace_source_frame_println): Prepared for
+       void stackslots.
+
+2006-11-15 23:37  edwin
+
+       * src/vm/jit/jit.c (jit_recompile): Set verbosecall flag.
+
+2006-11-15 23:36  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_points): Fix: Only
+       put a replacement point at a back branch target if the block does not
+       contain any other replacement point.
+       
+       (replace_read_executionstate): Better debugging helpers.
+       (replace_me): Likewise.
+       
+       * src/vm/jit/replace.h (sourceframe_t): Added a field for debugging.
+
+2006-11-15 23:33  edwin
+
+       * src/vm/jit/stack.c (stack_reanalyse_block): Encode returnAddresses
+       in the javalocals array.
+       (stack_analyse): Likewise.
+       
+       * src/vm/jit/replace.c (replace_create_replacement_point): Store
+       returnAddresses in replacement points.
+       (replace_create_replacement_points): Encode returnAddresses in
+       javalocals.
+       (replace_read_executionstate): Ignore returnAddresses.
+       (replace_write_executionstate): Likewise.
+       (replace_find_replacement_point): Match returnAddresses.
+
+2006-11-15 23:30  edwin
+
+       * src/vm/jit/show.h (show_javalocals_array): New function.
+       
+       * src/vm/jit/show.c (show_javalocals_array): New function.
+       (show_icmd): Prepared for showing returnAddresses.
+       
+       * src/vm/jit/replace.c (replace_replacement_point_println): Prepared
+       for showing constant returnAddresses.
+       
+       * src/vm/jit/replace.h (rplalloc): Made type unsigned, so it will be
+       able to hold TYPE_RET (8).
+       
+       * src/vm/jit/jit.h (s2_operand_t): Added field `retaddrnr` that will
+       be used by ASTORE with returnAddresses.
+
+2006-11-15 23:24  edwin
+
+       * src/vm/jit/inline/inline.c (inline_inline_intern): Removed some
+       unused code.
+
+2006-11-15 23:23  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Fix: Put RETURN replacement
+       points before the emit_load. This code needs cleaning up.
+
+2006-11-15 23:21  edwin
+
+       * src/vm/jit/replace.c: Partial implementation of synchronization
+       slot translation. Translating synchronized INLINE <-> CALL needs more
+       work.
+
+2006-11-15 23:19  edwin
+
+       * src/vm/jit/replace.c (replace_find_replacement_poin): Fix: Compare
+       both id and method when searching a replacement point.
+       (replace_executionstate_println): Prettier printing.
+       
+       * src/vm/jit/replace.h (replace_pop_activation_record): Removed
+       prototype.
+
+2006-11-15 23:17  edwin
+
+       * src/vm/jit/inline/inline.c (inline_instruction): New function.
+       Factored code out of other functions generation instructions.
+
+2006-11-15 23:15  edwin
+
+       * src/vm/jit/jit.h (insinfo_inline): Added field `paramcount`.
+       
+       * src/vm/jit/inline/inline.c (inline_generate_sync_builtin): New
+       function. Generate explicit MONITORENTER/EXIT instructions.
+       (emit_inlining_prolog): Moved INLINE_START to the beginning of the
+       prolog. Explicit synchronization.
+       (emit_inlining_epilog): Explicit synchronization.
+       (rewrite_method): Use epilog_instructioncount.
+       (inline_analyse_callee): Explicit synchronization.
+       
+       * src/vm/jit/i386/codegen.c (ICMD_INLINE_START): Removed implicit
+       synchronization.
+       (ICMD_INLINE_END): Likewise.
+       
+       * src/vm/jit/replace.c (replace_create_replacement_point): Handle
+       parameters for top frames.
+       (replace_create_replacement_points): Likewise.
+       (replace_read_executionstate): Likewise.
+       (replace_write_executionstate): Likewise.
+       (replace_me): Likewise.
+
+2006-11-15 23:08  edwin
+
+       * src/vm/jit/replace.h (RPLALLOC_STACK, RPLALLOC_PARAM,
+       RPLALLOC_SYNC):
+       New constants.
+       
+       * src/vm/jit/replace.c (replace_push_activation_record): Fix:
+       Decrement
+       SP _before_ writing the return address.
+       (replace_me): More logging.
+       (replace_replacement_point_println): More logging.
+       (replace_executionstate_println): Prettier printing.
+
+2006-11-15 23:02  edwin
+
+       * src/vm/jit/code.h (codeinfo): Added field `invalid`. (Should become
+       a flag, later.)
+       * src/vm/jit/jit.c (jit_recompile): Fixed for first compilation. Do
+       not
+       refuse to recompile.
+
+2006-11-15 22:59  edwin
+
+       * src/vm/jit/inline/inline.c (inline_inline_intern): Do not inline
+       abstract methods (need to search for single implementation).
+
+2006-11-15 22:47  edwin
+
+       * src/vm/jit/replace.c (replace_me): Small cleanup.
+       * src/vm/jit/inline/inline.c (create_body_block): Do not translate
+       javalocals for dead code.
+       (inline_inline_intern): Fixed flag check.
+
+2006-11-15 22:46  edwin
+
+       * src/vm/method.c (method_printflags): Print MONOMORPHIC and
+       IMPLEMENTED flags.
+
+2006-11-15 18:26  twisti
+
+       * src/vm/properties.c (properties_init) [ENABLE_JAVASE]: Allocate the
+       utsname structure on the heap.
+
+2006-11-15 18:09  twisti
+
+       * src/vm/properties.c (properties_init) [ENABLE_JAVASE]: Don't free
+       memory, we need it later.
+
+2006-11-15 18:01  twisti
+
+       * src/cacaoh/headers.c (cacao_prefix, classpath_libdir, _Jv_classpath)
+       (_Jv_java_library_path): Added.
+
+2006-11-15 17:58  twisti
+
+       * src/vm/properties.c (properties_init): Also fill the internal
+       property table.
+       (properties_postinit): Re-set some properties that may have changed.
+       (properties_system_add): Removed.
+       [ENABLE_JAVASE] (properties_system_add_all): Rewritten.
+       
+       * src/vm/properties.h (properties_postinit): Changed signature.
+       (properties_system_add): Removed.
+       [ENABLE_JAVASE] (properties_system_add_all): Added.
+       
+       * src/native/vm/gnu_classpath_VMSystemProperties.c (preInit): Moved
+       implementation to properties.
+       
+       * src/vm/vm.c (vm_create): Call properties_postinit.
+
+2006-11-15 17:46  twisti
+
+       * src/vm/vm.c (vm_create): Don't initialize java/lang/System
+       explicitely.
+
+2006-11-15 16:25  twisti
+
+       * configure.ac (--enable-java): Added.
+
+2006-11-15 15:52  twisti
+
+       * src/vm/jit/parse.c (parse): Added missing semi-colon.
+
+2006-11-15 15:47  edwin
+
+       * src/vm/jit/icmdtable.inc (CHECKNULL_POP): Removed.
+       
+       * src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.
+
+2006-11-15 15:42  twisti
+
+       * src/vm/jit/jit.h (ICMD_CHECKNULL_POP): Removed.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/show.c: Likewise.
+
+2006-11-15 15:30  twisti
+
+       Reverted patch 5890.
+       
+       * src/vm/jit/jit.h: Reverted.
+       
+       * src/vm/jit/alpha/codegen.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/powerpc/codegen.c: Likewise.
+       * src/vm/jit/powerpc64/codegen.c: Likewise.
+       * src/vm/jit/sparc64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/intrp/codegen.c: Likewise.
+       
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/verify/typecheck-stackbased-gen.inc: Likewise.
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.
+
+2006-11-15 13:44  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.c (md_param_alloc): Fixed
+       preallocation.
+       
+       * src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method): Fixed
+       argument handling.
+
+2006-11-15 12:25  twisti
+
+       * src/vm/jit/jit.h (ICMD_CHECKNULL): Renamed to ICMD_CHECKNULL_POP.
+       
+       * src/vm/jit/alpha/codegen.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/powerpc/codegen.c: Likewise.
+       * src/vm/jit/powerpc64/codegen.c: Likewise.
+       * src/vm/jit/sparc64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/intrp/codegen.c: Likewise.
+       
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       
+       * src/vm/jit/verify/typecheck-stackbased-gen.inc (ICMD_CHECKNULL):
+       Removed.
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.
+
+2006-11-14 21:56  twisti
+
+       * src/jit/verify/typecheck-stackbased.c (mm/memory.h): Added.
+       * src/jit/powerpc/emit.c (mm/memory.h): Likewise.
+       * src/signal.c (mm/memory.h): Likewise.
+
+2006-11-13 21:43  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.c (md_param_alloc): Began
+       fixing ABI issues. It is not correct now, but fptest runs now.
+       Remaining issues in java<->native mainly stack offsets.
+       
+       * src/vm/jit/powerpc64/emit.c (emit_load): Removed M_ILD case.
+       (emit_store): Removed M_FST case. There is no M_FST expect for
+       accessing c structs, internally everything is done using M_DLD
+       and M_DST, M_FST would convert the values.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen): Removed all M_FST and
+       M_FLD.
+       
+       * src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method): Fixed
+       argument passing on stack.
+
+2006-11-12 15:42  edwin
+
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.
+
+2006-11-12 15:41  edwin
+
+       * src/vm/jit/icmdtable.inc: Activate INLINE_START and INLINE_END.
+
+2006-11-12 15:33  edwin
+
+       * src/vm/linker.c (inline_debug_log): Added variable reference.
+       (linker_overwrite_method): Factored out overwriting into this
+       function,
+       update method flags and check assumptions when overwriting.
+       (link_class_intern): Use linker_overwrite_method. Invalidate code of
+       methods that makes broken assumptions.
+       
+       * src/vm/method.c (inline_debug_log): Only use for ENABLE_INLINING.
+       (method_add_to_worklist): Allocate items with NEW.
+
+2006-11-12 15:14  edwin
+
+       * src/vm/method.h (method_assumption): New struct.
+       (method_worklist): New struct.
+       (methodinfo): Added fields `overwrites` and `assumptions`.
+       (method_add_assumption_monomorphic): Added prototype.
+       (method_break_assumption_monomorphic): Likewise.
+       
+       * src/vm/method.c (inline_debug_log): Added variable reference.
+       (method_add_to_worklist): New function.
+       (method_add_assumption_monomorphic): Likewise.
+       (method_break_assumption_monomorphic): Likewise.
+
+2006-11-12 15:01  edwin
+
+       * src/cacaoh/headers.c (inline_debug_log): Added dummy variable.
+
+2006-11-12 15:00  edwin
+
+       * src/vm/loader.c (load_method): Set ACC_METHOD_MONOMORPHIC and
+       ACC_METHOD_IMPLEMENTED flags.
+
+2006-11-12 13:55  edwin
+
+       * src/vm/jit/replace.c (replace_me): Recompile replacement methods.
+
+2006-11-12 13:54  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_point): Use the
+       ICMD id as id for replacement points.
+       (replace_replacement_point_println): Print the rplpoint id.
+
+2006-11-12 13:52  edwin
+
+       * src/vm/jit/replace.c (replace_source_frame_println): Print position
+       id.
+       * src/vm/jit/replace.c (replace_pop_activation_record): Subtract one
+       from the return address so we don't hit the following replacement
+       point.
+
+2006-11-12 13:51  edwin
+
+       * src/vm/jit/replace.c (replace_write_executionstate): Added some
+       asserts.
+
+2006-11-12 13:50  edwin
+
+       * src/vm/jit/replace.c: Cleaned up debugging prints.
+
+2006-11-12 13:47  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_points): Handle
+       javaindex == UNUSED.
+
+2006-11-12 13:46  edwin
+
+       * src/vm/jit/jit.h, src/vm/jit/jit.c (jit_invalidate_code):
+       New function.
+
+2006-11-12 13:40  edwin
+
+       * src/vm/jit/jit.c (jit_recompile): Some cleanups.
+
+2006-11-12 13:39  edwin
+
+       * src/vm/jit/i386/md.c (md_patch_replacement_point): Deactivated
+       debugging print.
+       * src/cacaoh/headers.c (jit_invalidate_code): Added stub.
+
+2006-11-12 13:38  edwin
+
+       * src/vm/jit/inline/inline.c (emit_inlining_prolog): Set javaindex
+       UNUSED for generated STOREs. Include local variables in stackvars
+       for insinfo_inline. Copy instruction id to INLINE_START.
+       (inline_clone_instruction): Check for javaindex == UNUSED.
+       (rewrite_method): Set javaindex UNUSED for generated STOREs.
+       (inline_inline_intern): Removed some testing code.
+
+2006-11-12 13:31  edwin
+
+       * src/vm/jit/parse.c, src/vm/jit/parse.h (Changes): Merged with
+       Authors.
+
+2006-11-12 13:21  edwin
+
+       * src/vm/jit/jit.h (INS_FLAG_ID_SHIFT, INS_FLAG_ID_MASK): Added. We
+       add
+       an instruction id to the flags field. This is a first attempt to
+       obtain
+       an id for ICMDs that is not dependent on any optimizations or
+       transformations in the compiler. The id is not the same as the
+       bytecode
+       PC, but it has a fixed relation to the bytecode PC, so it should be
+       sufficient at least for replacement. This is an intermediate solution
+       with serious shortcommings, and should be replaced by a true ICMD-to-
+       bytecode-PC mapping in the future. (For example, the id uses up all
+       the free bits in the flags field, and it is not protected against
+       overflow.)
+       
+       * src/vm/jit/parse.h, src/vm/jit/parse.c: Set the instruction id, and
+       do not overwrite it when setting other flags.
+       
+       * src/vm/jit/stack.c: Do not clear the instruction id.
+       
+       * src/vm/jit/show.c (show_basicblock): Display the instruction id.
+
+2006-11-12 12:57  twisti
+
+       * src/vm/jit/powerpc64/codegen.c (codegen): Fixed ICMD_BALOAD, use
+       correct java_bytearray type.
+
+2006-11-12 12:55  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Fixed ICMD_BALOAD, use
+       correct java_bytearray type.
+
+2006-11-12 12:54  edwin
+
+       * src/vm/jit/parse.h: Fixed typos.
+
+2006-11-11 19:26  ajordan
+
+       * src/vm/jit/sparc64/*: implemented patching (partly), adherent fixes.
+
+2006-11-11 18:45  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Use emit_array_checks.
+
+2006-11-11 18:34  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Replaced gen_bound_check by
+       emit_arrayindexoutofbounds_check.
+
+2006-11-11 18:31  twisti
+
+       * src/vm/jit/alpha/emit.c (vm/options.h): Added.
+       (emit_arrayindexoutofbounds_check): New function.
+       (emit_arraystore_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Removed patch-NOPs generation,
+       replaced gen_nullptr_check with emit_nullpointer_check.
+       (createnativestub): Removed patch-NOPs generation.
+       
+       * src/vm/jit/alpha/codegen.h (gen_nullptr_check): Removed.
+       (PATCHER_NOPS): Added.
+       
+       * src/vm/jit/alpha/patcher.c (patcher_get_putfield): Use opt_shownops
+       instead of opt_showdisassemble.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       
+       * src/vm/jit/emit-common.c (emit_array_checks): Added [__ALPHA__].
+       * src/vm/jit/codegen-common.c (codegen_add_patch_ref): Likewise.
+
+2006-11-11 17:08  edwin
+
+       * src/vm/jit/tools/genoffsets.c (executionstate): Renamed to
+       executionstate_t.
+       * src/vm/jit/asmpart.h: Likewise.
+       
+       * src/vm/jit/show.c (show_variable_intern): New function. Does not
+       append ' '. Regard variables above vartop as invalid.
+       (show_method): Only show variables up to vartop.
+       (show_inline_info): New function.
+       (show_basicblock): Show right number of javalocals, show inlining
+       info at the start of blocks.
+       (show_variable): Moved body to show_variable_intern.
+       (show_icmd): Use show_inline_info.
+       
+       * src/vm/jit/inline/inline.c: Handle javalocals.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Handle replacement points
+       for INLINE_START, RETURN and INVOKEs.
+       
+       * src/vm/jit/replace.c: Many changes for making replacement work
+       over multiple stack frames.
+       * src/vm/jit/replace.h: Likewise.
+       
+       * src/vm/jit/jit.h (insinfo_inline): Added fields.
+       (basicblock): Added field `inlineinfo`.
+
+2006-11-11 17:05  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Renamed codegen_addpatchref to
+       codegen_add_patch_ref and codegen_addreference to
+       codegen_add_branch_ref.
+       (createnativestub): Likewise.
+
+2006-11-11 16:56  twisti
+
+       * src/vm/jit/alpha/md.c (md_codegen_patch_branch): New function.
+       * src/vm/jit/alpha/emit.c (emit_exception_stubs): Use
+       md_codegen_patch_branch.
+       * src/vm/jit/alpha/codegen.c (codegen): Use
+       codegen_resolve_branchrefs.
+       * src/vm/jit/alpha/codegen.h (gen_resolvebranch): Removed.
+
+2006-11-11 16:44  twisti
+
+       * configure.ac: Support mipsel architectures.
+
+2006-11-11 14:28  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_add_patch_ref): Added
+       [__X86_64__] for NOP-generation.
+
+2006-11-10 16:41  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use
+       codegen_resolve_branchrefs, removed patcher NOP generation, renamed
+       codegen_addpatchref to codegen_add_patch_ref.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/x86_64/codegen.h (PATCHER_NOPS): Defined.
+       
+       * src/vm/jit/x86_64/patcher.c (patcher_get_putstatic): Use
+       opt_shownops instead of opt_showdisassemble.
+       (patcher_get_putfield): Likewise.
+       (patcher_putfieldconst): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_class): Likewise.
+       (patcher_instanceof_class): Likewise.
+       (patcher_resolve_native): Likewise.
+
+2006-11-10 12:32  twisti
+
+       * src/vm/jit/x86_64/md.c (md_codegen_patch_branch): New function.
+       * src/vm/jit/x86_64/emit.c (emit_exception_stubs): Use
+       md_codegen_patch_branch.
+
+2006-11-09 15:27  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Use codegen_add_branch_ref,
+       removed opt_shownops code.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.h (PATCHER_NOPS): Added.
+       * src/vm/jit/mips/codegen.h (PATCHER_NOPS): Removed opt_shownops
+       check.
+       
+       * src/vm/jit/codegen-common.c (codegen_add_patch_ref): Check for
+       opt_shownops, added [__POWERPC__].
+
+2006-11-09 10:52  twisti
+
+       * src/vm/jit/powerpc/emit.c (vm/options.h): Added.
+       (emit_nullpointer_check): New function.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_exception_stubs): Use md_codegen_patch_branch.
+       
+       * src/vm/jit/powerpc/md.c (vm/jit/powerpc/codegen.h): Added.
+       (md_codegen_patch_branch): New function.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Use
+       codegen_resolve_branchrefs, use opt_shownops, removed buggy ICMD_LCMP
+       implementation (i'll add a new one if i find some time), use exception
+       emit_* functions.
+       (createnativestub): Use opt_shownops.
+       
+       * src/vm/jit/powerpc/patcher.c (patcher_get_putfield): Use
+       opt_shownops.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.h (gen_nullptr_check): Removed.
+       (gen_bound_check): Likewise.
+       (M_BRAMASK): Renamed to M_BMASK.
+       (M_BRMASK): Renamed to M_BCMASK.
+       (M_BRA): Renamed to M_B and hardcoded the opcode.
+       (M_BRAC): Renamed to M_BC and hardcoded the opcode.
+       (gen_resolvebranch): Removed.
+       
+       * src/vm/jit/emit-common.c (emit_array_checks): New function.
+       * src/vm/jit/emit-common.h (emit_array_checks): Added.
+
+2006-11-09 10:23  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_add_method): Get codeinfo from
+       data segment.
+
+2006-11-09 09:59  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.h: Changed ABI for float
+       arguments.
+       
+       * src/vm/jit/powerpc64/linux/md-asm.h: Likewise.
+       
+       * src/vm/jit/powerpc64/linux/md-abi.c: Likewise.
+       
+       * src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method): Various
+       argument handling fixes.
+       
+       * src/vm/jit/powerpc64/codegen.h (M_BRAC): Renamed to M_BC
+       (M_BRA): Renamed to M_B
+       (M_BRACMASK): Renamed to M_BCMASK.
+       (M_BRAMASK): Renamed to M_BMASK.
+       
+       * src/vm/jit/powerpc64/md.c (md_codegen_patch_branch): Use M_BCMASK
+       and M_BMASK instead of hardcoded masks.
+
+2006-11-09 09:54  twisti
+
+       * src/vm/jit/powerpc/linux/md-os.c (vm/jit/profile/profile.h): Changed
+       to vm/jit/optimizing/profile.h.
+       (md_signal_handler_sigsegv): If faulting address is not equal 0, try
+       to dump a tsacktrace and exit.
+
+2006-11-08 22:02  twisti
+
+       * NEWS: Added release 0.98.
+
+2006-11-08 22:00  twisti
+
+       * src/vm/method.h (methodinfo): Added signature.
+       * src/vm/field.h (fieldinfo): Added signature.
+       * src/vm/loader.c (load_method): Load signature attribute.
+       (load_field): Likewise.
+       * src/native/vm/java_lang_reflect_Method.c (getSignature):
+       Implemented.
+       * src/native/vm/java_lang_reflect_Field.c (getSignature): Likewise.
+
+2006-11-08 20:34  edwin
+
+       * src/vm/jit/code.h (codeinfo): Added field stackframesize.
+       * src/vm/jit/code.c (code_get_stack_frame_size): Return
+       code->stackframesize.
+       
+       * src/vm/jit/replace.c (replace_create_replacement_points): Set
+       code->stackframesize.
+       (replace_read_executionstate): Read stack types from rplallocs.
+       (replace_write_executionstate): Check stack types.
+       (replace_pop_activation_record): New function.
+       (replace_me): Added some temporary code for testing.
+       (replace_executionstate_println): Use executionstate.code.
+       (java_value_print): New function.
+       (replace_sourcestate_println): Print values prettily.
+       
+       * src/vm/jit/replace.h (executionstate): Added field `code`.
+       (sourcestate): Added field `javastacktype`.
+       (replace_pop_activation_record): New function.
+       (replace_executionstate_println): Changed arguments.
+
+2006-11-08 20:27  twisti
+
+       * src/vm/exceptions.c (new_nullpointerexception): Renamed to
+       exceptions_new_nullpointerexception.
+       * src/vm/exceptions.h: Likewise.
+       * src/vm/jit/stacktrace.c: Likewise.
+       * src/cacaoh/headers.c: Likewise.
+
+2006-11-08 13:33  tbfg
+
+       * src/vm/jit/powerpc64/codegen.h (gen_resolvebranch): Removed.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen): Replaced
+       gen_resolvebranch with md_codegen_patch_branch.
+       
+       * src/vm/jit/powerpc64/md.c (md_codegen_patch_branch): Prevent AA
+       and LK overwrites for b.
+
+2006-11-08 13:03  tbfg
+
+       * src/vm/jit/powerpc64/md.c (md_codegen_patch_branch): Added.
+
+2006-11-07 09:06  twisti
+
+       * src/vm/jit/i386/md.c (md_codegen_patch_branch): New function.
+       * src/vm/jit/i386/emit.c (emit_exception_stubs): Use
+       md_codegen_patch_branch.
+       * src/vm/jit/i386/codegen.c (codegen): Use codegen_resolve_branchrefs.
+       * src/vm/jit/i386/codegen.h (gen_resolvebranch): Removed.
+
+2006-11-07 08:51  twisti
+
+       * src/vm/jit/codegen-common.h (codegen_resolve_branchrefs): Added.
+
+2006-11-06 21:12  twisti
+
+       * jit/mips/emit.c (emit_patcher_stubs): Handle displacement overflows.
+       
+       * jit/mips/codegen.c (codegen): Removed patcher NOPs generation.
+       (createnativestub): Likewise.
+       
+       * jit/mips/codegen.h (PATCHER_CALL_INSTRUCTIONS): Defined.
+       (PATCHER_CALL_SIZE): Changed to 5 * 4;
+       (PATCHER_NOPS): Defined.
+       
+       * jit/mips/patcher.c (patcher_wrapper): Restore original instructions.
+       (patcher_get_putstatic): Don't restore original code.
+       (patcher_get_putfield): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_interface): Likewise.
+       (patcher_instanceof_interface): Likewise.
+       (patcher_checkcast_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+       
+       * jit/mips/asmpart.S (asm_patcher_wrapper): Handle bigger patcher stub
+       stack.
+       
+       * jit/codegen-common.c (codegen_add_patch_ref): Generate NOPs, if
+       requested.
+
+2006-11-06 17:13  twisti
+
+       * src/vm/jit/codegen-common.c (toolbox/list.h): Added.
+       (codegen_addreference): Renamed to codegen_add_branch_ref, use
+       md_codegen_patch_branch instead of gen_resolvebranch.
+       (codegen_resolve_branchrefs): New function.
+       (codegen_addpatchref): Renamed to codegen_add_patch_ref.
+       * src/vm/jit/codegen-common.h (codegen_addreference): Renamed to
+       codegen_add_branch_ref.
+       (codegen_resolve_branchrefs): New function.
+       (codegen_addpatchref): Renamed to codegen_add_patch_ref.
+       
+       * src/vm/jit/dseg.h (toolbox/list.h): Added.
+       
+       * src/vm/jit/mips/emit.c (vm/options.h): Added.
+       (emit_arithmetic_check): New function.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_arraystore_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       (emit_exception_check): Likewise.
+       (emit_exception_stubs): Use md_codegen_patch_branch instead of
+       gen_resolvebranch.
+       
+       * src/vm/jit/mips/md.c (vm/vm.h): Added.
+       (md_codegen_patch_branch): New function.
+       
+       * src/vm/jit/mips/codegen.c (codegen): Use new emit_* functions, use
+       opt_shownops instead of opt_showdissasemble.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/mips/codegen.h (gen_nullptr_check): Removed.
+       (gen_bound_check): Likewise.
+       (gen_div_check): Likewise.
+       (gen_resolvebranch): Likewise.
+       
+       * src/vm/jit/mips/patcher.c: Use opt_shownops instead of
+       opt_showdissasemble.
+       (patcher_checkcast_instanceof_interface): Split into two functions:
+       patcher_checkcast_interface and patcher_instanceof_interface.
+       
+       * src/vm/jit/patcher.h (patcher_checkcast_interface): Added.
+       (patcher_instanceof_interface): Added.
+       
+       * src/vm/jit/emit-common.h (emit_arithmetic_check): Added.
+       (emit_arrayindexoutofbounds_check): Likewise.
+       (emit_arraystore_check): Likewise.
+       (emit_classcast_check): Likewise.
+       (emit_nullpointer_check): Likewise.
+       (emit_exception_check): Likewise.
+
+2006-11-06 16:38  tbfg
+
+       * src/vm/jit/powerpc64/codegen.c (codegen): Various more fixes all
+       over the place. jctest is now successfull for ppc64.
+       
+       * src/vm/jit/powerpc64/codegen.h (M_DIV): Changed used opcode.
+       (M_SLL_IMM): Fixed.
+
+2006-11-06 16:17  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_point): New
+       function.
+       (replace_create_replacement_points): Create replacement points for
+       INVOKE* and *RETURN instructions.
+       (replace_read_executionstate): Fixed loop.
+       (replace_write_executionstate): Fixed loop.
+       (replace_sourcestate_println): Adapted to new source state layout.
+
+2006-11-05 23:17  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Create replacement points after
+       the final allocations.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Do not create replacement
+       points before the codegen is called.
+
+2006-11-05 23:11  edwin
+
+       * src/vm/jit/codegen-common.h (codegendata): Removed maxlocals. This
+       is
+       now in jitdata.
+       * src/vm/jit/codegen-common.c (codegen_setup): Removed cd->maxlocals.
+       
+       * src/vm/jit/replace.c: Move towards exact replacement/GC points.
+       * src/vm/jit/replace.h: Likewise.
+       
+       * src/vm/jit/optimizing/lsra.h: Use jd->maxlocals.
+       * src/vm/jit/optimizing/lifetimes.c: Likewise.
+       * src/vm/jit/optimizing/ssa.c: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/verify/typecheck.c: Likewise.
+       * src/vm/jit/loop/analyze.c: Likewise.
+       * src/vm/jit/inline/inline.c: Likewise.
+       * src/vm/jit/allocator/lsra.c: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/allocator/liveness.c: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+       
+       * src/vm/jit/show.h (show_allocation): Made global.
+       * src/vm/jit/show.c: Likewise.
+
+2006-11-05 22:47  edwin
+
+       * src/vm/jit/jit.c (jit_jitdata_new): Initialize jd->maxlocals.
+
+2006-11-05 22:46  edwin
+
+       * src/vm/jit/jit.h (jitdata): Added maxlocals field.
+
+2006-11-05 21:43  twisti
+
+       * src/vm/options.c (opt_shownops): Added.
+       * src/vm/options.h (opt_shownops): Likewise.
+       * src/vm/vm.c (usage): Added -so help.
+       (vm_create): Added opt_shownops handling.
+
+2006-11-05 21:27  edwin
+
+       * src/vm/jit/jit.h (INS_FLAG_RETADDR): Added flag for marking ASTOREs
+       of returnAddresses.
+       
+       * src/vm/jit/stack.c (stack_reanalyse_block): Invalidate target of
+       ASTORE with returnAddress.
+       (stack_analyse): Likewise.
+
+2006-11-05 21:23  twisti
+
+       * src/vm/utf8.c (utf_Signature): Added.
+       (utf8_init): Initialize utf_Signature.
+       * src/vm/utf8.h (utf_Signature): Added.
+
+2006-11-05 21:18  twisti
+
+       * src/vm/loader.c (load_attributes): Load Signature attribute.
+       * src/vm/class.h (classinfo): Added signature.
+       * src/native/vm/java_lang_VMClass.c (getClassSignature): Implemented.
+
+2006-11-05 21:14  edwin
+
+       * src/vm/jit/show.c (show_basicblock): Show javalocals.
+       (show_variable_array): Made it NULL-safe, show UNUSED entries.
+
+2006-11-05 20:17  edwin
+
+       * src/vm/jit/show.c (show_icmd): Show javaindex for *STORE.
+
+2006-11-05 20:07  edwin
+
+       * src/vm/jit/jit.h (s3_operand_t): Added field javaindex.
+       (INS_FLAG_KILL_PREV): New flag.
+       (INS_FLAG_KILL_NEXT): New flag.
+       (basicblock): Added field javalocals. This points to the mapping from
+       Java bytecode locals to cacao variables at the beginning of the block.
+       
+       * src/vm/jit/stack.c (Changes): Merged with Authors.
+       (stackdata_t): Added fields maxlocals and javalocals.
+       (stack_clone_block): Initialize javalocals.
+       (stack_create_locals): New function.
+       (stack_merge_locals): New function.
+       (stack_create_invars): Use stack_create_invars.
+       (stack_create_invars_from_outvars): Likewise.
+       (stack_check_invars): Use stack_merge_locals.
+       (stack_check_invars_from_outvars): Likewise.
+       (stack_reanalyse_block): Maintain javalocals mapping.
+       (stack_init_javalocals): New function.
+       (stack_analyse): Maintain javalocals mapping.
+       (stack_verbose_show_block): Show javalocals.
+       (stack_verbose_block_enter): Distinguish block cloning and
+       re-analysing.
+       (stack_verbose_show_state): New function.
+
+2006-11-05 19:49  edwin
+
+       * src/vm/jit/stack.c (COPY_VAL_AND_TYPE): Fix: Only copy vv for
+       TYPE_RET
+       (and later for other constants). Otherwise the allocation of PREALLOC
+       variables can be overwritten when re-analysing a block.
+
+2006-11-05 19:45  edwin
+
+       * src/vm/jit/show.c (show_method): Show maxinterfaces only for stage
+       >= SHOW_STACK.
+       (show_variable): Show allocation for PREALLOC variables.
+
+2006-11-05 16:58  michi
+
+       * src/vm/jit/stacktrace.h: Added stacktracecontainer.
+       * src/vm/jit/stacktrace.c (stacktrace_fillInStackTrace): Now returns
+       stacktracecontainer as wrapper for stacktracebuffer and entries.
+       
+       * src/native/vm/java_lang_VMThrowable.c: Undoes the wrapping
+       mentioned above.
+
+2006-11-05 15:47  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_points): Partially
+       ported to new IR.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Reactivate code for
+       replacement points.
+       * src/vm/jit/jit.c (jit_compile_intern): Likewise.
+
+2006-11-05 10:40  edwin
+
+       * src/vm/jit/inline/inline.c: Ported to the new IR. There are some
+       checkins missing to make it linkable, though.
+       * src/vm/jit/inline/inline_debug.inc: Likewise.
+
+2006-11-05 10:31  edwin
+
+       * src/vm/global.h (ACC_METHOD_IMPLEMENTED): Added.
+       (ACC_METHOD_MONOMORPHIC): Added.
+
+2006-11-05 10:22  edwin
+
+       * src/vm/jit/jit.h (jitdata): New fields maxinterfaces, returnblock,
+       returncount, branchtoentry, branchtoend.
+       
+       * src/vm/jit/jit.c (jit_jitdata_new): Initialize new fields.
+       
+       * src/vm/jit/parse.c (parse_mark_exception_boundaries): Set
+       branchtoend.
+       (parse): Set branchtoentry.
+       
+       * src/vm/jit/stack.c (stack_analyse): Set jd->maxinterfaces,
+       returncount, and returnblock.
+       
+       * src/vm/jit/allocator/simplereg.c (simplereg_allocate_interfaces):
+       Use jd->maxinterfaces.
+       (simplereg_allocate_temporaries): Likewise.
+       
+       * src/vm/jit/show.c (show_method): Show the new fields. Use
+       jd->maxinterfaces. Show invalid variable indices. Show inline info.
+
+2006-11-05 09:52  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Reactivated code for inlining.
+
+2006-11-04 23:42  edwin
+
+       * src/vm/jit/jit.h (jitdata): Clarified comment of isleafmethod.
+
+2006-11-04 23:37  edwin
+
+       * src/vm/jit/jit.c (jit_jitdata_new): Initialize jd->isleafmethod
+       depending on whether the method needs synchronization.
+       
+       * src/vm/jit/parse.c (parse): Initialization of jd->isleafmethod has
+       been moved to jit_jitdata_new.
+
+2006-11-04 23:29  edwin
+
+       * src/vm/jit/jit.h, src/vm/jit/jit.c (jit_jitdata_new): Made global.
+
+2006-11-04 23:24  edwin
+
+       * src/vm/loader.c (load_newly_created_array): Explicitly zero the
+       allocated methodinfo array.
+
+2006-11-04 23:13  edwin
+
+       * src/vm/jit/stack.c (stack_change_to_tempvar): Fix: Only replace
+       pass-through variables at the right stack depth. Otherwise the IR
+       can become inconsistent, for example a temporary variable could be
+       used more than once.
+
+2006-11-04 22:40  edwin
+
+       * src/vm/jit/stack.c (stack_reanalyse_block): Relocate dst.varindex
+       for ICMD_JSR (even if it is not used, it keeps the IR consistent).
+
+2006-11-04 22:01  edwin
+
+       * src/mm/memory.c: Added ENABLE_MEMCHECK code:
+       (mem_alloc): Prepared for poisoning memory.
+       (mem_realloc): Invalidate freed memory.
+       (mem_free): Invalidate freed memory.
+       (dump_check_canaries): New function.
+       (dump_alloc): Added canaries, record allocation.
+       (dump_realloc): Invalidate freed memory.
+       (dump_release): Check canaries, invalidate freed memory.
+       
+       * src/mm/memory.h (dump_allocation_t): New struct.
+       (dumpinfo_t): Added allocation list for ENABLE_MEMCHECK.
+       
+       * configure.ac (--enable-memcheck): Added configure flag.
+
+2006-11-04 17:30  michi
+
+       * src/mm/boehm.h: Renamed to gc-common.h
+       * src/mm/gc-common.h: Added.
+       
+       * src/vm/builtin.c, src/vm/jit/mips/linux/md-os.c,
+       src/vm/jit/mips/irix/md-os.c, src/vm/jit/stacktrace.c, src/vm/vm.c,
+       src/native/tool/gennativetable.c, src/native/jni.c,
+       src/native/vm/gnu_java_lang_management_VMThreadMXBeanImpl.c,
+       src/native/vm/gnu_java_lang_management_VMMemoryMXBeanImpl.c,
+       src/native/vm/java_lang_VMObject.c,
+       src/native/vm/java_lang_VMRuntime.c,
+       src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c,
+       src/native/jvmti/jvmti.c, src/mm/nogc.c, src/mm/boehm.c,
+       src/mm/memory.h,
+       src/threads/native/threads.c, src/cacaoh/headers.c,
+       src/cacaoh/cacaoh.c:
+       Changed include from "mm/boehm.h" to "mm/gc-common.h"
+       
+       * src/mm/Makefile.am: Added subdir and lib for cacao-gc
+       
+       * src/mm/cacao-gc: Added.
+       * src/mm/cacao-gc/gc.c: Added.
+       * src/mm/cacao-gc/Makefile.am: Added.
+       * src/mm/cacao-gc/.cvsignore: Added.
+       
+       * src/threads/native/threads.c: Fixed include of boehms gc.h
+       
+       * src/vm/jit/mips/linux/md-os.c (md_init) [ENABLE_GC_BOEHM]: Added
+       ifdef
+       for boehm specific call.
+       * src/vm/jit/mips/irix/md-os.c: Likewise.
+       * src/vm/signal.c: Likewise.
+       
+       * configure.ac: Adapted buildsystem for new GC. Added cacao-gc.
+
+2006-11-04 15:46  tbfg
+
+       * src/vm/jit/powerpc64/emit.c (emit_verbosecall_enter):
+       Removed unsued var.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen):
+       Lots of arithmetic changes.
+       
+       * src/vm/jit/powerpc64/codegen.h (M_SLL): Converted to 64bit.
+       (M_LSTX): Added.
+       (gen_bound_check): Fixed.
+
+2006-11-03 22:11  michi
+
+       * src/vm/loader.c (load_class_from_classbuffer): Removed commented
+       code which
+       placed methodinfos onto the heap.
+
+2006-11-03 15:40  tbfg
+
+       checkcast testcase
+
+2006-11-03 15:13  twisti
+
+       * parisc/.cvsignore: New file.
+       * parisc/linux/.cvsignore: Likewise.
+
+2006-11-03 14:03  twisti
+
+       * src/vm/jit/parisc/md-abi.h: New file.
+       * src/vm/jit/parisc/md.c: Likewise.
+       * src/vm/jit/parisc/arch.h: Likewise.
+       * src/vm/jit/parisc/Makefile.am: Likewise.
+       * src/vm/jit/Makefile.am (SUBDIRS): Added parisc.
+       * configure.ac: Added parisc support.
+
+2006-11-02 12:54  twisti
+
+       * src/toolbox/list.c, src/toolbox/list.h (list_create_dump): New
+       function.
+       (list_first_unsynced): Likewise.
+       (list_last_unsynced): Likewise.
+       (list_next_unsynced): Likewise.
+       (list_prev_unsynced): Likewise.
+
+2006-11-02 12:50  twisti
+
+       * src/Makefile.am (DIST_SUBDIRS): Compile mm first.
+       (SUBDIRS): Likewise.
+
+2006-11-02 10:21  twisti
+
+       * src/vm/jit/dseg.h (patchref): Added comments.
+
+2006-11-01 20:19  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): Use new dseg function names.
+       (createnativestub): Likewise.
+       * src/vm/jit/mips/emit.c (emit_iconst): Likewise.
+       (emit_lconst): Likewise.
+       (emit_exception_stubs): Likewise.
+       (emit_patcher_stubs): Likewise.
+       (emit_verbosecall_enter): Likewise.
+       (emit_verbosecall_exit): Likewise.
+       
+       * src/vm/jit/mips/codegen.h (M_INTMOVE): Wrap into do-while.
+
+2006-10-31 22:02  twisti
+
+       * src/vm/jit/Makefile.am (DIST_SUBDIRS): Forgot to remove ifconv.
+
+2006-10-31 22:01  twisti
+
+       * src/vm/jit/ifconv: Removed.
+       
+       * src/vm/jit/optimizing/ifconv.c: Added.
+       * src/vm/jit/optimizing/ifconv.h: Likewise.
+       
+       * src/vm/jit/optimizing/Makefile.am (IFCONV_SOURCES): Added.
+       (liboptimizing_la_SOURCES): Added IFCONV_SOURCES.
+       
+       * src/vm/jit/jit.c (vm/jit/ifconv/ifconv.h): Changed to
+       vm/jit/optimizing/ifconv.h.
+       
+       * src/vm/jit/Makefile.am (IFCONV_LIB): Removed.
+       
+       * configure.ac (AC_CONFIG_FILES): Removed src/vm/jit/ifconv/Makefile.
+
+2006-10-31 21:57  ajordan
+
+       * src/vm/jit/sparc64/asmpart.S: added exception handling code.
+       * src/vm/jit/sparc64/md-asm.h: Likewise.
+       
+       * src/vm/jit/sparc64/*: implemented createnativestub, added functions
+       for param allocation following the ABI.
+
+2006-10-31 21:35  twisti
+
+       * src/vm/jit/reorder.c: Removed.
+       * src/vm/jit/reorder.h: Likewise.
+       
+       * src/vm/jit/optimizing/reorder.c: Added.
+       * src/vm/jit/optimizing/reorder.h: Likewise.
+       
+       * src/vm/jit/optimizing/Makefile.am (REORDER_SOURCES): Added.
+       (liboptimizing_la_SOURCES): Added REORDER_SOURCES.
+       
+       * src/vm/jit/jit.c (vm/jit/reorder.h): Changed to
+       vm/jit/optimizing/reorder.h.
+       
+       * src/vm/jit/Makefile.am (libjit_la_SOURCES): Removed reorder.[ch].
+
+2006-10-31 21:27  twisti
+
+       * src/vm/jit/optimizing/Makefile.am (INCLUDES): Renamed to
+       AM_CPPFLAGS.
+       (LIBS): Added.
+
+2006-10-31 20:26  twisti
+
+       * src/vm/vm.c (vm/jit/profile/profile.h): Changed to
+       vm/jit/optimizing/profile.h.
+       (vm/jit/recompile.h) Changed to vm/jit/optimizing/recompile.h.
+
+2006-10-31 20:11  twisti
+
+       * src/vm/jit/optimizing/profile.c: Added.
+       * src/vm/jit/optimizing/profile.h: Likewise.
+       * src/vm/jit/optimizing/recompile.c: Likewise.
+       * src/vm/jit/optimizing/recompile.h: Likewise.
+       
+       * src/vm/jit/optimizing/Makefile.am (INCLUDES): Added OS_DIR.
+       (PROFILE_SOURCES): Added.
+       (RECOMPILE_SOURCES): Added.
+       (SSA_SOURCES): Added.
+       
+       * src/vm/jit/recompile.c: Removed.
+       * src/vm/jit/recompile.h: Likewise.
+       * src/vm/jit/profile: Likewise.
+       
+       * src/vm/jit/Makefile.am (SUBDIRS): Added optimizing.
+       (PROFILE_LIB): Removed.
+       (RECOMPILE_SOURCES): Likewise.
+       
+       * src/cacao/Makefile.am (GC_LIB): Removed.
+       
+       * src/mm/Makefile.am (DIST_DUBDIRS): Added boehm-gc.
+       (GC_LIB): Added.
+       
+       * src/Makefile.am (DIST_SUBDIRS): Removed boehm-gc.
+       (SUBDIRS): Likewise.
+       (BOEHM): Removed.
+       
+       * src/threads/native/threads.c (boehm-gc/include/gc.h): Changed to
+       mm/boehm-gc/include/gc.h.
+       
+       * src/cacaoh/Makefile.am (GC_LIB): Removed.
+       
+       * configure.ac (AC_CONFIG_FILES): Removed src/vm/jit/profile/Makefile.
+       (AC_CONFIG_SUBDIRS): Changed src/boehm-gc to src/mm/boehm-gc.
+       * autogen.sh: Changed path to boehm-gc.
+
+2006-10-31 20:00  twisti
+
+       * src/vm/exceptions.c (exceptions_handle_exception): Made identation
+       correct.
+
+2006-10-31 19:58  twisti
+
+       * src/mm/boehm-gc/.cvsignore: Added some files.
+
+2006-10-31 15:42  twisti
+
+       * Moved boehm-gc from src/ to src/mm/.
+
+2006-10-31 13:40  tbfg
+
+       * src/vm/jit/powerpc64/codegen.c (codegen):
+       Fixed parameter passing.
+       Various fixes for many ICMD_*.
+       
+       * src/vm/jit/powerpc64/patcher.c (patcher_get_putfield):
+       Fixed for longs.
+       
+       * src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method):
+       Fixed methodheader, exception handling now works.
+       
+       * src/vm/exceptions.c (exceptions_handle_exception):
+       Indenting.
+
+2006-10-31 10:16  twisti
+
+       * configure.ac (AC_INIT): Changed version to 0.97+svn.
+       (OPT_CFLAGS): Changed to -O0.
+
+2006-10-31 10:15  twisti
+
+       * NEWS: Forgot to commit the date for 0.97, grrrr.
+
+2006-10-31 00:07  twisti
+
+       * ChangeLog: Updated for release 0.97.
+2006-10-30 23:52  twisti
+
+       * configure.ac (AC_INIT): Changed version to 0.97.
+       (--enable-threads): Removed green from help string.
+
+2006-10-30 13:03  twisti
+
+       * src/vm/jit/show.c (show_method): Removed debug output.
+       (SHOW_INT_CONST): Removed long cast and print hex value additionally.
+       (SHOW_LNG_CONST): Removed long long cast and print hex value
+       additionally. Also added version for SIZEOF_VOID_P == 4.
+       (SHOW_ADR_CONST): Added.
+       (SHOW_FLT_CONST): Print hex value additionally.
+       (SHOW_DBL_CONST): Likewise. Also added version for SIZEOF_VOID_P == 4.
+       (show_icmd): Smaller changes.
+
+2006-10-30 12:27  twisti
+
+       * src/threads/native/threads.h (MUTEXSIM): Removed.
+       (pthread_mutex_rec_t): Likewise.
+       (pthread_mutex_init_rec): Likewise.
+       (pthread_mutex_destroy_rec): Likewise.
+       (pthread_mutex_lock_rec): Likewise.
+       (pthread_mutex_unlock_rec): Likewise.
+       * src/threads/native/threads.c (pthread_mutex_init_rec): Removed.
+       (pthread_mutex_destroy_rec): Likewise.
+       (pthread_mutex_lock_rec): Likewise.
+       (pthread_mutex_unlock_rec): Likewise.
+       (compiler_lock): Use pthread functions.
+       (compiler_unlock): Likewise.
+       (threads_cast_darwinstop): Warning fixes and use vm_abort.
+       (threads_cast_darwinresume): Use vm_abort.
+       (threads_cast_stopworld): Warning fixes.
+       (pthreads_preinit) [!MUTEXSIM]: Removed code.
+
+2006-10-30 11:52  edwin
+
+       * src/vm/jit/intrp/intrp.h (Cell): Moved the typedef upward, so we can
+       use it in other headers.
+       (global_sp): Does not need the complex casts anymore.
+       
+       * src/threads/native/threads.h (threadobject): Made _global_sp a
+       Cell*.
+       * src/threads/native/threads.c: Likewise.
+
+2006-10-30 11:21  edwin
+
+       * src/mm/memory.h (ALIGN): Renamed to MEMORY_ALIGN.
+       * src/mm/memory.c: Likewise.
+       * src/vm/jit/dseg.c: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/codegen-common.c: Likewise.
+       * src/vm/linker.c: Likewise.
+       * src/mm/nogc.c: Likewise.
+       * src/cacaoh/headers.c: Likewise.
+
+2006-10-30 11:04  edwin
+
+       * src/threads/native/threads.c (threads_dump): Cast pthread_t to long
+       for printing it.
+
+2006-10-30 11:00  edwin
+
+       * src/vm/jit/cfg.c (cfg_build): Removed set-but-not-used variable (m).
+       * src/vm/jit/ifconv/ifconv.c (check): Likewise (cd).
+       * src/vm/jit/stack.c (stack_reanalyse_block): Likewise (maythrow).
+       (stack_analyse): Likewise (code, b_index).
+       * src/vm/jit/show.c (show_basicblock): Likewise (m).
+       * src/vm/jit/mips/emit.c (emit_copy): Likewise (rd).
+       * src/vm/jit/parse.c (parse): Likewise (code).
+       * src/vm/exceptions.c (exceptions_handle_exception): Likewise
+       (framesize).
+
+2006-10-30 10:32  edwin
+
+       * src/vm/jit/verify/typecheck-common.c (typecheck_init_flags): Removed
+       set-but-not-used variable `i`.
+
+2006-10-30 10:31  edwin
+
+       * src/vm/jit/verify/typecheck-builtins.inc: Removed set-but-not-used
+       variable `cls`.
+
+2006-10-30 10:15  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Zero `uf` to avoid warning.
+
+2006-10-30 00:45  edwin
+
+       * src/vm/builtin.c (builtin_print_argument): Made logtextlen an in/out
+       argument. Correctly reallocate logtext, increase logtextlen.
+       (builtin_trace_args): Pass &logtextlen to builtin_print_argument.
+       (builtin_displaymethodstop): Likewise.
+
+2006-10-29 23:43  edwin
+
+       * src/vm/jit/jit.h (stackelement): Removed the obsolete fields
+       `typeinfo` and `regoff`.
+
+2006-10-29 23:37  edwin
+
+       * src/vm/jit/stack.c (stack_grow_variable_array): Zero the additional
+       space when reallocating the jd->var array.
+       
+       * src/vm/jit/parse.c (parse_realloc_instructions): Zero the
+       additional space when reallocating the instructions array.
+
+2006-10-29 23:33  edwin
+
+       * src/vm/jit/parse.c (parse): Fix in ICMD_TABLESWITCH: Put table into
+       dump memory.
+
+2006-10-29 23:23  edwin
+
+       * NEWS: Typo fixed.
+
+2006-10-29 16:21  edwin
+
+       * src/vm/suck.c (stdlib.h): Include to avoid warning about `free`.
+
+2006-10-29 16:14  edwin
+
+       * src/vm/suck.c (suck_add_from_property): Use `free` to free memory
+       coming out of the C library - it has not been allocated with M?NEW,
+       so M?FREE is wrong here.
+
+2006-10-29 14:49  twisti
+
+       * src/vm/builtin.c (builtin_print_argument): Print float/double values
+       with %g and addresses as hex.
+       (builtin_trace_args): Fixed message length calclation.
+       (builtin_displaymethodstop): Fixed bug: we only passed the long value.
+
+2006-10-29 11:15  edwin
+
+       * src/cacaoh/headers.c (vm_abort): Print the error message before
+       aborting.
+
+2006-10-28 19:40  twisti
+
+       * NEWS: New news.
+
+2006-10-28 19:26  twisti
+
+       * src/vm/jit/dseg.c (dseg_find_float): Compare hex value.
+       (dseg_find_double): Likewise.
+
+2006-10-28 17:45  twisti
+
+       * NEWS: Added some stuff.
+
+2006-10-28 17:15  edwin
+
+       * NEWS: Added news for CACAO 0.97.
+
+2006-10-28 16:55  edwin
+
+       * src/vm/jit/jit.c (stackreq): Fixed for DUP/SWAP instructions. The
+       numbers for DUP2_X1 and DUP2_X2 were also wrong before the new IR
+       had been introduced. The new IR in addition needs extra temps in some
+       cases, thus the numbers before the 'plus' operators.
+
+2006-10-28 16:51  edwin
+
+       * src/vm/jit/stack.c (stack_analyse): Store vartop in jitdata.
+       
+       * src/vm/jit/show.c (show_method): Show number of variables.
+       
+       * tests/regression/jasmin/test_many_dup2_x2.j: New test.
+       * tests/regression/jasmin/test_many_dup.j: Likewise.
+       * tests/regression/jasmin/test_many_dup_x2.j: Likewise.
+       * tests/regression/jasmin/test_many_swap.j: Likewise.
+       * tests/regression/jasmin/test_many_dup2.j: Likewise.
+       * tests/regression/jasmin/test_many_dup2_x1.j: Likewise.
+       * tests/regression/jasmin/test_many_dup_x1.j: Likewise.
+       
+       * tests/regression/jasmin/Makefile.am: Added new tests.
+
+2006-10-28 15:21  edwin
+
+       * src/vm/jit/stack.c (stackdata_t): Added field varsallocated.
+       (stack_grow_variable_array): Smarted memory allocation.
+       (stack_analyse): Initialize sd.varsallocated.
+
+2006-10-28 13:02  edwin
+
+       * src/vm/access.c (ACCESS_ASSERT): Replaced with assert. Because of
+       a mistake in the definition of ACCESS_DEBUG, ACCESS_ASSERT always
+       was a NOP!
+       (access_is_accessible_member): Fixed assertion.
+
+2006-10-28 12:53  edwin
+
+       * src/vm/loader.c (LOADER_ASSERT): Replaced with assert.
+
+2006-10-28 12:49  edwin
+
+       * src/vm/class.c (CLASS_ASSERT): Replaced by assert.
+
+2006-10-28 12:47  edwin
+
+       * src/vm/class.c (class_array_of): Release dump memory.
+       (class_multiarray_of): Likewise.
+       (class_get_classref_multiarray_of): Likewise.
+
+2006-10-27 10:41  twisti
+
+       * src/vm/vm.c: Renamed -Xglibj to -Xbootclasspath/c to match jamvm's
+       option (Robert, Mark and I decided that once).
+       (vm_create): Removed unnecessary k. #ifdef'd the profiling stuff.
+       (vm_run): Removed commented code.
+       * src/vm/options.c, src/vm/options.h [ENABLE_PROFILING] (opt_prof)
+       (opt_prof_bb): Added.
+       * src/vm/jit/jit.c (jit_compile) [ENABLE_PROFILING]: Added for
+       opt_prof stuff.
+       [ENABLE_VERIFIER]: Added for flag setting.
+       * src/vm/jit/codegen-common.c (codegen_createnativestub)
+       [ENABLE_PROFILING]: Added for opt_prof stuff.
+
+2006-10-26 16:41  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Declare variables at the start
+       of codegen (uf, fi).
+
+2006-10-26 12:05  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Made fieldinfo and
+       unresolved_field fucntion variables, fieldtype was uninitialized for
+       PUTFIELD.
+
+2006-10-26 11:57  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Made fieldinfo and
+       unresolved_field function variables (it makes the code more readable).
+
+2006-10-26 11:47  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Fixed ICMD_PUTFIELD: Set
+       fieldtype before it is used. Fixed warnings.
+       
+       * src/vm/jit/mips/codegen.c (codegen): Prevent warnings.
+
+2006-10-26 11:35  twisti
+
+       * NEWS: Added some 0.97 news.
+
+2006-10-26 11:30  twisti
+
+       * src/vm/exceptions.c (exceptions_print_exception): Removed [!NDEBUG]
+       condition, as we may need this function in the VM (e.g. recompile).
+       * src/vm/jit/recompile.c (vm/exceptions.h): Added.
+       (recompile_thread): Call exceptions_print_exception in exception case.
+
+2006-10-26 11:29  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Initialize uf to NULL for
+       resolved fields, to avoid warnings.
+       
+       * src/vm/jit/intrp/engine.c (engine): Initialize
+       classcastexception_object and arrayindexoutofbounds_index to avoid
+       warnings.
+
+2006-10-26 11:23  edwin
+
+       * src/vm/jit/dseg.c (dseg_addlinenumber_inline_start): Read inline
+       info from instruction, ported to new instruction format.
+       (dseg_addlinenumber_inline_end): Likewise.
+
+2006-10-26 11:19  edwin
+
+       * src/vm/jit/show.c (show_icmd): Fixed warning fix.
+
+2006-10-26 11:18  edwin
+
+       * src/threads/native/threads.c (threads_table_dump): Fix warning (the
+       function is currently unused, but may become handy again.)
+
+2006-10-26 11:15  edwin
+
+       * src/vm/jit/show.c (show_method): Fixed warning.
+       (show_basicblock): Likewise.
+       (show_icmd): Likewise.
+
+2006-10-26 11:04  twisti
+
+       * src/vm/jit/x86_64/md.h: Removed.
+       * src/vm/jit/x86_64/Makefile.am (libarch_la_SOURCES): Removed md.h.
+       * src/vm/jit/x86_64/codegen.c (md.h): Removed.
+       (codegen): Warning fix.
+
+2006-10-26 10:34  twisti
+
+       * src/vm/jit/mips/md-abi.h: Fixed MIPS64 compilation and backported
+       some MIPS32 stuff.
+
+2006-10-26 10:09  twisti
+
+       * src/vm/descriptor.h (paramdesc): We need a type for MIPS32, as the
+       type in the allocated argument register may be different to the actual
+       register (e.g. passing a float in an integer register).
+
+2006-10-26 09:55  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): More comment and brace changes.
+
+2006-10-26 09:44  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): Comment and brace changes.
+
+2006-10-26 09:29  twisti
+
+       * src/vm/jit/mips/md-asm.h: Renamed t8 to t4 and removed t9, as it's
+       actually itmp3.
+       * src/vm/jit/mips/asmpart.S: Likewise.
+
+2006-10-25 14:26  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.c (_ALIGN): Renamed to
+       CACAO_ALIGN because of name clash with /usr/include/asm-ppc64/page.h.
+       
+       * src/vm/jit/powerpc64/emit.c (emit_lconst): Added.
+       (emit_iconst): Reformatted.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen):
+       Replaced all stackframesize with cd->stackframesize.
+       Implemented ICMD_IF_LLT, ICMD_IF_LLE, ICMD_IF_LGE, ICMD_IF_LGT.
+       
+       * src/vm/jit/powerpc64/asmpart.S:
+       Partially fixed exception path.
+       (asm_cacheflush): Fixed.
+       
+       * src/vm/jit/powerpc64/codegen.h (LCONST): Implemented.
+       
+       * tests/if_tests.java: Added simple testcase for if and compare.
+
+2006-10-24 23:24  edwin
+
+       * src/vm/utf8.h, src/vm/utf8.c (utf8_safe_number_of_u2s): Modified to
+       completely emulate the behaviour of the RI in case of truncated UTF-8
+       characters. This requires an extra strlen(text) beforehand. We still
+       require zero-termination. We could drop that with a few extra changes,
+       should we find other uses for these functions.
+       (utf8_safe_convert_to_u2s): Likewise.
+       
+       * src/vm/string.c (javastring_safe_new_from_utf8): Pass number of
+       bytes to the decoding functions.
+
+2006-10-24 17:51  edwin
+
+       * src/vm/utf8.c (utf8_safe_number_of_u2s): Skip only bytes beginning
+       with high bits 10 in invalid sequences.
+       (utf8_safe_convert_to_u2s): Likewise.
+
+2006-10-24 16:41  edwin
+
+       * src/vm/utf8.h, src/vm/utf8.c (utf8_safe_number_of_u2s): New
+       function.
+       (utf8_safe_convert_to_u2s): Likewise.
+       
+       * src/vm/stringlocal.h, src/vm/string.c
+       (javastring_safe_new_from_utf8): New function.
+       
+       * src/native/jni.c (_Jv_JNI_NewStringUTF): Use the new functions for
+       safe UTF-8 decoding.
+
+2006-10-24 11:17  twisti
+
+       * src/vm/jit/dseg.c (dseg_display): Rewritten.
+
+2006-10-22 04:28  ajordan
+
+       * src/vm/jit/sparc64/codegen.h: fixed M_SAVE.
+       
+       * src/vm/jit/sparc64/disass.c: configuring disass for big-endian.
+
+2006-10-22 02:49  ajordan
+
+       * src/vm/jit/sparc64/emit.c: Implemented trace enter/exit functions.
+       * src/vm/jit/sparc64/codegen.c: Likewise.
+       
+       * src/vm/jit/sparc64/md.c: Implemented md_get_method_patch_address.
+       
+       * src/vm/jit/sparc64/asmpart.S(asm_call_jit_compiler): Fixed window
+       handling
+       
+       * src/vm/jit/sparc64/disass.c: Fixed disassembly printing.
+       
+       * src/vm/jit/sparc64/md-abi.h: Minor changes/fixes.
+       * src/vm/jit/sparc64/codegen.h: Likewise.
+       * src/vm/jit/sparc64/md-asm.h: Likewise.
+
+2006-10-22 00:38  edwin
+
+       * src/vm/jit/jit.c (jit_asm_compile): Fixed xpc for extern
+       stackframeinfo by subtracting 1 from the return address.
+       This fixes stacktraces when exceptions are thrown out of
+       the compiler.
+       
+       * tests/regression/extest.2output: Changed line numbers to
+       the values same the RI returns, which are correct upon inspection
+       of the Java code.
+
+2006-10-21 15:06  edwin
+
+       * src/vm/jit/parse.c (parse): Bugfix for -noverify: Do not make the
+       variable array dependant on jd->flags, as this breaks stack_analyse.
+
+2006-10-20 18:35  twisti
+
+       * src/vm/jit/mips/codegen.c (md.h): Removed.
+       * src/vm/jit/mips/md.h: Removed.
+       * src/vm/jit/mips/Makefile.am (libarch_la_SOURCES): Removed md.h.
+
+2006-10-20 14:53  twisti
+
+       * src/vm/jit/jit.c (jit_init) [ENABLE_JIT]: Call stack_init only for
+       JIT.
+       [ENABLE_JIT] (jit_asm_compile): Only for JIT.
+       
+       * src/vm/jit/Makefile.am (SUBDIRS) [ENABLE_JIT]: Add allocator only
+       for JIT.
+       (libjit_la_SOURCES) [ENABLE_JIT]: Compile reg.[ch], replace.[ch] and
+       stack.[ch] only for JIT.
+       
+       * src/cacaoh/headers.c [ENABLE_INTRP] (intrp_asm_abstractmethoderror):
+       Added.
+
+2006-10-20 14:26  twisti
+
+       * src/vm/linker.c (link_class_intern): Handle AbstractMethodError for
+       interpreter (missed this one in the last commit).
+
+2006-10-20 14:22  twisti
+
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_abstractmethoderror): Added.
+       * src/vm/jit/asmpart.h [ENABLE_INTRP] (intrp_asm_abstractmethoderror):
+       Likewise.
+       * src/vm/linker.c (linker_addinterface): Handle AbstractMethodError
+       for interpreter.
+
+2006-10-20 13:58  twisti
+
+       * src/native/vm/gnu_classpath_VMSystemProperties.c (preInit): Removed
+       unused ld_library_path.
+
+2006-10-20 13:54  twisti
+
+       * src/vm/suck.c (vm/vm.h): Added.
+       (bootclasspath, classpath): Removed.
+       (suck_add_from_property): Prefix bootclasspath with _Jv_.
+       * src/vm/suck.h (bootclasspath, classpath): Removed.
+       
+       * src/vm/vm.c (_Jv_bootclasspath, _Jv_classpath)
+       (_Jv_java_library_path): Added.
+       (version): Prefix bootclasspath with _Jv_.
+       (vm_create): Likewise, set _Jv_java_library_path to LD_LIBRARY_PATH
+       before handling commandline options.
+       * src/vm/vm.h (_Jv_bootclasspath, _Jv_classpath)
+       (_Jv_java_library_path): Added.
+       
+       * src/native/vm/gnu_classpath_VMSystemProperties.c (preInit): Prefix
+       bootclasspath and classpath with _Jv_, use _Jv_java_library_path for
+       setting java.library.path.
+       
+       * src/cacao/cacao.c (main): First let dlopen try to open libjvm at
+       it's default locations.
+       * src/native/native.c (native_init): Likewise.
+       
+       * src/cacaoh/headers.c (_Jv_bootclasspath): Added.
+       
+       * contrib/setenvinstalled.in: Set LD_LIBRARY_PATH again.
+       * contrib/setenvsource.in: Likewise.
+       
+       * tests/regression/native/Makefile.am (JAVAFLAGS): Removed
+       -Djava.library.path=.
+       (check): Set LD_LIBRARY_PATH.
+       * tests/regression/codepatching/Makefile.am (check): Likewise.
+       * tests/regression/Makefile.am: Likewise.
+
+2006-10-20 13:09  twisti
+
+       * src/vm/signal.c (signal_init): Added dummy allocation to install
+       Boehm's signal handlers.
+       * src/threads/native/threads.c (threads_preinit): Removed dummy
+       allocation.
+       
+       * src/vm/vm.c (vm_create): Call threads_preinit before gc_init.
+       * src/cacaoh/cacaoh.c (main): Likewise.
+
+2006-10-20 12:00  twisti
+
+       * src/vm/exceptions.c [ENABLE_JIT] (exceptions_handle_exception): Only
+       required for JIT.
+
+2006-10-20 00:37  ajordan
+
+       * src/mm/memory.c: fixed typo in _no_threads_dumpinfo definition
+
+2006-10-19 10:10  twisti
+
+       * src/threads/native/threads.c (threads_interrupt_thread): Renamed to
+       threads_thread_interrupt, send thread a SIGHUP singal to interrupt
+       blocking system calls (thanks to Robert Schuster).
+       (threads_dump): Removed threads_sleep call.
+       
+       * src/threads/native/threads.h (threads_interrupt_thread): Renamed to
+       threads_thread_interrupt.
+       * src/native/vm/java_lang_VMThread.c (interrupt): Likewise.
+       * src/native/jvmti/jvmti.c (InterruptThread): Likewise.
+       
+       * src/vm/signal.c (signal_init): Register SIGHUP.
+       (signal_handler_sighup): Added.
+
+2006-10-19 09:32  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_dump_trace): Changed signature.
+       * src/vm/jit/stacktrace.h: Likewise.
+       
+       * src/vm/jit/codegen-common.c (codegen_get_pv_from_pc): Pass
+       threadobject to stacktrace_dump_trace.
+       
+       * src/vm/signal.c (signal_init): Don't register SIGUSR1.
+       (signal_handler_sigusr1): Removed.
+       
+       * src/native/jni.h: Include GNU Classpath JNI header before we define
+       our header.
+       (localref_table): Forward typedef.
+       
+       * src/threads/native/threads.c (threads_dump): Pass threadobject to
+       stacktrace_dump_trace.
+       
+       * src/cacaoh/headers.c (stacktrace_dump_trace): Added.
+
+2006-10-19 09:27  twisti
+
+       * src/threads/native/threads.h (threadobject, threads_table_entry_t)
+       (threads_table_t): Forward typedef.
+       (threadobject): Changed dumpinfo to dumpinfo_t.
+
+2006-10-19 09:25  twisti
+
+       * src/mm/memory.h (dumpblock): Postfixed with _t and moved before
+       internal includes, as we have some problems with threadobject.
+       (dumpinfo): Likewise.
+       * src/mm/memory.c: Postfixed dumpblock and dumpinfo with _t.
+
+2006-10-19 09:23  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Warning fixes.
+
+2006-10-18 16:55  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_createnativestub): Initialize
+       jd->flags to zero.
+
+2006-10-18 16:27  edwin
+
+       * tests/regression/jasmin/runtest: Removed debugging `tee TEST`.
+       * tests/regression/jasmin/Makefile.am (CLEANFILES): Added file
+       TESTSIA.
+
+2006-10-18 16:19  edwin
+
+       * tests/regression/jasmin/Makefile.am (SOURCE_FILES): Use EXTRA_DIST,
+       instead.
+
+2006-10-18 15:57  edwin
+
+       * src/vm/jit/i386/linux/Makefile.am (noinst_HEADERS): Added md-asm.h.
+       * src/vm/jit/i386/freebsd/Makefile.am (noinst_HEADERS): Likewise.
+
+2006-10-18 15:27  twisti
+
+       * src/vm/jit/Makefile.am (DIST_SUBDIRS): Added powerpc64.
+
+2006-10-18 15:19  twisti
+
+       * src/vm/jit/Makefile.am (DIST_SUBDIRS): Added optimizing.
+
+2006-10-18 15:14  twisti
+
+       * src/vm/jit/sparc64/Makefile.am (libarch_la_SOURCES): Removed md.h.
+
+2006-10-18 15:09  twisti
+
+       * src/vm/jit/i386/Makefile.am (libarch_la_SOURCES): Renamed md-emit.h
+       to emit.h.
+
+2006-10-18 15:04  twisti
+
+       * configure.ac (AC_INIT): Changed to version 0.97rc.
+       (CFLAGS): Changed to -O2.
+
+2006-10-18 14:53  edwin
+
+       * tests/regression/jasmin/Makefile.am: Temporarily disable failing
+       tests for the release.
+       * src/vm/jit/stack.c (stack_analyse): Check field type when creating
+       a PUTFIELDCONST/PUTSTATICCONST instruction.
+
+2006-10-16 09:59  edwin
+
+       * src/vm/jit/parse.c (parse_resolve_exception_table): Do not use
+       codegendata.
+       (parse): Likewise.
+       
+       * src/vm/jit/stack.c (stack_analyse): Likewise.
+
+2006-10-16 09:02  twisti
+
+       * src/vm/jit/allocator/simplereg.c [ENABLE_STATISTICS]
+       (simplereg_make_statistics): Don't print this INREGISTER stuff.
+
+2006-10-16 08:53  twisti
+
+       * src/vm/jit/jit.c (jit_compile_intern) [ENABLE_STATISTICS]:
+       exceptiontablelength is now in jitdata.
+
+2006-10-16 00:05  ajordan
+
+       * src/vm/jit/sparc64/codegen.c: Ported to unified variables.
+       * src/vm/jit/sparc64/emit.c: Likewise.
+       
+       * src/vm/jit/sparc64/md.c: Implemented md_codegen_get_pv_from_pc.
+       
+       * src/vm/jit/sparc64/codegen.h: Some fixes.
+       * src/vm/jit/sparc64/asmpart.S: Likewise.
+
+2006-10-15 22:44  edwin
+
+       * src/vm/linker.c (link_class_intern): Removed unused variable.
+
+2006-10-15 22:25  edwin
+
+       * src/vm/jit/jit.h (exception_entry): New struct.
+       (jitdata): Added exceptiontable fields. Cleaned up.
+       
+       * src/vm/exceptions.h (exceptionentry): Removed.
+       
+       * src/vm/jit/dseg.h (dseg_exception_entry): New struct.
+       
+       * src/vm/jit/stack.h (BLOCK_OF): Moved to parse.h.
+       * src/vm/jit/parse.h (BLOCK_OF): Added.
+       
+       * src/vm/jit/codegen-common.h (codegendata): Removed exceptiontable
+       and exceptiontablelength.
+       
+       * src/vm/loader.c (load_method): Renamed m->exceptiontable* to
+       m->rawexceptiontable*.
+       (load_class_from_classbuffer): Likewise.
+       * src/vm/method.c (method_free): Likewise.
+       
+       * src/vm/method.h (methodinfo): Renamed m->exceptiontable* to
+       m->rawexceptiontable*.
+       (exceptiontable): Renamed to raw_exception_entry. Removed fields that
+       are only used in jd->exceptiontable.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Moved exceptiontable to jd,
+       renamed struct exceptiontable to exception_entry.
+       * src/vm/jit/sparc64/codegen.c (codegen): Likewise.
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       * src/vm/jit/stack.c (stackdata_t): Likewise.
+       (stack_analyse): Likewise.
+       (stack_reanalyse_block): Likewise.
+       * src/vm/jit/optimizing/graph.c (graph_add_exceptions): Likewise.
+       * src/vm/jit/show.c (show_method): Likewise.
+       * src/vm/jit/verify/typecheck-common.h (verifier_state): Likewise.
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Likewise.
+       * src/vm/jit/verify/typecheck-stackbased.c (typecheck_stackbased):
+       Likewise.
+       * src/vm/jit/mips/codegen.c (codegen):
+       * src/vm/jit/loop/loop.h (LoopContainer): Likewise.
+       * src/vm/jit/loop/analyze.c (analyze_nested): Likewise.
+       (analyze_or_exceptions): Likewise.
+       (update_internal_exceptions): Likewise.
+       (create_static_checks): Likewise.
+       (optimize_loops): Likewise.
+       * src/vm/jit/inline/inline.c (test_inlining): Likewise.
+       * src/vm/jit/allocator/lsra.c (lsra_add_exceptions): Likewise.
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
+       * src/vm/jit/intrp/codegen.c (codegen): Likewise.
+       * src/vm/jit/schedule/schedule.h (M_SCHEDULE_SET_EXCEPTION_POINT):
+       Likewise.
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+       * src/vm/jit/jit.c (jit_compile_intern): Likewise.
+       (jit_jitdata_new): Initialize exceptiontable fields.
+       
+       * src/vm/jit/codegen-common.c (codegen_setup): Removed exceptiontable
+       fields.
+       
+       * src/vm/jit/parse.c (parse_mark_exception_boundaries): New function.
+       (parse_resolve_exception_table): New function.
+       (fillextable): Removed.
+       (parse): Use parse_mark_exception_boundaries and
+       parse_resolve_exception_table. Write the basicblockindex for the end
+       marker block.
+       
+       * src/vm/jit/intrp/asmpart.c (exceptionentry): Renamed to
+       dseg_exception_entry.
+       * src/vm/exceptions.c (exceptions_handle_exception): Likewise.
+       
+       * src/vm/linker.c (link_class_intern): Do not resolve exception
+       classes here. This is now done in parse.c.
+
+2006-10-15 13:52  edwin
+
+       * src/vm/jit/jit.h: Indentation cleanup.
+
+2006-10-15 13:37  edwin
+
+       * src/vm/jit/jit.h (flags_operand_t): Removed `fields` struct. It was
+       not safe to use, as defined.
+
+2006-10-15 13:19  edwin
+
+       * src/vm/jit/jit.h (flags_operand_t): Removed unused argcount.
+       (ACONST_LOAD): Removed.
+       (ACONST_BUILTIN): Removed.
+
+2006-10-15 12:59  edwin
+
+       * src/vm/method.h (methodinfo): Removed c_block_nr.
+       * src/vm/jit/jit.h (jitdata): Removed c_block_nr.
+       (BASICBLOCK_INIT): Do not set bptr->nr here.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Renumber basic blocks after
+       transformations.
+       (jit_check_basicblock_numbers): Made stricter.
+       
+       * src/vm/jit/stack.c (stack_append_block): Set basic block numbers
+       correctly.
+       (stack_clone_block): Do not set bptr->nr here.
+       
+       * src/vm/jit/verify/typecheck.c (typestate_reach): Use the correct
+       check for setting the repeat flag.
+       (typecheck): Check basic block numbers.
+       
+       * src/vm/jit/verify/typecheck-stackbased.c (typecheck_stackbased):
+       Check basic block numbers.
+       
+       * src/vm/jit/loop/analyze.c (copy_handler): Do not use c_block_nr.
+       (create_static_checks): Likewise.
+       * src/vm/jit/inline/inline.c (create_block): Likewise.
+       * src/vm/jit/parse.c (parse): Likewise.
+
+2006-10-15 12:20  edwin
+
+       * src/vm/jit/jit.c (jit_renumber_basicblocks): New function.
+       (jit_check_basicblock_numbers): Likewise.
+       (jit_init): Removed obsolete variable `i`.
+       
+       * src/vm/jit/jit.h (jit_renumber_basicblocks): New function.
+       (jit_check_basicblock_numbers): Likewise.
+
+2006-10-14 19:12  twisti
+
+       * src/native/jni.c (_Jv_JNI_DetachCurrentThread): Made
+       --disable-threads-safe.
+
+2006-10-13 18:29  edwin
+
+       * tests/regression/jasmin/Makefile.am: Added new tests.
+
+2006-10-13 18:25  edwin
+
+       * src/vm/jit/verify/icmds.c: Check basic types of instance for field
+       access.
+       * src/vm/jit/verify/typecheck-fields.inc: Check basic type of value.
+       
+       * src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (verify_fieldaccess): Define
+       VERIFY_ERROR for the include file.
+       
+       * src/vm/jit/verify/typecheck-stackbased.c (VERIFY_ERROR): Fixed
+       macro.
+       
+       *
+       tests/regression/jasmin/test_verify_fail_putfieldconst_basic_type_instance.j,
+       tests/regression/jasmin/test_verify_fail_getfield_basic_type_instance.j,
+       tests/regression/jasmin/test_verify_fail_putfield_basic_type_value.j,
+       tests/regression/jasmin/test_verify_fail_putstatic_basic_type_value.j,
+       tests/regression/jasmin/test_verify_fail_putfieldconst_basic_type_value.j,
+       tests/regression/jasmin/test_verify_fail_getfield_basic_type_value.j,
+       tests/regression/jasmin/test_verify_fail_putfield_basic_type_instance.j,
+       tests/regression/jasmin/test_verify_fail_putfield_basic_type_lookup.j,
+       tests/regression/jasmin/test_verify_fail_getfield_basic_type_lookup.j,
+       tests/regression/jasmin/test_verify_fail_putstaticconst_basic_type_value.j:
+       New tests.
+       
+       * tests/regression/jasmin/runtest: Look for specified ICMDs in -sia
+       output.
+
+2006-10-13 17:06  tbfg
+
+       * src/vm/jit/powerpc64/md.c (md_get_method_patch_address): Fixed
+       comments.
+       
+       * src/vm/jit/powerpc64/codegen.c: Added credits.
+       
+       * src/vm/jit/powerpc64/asmpart.S (asm_handle_nat_exception): Fixed
+       exception handling code. Added credits.
+
+2006-10-13 16:30  edwin
+
+       * src/vm/jit/verify/typecheck-fields.inc: Re-activate stack overflow
+       checking.
+       
+       * src/vm/jit/verify/typecheck-common.h (verifier_state): Added field
+       `stackceiling`.
+       
+       * src/vm/jit/verify/typecheck-stackbased.c (CHECK_STACK_DEPTH):
+       Cleaned up.
+       (CHECK_STACK_SPACE): Cleaned up.
+       (typecheck_stackbased_verify_fieldaccess): Check for stack overflow.
+       (typecheck_stackbased): Moved stackceiling into state.
+
+2006-10-13 16:06  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_reg_of_var): Removed `inline`
+       declaration. The crappy IRIX compiler does not create a global symbol
+       otherwise.
+
+2006-10-13 14:34  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Use generated
+       code.
+       
+       * src/vm/jit/verify/typecheck-stackbased-gen.inc: New file, GENERATED!
+       * src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.
+       
+       * src/vm/jit/verify/typecheck.h (typecheck_stackbased): Added.
+       
+       * src/vm/jit/verify/Makefile.am: Added source files for both generated
+       verifiers.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Call the stack-based verifier
+       for the interpreter.
+       
+       * src/vm/vm.c (vm_create): Re-enable verification fot the interpreter.
+
+2006-10-13 14:22  edwin
+
+       * src/vm/jit/verify/generate.pl: Clearly mark generated code.
+
+2006-10-13 14:00  edwin
+
+       * src/vm/jit/icmdtable.inc: Documented prettily.
+
+2006-10-13 13:11  edwin
+
+       * src/vm/jit/jit.h (op_data): Removed.
+       (stackreq): Moved to a more logical place.
+       
+       * src/vm/jit/jit.c (op_data): Removed.
+       (jit_init): Removed code initializing op_data.
+       
+       * src/vm/jit/optimizing/lifetimes.c (LifeOutAtStatement): Use
+       icmd_table.
+       * src/vm/jit/optimizing/ssa.c (dead_code_elimination): Likewise.
+
+2006-10-13 12:49  edwin
+
+       * src/vm/jit/jit.h (icmd_table): Added.
+       (icmd_names): Removed.
+       
+       * src/vm/jit/jit.c (icmd_table): Added.
+       (icmd_names): Removed.
+       
+       * src/vm/jit/show.c (show_icmd): Use icmd_table.
+       * src/vm/jit/optimizing/ssa.c (dead_code_elimination): Likewise.
+
+2006-10-13 12:47  edwin
+
+       * src/vm/resolve.c: Removed obsolete debug prints.
+
+2006-10-13 11:57  edwin
+
+       * src/vm/jit/jit.h: Added DF_ constants for ICMD table.
+       Added CF_ constants.
+       Added ICMDTABLE_ constants.
+       (icmdtable_entry_t): New struct.
+
+2006-10-13 11:28  edwin
+
+       * src/vm/jit/icmdtable.inc: New file. Not used, yet.
+       * src/vm/jit/Makefile.am: Added new file.
+
+2006-10-13 11:27  edwin
+
+       * src/vm/jit/verify/generate.pl: Omit comma at end of ICMD table.
+
+2006-10-13 11:11  edwin
+
+       * src/vm/jit/verify/typecheck-stackbased.c: New file. Not used, yet.
+       * src/vm/jit/verify/icmds.c: New file.
+       * src/vm/jit/verify/generate.pl: New file.
+       
+       * src/vm/jit/verify/typecheck-invoke.inc: Added copyright notice.
+       * src/vm/jit/verify/typecheck-fields.inc: Likewise.
+       * src/vm/jit/verify/typecheck-builtins.inc: Likewise.
+       * src/vm/jit/verify/typecheck-common.c: Likewise.
+       * src/vm/jit/verify/typecheck-common.h: Likewise.
+
+2006-10-13 10:36  edwin
+
+       * src/vm/jit/verify/typeinfo.c (typevector_store): Remove obsolete
+       assertion.
+
+2006-10-13 10:33  edwin
+
+       * src/vm/jit/stack.c (stack_analyse): Set iptr->dst for CHECKNULL.
+
+2006-10-13 00:47  edwin
+
+       * src/vm/builtin.c (builtin_isanysubclass): Bugfix for the case that
+       `sub` is an interface and `super` is a class. The function returned
+       random values in this case, since it used the <= 0 base value of the
+       interface class to perform the subclass check. The only case in which
+       an interface can be a subclass of a non-interface `super` is when
+       `super` is java.lang.Object, so we check explicitly for this case.
+       This fixes a bug with BeanShell-2.0b4.
+       
+       (builtin_isanysubclass_vftbl): Likewise.
+
+2006-10-12 23:34  edwin
+
+       * src/vm/jit/stack.c (stack_check_invars): Bugfix: Only set flags to
+       BBTYPECHECK_REACHED if the block has already been analysed.
+       
+       (stack_check_invars_from_outvars): Likewise.
+
+2006-10-12 20:06  twisti
+
+       * src/vm/jit/cfg.c (cfg_build): Check for EXH basic blocks in
+       fall-through case.
+
+2006-10-12 15:59  edwin
+
+       * tests/regression/jasmin/runtest: Added timeout capability.
+
+2006-10-12 15:22  edwin
+
+       * src/vm/jit/verify/typecheck-common.h (typecheck_print_statistics):
+       Added prototype.
+       (typecheck_jsr_t): New struct.
+       (typecheck_jsr_caller_t): Likewise.
+       (verifier_state): Added fields for stackbased verifier.
+
+2006-10-12 15:07  edwin
+
+       * src/vm/jit/verify/typecheck-common.c: Made debugging and statistics
+       symbols global.
+       * src/vm/jit/verify/typecheck-common.h: Likewise.
+
+2006-10-12 14:52  edwin
+
+       * src/vm/jit/verify/typecheck-invoke.inc: Added code variants for the
+       stackbased verifier. Not used, yet.
+       * src/vm/jit/verify/typecheck-builtins.inc: Likewise.
+
+2006-10-12 14:42  edwin
+
+       * src/vm/jit/verify/typecheck-common.c: Include headers.
+       * src/vm/jit/verify/typecheck-common.h: Cleanup.
+
+2006-10-12 14:39  edwin
+
+       * src/vm/jit/verify/typecheck.c (ISBUILTIN): Removed.
+       * src/vm/jit/verify/typecheck-builtins.inc (ISBUILTIN): Added.
+
+2006-10-12 14:38  tbfg
+
+       * src/vm/jit/powerpc64/codegen.c (codegen): Adopt locals
+       and regoff changes.
+
+2006-10-12 14:18  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Prepared for
+       addeding the stackbased verifier. No functional change, yet.
+       (verify_builtin): Likewise.
+
+2006-10-12 14:12  edwin
+
+       * src/vm/jit/verify/typecheck-common.c,
+       src/vm/jit/verify/typecheck-common.h (typecheck_init_flags): Added
+       minflags argument.
+       
+       * src/vm/jit/verify/typecheck.c (typecheck): Call typecheck_init_flags
+       with minflags set to BBFINISHED.
+
+2006-10-12 14:02  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_fieldaccess): New function.
+       (verify_basic_block): Moved field verification into a separate
+       function.
+       
+       * src/vm/jit/verify/typecheck-fields.inc: Removed opcode-dependant
+       stuff. Some code for the stackbased verifier is checked in, but not
+       used, yet.
+
+2006-10-12 13:13  twisti
+
+       * src/vm/jit/mips/linux/md-os.c (thread_restartcriticalsection): Added
+       uClibc support.
+
+2006-10-12 12:44  twisti
+
+       * src/vm/jit/mips/linux/md-os.c (md_signal_handler_sigsegv): Added
+       uClibc support.
+
+2006-10-12 10:10  edwin
+
+       * src/vm/jit/verify/typecheck.c: Moved <assert.h> include to the right
+       place. Moved some code to typecheck-common.[ch].
+       
+       * src/vm/jit/verify/typecheck-common.c: New file.
+       * src/vm/jit/verify/typecheck-common.h: New file.
+       
+       * src/vm/jit/verify/Makefile.am: Added new source files.
+
+2006-10-11 23:52  edwin
+
+       * src/vm/jit/verify/typecheck-builtins.inc: Removed redundant
+       `return true`. Moved declaration of `av`.
+
+2006-10-11 23:44  edwin
+
+       * src/vm/jit/verify/typecheck-invoke.inc: Use invokestatic where
+       possible. Added a comment.
+
+2006-10-11 23:41  edwin
+
+       * src/vm/jit/verify/typecheck-invoke.inc: Indent log messages to make
+       them more readable.
+
+2006-10-11 23:37  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Define jd and dv
+       before including the function body.
+       
+       * src/vm/jit/verify/typecheck-invoke.inc: Removed definitions of jd
+       and dv. Small cleanup.
+
+2006-10-11 23:22  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_builtin): Define jd and dv
+       before including the function body.
+       
+       * src/vm/jit/verify/typecheck-builtins.inc: Removed definitions
+       of jd and dv.
+
+2006-10-11 23:00  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Moved body to a
+       separate file in order to prepare comitting the stackbased verifier.
+       (verify_builtin): Likewise.
+       (verify_generic_builtin): Likewise, no integrated in verify_builtin.
+       (verify_basic_block): Moved field instruction verification to a
+       separate file.
+       
+       * src/vm/jit/verify/typecheck-invoke.inc: New file.
+       * src/vm/jit/verify/typecheck-fields.inc: New file.
+       * src/vm/jit/verify/typecheck-builtins.inc: New file.
+       
+       * src/vm/jit/verify/Makefile.am: Added new source files.
+
+2006-10-11 19:43  edwin
+
+       * src/cacaoh/headers.c (typeinfo_print_short): Stub added.
+
+2006-10-11 19:42  edwin
+
+       * src/vm/jit/verify/typeinfo.c (typeinfo_init_component): Fixed for
+       the case that srcarray == dst. (The mergedlist was overwritten with
+       NULL in this case.)
+
+2006-10-11 19:40  edwin
+
+       * src/vm/resolve.c, src/vm/resolve.h
+       (resolve_method_param_type_checks_stackbased): New function.
+       (resolve_constrain_unresolved_method_params_stackbased): Likewise.
+
+2006-10-11 16:31  edwin
+
+       *
+       tests/regression/jasmin/test_verify_fail_athrow_wrong_reftype_unresolved.j:
+       New test.
+       
+       * tests/regression/jasmin/test_verify_fail_athrow_wrong_reftype.j:
+       New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new tests.
+
+2006-10-11 16:21  edwin
+
+       * tests/regression/jasmin/test_verify_fail_areturn_wrong_reftype.j:
+       New test.
+       
+       * tests/regression/jasmin/test_verify_fail_invoke_return_basic_type.j:
+       New test.
+       
+       * tests/regression/jasmin/test_verify_fail_ireturn_wrong_type.j: New
+       test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new tests.
+
+2006-10-11 10:17  edwin
+
+       * tests/regression/jasmin/test_verify_fail_handler_bad_local.j: new
+       test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-10-10 21:16  edwin
+
+       * tests/regression/jasmin/test_verify_fail_jsr_recursion_terminates.j:
+       Added expected error.
+       
+       * tests/regression/jasmin/test_verify_fail_jsr_recursion.j: Likewise.
+       
+       * tests/regression/jasmin/test_verify_ok_jsr_improper_nesting.j: New
+       test.
+       
+       * tests/regression/jasmin/test_verify_fail_jsr_multiple_returns.j: New
+       test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new tests.
+
+2006-10-10 20:45  edwin
+
+       *
+       tests/regression/jasmin/test_verify_fail_jsr_recursion_terminates.j:
+       New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-10-10 20:31  edwin
+
+       * tests/regression/jasmin/test_verify_fail_jsr_recursion.j: New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-10-10 00:29  edwin
+
+       * src/vm/resolve.c, src/vm/resolve.h (constrain_unresolved_method):
+       Split into two new functions.
+       
+       (resolve_constrain_unresolved_method_instance): New function.
+       (resolve_constrain_unresolved_method_params): Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Use new
+       functions.
+
+2006-10-09 23:53  edwin
+
+       * src/vm/resolve.c (resolve_method_type_checks): Split up into
+       two new functions.
+       
+       (resolve_method_instance_type_checks): New function.
+       
+       (resolve_method_param_type_checks): New function.
+       
+       * src/vm/resolve.h (resolve_method_type_checks): Removed.
+       (resolve_method_instance_type_checks): New function.
+       (resolve_method_param_type_checks): New function.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Call
+       resolve_method_instance_type_checks and
+       resolve_method_param_type_checks.
+
+2006-10-09 23:21  edwin
+
+       * src/vm/resolve.c (resolve_method_verifier_checks): Removed unused
+       variable. Removed unclear assertion.
+
+2006-10-09 23:17  edwin
+
+       * src/vm/resolve.c (resolve_method_verifier_checks): Removed unused
+       arguments.
+       
+       (resolve_method): Changed arguments to resolve_method_verifier_checks.
+       
+       * src/vm/resolve.h (resolve_method_verifier_checks): Removed unused
+       arguments.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Changed
+       arguments to resolve_method_verifier_checks.
+
+2006-10-09 23:06  edwin
+
+       * src/vm/resolve.c (resolve_method_verifier_checks): Factored out
+       parameter type checks into a separate function.
+       
+       (resolve_method_type_checks): New function.
+       
+       * src/vm/resolve.h (resolve_method_type_checks): New function.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Call
+       resolve_method_type_checks.
+
+2006-10-09 22:19  edwin
+
+       * src/vm/resolve.c (resolve_method_verifier_checks): Factored out
+       loading constraints into a separate function.
+       
+       (resolve_method_loading_constraints): New function.
+       
+       (resolve_method): Call resolve_method_loading_constraints.
+       
+       * src/vm/resolve.h (resolve_method_loading_constraints): New function.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Call
+       resolve_method_loading_constraints.
+
+2006-10-09 17:08  edwin
+
+       * src/vm/resolve.c (resolve_method_lazy): Removed dependence on
+       instruction format. Do not perform verifier checks. (Caller will
+       do these.)
+       
+       (create_unresolved_method): Renamed to
+       resolve_create_unresolved_method. Changed arguments.
+       
+       * src/vm/resolve.h (create_unresolved_method): Renamed to
+       resolve_create_unresolved_method. Changed arguments.
+       
+       (resolve_method_lazy): Changed arguments.
+       
+       (resolve_method_verifier_checks): Export.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Adapted
+       to changed resolve functions. Call resolve_method_verifier_checks.
+       Do promotion from INVOKEVIRTUAL to INVOKESPECIAL here.
+       
+       * src/vm/jit/parse.c (parse): Adapted to changed resolve functions.
+       Do promotion from INVOKEVIRTUAL to INVOKESPECIAL here.
+
+2006-10-09 15:42  edwin
+
+       * src/vm/resolve.c (resolve_field_verifier_checks): Removed dependence
+       on instruction format.
+       
+       (resolve_field_lazy): Pass field reference, instead of instruction.
+       Do not perform verification checks here. (Caller will do them.)
+       
+       (resolve_field): Adapted to changed resolve_field_verifier_checks.
+       
+       (create_unresolved_field): Renamed to resolve_create_unresolved_field.
+       
+       (constrain_unresolved_field): Renamed to
+       resolve_constrain_unresolved_field. Removed dependence on instruction
+       format.
+       
+       * src/vm/resolve.h (create_unresolved_field): Renamed to
+       resolve_create_unresolved_field.
+       
+       (resolve_field_lazy): Changed arguments.
+       
+       (resolve_field_verifier_checks): Export.
+       
+       (constrain_unresolved_field): Renamed to
+       resolve_constrain_unresolved_field. Changed arguments.
+       
+       * src/vm/jit/verify/typecheck.c (typecheck): Moved instruction set
+       dependent parts of resolve functions into typecheck.
+       
+       * src/vm/jit/parse.c (resolve_field_lazy): Changed arguments.
+       (create_unresolved_field): Renamed.
+
+2006-10-08 22:49  edwin
+
+       *
+       test/regression/jasmin/test_verify_ok_jsr_subroutine_loops_to_start.j:
+       New test.
+       
+       * test/regression/jasmin/test.j: Small cleanup.
+       
+       * test/regression/jasmin/Makefile.am: Added new test.
+
+2006-10-08 11:39  edwin
+
+       * src/vm/jit/stack.c: Verify that subroutines are not merged.
+       (SBRSTART): New macro.
+       (COPY_VAL_AND_TYPE_VAR): New macro, propagate SBRSTART.
+       (COPY_VAL_AND_TYPE): Use COPY_VAL_AND_TYPE_VAR.
+       (stack_create_invars): Cleaned up, use COPY_VAL_AND_TYPE_VAR.
+       (stack_create_invars_from_outvars): Use COPY_VAL_AND_TYPE_VAR.
+       (stack_check_invars): Check against merging of subroutines. Wrapped
+       verifier checks in #if defined(ENABLE_VERIFIER).
+       (stack_check_invars_from_outvars): Likewise.
+       (stack_reanalyse_block): Wrapped verifier checks in
+       #if defined(ENABLE_VERIFIER).
+       (stack_analyse): Prepare a real variable for the handler stack.
+       Implemented re-analysing of blocks. Set SBRSTART for JSR.
+       
+       * src/vm/jit/parse.c (parse): Reserve extra variables needed by
+       stack_analyse.
+       
+       * src/vm/global.h (STACK_EXTRA_VARS): New macro.
+
+2006-10-08 10:51  edwin
+
+       * src/vm/jit/show.c (show_basicblock): Removed extra newline.
+
+2006-10-08 00:07  edwin
+
+       *
+       tests/regression/jasmin/test_verify_fail_jsr_merge_subroutines_via_stack.j:
+       New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-10-07 23:56  edwin
+
+       * src/vm/jit/cfg.c (cfg_build): Fixed a bug causing infinite loops.
+       
+       * src/vm/jit/parse.c (parse): Always add a NOP at block ends. This is
+       needed by the JSR elimination in stack.c.
+       
+       * tests/regression/jasmin/test_verify_fail_jsr_merge_subroutines.j:
+       New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-10-07 23:02  edwin
+
+       * tests/regression/jasmin/test_verify_fail_jsr_polymorphic_pop.j:
+       New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added new test.
+       
+       * src/vm/jit/stack.c (stack_check_invars): Fixed bug exposed by the
+       new test.
+       (stack_check_invars_from_outvars): Likewise.
+
+2006-10-07 22:34  edwin
+
+       *
+       tests/regression/jasmin/test_verify_fail_jsr_called_with_different_stackdepths.j:
+       New test.
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-10-07 12:54  edwin
+
+       * src/vm/jit/stack.c (GET_NEW_VAR): Fixed macro argument.
+       
+       (SET_TEMPVAR): Call new function stack_change_to_tempvar.
+       
+       (stack_change_to_tempvar): New function.
+       
+       (stack_analyse): Mark pass-through stackslots of INVOKEs instead of
+       resetting them to TEMPVARs.
+       
+       * src/vm/jit/jit.h (PASSTHROUGH): New flag.
+
+2006-10-07 10:22  edwin
+
+       * src/vm/jit/allocator/simplereg.c: Implemented REG_INDEX for
+       architectures with address register file.
+
+2006-10-07 09:44  edwin
+
+       * src/vm/jit/allocator/simplereg.c
+       (simplereg_allocate_locals_leafmethod): Fixed declaration after code.
+
+2006-10-07 00:06  edwin
+
+       * src/vm/jit/allocator/simplereg.c (simplereg_allocate_interface):
+       Copy all flags except SAVEDVAR when reusing an interface slot.
+
+2006-10-06 23:58  edwin
+
+       * src/vm/jit/allocator/simplereg.c: Cleaned up memory slot allocation.
+
+2006-10-06 23:41  edwin
+
+       * src/vm/jit/allocator/simplereg.c (simplereg_allocate_interfaces):
+       Fixed
+       indentation.
+
+2006-10-06 23:03  edwin
+
+       * src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
+       Minor cleanup, use SIMPLEREG_REG_INDEX.
+
+2006-10-06 22:37  edwin
+
+       * src/vm/jit/allocator/simplereg.c: Reuse interface registers in
+       blocks
+       that don't need them. Abstracted out the free register stacks with
+       macros. Major code cleanup.
+       
+       * src/vm/jit/allocator/simplereg.h (reg_make_statistics): Renamed to
+       simplereg_make_statistics.
+       
+       * src/vm/jit/reg.h (registerdata): Added fields `adrusedinout`,
+       `intusedinout`, `fltusedinout`, and `regisoutvar`.
+       
+       * src/vm/jit/jit.c (simplereg_make_statistics): Renamed to
+       simplereg_make_statistics.
+       
+       * src/vm/jit/jit.h (SAVEDTMP): Renamed to SAVREG.
+       (TMPARG): Renamed to ARGREG.
+       (STCOPY): Removed.
+       (STKEEP): Removed.
+
+2006-10-06 21:30  edwin
+
+       * src/vm/jit/stack.c (stack_analyse): Do not set argintreguse to
+       a value > INT_ARG_CNT, as this breaks some new code that will
+       later be committed to simplereg.c, and does not make sense, anyway.
+
+2006-10-06 20:11  edwin
+
+       * src/vm/jit/intrp/Makefile.am (Changes): Added my name.
+
+2006-10-06 20:09  edwin
+
+       * src/vm/jit/show.h (show_variable): Made global.
+       (show_variable_array): Likewise.
+       
+       * src/vm/jit/show.c (show_variable): Likewise.
+       (show_variable_array): Likewise.
+
+2006-10-05 20:30  edwin
+
+       * src/threads/native/threads.c (threads_attach_current_thread): Rename
+       left-over `t` to `thread` in interpreter code.
+
+2006-10-05 20:21  edwin
+
+       * src/vm/jit/codegen-common.c: Include vm/jit/intrp/intrp.h to prevent
+       a warning.
+
+2006-10-05 20:18  edwin
+
+       * src/vm/jit/intrp/intrp.h: Added missing prototypes.
+       
+       * src/vm/jit/intrp/engine.c: Comment unused variable `ca1`.
+       
+       * src/vm/jit/intrp/java.vmg: Mark the variables `currentsp` as
+       MAYBE_UNUSED.
+
+2006-10-05 20:04  edwin
+
+       * src/vm/jit/intrp/intrp.h: Cleaned up. Defined missing prototypes.
+       
+       * src/vm/jit/intrp/java.vmg: Defined "afi" type prefix.
+
+2006-10-05 19:36  edwin
+
+       * src/vm/jit/intrp/peephole.c: Include interpreter files using < >
+       instead of " ", so they are only searched for in the include path.
+       This avoids using the wrong include files when compiling in a
+       buildir.
+       
+       * src/vm/jit/intrp/codegen.c: Likewise.
+       * src/vm/jit/intrp/engine.c: Likewise.
+       * src/vm/jit/intrp/disasm.c: Likewise.
+       * src/vm/jit/intrp/dynamic-super.c: Likewise.
+       
+       * src/vm/jit/intrp/vmgenx: Fixed to work with builddir, and cleaned
+       up.
+       
+       * src/vm/jit/intrp/Makefile.am: Fixed dependencies for builddir.
+
+2006-10-05 17:52  edwin
+
+       * src/vm/jit/intrp/engine.c (Changes): Added my name.
+       (vim boilerplate): Added.
+
+2006-10-05 17:28  twisti
+
+       * src/native/jni.c (jni_attach_current_thread): New help function.
+       (_Jv_JNI_AttachCurrentThread): Use helper function.
+       (_Jv_JNI_AttachCurrentThreadAsDaemon): Likewise.
+       (_Jv_JNI_DetachCurrentThread): Implemented.
+       
+       * src/threads/native/threads.c (method_thread_init)
+       (method_threadgroup_add_: Made static.
+       (threads_init): Code rearranged.
+       (threads_startup_thread): Removed thread detach code and call
+       threads_detach_thread.
+       (threads_detach_thread): New function.
+       
+       * src/threads/native/threads.h (threads_detach_thread): Added.
+
+2006-10-05 17:23  twisti
+
+       * src/vm/utf8.c (utf_removeThread, utf_java_lang_Thread__V): Added.
+       (utf8_init): Initialize new strings.
+       * src/vm/utf8.h (utf_removeThread, utf_java_lang_Thread__V): Added.
+
+2006-10-05 16:28  edwin
+
+       * src/vm/vm.c (vm_create): Turn off the verifier for -Xint.
+
+2006-10-05 16:18  edwin
+
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Style fix.
+
+2006-10-05 16:12  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Save synchronized object in
+       a special stackslot and use it for monitorexit.
+       
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): When
+       unwinding a synchronized method, exit the monitor.
+
+2006-10-05 15:43  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Reserve an extra stackslot in
+       synchronized methods.
+       (intrp_createcompilerstub): Likewise.
+       (intrp_createnativestub): Use stackframesize for clarity.
+
+2006-10-05 15:33  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Separate stackframesize from
+       the number of local variables.
+       (intrp_createcompilerstub): Likewise.
+       
+       * src/vm/jit/intrp/engine.c (MAXLOCALS): Changed to FRAMESIZE.
+       
+       * src/vm/jit/intrp/java.vmg (INVOKEVIRTUAL): Use FRAMESIZE.
+       (INVOKESTATIC): Likewise.
+       (INVOKESPECIAL): Likewise.
+       (INVOKEINTERFACE): Likewise.
+
+2006-10-05 14:13  twisti
+
+       * src/native/jni.c (jni_init_localref_table): New function.
+       (AttachCurrentThread): Implemented.
+       (JNI_CreateJavaVM): Use jni_init_localref_table.
+       
+       * src/threads/native/threads.c (method_thread_init)
+       (method_threadgroup_add): New global variables.
+       (threads_init): Store methods resolved in global variables.
+       (threads_attach_current_thread): New function.
+       
+       * src/threads/native/threads.h (MIN_PRIORITY, NORM_PRIORITY)
+       (MAX_PRIORITY): Defined.
+       (threads_attach_current_thread): New function.
+
+2006-10-05 12:23  edwin
+
+       * src/vm/jit/intrp/java.vmg (TRACECALL): Implemented for 32-bit
+       architectures.
+
+2006-10-05 10:50  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Fix off-by-one error in len
+       tests of optimizations.
+
+2006-10-05 10:41  edwin
+
+       * src/vm/jit/show.c (show_icmd): Show constant operand of IFxx, and
+       IF_Lxx.
+
+2006-10-05 10:39  edwin
+
+       * src/vm/jit/show.c (show_basicblock): Fixed deadcode check.
+       
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Clear
+       global_sp.
+
+2006-10-05 09:04  twisti
+
+       * src/vm/jit/powerpc/emit.c (emit_verbosecall_enter): Darwin build
+       fixes.
+
+2006-10-05 00:21  edwin
+
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Fixed for
+       catch-all handlers.
+
+2006-10-05 00:06  edwin
+
+       * src/vm/jit/show.c (show_method): Adapted to interpreter.
+       (show_basicblock): Likewise.
+       
+       * src/vm/jit/intrp/disass.c (intrp_disassinstr): Write disassembly to
+       stdout.
+       (intrp_disassemble): Likewise.
+
+2006-10-04 23:08  edwin
+
+       * tests/regression/jctest.java: Also test division/remainder with
+       constant divisor 1.
+       
+       * tests/regression/jctest.output: Updated test output.
+
+2006-10-04 23:05  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Don't ?DIVPOW2 with value 1.
+       The optimization produces the wrong result in this case.
+
+2006-10-04 22:53  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Implemented IDIVPOW2 and
+       LDIVPOW2 optimizations.
+
+2006-10-04 22:39  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Implemented IREMPOW2 and
+       LREMPOW2 optimizations.
+
+2006-10-04 22:12  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Implement optimization of
+       comparisons.
+
+2006-10-04 20:44  edwin
+
+       * src/vm/jit/allocator/simplereg.c (reg_free_temp_func): Fixed indices
+       into regcopycount array.
+       (allocate_scratch_registers): Likewise.
+
+2006-10-04 20:02  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): #if 0-ed optimized ICMDs that
+       are currently not used. In order to use these instructions, we could
+       either add the optimization checks directly to codegen.c, or introduce
+       a special pass between parse and intrp_codegen which replaces the
+       instructions.
+
+2006-10-04 19:47  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Removed unoptimized *CONST
+       instructions. Since stack_analyse is no longer performed before the
+       interpreter codegen, these instructions cannot occur.
+
+2006-10-04 19:38  edwin
+
+       * src/vm/jit/stack.c: Removed interpreter-specific code.
+
+2006-10-04 18:44  edwin
+
+       * src/threads/native/lock.c (lock_monitor_exit): Check for NULL
+       object.
+       There is no guarantee that MONITORENTER/EXITs are properly nested, so
+       we cannot rely on the check in lock_monitor_enter here.
+
+2006-10-04 18:39  edwin
+
+       * tests/regression/jasmin/test_nullpointerexception_monitorexit.j:
+       Fixed test case, so it passes if the exception is thrown.
+
+2006-10-04 18:35  edwin
+
+       * tests/regression/jasmin/test_nullpointerexception_monitorexit.j:
+       New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added
+       test_nullpointerexception_monitorexit.j.
+
+2006-10-04 18:25  edwin
+
+       * tests/regression/jasmin/Makefile.am: Properly quote variables.
+
+2006-10-04 18:23  edwin
+
+       * src/vm/jit/intrp/engine.c (THROW_CLASSCASTEXCEPTION): Really throw a
+       ClassCastException, not a NullPointerException.
+       
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Set
+       global_sp, in case the resolving of the catchtype involves the
+       execution of Java code.
+       
+       * src/vm/jit/intrp/java.vmg (MONITORENTER): Check for exception.
+       (MONITOREXIT): Likewise.
+
+2006-10-04 16:42  edwin
+
+       * src/vm/jit/intrp/java.vmg (LOOKUPSWITCH): No point in using >= 0 on
+       an unsigned variable.
+
+2006-10-04 16:01  edwin
+
+       * src/vm/jit/intrp/codegen.c (nativecall): Store return valud of
+       codegen_finish_native_call in *exceptionptr.
+       
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Resolve
+       unresolved catchtype references.
+
+2006-10-04 15:14  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Convert JavaPCs to block
+       indices.
+       Do not check for BBREACHED (not set by parse).
+       (gen_branch): Convert JavaPCs to block indices.
+       
+       * src/vm/jit/intrp/java.vmg (RET): restored.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Do not perform stack_analyse
+       and
+       dependent passes for intrp.
+
+2006-10-04 15:04  twisti
+
+       * src/vm/jit/intrp/md.c (intrp_md_init): Set vm_out to stderr.
+       
+       * src/vm/jit/intrp/engine.c (THROW_CLASSCASTEXCEPTION): Added.
+       (engine): Handle ClassCastExceptions with argument.
+       
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Indent.
+       
+       * src/vm/jit/intrp/dynamic-super.c: Use LOCK_MONITOR_{ENTER,EXIT}
+       macros.
+       
+       * src/vm/jit/intrp/patcher.c (intrp_patcher_invokestatic_special):
+       Write back method pointer. I wonder how this ever worked before.
+       (intrp_patcher_invokevirtual): Likewise.
+       (intrp_patcher_invokeinterface): Likewise.
+       
+       * src/vm/jit/intrp/java.vmg (RET): Removed.
+       (TABLESWITCH): Changed reading direction of cases. Don't know if that
+       works: NOT TESTED!
+       (CHECKCAST): Use THROW_CLASSCASTEXCEPTION.
+       (ARRAYCHECKCAST): Likewise.
+       (MONITORENTER): Likewise.
+       (MONITOREXIT): Likewise.
+
+2006-10-04 14:50  edwin
+
+       * src/vm/jit/intrp/dynamic-super.c (superreuse_insert): Use
+       lock_monitor_ functions.
+       (patchersuper_rewrite): Likewise.
+       (hashtable_patchersupers_insert): Likewise.
+
+2006-10-04 14:31  edwin
+
+       * src/vm/jit/intrp/codegen.c (codegen): Restored ICMD_RET to really
+       perform a RET (JSR elimination will not be performed for intrp.)
+       Removed a comment that does not apply any more.
+
+2006-10-04 14:20  edwin
+
+       * src/vm/jit/intrp/java.vmg (builtin_monitorenter): Changed to
+       lock_monitor_enter.
+       (builtin_monitorexit): Changed to lock_monitor_exit.
+
+2006-10-04 13:40  edwin
+
+       * src/vm/jit/intrp/codegen.c: Made it compile again.
+
+2006-10-04 13:35  twisti
+
+       * src/vm/jit/intrp/codegen.c: New instruction format fixes.
+
+2006-10-04 12:09  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Removed src/scripts/rmic and
+       src/scripts/rmiregistry.
+       * src/scripts/Makefile.am (bin_SCRIPTS): Removed trailing \.
+
+2006-10-04 10:37  twisti
+
+       * src/scripts/rmic.in: Removed.
+       * src/scripts/rmiregistry.in: Likewise.
+       
+       * src/scripts/Makefile.am (bin_SCRIPTS) Removed rmi.in and
+       rmiregistry.in.
+       * src/scripts/.cvsignore: Likewise.
+       
+       * src/scripts/java.in: Don't call cacao with an absolute path, this
+       would break WITH_JRE_LAYOUT. I think we can expect cacao to be in the
+       PATH.
+
+2006-10-04 10:10  twisti
+
+       * configure.ac (--with-jre-layout): Added.
+       
+       * src/vm/global.h (CLASSPATH_LIBRARY_PATH): Removed.
+       
+       * src/vm/vm.c [WITH_JRE_LAYOUT] (libgen.h, unistd.h): Added.
+       (cacao_prefix, cacao_libjvm, classpath_libdir): New global variables.
+       (version): Print gnu.classpath.boot.library.path instead of
+       java.library.path as this is the interesting one.
+       (vm_create): Added WITH_JRE_LAYOUT stuff.
+       
+       * src/vm/vm.h (stackbottom): Removed.
+       (cacao_prefix, cacao_libjvm, classpath_libdir): Added.
+       
+       * src/cacao/cacao.c [WITH_JRE_LAYOUT] (errno.h, libgen.h, unistd.h):
+       Added.
+       (main): Added WITH_JRE_LAYOUT stuff.
+       
+       * src/native/vm/gnu_classpath_VMSystemProperties.c (vm/vm.h): Added.
+       (preInit): Set env_java_home to cacao_prefix and
+       gnu.classpath.boot.library.path to classpath_libdir.
+       
+       * src/native/native.c (native_init): Use cacao_libjvm in lt_dlopenext
+       call.
+
+2006-10-03 21:19  edwin
+
+       * src/vm/jit/jit.h (jitdata): Renamed c_debug_nr to c_block_nr. (Still
+       not a good name. Should probably be removed entirely.)
+       Added comments.
+       
+       * src/vm/method.h (c_debug_nr): Renamed to c_block_nr.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/loop/analyze.c: Likewise.
+       * src/vm/jit/inline/inline.c: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+
+2006-10-03 20:57  edwin
+
+       * src/vm/jit/powerpc/codegen.c: Removed new_ prefix from variable and
+       field names.
+       
+       * src/vm/jit/cfg.c: Likewise.
+       * src/vm/jit/sparc64/codegen.c: Likewise.
+       * src/vm/jit/reorder.c: Likewise.
+       * src/vm/jit/ifconv/ifconv.c: Likewise.
+       * src/vm/jit/alpha/codegen.c: Likewise.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/stack.h: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/verify/typecheck.c: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/powerpc64/codegen.c: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/replace.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/parse.h: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+       * src/vm/jit/jit.h: Likewise.
+
+2006-10-03 20:44  edwin
+
+       * src/vm/resolve.c: Removed new_ prefix from function names.
+       * src/vm/resolve.h: Likewise.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/stack.h: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/verify/typecheck.c: Likewise.
+       * src/vm/jit/show.h: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/allocator/simplereg.h: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/parse.h: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+
+2006-10-03 20:27  edwin
+
+       * src/vm/jit/allocator/simplereg.c: Warning fixed.
+
+2006-10-03 20:26  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Use varindex as in other
+       codegens.
+
+2006-10-03 20:22  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Removed obsolete stack depth
+       checking code.
+       
+       * src/vm/jit/stack.h (CHECK_STACK_DEPTH): Removed macro.
+
+2006-10-03 19:11  edwin
+
+       * src/vm/jit/powerpc64/codegen.c (codegen): Unified IINC and
+       IADDCONST.
+
+2006-10-03 18:50  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Unify IINC and IADDCONST.
+
+2006-10-03 18:34  edwin
+
+       * src/vm/jit/allocator/simplereg.c (reg_make_statistics): Bugfix.
+
+2006-10-03 18:21  twisti
+
+       * src/native/vm/gnu_classpath_VMSystemProperties.c (preInit): We don't
+       need to strcpy the library variables. Don't know where this code came
+       from.
+
+2006-10-03 18:09  edwin
+
+       * src/vm/jit/allocator/simplereg.c (reg_make_statistics): Make it
+       compile again.
+
+2006-10-03 17:44  edwin
+
+       Moved unified_variables branch to trunk.
+
+2006-10-03 17:24  edwin
+
+       * tests/regression/jasmin/test_iinc.j: New test.
+       
+       * tests/regression/jasmin/Makefile.am: Added test_iinc.j
+
+2006-10-03 16:42  edwin
+
+       Merged r5640 from trunk:
+       
+       * src/vm/jit/x86_64/Makefile.am (libarch_la_SOURCES): Renamed
+       md-emit.h to emit.h.
+
+2006-10-03 16:32  edwin
+
+       * src/vm/jit/powerpc/codegen.c: Implemented ICMD_JSR like ICMD_GOTO.
+       * src/vm/jit/powerpc64/codegen.c: Likewise.
+       
+       * src/vm/jit/alpha/codegen.c: Implemented ICMD_JSR like ICMD_GOTO.
+       Unified ICMD_IINC and ICMD_IADDCONST.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+
+2006-10-02 19:24  edwin
+
+       Merged r5636, r5637, and r5638 from trunk:
+       
+       * src/native/tools/gennativetable.c: Made it work again.
+       
+       * tests/regression/jasmin/.cvsignore: New file.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): #if 0 replacement point
+       code.
+       
+       * src/vm/jit/powerpc/emit.c [!NDEBUG] (emit_verbosecall_enter)
+       (emit_verbosecall_exit): #ifdef'ed.
+
+2006-10-02 16:36  christian
+
+       * src/vm/jit/alpha/md-abi.c (md_return_alloc): Activated return value
+       stackslot registers precolouring again.
+
+2006-10-02 14:18  edwin
+
+       * src/vm/jit/powerpc/netbsd/md-abi.c: Blindly ported to
+       unified_variables.
+       
+       * src/vm/jit/powerpc/linux/md-abi.c: Cleaned up.
+       * src/vm/jit/powerpc/darwin/md-abi.c: Likewise.
+       * src/vm/jit/alpha/md-abi.c: Likewise.
+       * src/vm/jit/mips/md-abi.c: Likewise.
+       * src/vm/jit/powerpc64/linux/md-abi.c: Likewise.
+       * src/vm/jit/x86_64/md-abi.c: Likewise.
+
+2006-10-02 13:59  edwin
+
+       * src/vm/jit/powerpc/codegen.c: Changed OUTVAR to INOUT.
+       * src/vm/jit/alpha/codegen.c: Likewise.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/powerpc64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/jit.h: Likewise.
+
+2006-10-02 13:43  edwin
+
+       * src/vm/jit/alpha/codegen.h: Removed M_COPY.
+       * src/vm/jit/mips/codegen.h: Likewise.
+       * src/vm/jit/i386/codegen.h: Likewise.
+       * src/vm/jit/powerpc64/codegen.h: Likewise.
+       * src/vm/jit/x86_64/codegen.h: Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c: Unified ICMD_RET with ICMD_GOTO.
+       * src/vm/jit/alpha/codegen.c: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/powerpc64/codegen.c: Likewise.
+       * src/vm/jit/intrp/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+
+2006-10-02 13:26  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Unified LOAD/STORE and
+       COPY/MOVE instructions.
+       
+       * src/vm/jit/powerpc/codegen.h (M_COPY): Removed.
+
+2006-10-02 13:16  edwin
+
+       * src/vm/jit/powerpc/linux/md-abi.c (md_param_alloc): Cleaned up
+       comments.
+       * src/vm/jit/powerpc/darwin/md-abi.c (md_param_alloc): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Removed obsolete call to
+       codegen_reg_of_var.
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       * src/vm/jit/mips/codegen.c (codegen): Likewise.
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+       
+       * src/vm/jit/codegen-common.c (codegen_reg_of_var): Cleaned up.
+       (codegen_reg_of_dst): Implemented using inline codegen_reg_of_var.
+
+2006-10-02 12:10  edwin
+
+       Merged r5626 from trunk:
+       
+       * src/vm/jit/replace.c (replace_create_replacement_points): Return
+       true.
+
+2006-10-02 11:55  edwin
+
+       Merged r5624 from trunk:
+       
+       * src/vm/jit/mips/asmpart.S (asm_vm_call_method): Remove argument
+       stack frame in normal path.
+
+2006-10-02 00:32  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Unified MOVE/COPY with
+       LOAD/STORE instructions.
+
+2006-10-02 00:08  edwin
+
+       * tests/regression/jasmin/runtest: Made it a bash script, so it works
+       on crappy fp98.
+
+2006-10-02 00:06  edwin
+
+       * tests/regression/jasmin/runtest: Do not use grep -o.
+
+2006-10-01 23:51  edwin
+
+       * src/vm/jit/mips/emit.c (emit_copy): Fixed arguments to
+       codegen_reg_of_var.
+       * src/vm/jit/powerpc64/emit.c (emit_copy): Likewise.
+       
+       * src/vm/jit/mips/codegen.c (codegen): Define varindex.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise. Fixed arguments
+       to codegen_reg_of_var. Replaced codegen_reg_of_var with
+       codegen_reg_of_dst.
+
+2006-10-01 23:37  edwin
+
+       * src/vm/jit/powerpc64/codegen.c: Ported to unified_variables.
+       * src/vm/jit/powerpc64/codegen.h: Likewise.
+       * src/vm/jit/powerpc64/emit.c: Likewise.
+       * src/vm/jit/powerpc64/linux/md-abi.c: Likewise.
+
+2006-10-01 23:00  edwin
+
+       Merged r5616 from trunk:
+       
+       * src/native/jni.c: Prefix all JNI functions with _Jv_JNI_, as gcj
+       does. This should prevent any linking problems.
+
+2006-10-01 22:55  edwin
+
+       * src/vm/jit/mips/codegen.c: Ported to unified_variables.
+       * src/vm/jit/mips/codegen.h: Likewise.
+       * src/vm/jit/mips/emit.c: Likewise.
+       * src/vm/jit/mips/md-abi.c: Likewise.
+
+2006-10-01 20:52  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Cleaned up unified_variables
+       changes.
+
+2006-10-01 20:49  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Cleaned up unified_variables
+       changes.
+
+2006-10-01 20:42  edwin
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Cleaned up unified_variables
+       changes.
+
+2006-10-01 20:37  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Cleaned up unified_variables
+       changes.
+
+2006-10-01 20:08  edwin
+
+       * tests/regression/jasmin/runtest: Use default JASMIN_JAR, if given.
+
+2006-10-01 18:01  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_reg_of_var): Fixed typo in
+       ARM code.
+
+2006-10-01 15:44  edwin
+
+       * src/vm/jit/verify/typeinfo.c (typevector_store_retaddr): Do not
+       invalidate the variable at index i-1.
+       (typevector_store_twoword): Removed.
+
+2006-10-01 15:25  edwin
+
+       * src/vm/jit/verify/typecheck.c (typecheck): Added debug print of
+       the reverse local map.
+
+2006-10-01 14:43  edwin
+
+       * src/vm/vm.c (vm_compile_all): Only use if !defined(NDEBUG).
+       (vm_compile_method): Likewise.
+
+2006-10-01 14:37  edwin
+
+       * src/vm/jit/verify/typeinfo.h: Disabled TYPECHECK_VERBOSE.
+
+2006-09-30 23:28  edwin
+
+       * src/vm/jit/jit.c (jit_compile_intern): Removed commented out
+       debugging code.
+
+2006-09-30 23:12  edwin
+
+       * src/vm/jit/allocator/simplereg.c (reg_new_temp): Simplified.
+       (reg_free_temp): Formatted.
+
+2006-09-30 23:06  edwin
+
+       * src/vm/jit/powerpc/linux/md-abi.c: Use VAR and VAROP macros.
+       * src/vm/jit/powerpc/darwin/md-abi.c: Likewise.
+       * src/vm/jit/alpha/codegen.c: Likewise.
+       * src/vm/jit/alpha/codegen.h: Likewise.
+       * src/vm/jit/alpha/md-abi.c: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/verify/typecheck.c: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/i386/codegen.h: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/x86_64/emit.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.h: Likewise.
+       * src/vm/jit/x86_64/md-abi.c: Likewise.
+       * src/vm/jit/codegen-common.c: Likewise.
+
+2006-09-30 22:45  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Use VAR and VAROP macros.
+       (codegen_insert_phi_moves): Likewise.
+
+2006-09-30 22:24  edwin
+
+       Merged r5591 from trunk:
+       
+       * src/native/jni.c (GetVersion): Prefixed with _Jv_, we should do that
+       with all JNI functions.
+
+2006-09-30 22:22  edwin
+
+       Merged r5589 and r5590 from trunk:
+       
+       * configure.ac: Fixed CFLAGS for cygwin.
+       * src/threads/native/threads.c: Inserted asserts for cygwin.
+       * src/vm/jit/i386/cygwin/Makefile.am: See below.
+       * src/vm/jit/i386/cygwin/md-asm.h: Added.
+       * src/vm/jit/i386/cygwin/md-os.c: Inserted asserts.
+       * src/vm/jit/i386/cygwin/ucontext.c: Added 3rd party file.
+       * src/vm/jit/i386/cygwin/ucontext.h: Added 3rd party file.
+       
+       
+       * src/cacao/.cvsignore, src/cacaoh/.cvsignore,
+       src/vm/jit/tools/.cvsignore: Added ignores for cygwin and
+       modified properties accordingly.
+
+2006-09-30 11:04  christian
+
+       * src/vm/jit/alpha/codegen.c (codegen): Changed to use the macros VAR
+       and VAROP.
+
+2006-09-30 10:16  christian
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Changed to use the macros
+       VAR and VAROP.
+
+2006-09-29 14:02  edwin
+
+       * src/vm/jit/allocator/simplereg.c (reg_free_temp_func): Handle
+       packed registers.
+       (new_allocate_scratch_registers): Likewise.
+
+2006-09-29 13:33  edwin
+
+       Merged r5540 from trunk:
+       
+       * configure.ac: Cygwin OS dir added.
+       * src\lib\Makefile.am: Now checks for "zip.exe" as well
+       * src\vm\jit\i386\Makefile.am: Added Cygwin OS dir.
+       * src\vm\jit\i386\cygwin\Makefile.am: Added.
+       * src\vm\jit\i386\cygwin\md-os.c: Added. Only contains
+       dummy signal handlers.
+       * src\vm\builtin.c: Undefine Bias for Cygwin because
+       Windows uses this define.
+       * src\vm\signal.c: No signal handlers for Cygwin.
+
+2006-09-29 12:46  edwin
+
+       Merged r5573, r5574, r5577, r5578, and r5579 from trunk.
+       
+       * src/cacao/cacao.c (vm/vm.h): Added.
+       * src/cacao/Makefile.am [!ENABLE_LIBJVM] (CACAO_LIB): Link libjvm.la.
+       
+       
+       * src/vm/jit/powerpc/darwin/md-asm.h (md_codegen_get_pv_from_pc):
+       Added stub define.
+       * src/vm/jit/powerpc/asmpart.S (L_md_codegen_get_pv_from_pc$stub):
+       Added.
+       
+       
+       * src/cacaoh/cacaoh.c (cacaoh_options_prepare): Set nOptions, this was
+       deleted accidentally.
+       
+       
+       * src/vm/vm.c (vm_create): Added installation of exit handler.
+       (vm_run): New function.
+       (vm_get_mainclass_from_jar): Likewise.
+       (vm_compile_all): Likewise.
+       (vm_compile_method): Likewise.
+       * src/vm/vm.h (vm_run): New function.
+       
+       * src/vm/options.c (options_prepare): Removed.
+       * src/vm/options.h (options_prepare): Likewise.
+       
+       * src/cacao/cacao.c (getmainclassnamefromjar): Removed.
+       (main): Moved most stuff to vm-functions and load libjvm with dlopen
+       and resolve symbols for ENABLE_LIBJVM.
+       (cacao_options_prepare): New function.
+       
+       * src/cacao/Makefile.am (CACAO_LIBS): New variable.
+       (cacao_LDADD): Use CACAO_LIBS.
+       
+       * src/native/native.c (native_init): Set mainhandle to libjvm for
+       ENABLE_LIBJVM.
+       
+       * src/cacaoh/cacaoh.c (cacaoh_prepare_options): New function.
+       
+       
+       * src/native/jni.c (JNI_CreateJavaVM): Renamed jvm to vm.
+
+2006-09-28 22:33  edwin
+
+       * src/vm/jit/powerpc64: Merged changes from r5403 to r5548 from trunk.
+
+2006-09-28 20:56  edwin
+
+       * src/vm/jit/i386/cygwin: Copied directory from trunk.
+
+2006-09-28 20:38  edwin
+
+       Merged r5547 from trunk:
+       
+       * src/native/jni.c (FindClass): Removed architecture #ifdef's.
+
+2006-09-28 20:33  edwin
+
+       Merged r5543 from trunk:
+       
+       * src/vm/jit/sparc64/codegen.c: Completed port to new instruction
+       format.
+       * src/vm/jit/sparc64/md-abi.h: Likewise.
+       * src/vm/jit/sparc64/emit.c: Likewise.
+
+2006-09-28 20:31  edwin
+
+       Merged r5541 from trunk:
+       
+       * src/vm/jit/powerpc/emit.c (vm/jit/emit.h): Renamed to
+       vm/jit/emit-common.h.
+       (emit_load_s1, emit_load_s2, emit_load_s3, emit_load_s1_low)
+       (emit_load_s2_low, emit_load_s3_low, emit_load_s1_high)
+       (emit_load_s2_high, emit_load_s3_high) (emit_store_dst): Removed.
+       
+       * src/vm/jit/powerpc/codegen.c (vm/jit/emit.h): Renamed to
+       vm/jit/emit-common.h.
+
+2006-09-28 20:29  edwin
+
+       Merged r5540 and r5542 from trunk:
+       
+       * configure.ac: Cygwin OS dir added.
+       * src\lib\Makefile.am: Now checks for "zip.exe" as well
+       * src\vm\jit\i386\Makefile.am: Added Cygwin OS dir.
+       * src\vm\jit\i386\cygwin\Makefile.am: Added.
+       * src\vm\jit\i386\cygwin\md-os.c: Added. Only contains
+       dummy signal handlers.
+       * src\vm\builtin.c: Undefine Bias for Cygwin because
+       Windows uses this define.
+       * src\vm\signal.c: No signal handlers for Cygwin.
+       
+       * src/vm/jit/i386/cygwin/.cvsignore: New file.
+
+2006-09-28 20:23  edwin
+
+       Merged r5539 from trunk:
+       
+       * src/vm/jit/mips/emit.c (emit_exception_stubs): Don't use
+       SIZEOF_VOID_P for getting return address, this is wrong on MIPS32.
+       * src/vm/jit/mips/codegen.c (createnativestub): Likewise.
+
+2006-09-28 20:20  edwin
+
+       Merged r5538 from trunk:
+       
+       * src/native/native.c (native_insert_char): New function.
+       (native_resolve_function): Use native_insert_char function to fill
+       name buffer.
+
+2006-09-28 20:19  edwin
+
+       Merged r5537 from trunk:
+       
+       * src/vm/jit/mips/codegen.c (codegen): Make fieldinfo,
+       unresolved_field local variables, better code for ICMD_PUTFIELD.
+
+2006-09-28 20:18  edwin
+
+       Merged r5536 from trunk:
+       
+       * src/vm/jit/mips/emit.c (vm/jit/emit.h): Renamed to
+       vm/jit/emit-common.h.
+       (emit_load_s1, emit_load_s2, emit_load_s3, emit_store_dst): Removed.
+       
+       * src/vm/jit/mips/codegen.c (vm/jit/emit.h): Renamed to
+       vm/jit/emit-common.h.
+       (codegen): Some updates to field instructions.
+
+2006-09-28 20:17  edwin
+
+       Merged r5535 from trunk:
+       
+       * src/vm/jit/mips/codegen.c (codegen): Moved ICMD_IREMPOW2 and
+       ICMD_LREMPOW2.
+
+2006-09-28 20:16  edwin
+
+       Merged r5534 from trunk:
+       
+       * src/vm/jit/alpha/emit.c (vm/jit/emit.h): Renamed to
+       vm/jit/emit-common.h.
+       (emit_load_s1, emit_load_s2, emit_load_s3, emit_store_dst): Removed.
+       
+       * src/vm/jit/alpha/codegen.c (vm/jit/emit.h): Renamed to
+       vm/jit/emit-common.h.
+
+2006-09-28 20:13  edwin
+
+       Merged r5531 and r5532, ported to unified_variables:
+       
+       * src/vm/jit/i386/md-emit.h: Renamed to src/vm/jit/i386/emit.h.
+       
+       * src/vm/jit/i386/emit.c (vm/jit/i386/md-emit.h): Renamed to
+       vm/jit/i386/emit.h.
+       (vm/jit/emit.h): Renamed to vm/jit/emit-common.h.
+       (emit_load_s1, emit_load_s2, emit_load_s3, emit_load_s1_low)
+       (emit_load_s2_low, emit_load_s1_high, emit_load_s2_high)
+       (emit_store_dst): Removed.
+       
+       * src/vm/jit/i386/codegen.c (vm/jit/i386/md-emit.h): Renamed to
+       vm/jit/i386/emit.h.
+       (vm/jit/emit.h): Renamed to vm/jit/emit-common.h.
+
+2006-09-28 19:53  edwin
+
+       Merged r5530 from trunk:
+       
+       * src/vm/jit/emit.h: Renamed to src/vm/jit/emit-common.h.
+       * src/vm/jit/emit-common.c: New file.
+       
+       * src/vm/jit/Makefile.am (noinst_HEADERS): Removed emit.h.
+       (libjit_la_SOURCES): Added emit-common.[ch].
+       
+       * src/vm/jit/x86_64/emit.c (emit_load_s1, emit_load_s2, emit_load_s3)
+       (emit_store_dst): Removed.
+       
+       * src/vm/jit/x86_64/codegen.c: Changed include names.
+
+2006-09-28 19:46  edwin
+
+       Merged r5529 from trunk:
+       
+       * src/vm/jit/x86_64/md-emit.h: Renamed to src/vm/jit/x86_64/emit.h.
+
+2006-09-28 19:36  edwin
+
+       Merged r5527 from trunk:
+       
+       * src/native/include/.cvsignore: Added sun_misc_Unsafe.h.
+
+2006-09-28 19:33  edwin
+
+       Merged r5526 from trunk:
+       
+       * src/native/vm/sun_misc_Unsafe.c: New file:
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       sun_misc_Unsafe.c.
+       * src/native/include/Makefile.am (GEN_HEADER_FILES): Added
+       sun_misc_Unsafe.h.
+
+2006-09-28 19:31  edwin
+
+       Merged r5525 from trunk:
+       
+       * tests/regression/clinitexception.2output: Updated to GNU Classpath
+       0.92.
+       * tests/regression/extest.2output: Likewise.
+
+2006-09-28 19:30  edwin
+
+       Merged r5509 from trunk:
+       
+       * src/vm/jit/show.c (new_show_basicblock): Print predecessors only for
+       stage >= SHOW_CFG.
+       * src/vm/jit/show.h (SHOW_CFG): Defined.
+
+2006-09-28 19:24  edwin
+
+       Merged r5506 from trunk:
+       
+       * src/native/jni.c (GetDirectBufferAddress): Check if address is NULL.
+
+2006-09-28 19:22  edwin
+
+       Merged r5502 from trunk, with additional fixes:
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Moved cfg_build call after
+       stack_analyse, because of JSR elimination.
+       
+       * src/vm/jit/cfg.c (cfg_build): Updated to be run after stack_analyse.
+       
+       Fixes:
+       
+       * src/vm/jit/cfg.c (cfg_build): Skip NOPs at the end of the block.
+       Handle JSR and RET correctly. Use bptr->next in the default case
+       of falling into the following block.
+
+2006-09-28 18:45  edwin
+
+       Merged r5489 from trunk:
+       
+       * configure.ac (INTRP_CFLAGS): Moved a bit.
+       * src/vm/jit/intrp/Makefile.am (CFLAGS): Don't define.
+       (AM_CFLAGS): Define as INTRP_CFLAGS, that seems to be the correct way.
+
+2006-09-28 18:42  edwin
+
+       * src/vm/jit/sparc64/codegen.c (codegen): Replaced catchtype.cls
+       with catchtype.any to reflect that it can be a classref or a
+       classinfo. (Also see r5488.)
+
+2006-09-28 18:35  edwin
+
+       Merged r5476 from trunk:
+       
+       Merged sparc64 changes from trunk.
+
+2006-09-28 18:31  edwin
+
+       Merged r5462 from trunk:
+       
+       * src/vm/jit/parse.c (new_parse): Added a ICMD_NOP at the end of each
+       basic block, if we have reorder enabled.
+
+2006-09-28 17:02  edwin
+
+       * src/vm/jit/reg.h (registerdata): New fields regcopycount,
+       memcopycount, and memcopycountsize.
+       
+       * src/vm/jit/allocator/simplereg.c (reg_init_temp): Take jitdata
+       argument, initialize copy counts.
+       (reg_free_temp): Simplified a bit.
+       (reg_free_temp_func): Check if freeing a copy.
+       (reg_alloc_dup): New function.
+       (new_allocate_scratch_registers): Implemented DUP coalescing using a
+       copy count for each register/memory regoff.
+
+2006-09-19 09:41  edwin
+
+       * tests/regression/jasmin/runtest: Display only the basename of tests.
+       * tests/regression/jasmin/Makefile.am: Use $(srcdir) to locate the
+       runtest script.
+
+2006-09-15 20:18  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Set stackslot SAVEDVAR for
+       MULTIANEWARRAY.
+
+2006-09-15 17:19  christian
+
+       src/vm/jit/allocator/simplereg.c (reg_free_temp_func): New var
+       structures also for SUPPORT_COMBINE_INTEGER_REGISTERS.
+
+2006-09-15 17:05  christian
+
+       * src/vm/jit/ppc/emit.c (emit_load): Changed to new variable
+       structure (varinfo * instead of stackptr) and the use of Macros
+       IS_INMEMORY and VAROP.
+       (emit_store): Likewise.
+       (emit_copy): Likewise.
+       (emit_load_high): Likewise.
+       (emit_load_low): Likewise.
+       (emit_load_s1): Likewise.
+       (emit_load_s1_low): Likewise.
+       (emit_load_s1_high): Likewise.
+       (emit_load_s2): Likewise.
+       (emit_load_s2_low): Likewise.
+       (emit_load_s2_high): Likewise.
+       (emit_load_s3): Likewise.
+       (emit_load_s3_low): Likewise.
+       (emit_load_s3_high): Likewise.
+       (emit_store_dst): Likewise.
+       
+       * src/vm/jit/ppc/codegen.c (codegen): Changed to new variable
+       structure (varinfo * instead of stackptr, adapting of Argument
+       handling, no interface copying anymore at BB Boundaries ) and the use
+       of Macros IS_INMEMORY, VAR and VAROP. ICMD_xSTORE and ICMD_xLOAD use
+       now
+       emit_copy. ICMD_DUPx and ICMD_SWAP were replaced by ICMD_MOVE and
+       ICMD_COPY. Invars are now regarded for EXH and JSR
+       Blocks. Changed ICMD_RET handling like with i386.
+       
+       * src/vm/jit/ppc/codegen.h (M_COPY): Changed to new variable
+       structure.
+       
+       * src/vm/jit/ppc/linux/md-abi.c (md_return_alloc): Changed to new
+       variable structure.
+       
+       * src/vm/jit/ppc/darwin/md-abi.c (md_return_alloc): Changed to new
+       variable structure.
+
+2006-09-15 16:55  edwin
+
+       * tests/regression/jasmin/Makefile.am: Added new test.
+       * tests/regression/jasmin/test_dup_x2_interface_slots.j: New test.
+       * tests/regression/jasmin/test_dup_x1_interface_slots.j: Changed
+       second loop to also use DUP_X1.
+
+2006-09-15 16:44  edwin
+
+       * src/vm/jit/stack.c (MOVE_TO_TEMP): New macro.
+       (new_stack_analyse): Use MOVE_TO_TEMP to save sources for all
+       DUP*, SWAP instructions where it is necessary.
+       
+       * src/vm/jit/parse.c (new_parse): Reserve additional NOPs for
+       DUP* instructions.
+
+2006-09-15 16:39  edwin
+
+       * tests/regression/jasmin/test_dup_x1_interface_slots.j: New test.
+       * tests/regression/jasmin/test_dup2_x1.j: Added dup2_x1 with
+       interface slots.
+       * tests/regression/jasmin/Makefile.am: Added new test.
+
+2006-09-15 16:31  christian
+
+       * src/vm/jit/alpha/emit.c (emit_load): Changed to new variable
+       structure (varinfo * instead of stackptr) and the use of Macro
+       IS_INMEMORY.
+       (emit_store): Likewise.
+       (emit_copy): Likewise.
+       (emit_load_s1): Likewise and reuse emit_load.
+       (emit_load_s2): Likewise and reuse emit_load.
+       (emit_load_s3): Likewise and reuse emit_load.
+       (emit_store_dst): Likewise and reuse emit_store.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Changed to new variable
+       structure (varinfo * instead of stackptr, adapting of Argument
+       handling, no interface copying anymore at BB Boundaries ) and the use
+       of Macro IS_INMEMORY. ICMD_xSTORE and ICMD_xLOAD use now
+       emit_copy. ICMD_DUPx and ICMD_SWAP were replaced by ICMD_MOVE and
+       ICMD_COPY. Invars are now regarded
+       for EXH and JSR Blocks. Changed ICMD_RET handling like with i386.
+       
+       * src/vm/jit/alpha/codegen.h (M_COPY): Changed to new variable
+       structure.
+       
+       * src/vm/jit/alpha/md-abi.c (md_return_alloc): Changed to new
+       variable structure.
+
+2006-09-15 15:52  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Add a third move at the
+       beginning of a swap operation to save the src1 operand, unless it
+       is in a temporary variable.
+       
+       * src/vm/jit/parse.c (new_parse): Reserve three ICMDs for SWAP.
+
+2006-09-15 15:44  edwin
+
+       * tests/regression/jasmin/Makefile.am: Added/renamed tests.
+
+2006-09-15 14:43  edwin
+
+       * src/vm/jit/verify/typecheck.c: Cleanup and documentation.
+
+2006-09-15 14:18  edwin
+
+       * src/vm/jit/verify/typecheck.c (typestate_reach): Removed check
+       against uninitialized object on stack/in locals during backward
+       branch. It is unnecessary, and not done by the RI. Reference:
+       Alessandro Coglio
+       Improving the official specification of Java bytecode verification
+       Proceedings of the 3rd ECOOP Workshop on Formal Techniques for
+       Java Programs
+       June 2001
+       citeseer.ist.psu.edu/article/coglio03improving.html
+       
+       (verify_basic_block): Removed check against uninitialized object in
+       locals within try block. See above.
+       
+       * tests/regression/jasmin/
+       test_verify_fail_backward_with_new_in_local.j: Renamed.
+       * tests/regression/jasmin/test_verify_fail_new_in_local_within_try.j:
+       Renamed.
+       
+       * tests/regression/jasmin/
+       test_verify_unspecced_ok_backward_with_new_on_stack.j: New test.
+       
+       * tests/regression/jasmin/
+       test_verify_fail_backward_with_new_on_stack.j: Fixed.
+
+2006-09-15 13:08  edwin
+
+       * tests/regression/jasmin/runtest: Use [ \t] instead of \s in the
+       regex for sed, as this seems to be more portable.
+
+2006-09-15 13:03  edwin
+
+       * src/vm/jit/verify/typecheck.c (typecheck_reset_flags): Mark
+       unreached
+       blocks as BBDELETED. The only case in which this can happen to a block
+       that was considered reachable by the stack analysis, is in the case of
+       an exception handler which only covers blocks that have no PEIs.
+
+2006-09-15 12:51  edwin
+
+       * src/vm/resolve.c (new_resolve_field_lazy): Check jd->flags instead
+       of opt_verify.
+       (new_resolve_method_lazy): Likewise.
+
+2006-09-15 12:48  christian
+
+       * src/vm/jit/stack.c (new_stack_analyse): Stackslot flags have to be
+       set for SAVEDVARs, too.
+
+2006-09-15 11:02  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Fix check for
+       active exception handlers. We may not compare pointers here, as the
+       blocks are not allocated with rising memory addresses. Use the
+       block numbers to compare ranges.
+
+2006-09-15 09:19  christian
+
+       * src/vm/jit/x86_64/emit.c (emit_load): Changed to new variable
+       structure (varinfo * instead of stackptr) and the use of Macro
+       IS_INMEMORY.
+       (emit_store): Likewise.
+       (emit_copy): Likewise.
+       (emit_ishift): Likewise.
+       (emit_lshift): Likewise.
+       (emit_load_s1): Likewise and reuse emit_load.
+       (emit_load_s2): Likewise and reuse emit_load.
+       (emit_load_s3): Likewise and reuse emit_load.
+       (emit_store_dst): Likewise and reuse emit_store.
+       
+       * src/vm/jit/x86_64/md-emit.h: Adapded prototypes.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Changed to new variable
+       structure (varinfo * instead of stackptr, adapting of Argument
+       handling, no interface copying anymore at BB Boundaries ) and the use
+       of Macro IS_INMEMORY. ICMD_xSTORE and ICMD_xLOAD use now
+       emit_copy. Invars are now regarded for EXH and JSR Blocks.
+       
+       * src/vm/jit/x86_64/codegen.h (M_COPY): Changed to new variable
+       structure.
+       
+       * src/vm/jit/x86_64/md-abi.c (md_return_alloc): Changed to new
+       variable structure.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Only try to preallocate
+       return stackslots, if they hold a TEMPVAR. Some preparation for SSA.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Had to disable
+       replace_create_replacement_points(jd).
+       
+       * src/vm/jit/show.c (new_show_icmd): Show s1 of [FIDL]RETURN like for
+       ARETURN.
+
+2006-09-14 22:51  edwin
+
+       * configure.ac: Generate tests/regression/jasmin/Makefile.
+       
+       * tests/regression/Makefile.am: Added subdir jasmin.
+       
+       * tests/regression/jasmin/Makefile.am: New file.
+       
+       * tests/regression/jasmin/runtest: Check if jasmin .jar is available.
+
+2006-09-14 22:49  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Change
+       destination variable of GETFIELD/GETSTATIC after all checks have been
+       performed, so there is no problem if destination == source.
+
+2006-09-14 21:29  edwin
+
+       * tests/regression/jasmin/test_verify_fail_retaddr_as_object.j:
+       New test.
+
+2006-09-14 21:23  edwin
+
+       *
+       tests/regression/jasmin/test_verify_fail_backward_with_new_in_local.j:
+       New test.
+       * tests/regression/jasmin/test_verify_fail_new_in_local_within_try.j:
+       Likewise.
+       * tests/regression/jasmin/test_verify_fail_double_local_index.j:
+       Likewise.
+       *
+       tests/regression/jasmin/test_verify_fail_backward_with_new_on_stack.j:
+       Likewise.
+
+2006-09-14 20:55  edwin
+
+       * tests/regression/jasmin/test_verify_fail_long_local.j:
+       Added comment.
+       * tests/regression/jasmin/test_verify_fail_double_overwritten.j:
+       New test.
+       * tests/regression/jasmin/test_verify_fail_invoke_basic_type.j:
+       New test.
+       * tests/regression/jasmin/test_verify_fail_long_overwritten.j:
+       New test.
+
+2006-09-14 20:36  edwin
+
+       * src/vm/jit/verify/typecheck.c (typecheck_invalidate_locals):
+       New function.
+       (verify_basic_block): Invalidate locals that share space with the
+       stored local.
+       (typecheck): Build reverse map of locals.
+
+2006-09-14 18:56  edwin
+
+       * src/vm/jit/reg.h (varinfo): Added typeinfo member.
+       
+       * src/vm/jit/verify/typecheck.c: Ported to unified_variables.
+       * src/vm/jit/verify/typeinfo.h: Likewise.
+       * src/vm/jit/verify/typeinfo.c: Likewise.
+
+2006-09-14 18:55  edwin
+
+       * src/vm/resolve.c (resolve_class_from_name): RESOLVE_VERBOSE changes.
+       (resolve_classref_or_classinfo): Likewise.
+       (resolve_class_from_typedesc): Likewise.
+       (resolve_and_check_subtype_set): Likewise.
+       (new_create_unresolved_field): Likewise.
+       (new_create_unresolved_method): Likewise.
+       
+       (new_resolve_field_verifier_checks): Ported to unified_variables.
+       (new_resolve_field_lazy): Likewise.
+       (new_resolve_method_verifier_checks): Likewise.
+       (new_resolve_method_lazy): Likewise.
+       (new_constrain_unresolved_field): Likewise.
+       
+       
+       (unresolved_subtype_set_from_typeinfo): Take classname directly,
+       instead of the constant_classref *.
+       
+       (create_unresolved_class): Pass classname to
+       unresolved_subtype_set_from_typeinfo.
+       
+       (new_constrain_unresolved_method): Ported to unified_variables.
+       Pass classname to unresolved_subtype_set_from_typeinfo. (This should
+       fix a bug when fieldref->p.classref was invalid.)
+       
+       (new_constrain_unresolved_method): Ported to unified_variables.
+       Pass classname to unresolved_subtype_set_from_typeinfo.
+       
+       * src/vm/resolve.h (jit/reg.h): Include this before typeinfo.h
+       (new_resolve_method_lazy): Added jd parameter.
+       (new_resolve_field_lazy): Likewise.
+       (new_constrain_unresolved_field): Likewise.
+       (new_constrain_unresolved_method): Likewise.
+       
+       * src/vm/jit/parse.c (new_parse): Pass jd to resolve functions.
+
+2006-09-14 18:45  edwin
+
+       * src/vm/jit/show.c (new_show_method): Only show allocation of locals
+       if stage is at least SHOW_REGS.
+       (new_show_icmd): Show class for CHECKCAST.
+
+2006-09-14 18:44  edwin
+
+       * src/vm/jit/stack.c (stack_create_invars): Add extra locals needed
+       by the verifier.
+       (stack_create_invars_from_outvars): Likewise.
+       (new_stack_analyse): Create inlocals for first block. Allow ASTORE of
+       returnAddress values.
+
+2006-09-14 18:40  edwin
+
+       * src/vm/jit/parse.c (new_parse): Commented calculation of varcount
+       and added added extra variables that will be needed by the verifier.
+
+2006-09-14 18:36  edwin
+
+       * src/vm/global.h (VERIFIER_EXTRA_LOCALS): New constant.
+       (VERIFIER_EXTRA_VARS): Likewise.
+
+2006-09-14 18:20  edwin
+
+       * src/vm/class.c (class_classref_or_classinfo_print): New function.
+       (class_classref_or_classinfo_println): Likewise.
+       
+       * src/vm/class.h (class_classref_or_classinfo_print): New function.
+       (class_classref_or_classinfo_println): Likewise.
+
+2006-09-14 18:16  edwin
+
+       * src/vm/jit/jit.h (VAROP): New macro for accessing variable operands.
+       (VAR): New macro for getting a variable from a varindex.
+
+2006-09-14 16:46  edwin
+
+       * tests/regression/jasmin/test_verify_fail_load_wrong_type.j:
+       New test.
+       * tests/regression/jasmin/
+       test_verify_fail_load_wrong_type_within_block.j: New test.
+       * tests/regression/jasmin/test_verify_fail_local_index.j: New test.
+       * tests/regression/jasmin/test_verify_fail_long_local_index.j:
+       New test.
+       * tests/regression/jasmin/test_verify_fail_long_local.j: New test.
+       * tests/regression/jasmin/test_verify_fail_split_local.j: New test.
+       * tests/regression/jasmin/test_verify_ok_overwrite_local_type.j:
+       New test.
+       * tests/regression/jasmin/test_verify_ok_untyped_local.j: New test.
+
+2006-09-13 00:21  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Replaced catchtype.cls with
+       catchtype.any to reflect that it can be a classref or a classinfo.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       * src/vm/jit/mips/codegen.c (codegen): Likewise.
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
+       * src/vm/jit/intrp/codegen.c (codegen): Likewise.
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+       
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Added XXX
+       comment warning that classrefs must be resolved here.
+
+2006-09-13 00:03  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Use emit_copy for LOAD/STORE
+       instructions. We should also combine this with ICMD_COPY/MOVE, but
+       I was not sure how to deal with the M_COPY macro.
+
+2006-09-12 23:35  edwin
+
+       * tests/regression/jasmin/test_swap_locals.j: New test.
+
+2006-09-12 23:31  edwin
+
+       * tests/regression/jasmin/test_swap_interface_slots.j: New test.
+
+2006-09-12 23:18  edwin
+
+       * tests/regression/jasmin/test_many_monitors.j: New test. (This test
+       case used to fail with old-instruction-format cacao.)
+
+2006-09-12 22:32  christian
+
+       * src/vm/jit/i386/codegen.c (codegen): Corrected handling of taking
+       arguments out of stack frame. Some changes to adapt SSA to unified
+       variables.
+
+2006-09-12 21:34  edwin
+
+       * src/vm/jit/parse.c (parse_check_instructions): Renamed to
+       parse_realloc_instructions to reflect what it really does. Fixed so
+       it adds at least as many instructions as required by the check.
+       
+       * src/vm/jit/parse.h (INSTRUCTIONS_CHECK): Use
+       parse_realloc_instructions.
+       (MARK_BASICBLOCK): Cleaned up backslashes.
+
+2006-09-12 21:23  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Fixed test for existing
+       coalescing for *STORE.
+       Properly use the return value of stack_mark_reached when analysing
+       a block for the first time.
+       
+       * tests/regression/jasmin/test_simple_load_store.j: Added a test
+       that just does ILOAD 1, ISTORE 1.
+
+2006-09-12 00:21  edwin
+
+       * tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j:
+       Renamed to test_verify_fail_jsr_handler_in_sub.j, as it fails on the
+       reference implementation.
+       
+       * tests/regression/jasmin/test_verify_ok_jsr_exceptions.j: Renamed to
+       test_verify_fail_jsr_exceptions.j, likewise.
+       
+       * tests/regression/jasmin/test_verify_fail_ret_uninit_var.j,
+       tests/regression/jasmin/test_verify_fail_aload_retaddress.j,
+       tests/regression/jasmin/test_verify_fail_ret_bad_type.j: Made
+       expected error match both CACAO's message and the reference
+       implementation's message.
+
+2006-09-11 23:32  edwin
+
+       * src/vm/jit/stack.c (stack_reanalyse_block): Removed unused
+       variable.
+
+2006-09-11 23:24  edwin
+
+       * src/vm/jit/stack.c: Added JSR elimination by block specialization.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Treat ICMD_RET as a GOTO.
+
+2006-09-11 23:17  edwin
+
+       * tests/regression/jasmin/runtest: Add --color option.
+
+2006-09-11 22:17  edwin
+
+       * tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub2.j: Added
+       a second call of the subroutine, so cacao has to clone the exception
+       handler.
+
+2006-09-11 14:59  edwin
+
+       * tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j:
+       New test.
+       * tests/regression/jasmin/test_verify_ok_jsr_exceptions.j: Likewise.
+       * tests/regression/jasmin/test_verify_ok_jsr_through_variable.j:
+       Likewise.
+       * tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub2.j:
+       Likewise.
+       * tests/regression/jasmin/test_verify_ok_jsr_swap.j: Likewise.
+
+2006-09-11 14:57  edwin
+
+       * tests/regression/jasmin/test_dup2.j: Fix stackdepth.
+       * tests/regression/jasmin/test_load_store_conflict.j: Likewise.
+
+2006-09-11 14:55  edwin
+
+       * tests/regression/jasmin/runtest: Only show PASS if status is ok.
+
+2006-09-11 14:54  edwin
+
+       * src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
+       Zero destination of ICMD_JSR to avoid problems when showing the IR.
+
+2006-09-11 14:52  edwin
+
+       * src/vm/jit/show.h (show_jit_type_letters): New variable.
+       (show_jit_type_names): Likewise.
+       
+       * src/vm/jit/show.c (jit_type): Renamed to show_jit_type_names and
+       exported.
+       (show_jit_type_letters): New variable.
+       (new_show_method): Improved.
+       (new_show_icmd): Likewise.
+
+2006-09-11 14:45  edwin
+
+       * src/toolbox/logging.h (log_text): Fixed for strings containing %.
+
+2006-09-11 14:37  edwin
+
+       * src/vm/jit/reg.h (varinfo): Put regoff inside a union (vv) so it
+       can share space with the constant values put in varinfo. Also made
+       type and flags s4.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Replace regoff with
+       vv.regoff.
+       
+       * src/vm/jit/show.c (new_show_method): Likewise.
+       (new_show_variable): Likewise.
+       
+       * src/vm/jit/allocator/simplereg.c (local_regalloc): Likewise.
+       (reg_new_temp_func): Likewise.
+       (reg_free_temp_func): Likewise.
+       (new_allocate_scratch_registers): Likewise.
+       (reg_make_statistics): Likewise.
+       
+       * src/vm/jit/i386/emit.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/codegen-common.c: Likewise.
+
+2006-09-11 00:33  edwin
+
+       * src/vm/global.h (TYPE_RET): New constant.
+       
+       * src/vm/exceptions.c (exceptions_throw_verifyerror_for_stack):
+       Display TYPE_RET correctly.
+
+2006-09-11 00:30  edwin
+
+       * src/vm/jit/jit.h (basicblock): Added fields `inlocals` and
+       `original` (for JSR elimination).
+
+2006-09-11 00:03  edwin
+
+       * tests/regression/jasmin/test_verify_fail_aload_retaddress.j: New
+       test.
+       * tests/regression/jasmin/test_verify_fail_ret_uninit_var.j: New
+       test.
+       * tests/regression/jasmin/test_verify_ok_jsr_pop.j: New test.
+       * tests/regression/jasmin/test_verify_ok_jsr_push.j: New test.
+
+2006-09-10 13:51  edwin
+
+       * tests/regression/jasmin/runtest: Return correct exit code.
+
+2006-09-10 13:45  edwin
+
+       * tests/regression/jasmin/runtest: Delete temporary files.
+       * tests/regression/jasmin/test_verify_ok_jsr.j: New test.
+       * tests/regression/jasmin/test_verify_ok_jsr_multiple_blocks.j: New
+       test.
+       * tests/regression/jasmin/test_verify_fail_ret_bad_type.j: New test.
+
+2006-09-10 13:43  edwin
+
+       * tests/regression/jasmin/runtest: Added harness code for expecting
+       errors.
+
+2006-09-10 11:35  christian
+
+       * src/vm/jit/i386/codegen.c (codegen): Corrected handling of taking
+       arguments out of stack frame.
+
+2006-09-10 11:20  edwin
+
+       * src/vm/jit/stack.c (DUP_SLOT): Removed code for direct coalescing.
+       (DUP coalescing will be done in simplereg, probably.)
+
+2006-09-10 09:11  edwin
+
+       * src/vm/jit/show.c (new_show_method): Use class_print and
+       class_classref_print for showing the catch type.
+
+2006-09-09 22:33  edwin
+
+       * src/vm/jit/stack.c: Fixed macro backslashes.
+
+2006-09-09 22:05  edwin
+
+       * src/vm/jit/show.c (new_show_method): Show hexadecimal offsets in
+       stack slot table.
+
+2006-09-09 21:58  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Reset the sd.new pointer at
+       the beginning of each basic block.
+
+2006-09-09 21:50  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Made control-flow easier
+       to read. The majority of the code is now indented one level too much.
+       I did not change this, yet, to avoid a giant diff. We can do this
+       when all the branches are merged together.
+
+2006-09-09 21:41  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Combined calls to
+       stack_create_instack.
+
+2006-09-09 21:33  edwin
+
+       * src/vm/jit/jit.h (basicblock): Removed members instack and
+       outstack.
+       
+       * src/vm/jit/stack.c (stack_check_invars): New function.
+       (stack_create_instack): New function.
+       (stack_mark_reached): Use new functions.
+       (new_stack_analyse): Likewise.
+       
+       * src/vm/jit/stack.h (COPYCURSTACK): Removed macro.
+
+2006-09-09 20:05  edwin
+
+       * src/vm/jit/stack.h (COPYCURSTACK): Do not create invars here.
+       
+       * src/vm/jit/stack.c (stack_create_invars): New function.
+       (stack_mark_reached): Use stack_create_invars.
+       (new_stack_analyse): Likewise.
+
+2006-09-09 19:37  edwin
+
+       * src/vm/jit/jit.h (basicblock): Added fields varstart and varcount.
+       Reordered fields for clarity and alignment.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Set varstart and varcount
+       of each basic block.
+
+2006-09-09 19:25  edwin
+
+       * src/vm/exceptions.c (exceptions_handle_exception): Added comment on
+       why we have to do eager resolving here. Check for exceptions while
+       resolving the catch class reference.
+       
+       * src/vm/linker.c (link_class_intern): Resolve exception classes
+       in handler entries lazily, instead of eagerly.
+
+2006-09-09 14:49  edwin
+
+       * src/vm/jit/stack.h (CURKIND): Removed macro.
+       (CURTYPE): Removed macro.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Removed the single use of
+       CURKIND.
+
+2006-09-09 14:45  edwin
+
+       * src/vm/jit/stack.h (Changes): Added my name.
+
+2006-09-09 14:41  edwin
+
+       * src/vm/jit/stack.h (REQUIRE_1, REQUIRE_2, REQUIRE_3, REQUIRE_4):
+       Removed.
+       * src/vm/jit/stack.c (new_stack_analyse): Use the general REQUIRE
+       macro.
+
+2006-09-08 23:59  edwin
+
+       * src/vm/jit/stack.c (IS_TEMPVAR): Fix bug spotted
+       (and produced ;) by c_u.
+
+2006-09-08 20:54  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Added some assertion.
+       When we do a STORE coalescing, the stackslot must have a creator.
+
+2006-09-08 20:50  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Unified last_dup_boundary
+       and last_pei_boundary to coalescing_boundary.
+       Activated STORE coalescing. Change destination operand of creator, if
+       any.
+
+2006-09-08 20:41  edwin
+
+       * src/vm/jit/stack.h (COPYCURSTACK): Use GET_NEW_VAR.
+       Removed SET_OUTVAR.
+       * src/vm/jit/stack.c (GET_NEW_VAR): New macro.
+       (various macros): Use GET_NEW_VAR, so the variable type is set.
+       Reset coalescing for non-consuming uses.
+       (SET_TEMPVAR): Fix: do not use "copy". Change the destination operand
+       of the creator, if any.
+       (DST_LOCAL): Activate LOAD coalescing.
+       (new_stack_analyse): Reset coalescing for pass-through operands.
+
+2006-09-08 19:48  edwin
+
+       * src/vm/jit/jit.h (stackelement): Added creator field.
+       * src/vm/jit/stack.h (COPYCURSTACK): Set creator = NULL.
+       * src/vm/jit/stack.c (DST, DST_LOCALVAR, MOVE_COPY_UP, COPY_DOWN):
+       Set creator to current iptr.
+       * src/vm/jit/stack.h: Cleaned up macros.
+       * src/vm/jit/stack.c: Likewise.
+
+2006-09-08 18:14  edwin
+
+       * src/vm/jit/codegen-common.h: Removed the NEW_VAR define.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/verify/typecheck.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/reg.c: Likewise.
+       * src/vm/jit/reg.h: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+       * src/vm/jit/codegen-common.c: Likewise.
+       * src/vm/jit/jit.h: Likewise, and removed the dupslots member from
+       the dst_operand_t union.
+
+2006-09-08 18:12  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): Removed code for DUPs.
+
+2006-09-08 17:59  edwin
+
+       * src/vm/jit/verify/typecheck.c: Removed code for DUPs.
+
+2006-09-08 17:57  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Removed code for DUPs.
+
+2006-09-08 17:50  edwin
+
+       * src/vm/jit/i386/codegen.c (*LOAD, *STORE): Normalized the source ==
+       dest check so it always looks the same.
+       (LLOAD, LSTORE): Use M_LNGMOVE, not M_INTMOVE.
+       (DSTORE): Combined with FSTORE, because it now has the same code.
+
+2006-09-08 17:37  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Fix LSTORE: The source == dest
+       test was broken.
+
+2006-09-08 16:41  edwin
+
+       * src/vm/jit/show.c (new_show_method): Fix display of local table.
+
+2006-09-08 16:26  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Fix ICMD_RET: The variable
+       index has to be mapped.
+
+2006-09-08 16:07  edwin
+
+       * src/vm/jit/stack.c (DUP_SLOT): Turn off coalescing.
+       (MOVE_COPY_UP): New macro.
+       (COPY_DOWN): New macro.
+       (interface_map): Changed to array of interface_info.
+       (*STORE): Fix index into last_store_boundary (must be javaindex).
+       (DUP*, SWAP): Eliminate DUPs.
+       (new_stack_analyse): Mark invar interfaces used.
+       
+       * src/vm/jit/show.c (new_show_method): Adapted to new
+       interface_map layout.
+       
+       * src/vm/jit/allocator/simplereg.c (interface_regalloc): Adapted
+       to new interface_map layout.
+       (new_allocate_scratch_registers): Likewise.
+       (new_allocate_scratch_registers): Removed code for DUP* instructions.
+       (ICMD_MOVE, ICMD_COPY): Added.
+
+2006-09-08 16:02  edwin
+
+       * src/vm/jit/i386/codegen.h (M_FLTMOVE): Only assert(0) if move would
+       have to be performed.
+
+2006-09-08 14:17  edwin
+
+       * src/vm/jit/show.c (show_variable): Check for invalid flags.
+
+2006-09-08 14:16  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Removed a debug print.
+
+2006-09-08 14:15  edwin
+
+       * src/vm/jit/stack.c (DST_LOCALVAR): _Really_ turn off coalescing
+       temporarily.
+
+2006-09-08 12:19  edwin
+
+       * src/vm/jit/allocator/simplereg.c (interface_regalloc): Changed
+       allocation of interface registers. interface_map now contains the
+       necessary flags, and receives a combination of allocated flags
+       and regoff.
+       
+       (new_allocate_scratch_registers): Copy the allocation of the
+       invars and outvars for each basic block.
+
+2006-09-08 12:17  edwin
+
+       * src/vm/jit/jit.h (LOCAL_UNUSED): Changed (in comment) to UNUSED.
+
+2006-09-08 12:16  edwin
+
+       * src/vm/jit/stack.c (stackdata_t): New struct for keeping internal
+       data of the stack analysis. This is necessary for converting macros
+       to functions.
+       (various macros): Adapted to use stackdata_t. Removed old code.
+       (DST_LOCALVAR): Temporarily turned off local variable coalescing.
+       (MARKREACHED): Converted to a function.
+       (stack_mark_reached): New function.
+       (last_store_boundary): Use java indices instead of internal local
+       indices into this table.
+       (new_stack_analyse): Removed old code.
+       
+       * src/vm/jit/stack.h (various macros): Adapted to use stackdata_t.
+       (MARKREACHED): Converted to a function.
+
+2006-09-08 12:10  edwin
+
+       * src/vm/jit/parse.h: Removed old code.
+       * src/vm/jit/parse.c (new_parse): Do not modify m->maxlocals and
+       cd->maxlocals.
+       They refer to the number of javalocals, and that's ok. We have
+       jd->localcount
+       to keep the number of internal locals.
+
+2006-09-08 12:07  edwin
+
+       * src/vm/jit/show.c (new_show_method): Show isleafmethod.
+       (new_show_method): Pretty interface map printing (prepared for
+       interface register allocation changes).
+       (new_show_method): Print allocation of stack slots.
+       (show_allocation): New function.
+       (show_variable): Mark SAVEDVARs with an exclamation mark.
+
+2006-09-08 01:05  edwin
+
+       * src/vm/jit/show.c (new_show_method): Only show local table if there
+       are locals.
+
+2006-09-07 23:17  edwin
+
+       * src/vm/jit/show.c (jit_type): Made types uppercase.
+       (new_show_method): Prettier printing of locals_map and interface_map.
+       (SHOW_STACKVAR): Renamed to SHOW_VARIABLE.
+       (new_show_stackvar): Renamed to show_variable. Cleaned up.
+
+2006-09-07 22:44  edwin
+
+       * src/vm/jit/allocator/simplereg.c (reg_new_temp_func): Removed old
+       version.
+       (reg_free_temp_func): Likewise.
+       (allocate_scratch_registers): Likewise.
+
+2006-09-07 22:39  edwin
+
+       * src/vm/jit/allocator/simplereg.c (reg_alloc_dup): Removed.
+       (new_reg_mark_copy): Likewise.
+
+2006-09-07 14:41  edwin
+
+       * src/vm/jit/i386/codegen.c (ICMD_COPY): Added.
+       (ICMD_MOVE): Likewise.
+
+2006-09-07 14:38  edwin
+
+       * src/vm/jit/reg.h (varinfo): New field copycount.
+       * src/vm/jit/parse.c (new_parse): Zero jd->var array.
+
+2006-09-07 14:31  edwin
+
+       * src/vm/jit/parse.c (new_parse): Allocate extra NOPs for stack
+       operations.
+
+2006-09-07 14:25  edwin
+
+       * src/vm/jit/show.c (ICMD_COPY): Uncommented.
+       (ICMD_MOVE): Likewise.
+
+2006-09-07 14:24  edwin
+
+       * src/vm/jit/jit.h, src/vm/jit/jit.c (ICMD_COPY): New ICMD.
+       (ICMD_MOVE): Likewise.
+
+2006-09-07 14:00  christian
+
+       * src/vm/jit/allocator/simplreg: Removed #if defined(NEW_VAR) over
+       some functions.
+
+2006-09-07 13:41  edwin
+
+       * src/vm/jit/jit.c (ENABLE_VERIFY): Corrected to ENABLE_VERIFIER.
+
+2006-09-07 13:29  christian
+
+       Unified variables changes for common/i386.
+
+2006-09-07 13:01  edwin
+
+       Branch for developing unified variables.
+
+2006-09-07 12:52  twisti
+
+       * src/vm/jit/i386/emit.c: Use IS_INMEMORY macro.
+       * src/vm/jit/i386/codegen.c: Likewise.
+
+2006-09-07 12:26  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Use IS_INMEMORY macro.
+
+2006-09-07 12:24  twisti
+
+       * src/vm/jit/powerpc/emit.c (emit_copy): Eliminate register move if
+       one of the variables resides in memory.
+
+2006-09-07 11:14  twisti
+
+       * src/vm/jit/alpha/emit.c (emit_copy): Only one not-equal comparison.
+
+2006-09-07 11:09  twisti
+
+       * src/vm/jit/powerpc64/emit.c (emit_copy): Eliminate register move if
+       one of the variables resides in memory.
+
+2006-09-07 10:59  twisti
+
+       * src/vm/jit/mips/emit.c (emit_copy): Eliminate register move if one
+       of the variables resides in memory.
+
+2006-09-07 10:46  twisti
+
+       * src/vm/jit/i386/emit.c (emit_copy): Eliminate register move if one
+       of the variables resides in memory.
+
+2006-09-07 10:16  twisti
+
+       * src/vm/jit/x86_64/emit.c (emit_copy): Eliminate register move if one
+       of the variables resides in memory.
+
+2006-09-07 10:03  twisti
+
+       * src/vm/jit/alpha/emit.c (emit_copy): Eliminate register move if one
+       of the variables resides in memory.
+
+2006-09-07 09:40  twisti
+
+       * src/vm/jit/jit.h (IS_SAVEDVAR): Added.
+       (IS_INMEMORY): Likewise.
+
+2006-09-07 00:32  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): Separate real arguments and
+       pass-through variables for INVOKE*.
+
+2006-09-07 00:29  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): Separate real arguments and
+       pass-through variables for BUILTIN.
+
+2006-09-06 23:18  twisti
+
+       * src/vm/jit/powerpc64/linux/md-abi.h: Bugfixes and changes for new
+       instruction format.
+       * src/vm/jit/powerpc64/linux/md-abi.c: Likewise.
+       * src/vm/jit/powerpc64/emit.c: Likewise.
+       * src/vm/jit/powerpc64/codegen.c: Likewise.
+       * src/vm/jit/powerpc64/codegen.h: Likewise.
+
+2006-09-06 22:34  twisti
+
+       * src/vm/jit/mips/linux/md-abi.h (REG_A0, REG_A1, REG_A2, REG_A3):
+       Defined.
+       * src/vm/jit/mips/codegen.c: Use REG_A? defines instead of
+       rd->argintreg[] loads.
+
+2006-09-06 22:16  twisti
+
+       * src/vm/jit/alpha/linux/md-abi.h (REG_A0, REG_A1, REG_A2, REG_A3):
+       Defined.
+       * src/vm/jit/alpha/codegen.c: Use REG_A? defines instead of
+       rd->argintreg[] loads.
+
+2006-09-06 21:56  twisti
+
+       * src/vm/jit/x86_64/md-abi.h (REG_A0, REG_A1, REG_A2, REG_A3):
+       Defined.
+       * src/vm/jit/x86_64/codegen.c: Use REG_A? defines instead of
+       rd->argintreg[] loads.
+
+2006-09-06 21:40  twisti
+
+       * src/vm/jit/stack.c (new_stack_analyse): Removed obsolete precedessor
+       calucation.
+
+2006-09-06 21:32  edwin
+
+       * tests/regression/jasmin/test_dup_x2.j: Split second test into
+       separate file.
+       * tests/regression/jasmin/test_dup_x2_to_dup_x1: New test.
+
+2006-09-06 21:30  edwin
+
+       * tests/regression/jasmin/runtest: Improved harness script.
+
+2006-09-06 21:17  twisti
+
+       * src/vm/jit/powerpc/linux/md-abi.h (REG_A0, REG_A1, REG_A2, REG_A3):
+       Defined.
+       * src/vm/jit/powerpc/darwin/md-abi.h: Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c: Use REG_A? defines instead of
+       rd->argintreg[] loads.
+
+2006-09-06 17:05  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): Generate the INVOKE/BUILTIN
+       call code in a common place.
+
+2006-09-06 16:43  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Generate the INVOKE/BUILTIN
+       call code in a common place.
+
+2006-09-06 16:41  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Don't move the function address
+       into disp for ICMD_BUILTIN.
+
+2006-09-06 16:30  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Generate the INVOKE/BUILTIN
+       call code in a common place.
+       (createnativestub): Removed unused disp variable.
+
+2006-09-06 16:24  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Generate the INVOKE/BUILTIN
+       call code in a common place.
+
+2006-09-06 16:06  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Generate the INVOKE/BUILTIN
+       call code in a common place.
+
+2006-09-06 16:01  edwin
+
+       * src/vm/jit/jit.h (INS_FLAG_NOCHECK): Reversed to INS_FLAG_CHECK.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/stack.h: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/parse.h: Likewise.
+
+2006-09-06 15:22  edwin
+
+       * src/vm/jit/parse.h (INSTRUCTIONS_CHECK): New macro.
+       * src/vm/jit/parse.c (new_parse): Merged twisti's reallocation of the
+       instruction array.
+
+2006-09-06 14:38  twisti
+
+       * src/vm/jit/alpha/codegen.c (ICMD_I2L): Use REG_ITMP1 for dst, this
+       can save a move.
+       (ICMD_LDIV, ICMD_LREM): Use argument registers for s1 and s2 when
+       loaded.
+
+2006-09-06 14:32  edwin
+
+       Checked in jasmin tests.
+
+2006-09-06 14:01  edwin
+
+       * src/vm/jit/parse.c (parserdata_t): New type.
+       (parse_setup): New function.
+       (parse_check_instructions): New function.
+
+2006-09-06 13:46  christian
+
+       * src/vm/jit/stack.c (new_stack_analyse): Ifdeffed handling of new var
+       system.
+       
+       * src/vm/jit/stack.h: Likewise.
+       
+       * src/vm/jit/parse.c (new_parse) : Likewise.
+       
+       * src/vm/jit/parse.h: Likewise.
+       
+       * src/vm/jit/jit.h: Ifdeffed structure entries for new var system.
+
+2006-09-06 12:37  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Use M_ISUB in ICMD_ISUBCONST
+       instead of M_IADD.
+
+2006-09-06 11:58  twisti
+
+       * src/vm/jit/mips/emit.c (emit_copy): Removed accidentally pasted
+       code.
+
+2006-09-06 11:12  edwin
+
+       * src/vm/jit/stack.h: Removed macros for old instruction format.
+
+2006-09-06 11:01  edwin
+
+       * src/vm/jit/parse.h: Removed NEW_ prefix from macros.
+       * src/vm/jit/parse.c: Likewise.
+
+2006-09-06 10:56  edwin
+
+       * src/vm/jit/stack.h (CHECKOVERFLOW): Removed.
+       (NEW_CHECKOVERFLOW): Renamed to CHECKOVERFLOW.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Removed NEW_ prefix from
+       macro names.
+
+2006-09-06 10:48  edwin
+
+       * src/vm/jit/x86_64/emit.c: Renamed new_instruction to instruction.
+       * src/vm/jit/x86_64/md-emit.h: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+
+2006-09-06 10:20  christian
+
+       * src/vm/stack.c (new_stack_analyse): Removed assert to check, that
+       all outvars are STACKVARS. Would be a possible conflict with swap
+       
+       * src/vm/parse.c (new_parse): Data colletion for local var
+       renaming(de-coalescing)
+       
+       * src/vm/parse.h (new_pase): Likewise.
+       
+       * src/vm/jit.h: Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Ifdefed interface copy in
+       regard to new
+       var system.
+
+2006-09-06 10:16  edwin
+
+       * src/vm/jit/mips/emit.c (emit_load_s1): Removed obsolete src param.
+       (emit_load_s2): Likewise.
+       (emit_load_s3): Likewise.
+
+2006-09-06 10:14  edwin
+
+       * src/vm/jit/powerpc64/emit.c (emit_load): New function.
+       (emit_load_s1): Implemented in terms of emit_load.
+       (emit_load_s2): Likewise.
+       (emit_load_s3): Likewise.
+       (emit_store_dst): New function.
+
+2006-09-06 10:09  edwin
+
+       * src/vm/jit/mips/emit.c (emit_load): New function.
+       (emit_load_s1): Implemented in terms of emit_load.
+       (emit_load_s2): Likewise.
+       (emit_load_s3): Likewise.
+       (emit_store_dst): New function.
+
+2006-09-06 09:57  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Implement conflict checking
+       and coalescing for *STORE.
+       * src/vm/jit/show.c (new_show_stackvar): Show coalescing info.
+
+2006-09-06 00:18  christian
+
+       * src/vm/jit/stack.c (new_stack_analyse): Mark all in and out
+       Stackslots of Basic Blocks as STACKVAR.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Removed copy of interfaces
+       to in and from out stackslots.
+
+2006-09-06 00:07  edwin
+
+       * src/vm/jit/powerpc64/codegen.c (codegen): ++lookup in LOOKUPSWITCH
+       loop.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Ported to new instruction
+       format.
+
+2006-09-05 23:37  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Port LASTORECONST, PUT*CONST.
+
+2006-09-05 23:10  edwin
+
+       * src/vm/jit/mips/codegen.c (codegen): Ported to new instruction
+       format.
+
+2006-09-05 23:08  twisti
+
+       * src/vm/jit/powerpc/emit.c: Updated to new instruction format.
+       * src/vm/jit/powerpc/codegen.c: Likewise.
+
+2006-09-05 23:07  twisti
+
+       * src/vm/builtin.c (builtin_print_argument): Print decimal values for
+       int and long arguments.
+
+2006-09-05 22:51  christian
+
+       * i386/emit.c: Changed to new instruction format.
+       * i386/codegen.c: Likewise.
+       * i386/codegen.h: Likewise.
+       * parse.c: Likewise.
+       * parse.h: Likewise.
+       * jit.h: Likewise.
+
+2006-09-05 22:42  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): Show LOOKUPSWITCH targets.
+
+2006-09-05 22:27  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Port MULTIANEWARRAY.
+
+2006-09-05 22:23  edwin
+
+       * sarc/vm/jit/parse.c (parse): Check return value of
+       lock_monitor_enter.
+
+2006-09-05 22:22  edwin
+
+       * src/threads/native/lock.h (lock_monitor_enter): Return bool.
+       * src/threads/native/lock.c (lock_monitor_enter): Check for
+       NullPointerException.
+
+2006-09-05 22:05  twisti
+
+       * src/vm/jit/cfg.c (cfg_build): It's better to not reuse the loop
+       variable.
+
+2006-09-05 21:53  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): Show BLOCK_OF tableswitch
+       targets.
+
+2006-09-05 21:50  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): Show TABLESWITCH targets.
+
+2006-09-05 21:20  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Port ICMD_CHECKCAST.
+
+2006-09-05 21:20  twisti
+
+       * src/vm/method.h (methodinfo): Removed members basicblockcount,
+       basicblocks, basicblockindex, instructioncount, instructions,
+       stackcount, and stack.
+       
+       * src/vm/jit/cfg.c: Use jitdata variables instead of methodinfo ones.
+       * src/vm/jit/reorder.c: Likewise.
+       * src/vm/jit/ifconv/ifconv.c: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/replace.c: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+
+2006-09-05 21:17  twisti
+
+       * src/vm/jit/powerpc/Makefile.am (libarch_la_SOURCES): Added
+       accidentally removed codegen.c.
+
+2006-09-05 21:16  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use d for return type checks.
+
+2006-09-05 21:15  twisti
+
+       * src/cacaoh/headers.c: Use a dummy flag for natively overloaded
+       methods.
+
+2006-09-05 21:14  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Deactivate replacement points.
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+
+2006-09-05 21:06  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Set fieldtype in all cases.
+
+2006-09-05 20:58  edwin
+
+       * src/vm/jit/show.c (new_show_basicblock): Prettier if.
+
+2006-09-05 20:57  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Use jd->new_basicblocks.
+
+2006-09-05 20:50  edwin
+
+       * src/vm/jit/alpha/codegen.c: Use invars/outvars instead of
+       instack/outstack.
+
+2006-09-05 20:17  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Port handling of INVOKE*
+       arguments.
+
+2006-09-05 20:11  edwin
+
+       * src/vm/jit/alpha/emit.c: Ported to new instruction format.
+       * src/vm/jit/alpha/codegen.c: Likewise.
+
+2006-09-05 19:38  twisti
+
+       * src/vm/jit/jit.h (instruction): Removed.
+       (new_instruction): Renamed to instruction.
+       
+       * src/vm/builtin.c: Renamed new_instruction to instruction.
+       * src/vm/builtin.h: Likewise.
+       * src/vm/resolve.c: Likewise.
+       * src/vm/resolve.h: Likewise.
+       * src/vm/jit/powerpc/emit.c: Likewise.
+       * src/vm/jit/powerpc/Makefile.am: Likewise.
+       * src/vm/jit/codegen-common.h: Likewise.
+       * src/vm/jit/cfg.c: Likewise.
+       * src/vm/jit/reorder.c: Likewise.
+       * src/vm/jit/emit.h: Likewise.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/stack.h: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/dseg.c: Likewise.
+       * src/vm/jit/verify/typecheck.c: Likewise.
+       * src/vm/jit/verify/typeinfo.c: Likewise.
+       * src/vm/jit/show.h: Likewise.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/codegen-common.c: Likewise.
+
+2006-09-05 19:06  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Converted with
+       portcodegen.pl.
+       * src/vm/jit/sparc64/codegen.c (codegen): Likewise.
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       * src/vm/jit/mips/codegen.c (codegen): Likewise.
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
+
+2006-09-05 18:43  edwin
+
+       Merge changes from trunk (powerpc64).
+
+2006-09-05 17:42  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Use emit_load instead of
+       emit_load_s1/s2 for variable arguments and interface copying.
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       * src/vm/jit/mips/codegen.c (codegen): Likewise.
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
+
+2006-09-05 17:21  edwin
+
+       Merged changes from trunk.
+
+2006-09-05 16:45  edwin
+
+       * src/vm/jit/powerpc/codegen.c (codegen): ICMD_PUTSTATIC: Use
+       emit_load_s1 to load the first operand.
+       * src/vm/jit/sparc64/codegen.c (codegen): Likewise.
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       * src/vm/jit/mips/codegen.c (codegen): Likewise.
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
+
+2006-09-05 16:12  edwin
+
+       * src/vm/jit/jit.h (basicblock): Changed type of iinstr to
+       new_instruction *.
+       * src/vm/jit/stack.c (new_stack_analyse): Removed obsolete casts.
+       * src/vm/jit/show.c (new_show_basicblock): Likewise.
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Likewise.
+       * src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
+       Likewise.
+       * src/vm/jit/parse.c (new_parse): Likewise.
+       * src/vm/jit/x86_64/codegen.c (new_parse): Likewise.
+
+2006-09-05 12:42  edwin
+
+       * src/vm/jit/jit.h (s3_operand_t): Removed arrayvftbl.
+       * src/vm/jit/x86_64/codegen.c (codegen): ICMD_MULTIANEWARRAY:
+       Use s3.c.cls instead of s3.arrayvftbl.
+
+2006-09-05 12:29  edwin
+
+       * src/vm/jit/jit.h (jitdata): Removed field new_rd.
+       * src/vm/jit/jit.c (jit_compile): Use rd instead of new_rd.
+       (jit_compile_intern): Likewise.
+       * src/vm/jit/verify/typecheck.c (typecheck): Likewise.
+       (verify_basic_block): Removed unused variables.
+       * src/vm/jit/allocator/simplereg.c (new_regalloc):
+       Use rd instead of new_rd.
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+
+2006-09-05 11:53  edwin
+
+       * src/vm/jit/x86_64/codegen.c: Ported to new instruction format.
+       * src/vm/jit/x86_64/emit.c: Likewise.
+       * src/vm/jit/x86_64/md-emit.h: Likewise.
+
+2006-09-05 11:50  edwin
+
+       * src/vm/jit/jit.h (s3_operand_t): Added union field arrayvftbl.
+
+2006-09-05 11:47  edwin
+
+       * src/vm/jit/jit.c (jit_compile): Test setup for the new x86_64
+       codegen.
+       (jit_compile_intern): Likewise.
+
+2006-09-05 11:42  edwin
+
+       * src/vm/jit/emit.h (emit_load*): Changed for new instruction format.
+       (emit_store*): Likewise.
+       (emit_copy*): Likewise.
+       (emit_store_dst): New function.
+
+2006-09-05 11:40  edwin
+
+       * src/vm/jit/jit.h (basicblock): Added fields invars and outvars.
+       * src/vm/jit/stack.h (MARKREACHED): Set invars.
+       * src/vm/jit/stack.c (new_stack_analyse): Set invars and outvars.
+       * src/vm/jit/show.c (new_show_basicblock): Show invars and outvars.
+
+2006-09-05 11:34  edwin
+
+       * src/vm/jit/jit.h (NEW_INSTRUCTION_*): Renamed to INSTRUCTION_.
+       The old INSTRUCTION_ and ICMD_ macros are removed.
+       * src/vm/resolve.c (NEW_INSTRUCTION_*): Replaced with INSTRUCTION_.
+       * src/vm/jit/show.c (new_show_icmd): Likewise.
+       * src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
+       Likewise.
+       * src/vm/jit/stack.c (new_stack_analyse): Likewise, and add a call
+       of builtintable_replace_function.
+
+2006-09-05 11:20  edwin
+
+       * src/vm/jit/verify/typecheck.c: Ported to new instruction format.
+       * src/vm/jit/verify/typeinfo.c (typeinfo_print): Likewise.
+       (typeinfo_print_short): Likewise.
+
+2006-09-05 11:16  edwin
+
+       * src/vm/builtin.h (builtintable_replace_function): Ported to new
+       instruction format.
+       * src/vm/builtin.c (builtintable_replace_function): Likewise.
+
+2006-09-05 11:13  edwin
+
+       * src/vm/jit/show.c (new_show_variable_array): New function.
+       (new_show_method): Fixed calculation of lastbptr.
+       Only show code lengths if stage >= SHOW_CODE.
+
+2006-09-05 10:52  edwin
+
+       * src/vm/resolve.h: Removed code for old instruction format.
+       * src/vm/resolve.c: Likewise.
+
+2006-09-05 10:47  edwin
+
+       * src/vm/jit/allocator/simplereg.h: Removed code for old instruction
+       format.
+       * src/vm/jit/allocator/simplereg.c: Likewise.
+
+2006-09-05 10:44  edwin
+
+       * src/vm/jit/show.h: Removed code for old instruction format.
+       * src/vm/jit/show.c: Likewise.
+
+2006-09-05 10:39  edwin
+
+       * src/vm/jit/stack.h: Removed code for old instruction format.
+       * src/vm/jit/stack.c: Likewise.
+
+2006-09-05 10:37  edwin
+
+       * src/vm/jit/parse.h: Removed code for old instruction format.
+       * src/vm/jit/parse.c: Likewise.
+
+2006-09-05 10:20  edwin
+
+       Branch for porting the new instruction format.
+
+2006-09-05 10:15  twisti
+
+       * src/vm/jit/i386/Makefile.am (noinst_HEADERS): Removed
+       icmd_uses_reg_res.inc.
+
+2006-09-05 10:10  twisti
+
+       * src/vm/jit/i386/icmd_uses_reg_res.inc: Removed.
+
+2006-09-05 10:09  edwin
+
+       * src/vm/jit/x86_64/codegen.h (ICONST): Fix this macro so it properly
+       uses its arguments.
+       (LCONST): Likewise.
+
+2006-09-05 10:04  twisti
+
+       * src/tests/Howdy.java: Removed.
+
+2006-09-05 10:03  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use cd->stackframesize
+       instead of stackframesize (bugfix).
+       (createnativestub): Likewise.
+
+2006-09-05 09:59  edwin
+
+       * src/vm/jit/codegen-common.h (codegen_reg_of_dst): New function.
+       * src/vm/jit/codegen-common.c (codegen_reg_of_dst): Likewise.
+       Right now this duplicates codegen_reg_of_var's body. We should
+       probably make one of these functions inline the other.
+
+2006-09-05 00:12  edwin
+
+       * src/vm/jit/ifconv/ifconv.c (ifconv_static): Deactivated
+       show_basicblock calls that will become a problem when code for the
+       old instruction format is removed.
+       (check): Likewise.
+
+2006-09-05 00:02  edwin
+
+       * src/vm/resolve.c (resolve_field): new_resolve_field_verifier_checks
+       used instead of the old function that will be removed soon.
+       (resolve_method): Use new_resolve_method_verifier_checks instead of
+       the
+       old function that will be removed soon.
+       (new_resolve_method_verifier_checks): Port handling of
+       TYPEINFO_IS_NEWOBJECT.
+       (new_resolve_method_verifier_checks): Likewise.
+       (new_constrain_unresolved_field): Likewise.
+       (new_constrain_unresolved_method): Likewise.
+
+2006-09-04 23:24  edwin
+
+       * src/vm/jit/parse.c (new_parse): Changed leftover "OP" macro uses
+       to "NEW_OP".
+
+2006-09-04 17:45  twisti
+
+       * src/vm/jit/mips/emit.c (config.h): Added.
+       [ENABLE_THREADS] (threads/native/lock.h): Likewise.
+       (vm/exceptions.h): Likewise.
+       (vm/stringlocal.h): Likewise.
+       (vm/jit/asmpart.h): Likewise.
+       (vm/jit/dseg.h): Likewise.
+       (vm/jit/replace.h): Likewise.
+       (emit_exception_stubs): New method.
+       (emit_patcher_stubs): Likewise.
+       (emit_replacement_stubs): Likewise.
+       
+       * src/vm/jit/mips/codegen.c (codegen): Use cd->stackframesize instead
+       of stackframesize, use emit functions to generate stubs and call trace
+       code.
+       (createnativestub): Likewise.
+
+2006-09-04 17:12  christian
+
+       * src/vm/jit/alpha/patcher.c (patcher_wrapper): Patch back machine
+       code.
+       (patcher_aconst): Renamed to patcher_resolve_classref_to_classinfo.
+       (patcher_clinit): Renamed to patcher_initialize_class.
+       (patcher_resolve_native): Renamed to patcher_resolve_native_function.
+       (patcher_athrow_areturn): Renamed to patcher_resolve_class.
+       (patcher_checkcast_instanceof_class): Renamed to
+       patcher_resolve_classref_to_vftbl.
+       (patcher_checkcast_instanceof_flags): Renamed to
+       patcher_resolve_classref_to_flags.
+       (patcher_builtin_multianewarray): Removed.
+       (patcher_builtin_arraycheckcast): Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Use new patcher functions.
+
+2006-09-04 16:33  twisti
+
+       * src/vm/jit/alpha/emit.c (vm/builtin.h): Added.
+       (vm/jit/abi-asm.h): Likewise.
+       (vm/jit/replace.h): Likewise.
+       (emit_verbosecall_enter): New method.
+       (emit_verbosecall_exit): Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Use emit functions to generate
+       call trace code.
+       (createnativestub): Likewise.
+
+2006-09-04 15:48  twisti
+
+       * src/vm/jit/powerpc/emit.c (config.h): Added.
+       [ENABLE_THREADS] (threads/native/lock.h): Likewise.
+       (vm/builtin.h): Likewise.
+       (vm/jit/abi-asm.h): Likewise.
+       (vm/jit/asmpart.h): Likewise.
+       (vm/jit/replace.h): Likewise.
+       (emit_exception_stubs): New method.
+       (emit_patcher_stubs): Likewise.
+       (emit_replacement_stubs): Likewise.
+       (emit_verbosecall_enter): Likewise.
+       (emit_verbosecall_exit): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Use emit functions to
+       generate stubs and call trace code.
+       (createnativestub): Likewise.
+
+2006-09-04 14:21  twisti
+
+       * src/vm/jit/powerpc/asmpart.S (asm_call_jit_compiler): We don't save
+       an argument on the stack anymore, offsets adjusted.
+       (asm_handle_exception): Use md_codegen_get_pv_from_pc instead of
+       assembler code and temporary variables as on other RISC architectures.
+
+2006-09-04 12:38  tbfg
+
+       * src/vm/jit/powerpc64/emit.c (emit_verbosecall_enter): Fixed off
+       by one stackslot overwrite some stuff bug.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen): Fix parameter passing
+       in.
+
+2006-09-02 14:26  tbfg
+
+       * src/vm/jit/powerpc64/arch.h: Reenabled platfrom features.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen): Fixed native calls.
+       (createnativestub): Likewise.
+
+2006-08-31 19:58  tbfg
+
+       * srv/vm/jit/powerpc64/asmpart.S (asm_vm_call_method): Fixed argument
+       handling.
+
+2006-08-31 13:32  tbfg
+
+       * src/vm/jit/powerpc64/emit.c (emit_verbosecall_enter): Moved from
+       codegen.c refactored into function, and made it work.
+       (emit_verbosecall_exit): Likewise.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen_trace_args): Moved into
+       emit.c and renamed it to emit_verbosecall_enter.
+       (codegen): Using emit_verbosecall_* instead of inline code, and
+       various fixes to make verbose:call work.
+       (createnativestub): Likewise.
+
+2006-08-28 19:31  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.h: New REG_TOC name needed to
+       call builtins due to ppc64 function descriptors (ELF ABI).
+       
+       * src/vm/jit/powerpc64/codegen.c (createnativestub): Big endian
+       requires M_LLD and M_IST to copy s4 values from dseg to stack.
+       (codegen): gen_method needs to create function descriptor call.
+       
+       * src/vm/jit/powerpc64/asmpart.S: When linking statically
+       non function descriptor calls are generated by compiler.
+       Some ifdefs added to fix static linking.
+
+2006-08-28 15:18  twisti
+
+       * src/vm/jit/patcher.h (patcher_resolve_class): Added.
+       (patcher_initialize_class): Likewise.
+       (patcher_resolve_classref_to_classinfo): Likewise.
+       (patcher_resolve_classref_to_vftbl): Likewise.
+       (patcher_resolve_classref_to_flags): Likewise.
+       (patcher_resolve_native_function): Likewise.
+       
+       * src/vm/jit/powerpc/patcher.c (patcher_wrapper): Patch back machine
+       code.
+       (patcher_aconst): Renamed to patcher_resolve_classref_to_classinfo.
+       (patcher_clinit): Renamed to patcher_initialize_class.
+       (patcher_resolve_native): Renamed to patcher_resolve_native_function.
+       (patcher_athrow_areturn): Renamed to patcher_resolve_class.
+       (patcher_checkcast_class): Renamed to
+       patcher_resolve_classref_to_vftbl.
+       (patcher_checkcast_instanceof_flags): Renamed to
+       patcher_resolve_classref_to_flags.
+       (patcher_builtin_multianewarray): Removed.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_instanceof_class): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Use new patcher functions
+       (some of them were already commited accidentally in the last commit).
+
+2006-08-28 13:05  twisti
+
+       * src/vm/jit/emit.h (emit_verbosecall_enter): Added.
+       (emit_verbosecall_exit): Likewise.
+       
+       * src/vm/jit/powerpc/emit.c (vm/builtin.h): Added.
+       (vm/jit/asmpart.h): Likewise.
+       (vm/jit/replace.h): Likewise.
+       (emit_exception_stubs): New method.
+       (emit_patcher_stubs): Likewise.
+       (emit_replacement_stubs): Likewise.
+       (emit_verbosecall_enter): Likewise.
+       (emit_verbosecall_exit): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (vm/jit/abi-asm.h): Added.
+       (codegen_trace_args): Removed.
+       (codegen): Use cd->stackframesize instead of stackframesize, use emit
+       functions to generate stubs and call trace code.
+       (createnativestub): Likewise.
+
+2006-08-25 11:55  tbfg
+
+       * src/vm/jit/show.c (show_method): Stubs are printed green when
+       using -debug-color.
+       
+       * src/vm/jit/powerpc64/linux/md-os.c (md_signal_handler_sigusr2):
+       Moved into #ifdef ENABLE_THREADS conditional compile, as it depends
+       on threadobject.
+       
+       * src/vm/jit/powerpc64/codegen.h: Added M_LADD_IMM and M_AADD_IMM
+       for better reading of code. Fixed M_CLR.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen): Some fixes with ?RETURN,
+       some fixes for -verbose:call (still defunc),
+       (createnativestub): Lots of fixes in stackframe calculations.
+       
+       * src/vm/jit/powerpc64/patcher.c (patch_aconst): Correct asm comment.
+       
+       * src/vm/jit/powerpc64/disass.c (disassinstr): Display 64 bit
+       addresses in disassembled code (-sa).
+       
+       * src/vm/jit/powerpc64/asmpart.S (L_asm_vm_call_method_return):
+       Fixed path for methods returning a value.
+       (L_asm_handle_exception): Fixed path for exception handling.
+       (asm_patcher_wrapper): Fixed path for codepatching.
+
+2006-08-25 07:54  twisti
+
+       * src/vm/exceptions.c (new_illegalmonitorstateexception): Renamed to
+       exceptions_new_illegalmonitorstateexception.
+       (exceptions_throw_illegalmonitorstateexception): New method.
+       * src/vm/exceptions.h: Likewise.
+       
+       * src/threads/native/lock.c (lock_monitor_exit): Use
+       exceptions_throw_illegalmonitorstateexception instead of
+       new_illegalmonitorstateexception.
+       (lock_monitor_wait): Likewise.
+       (lock_monitor_notify): Likewise.
+       
+       * src/cacaoh/headers.c (new_illegalmonitorstateexception): Renamed to
+       exceptions_throw_illegalmonitorstateexception.
+
+2006-08-25 07:29  twisti
+
+       * src/vm/jit/alpha/emit.c (emit_exception_stubs): Bugfix when
+       reallocating the code area.
+       (emit_patcher_stubs): Reuse the asm_patcher_wrapper call code.
+       (emit_replacement_stubs): Removed savedmcodeptr.
+
+2006-08-25 07:14  twisti
+
+       * src/vm/jit/alpha/emit.c (emit_exception_stubs): Bugfix when
+       reallocating the code area.
+       (emit_patcher_stubs): Likewise.
+
+2006-08-24 18:42  twisti
+
+       * src/vm/jit/codegen-common.h (codegendata): Added stackframesize. I
+       think this is more obvious than in jitdata.
+       
+       * src/vm/jit/jit.h (jitdata): Removed stackframesize.
+       
+       * src/vm/jit/alpha/emit.c (emit_exception_stubs): Replaced
+       jd->stackframesize with cd->stackframesize.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/i386/emit.c (emit_exception_stubs): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+
+2006-08-24 09:29  tbfg
+
+       srv/vm/jit/powerpc/linux/md-os.c (md_signal_handler_sigusr2): Moved
+       inside
+       ENABLE_THREADS ifdef as is depends on threads.
+
+2006-08-23 16:04  twisti
+
+       * src/vm/jit/alpha/emit.c [ENABLE_THREADS] (threads/native/lock.h):
+       Added.
+       (vm/jit/asmpart.h): Likewise.
+       (vm/jit/dseg.h): Likewise.
+       (emit_exception_stubs): New function.
+       (emit_patcher_stubs): Likewise.
+       (emit_replacement_stubs): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Use jd->stackframesize, removed
+       stub generation code.
+       (createnativestub): Likewise.
+
+2006-08-23 15:55  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_handle_exception): Fixed bug with
+       maybe-leaf stack and use same registers as on MIPS.
+
+2006-08-23 15:45  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_handle_exception): Use
+       md_codegen_get_pv_from_pc.
+
+2006-08-23 15:10  twisti
+
+       * src/vm/jit/mips/asmpart.S (asm_handle_exception): Changed some
+       comments.
+
+2006-08-23 14:55  twisti
+
+       * src/vm/jit/alpha/asmpart.S (L_asm_handle_exception_stack_loop):
+       Don't save xpc.
+
+2006-08-23 14:23  twisti
+
+       * src/boehm-gc/configure.in (AC_C_INLINE): Set CFLAGS properly before.
+
+2006-08-23 14:07  twisti
+
+       * configure.ac (AC_CONFIG_SUBDIRS): Moved to the end of the file and
+       export OPT_CFLAGS/ARCH_CFLAGS instead of CFLAGS.
+       
+       * src/boehm-gc/configure.in: Pass CFLAGS to Makefile's as for CACAO.
+       * src/boehm-gc/Makefile.am (AM_CXXFLAGS, AM_CFLAGS): Commented.
+       (AM_CPPFLAGS): Added.
+
+2006-08-23 12:57  twisti
+
+       * src/vm/jit/alpha/emit.c (config.h): Added.
+       [ENABLE_THREADS] (threads/native/lock.h): Likewise.
+       (vm/jit/asmpart.h): Likewise.
+       (vm/jit/dseg.h): Likewise.
+       (emit_exception_stubs): New function.
+       (emit_patcher_stubs): Likewise.
+       (emit_replacement_stubs): Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Use jd->stackframesize, use
+       new desg_add_* functions, removed stub generation code.
+       (createnativestub): Likewise.
+
+2006-08-23 12:29  twisti
+
+       * src/vm/vm.c (OPT_ALL, OPT_METHOD, OPT_SIGNATURE): #ifndef NDEBUG.
+       (usage): Don't print -all, -m, -sig options.
+
+2006-08-23 12:12  twisti
+
+       * src/vm/jit/emit.h (emit_replacement_stubs): Added.
+
+2006-08-22 20:48  twisti
+
+       * src/vm/jit/i386/md-emit.h (vm/jit/codegen-common.h): Added.
+
+2006-08-22 19:53  twisti
+
+       * src/vm/jit/emit.h (emit_exception_stubs): Added.
+       (emit_patcher_stubs): Likewise.
+       
+       * src/vm/jit/jit.h (jitdata): Added member stackframesize.
+
+2006-08-22 15:49  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.h: Added PA_SIZE and
+       PA_SIZE_IN_POINTERS defines.
+       
+       * src/vm/jit/powerpc64/arch.h: Enabled machine dependend
+       compare_and_swap implementation for ppc64.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen): Remove lot of PACK_REGS
+       usages, changed stack address calculations from *4 -> *8, added
+       a M_NOP for debugging.
+       
+       * src/vm/jit/powerpc64/machine-instr.h (compare_and_swap): Ported
+       for 64 bit.
+       (atomic_add): Removed.
+       
+       * src/vm/jit/powerpc64/patcher.c (patcher_wrapper): Fixed stack
+       calculations from *4 -> *8
+       (patcher_aconst): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_checkcast_class): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interf): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_get_putfield): Likewise.
+       (patcher_get_putstatic): Likewise.
+       (patcher_instanceof_class): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_resolve_native): Likewise.
+       
+       * src/vm/jit/powerpc64/asmpart.S (asm_patcher_wrapper): Fixed
+       calling convetions, as we callback C. Fixed 32 bit issues.
+       (asm_call_jit_compiler): PPC64 has additional PA_SIZE
+       on stack - fixed that.
+
+2006-08-22 14:39  twisti
+
+       * src/native/vm/java_lang_VMThrowable.c (fillInStackTrace): Removed
+       architecture #ifdef's.
+       (getStackTrace): Likewise.
+
+2006-08-22 12:43  twisti
+
+       * src/native/native.c (dummynativetable): Made non-static, GCC 4.1
+       optimized the table away.
+       (native_init): Removed dummynativetable-hack.
+
+2006-08-22 09:02  tbfg
+
+       * src/vm/options.h: Renamed -verbosecolor to -debug-color,
+       opt_colorverbose to opt_debugcolor and OPT_COLORVERBOSE to
+       OPT_DEBUGCOLOR
+       * src/vm/method.c: Same as above.
+       * src/vm/jit/dseg.c: Same as above.
+       * src/vm/vm.c: Same as above.
+       * src/vm/options.c: Same as above.
+       * src/vm/jit/Makefile.am: Removed options.h dependecy, as deps are
+       tracked automatically.
+
+2006-08-21 17:37  twisti
+
+       * src/lib/vm/reference/gnu/classpath/VMStackWalker.java
+       (firstNonNullClassLoader): Added and made native.
+       
+       * src/native/vm/gnu_classpath_VMStackWalker.c (getClassContext):
+       Removed architecture #ifdef's, as most stacktrace stuff is
+       architecture independent and the dependent stuff is very simple to
+       implement.
+       (getCallingClass): Likewise.
+       (getCallingClassLoader): Likewise.
+       (firstNonNullClassLoader): Added.
+
+2006-08-21 15:25  twisti
+
+       * src/vm/jit/i386/asmpart.S (L_asm_patcher_wrapper_exception): Removed
+       duplicate add line.
+
+2006-08-21 15:17  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Added
+       src/vm/jit/i386/darwin/Makefile.
+       
+       * src/vm/jit/i386/codegen.c (createnativestub): Align stack to
+       16-bytes.
+       
+       * src/vm/jit/i386/darwin/md-os.c: Darwin specific functions.
+       * src/vm/jit/i386/darwin/md-asm.h: Darwin specific assembler defines.
+       * src/vm/jit/i386/darwin/Makefile.am: New file.
+       * src/vm/jit/i386/darwin/.cvsignore: Likewise.
+       
+       * src/vm/jit/i386/linux/md-asm.h: Linux specific assembler defines.
+       * src/vm/jit/i386/freebsd/md-asm.h: FreeBSD specific assembler
+       defines.
+       
+       * src/vm/jit/i386/md-asm.h: Removed.
+       
+       * src/vm/jit/i386/asmpart.S (asm_handle_exception): Align stack to
+       16-bytes.
+       (asm_abstractmethoderror): Likewise.
+       (asm_patcher_wrapper): Likewise.
+       (asm_builtin_f2i, asm_builtin_d2i, asm_builtin_f2l, asm_builtin_d2l):
+       Likewise.
+       
+       * src/vm/jit/i386/Makefile.am (DIST_SUBDIRS): Added darwin.
+       (AM_CPPFLAGS): Added OS_DIR as include.
+       (noinst_HEADERS): Removed md-asm.h.
+       
+       * src/threads/native/threads.c (threads_cast_darwinstop): Use generic
+       defines and machine dependent structures.
+
+2006-08-21 14:52  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h (asm_initialize_thread_stack):
+       Define removed.
+       (asm_perform_threadswitch): Likewise.
+       (asm_switchstackandcall): Likewise.
+
+2006-08-18 18:37  tbfg
+
+       src/vm/options.h: Added the commandlineswitch --verbosecolor which
+       enables
+       colored output of show: -si prints method names in red -sd shows
+       datasegment
+       dump in blue. (use | less -R)
+       
+       src/vm/options.c (options_get): There is a nasty bug in there, read
+       comment.
+
+2006-08-18 13:07  twisti
+
+       * src/toolbox/util.c (util_current_time_millis): Removed.
+       * src/toolbox/util.h: Likewise.
+       
+       * src/vm/vm.c (vm_create): Use builtin_currenttimemillis instead of
+       util_current_time_millis.
+
+2006-08-18 13:01  twisti
+
+       * src/vm/exceptions.c (new_arraystoreexception): Renamed to
+       exceptions_new_arraystoreexception.
+       (exceptions_throw_arraystoreexception): New function.
+       * src/vm/exceptions.h: Likewise.
+       
+       * src/vm/builtin.c (builtintable_init): Reimplemented and added
+       builtintable_function.
+       (builtintable_replace_function): New function.
+       (builtin_arraycopy): Likewise.
+       (builtin_currenttimemillis): Likewise.
+       
+       * src/vm/builtin.h (builtintable_entry): Added some extra members.
+       (builtin_asm_get_exceptionptrptr): Removed.
+       (builtintable_replace_function): Added.
+       (builtin_arraycopy): Likewise.
+       (builtin_currenttimemillis): Likewise.
+       
+       * src/vm/builtintable.inc (builtintable_internal): Use new
+       builtintable_entry structure.
+       (builtintable_automatic): Likewise.
+       (builtintable_function): Added.
+       
+       * src/vm/jit/stack.c (stack_analyse): Call
+       builtintable_replace_function.
+       
+       * src/vm/jit/show.c (new_show_icmd): Print correct variable of builtin
+       calls.
+       (show_icmd): Likewise.
+       
+       * src/vm/jit/stacktrace.c (stacktrace_inline_arraystoreexception): Use
+       exceptions_new_arraystoreexception.
+       
+       * src/native/vm/java_lang_VMSystem.c (arraycopy): Removed
+       implementation and use builtin_arraycopy.
+       
+       * src/cacaoh/headers.c
+       (exceptions_throw_arrayindexoutofboundsexception): Added.
+       (exceptions_new_arraystoreexception): Likewise.
+       (exceptions_throw_arraystoreexception): Likewise.
+
+2006-08-18 12:24  twisti
+
+       * src/vm/class.c (class_java_lang_VMSystem): Added.
+       * src/vm/class.h: Likewise.
+       * src/vm/loader.c (loader_init): Likewise.
+       * src/vm/linker.c (linker_init): Likewise.
+
+2006-08-18 10:22  tbfg
+
+       src/vm/jit/powerpc64/linux/md-os.c: Ported signal handlers to ppc64
+       ucontext.
+
+2006-08-17 17:51  tbfg
+
+       src/vm/jit/powerpc64/md.c (md_get_method_patch_address): Fixed
+       opcodes in
+       casetests.
+       
+       src/vm/jit/powerpc64/arch.h: Temporarily disabled all hardwarefeaturs
+       to
+       make porting easier.
+       
+       src/vm/jit/powerpc64/codegen.c: Started to fix 32/64 bit issues.
+       
+       src/vm/jit/powerpc64/codegen.h: Removing special long handling.
+       
+       src/vm/jit/powerpc64/patcher.c: Changed comment only.
+
+2006-08-17 09:59  twisti
+
+       * src/vm/jit/i386/asmpart.S (asm_patcher_wrapper): Restore REG_ITMP3
+       from stub stack. I missed this when I did the last changes.
+
+2006-08-17 09:26  twisti
+
+       * src/vm/jit/optimizing: Added ignore property.
+
+2006-08-16 15:35  christian
+
+       * src/vm/jit/optimizing/.cvsignore: New file.
+
+2006-08-16 12:21  christian
+
+       * src/vm/jit/stack.c (stack_analyse): Use of real PEI data
+       (op_data[opcode][PEI]) to prevent copy propagation to LOCALVAR with
+       ICMD_XSTORE instead of just regarding INVOKES as PEI's.
+
+2006-08-16 12:11  christian
+
+       * src/toolbox/worklist.h: Comments added.
+
+2006-08-16 12:10  christian
+
+       * src/toolbox/bitvector.c: Comments added.
+       
+       * src/toolbox/bitvector.h: Comments added.
+       
+       * src/toolbox/worklist.c: Comments added.
+
+2006-08-16 11:35  christian
+
+       * src/toolbox/worklist.c: Corrected Header information.
+       
+       * src/toolbox/worklist.h: Likewise.
+       
+       * src/toolbox/bitvector.c: Likewise.
+       
+       * src/toolbox/bitvector.h: Likewise.
+
+2006-08-16 11:31  christian
+
+       * src/vm/jit/allocator/liveness.c: Corrected Header information.
+       
+       * src/vm/jit/allocator/liveness.h: Likewise.
+       
+       * src/vm/jit/allocator/lsra.c: Likewise.
+       
+       * src/vm/jit/allocator/lsra.h: Likewise.
+
+2006-08-16 11:26  christian
+
+       * src/vm/jit/optimizing/dominators.c: Corrected Header information.
+       
+       * src/vm/jit/optimizing/dominators.h: Likewise.
+       
+       * src/vm/jit/optimizing/graph.c: Likewise.
+       
+       * src/vm/jit/optimizing/graph.h: Likewise.
+       
+       * src/vm/jit/optimizing/lifetimes.c: Likewise.
+       
+       * src/vm/jit/optimizing/lifetimes.h: Likewise.
+       
+       * src/vm/jit/optimizing/lsra.c: Likewise.
+       
+       * src/vm/jit/optimizing/lsra.h: Likewise.
+       
+       * src/vm/jit/optimizing/ssa.c: Likewise.
+       
+       * src/vm/jit/optimizing/ssa.h: Likewise.
+
+2006-08-16 11:18  christian
+
+       * src/vm/jit/optimizing/ssa.c (ssa_print_phi): Printing now phi
+       functions correctly for debug output.
+       
+       * src/vm/jit/optimizing/ssa.c (dead_code_elimination): No removal of
+       potential exception throwing instructions (PEI) anymore.
+       
+       * src/vm/jit/jit.h: Renamed op_needs_saved[] to op_data[][NEEDS_SAVED]
+       and introduced the new op_data[][PEI].
+       
+       * src/vm/jit/jit.c (jit_init): Added init of op_data[NEEDS_SAVED|PEI]
+       
+       * src/vm/jit/optimizing/lifetimes.c (LifeOutAtStatement): Renamed
+       op_needs_saved[] to the new op_data[][NEEDS_SAVED]
+
+2006-08-15 14:54  christian
+
+       * src/vm/jit/optimizing/lifetimes.c (LifenessAnalysis): Ignore
+       variables used in phi functions, if they define itself (x =
+       phi(...,x,...)).
+       
+       * src/vm/jit/i386/codegen.c (codegen): Bugfix in code created for
+       ICMD_IINC for SSA.
+       
+       * src/vm/jit/show.c (new_show_method): Regard ENABLE_SSA like
+       ENABLE_LSRA to suppress output of interfaces.
+       
+       * src/vm/jit/show.c (show_method): likewise.
+       
+       * src/vm/jit/show.c (show_icmd): Regard special operand format for
+       ICMD_IINC with SSA.
+
+2006-08-14 18:14  christian
+
+       * src/vm/jit/optimizing/: New directory for optimizing compiler (SSA
+       by now - does not work by now, code merging with svn head introduced
+       some hazardous faults).
+       
+       * src/vm/jit/optimizing/dominators.c: Computation of dominators and
+       domination frontier for SSA.
+       
+       * src/vm/jit/optimizing/dominators.h: Include file for dominators.c.
+       
+       * src/vm/jit/optimizing/graph.c: CFG functions needed for SSA.
+       
+       * src/vm/jit/optimizing/graph.h: Include file for graph.c
+       
+       * src/vm/jit/optimizing/lifetimes.c: Scanning lifetimes for SSA.
+       
+       * src/vm/jit/optimizing/lifetimes.h: Include file for lifetimes.c
+       
+       * src/vm/jit/optimizing/lsra.c: LSRA based on SSA.
+       
+       * src/vm/jit/optimizing/lsra.h: Include file for lsra.c.
+       
+       * src/vm/jit/optimizing/Makefile.am: New Makefile.am for this
+       directory.
+       
+       * src/vm/jit/optimizing/ssa.c: Computation of SSA form.
+       
+       * src/vm/jit/optimizing/ssa.h: Include File for ssa.c.
+
+2006-08-14 18:10  christian
+
+       * src/vm/jit/optimizing: New directory
+
+2006-08-14 17:50  christian
+
+       * src/vm/jit/optimizing/: New directory for optimizing compiler (SSA
+       by now - does not work by now, code merging with svn head introduced
+       some hazardous faults).
+       
+       * src/vm/jit/optimizing/dominators.c: Computation of dominators and
+       domination frontier for SSA.
+       
+       * src/vm/jit/optimizing/dominators.h: Include file for dominators.c.
+       
+       * src/vm/jit/optimizing/graph.c: CFG functions needed for SSA.
+       
+       * src/vm/jit/optimizing/graph.h: Include file for graph.c
+       
+       * src/vm/jit/optimizing/lifetimes.c: Scanning lifetimes for SSA.
+       
+       * src/vm/jit/optimizing/lifetimes.h: Include file for lifetimes.c
+       
+       * src/vm/jit/optimizing/lsra.c: LSRA based on SSA.
+       
+       * src/vm/jit/optimizing/lsra.h: Include file for lsra.c.
+       
+       * src/vm/jit/optimizing/Makefile.am: New Makefile.am for this
+       directory.
+       
+       * src/vm/jit/optimizing/ssa.c: Computation of SSA form.
+       
+       * src/vm/jit/optimizing/ssa.h: Include File for ssa.c.
+       
+       * src/vm/jit/allocator/lsra.c: Moved from src/vm/jit. Quite complete
+       code change (including: no more allocation of unused reserved
+       registers, possibility of exact lifetime analysis, removal of old
+       lifetime test functions).
+       
+       * src/vm/jit/allocator/lsra.h: Moved from src/vm/jit.
+       
+       * src/vm/jit/allocator/liveness.c: New File. Exact lifetime analysis
+       for LSRA.
+       
+       * src/vm/jit/allocator/liveness.h: New File. Include File for
+       liveness.c. The #define LV enables by now the exact liveness analysis.
+       
+       * src/vm/jit/allocator/Makefile.am: Adopted for new/moved files in
+       src/vm/jit/allocator.
+       
+       * sc/vm/jit/Makefile.am: Adopted for above new/moved files.
+       
+       * configure.ac: Introduced ENABLE_SSA: new option --enable-ssa.
+       Changes for ENABLE_LSRA (--enable-lsra). New Makefile in
+       src/vm/jit/optimizing added.
+       
+       * src/vm/jit/allocator/simplereg.c (reg_make_statistics): Support for
+       ENABLE_SSA for statistics.
+       
+       * src/vm/options.h: opt_lsra is used with ENABLE_SSA like with
+       ENABLE_LSRA.
+       
+       * src/vm/options.c: opt_lsra is used with ENABLE_SSA like with
+       ENABLE_LSRA.
+       
+       * src/vm/global.h: New struct imm for union imm_union to get another
+       operand for IINC in combination with SSA added.
+       
+       * src/vm/vm.c: opt_lsra and the option -lsra is used with ENABLE_SSA
+       like with ENABLE_LSRA.
+       
+       * src/vm/jit/stack.c (stack_analyse): No stack element lifetimes
+       counting anymore for lsra/ssa (m->maxlifetimes).
+       
+       * src/vm/jit/stack.h: No stack lifetime counting anymore for lsra/ssa
+       (m->maxlifetimes).
+       
+       * src/vm/jit/i386/codegen.c: Support for ENABLE_SSA added.
+       
+       * src/vm/jit/i386/codegen.c (codegen_insert_phi_moves): New function
+       to insert phi moves for SSA at the end of Basic Blocks.
+       
+       * src/vm/jit/i386/codegen.c (cg_move): New function to create the
+       instructions for the actual move for codegen_insert_phi_moves).
+       
+       * src/vm/jit/i386/codegen.c (codegen): Logic and calls to use
+       codegen_insert_phi_moves for SSA added. With SSA for parameters in
+       memory this memory positions cannot be reused to avoid copying. Checks
+       added to prevent moves to or from stackslots removed by the dead code
+       elimination. Special handling for the new ICMD_IINC operand format
+       used by SSA added.
+       
+       * src/vm/jit/i386/codegen.h (M_COPY): Checks added to prevent moves to
+       or from stackslots removed by the dead code elimination. Original
+       M_COPY renamed to _M_COPY.
+       
+       * src/vm/jit/jit.c (jit_init): Populate op_needs_saved. Regard
+       ENABLE_SSA.
+       
+       * src/vm/jit/jit.h: Support for ENABLE_SSA added. Added an array which
+       shows which ICMD's need a SAVEDVAR for SSA and the new LSRA with exact
+       liveness analysis. src/toolbox/Makefile.am: Changed to include the
+       following new files:
+       
+       * src/toolbox/bitvector.c: Bitvector implementation for SSA.
+       
+       * src/toolbox/bitvector.h: Include file for bitvector.c.
+       
+       * src/toolbox/worklist.c: Worklist implementation for SSA.
+       
+       * src/toolbox/worklist.h: Include file for worklist.c.
+
+2006-08-14 10:59  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_findmethod): Renamed to
+       codegen_get_pv_from_pc.
+       
+       * src/vm/jit/codegen-common.h (codegen_findmethod): Likewise.
+       (md_codegen_findmethod): Renamed to md_codegen_get_pv_from_pc.
+       
+       * src/vm/jit/stacktrace.c (stacktrace_create_stackframeinfo):
+       Likewise.
+       (stacktrace_create_inline_stackframeinfo): Likewise.
+       (stacktrace_create_extern_stackframe): Likewise.
+       (stacktrace_create): Likewise.
+       
+       * src/vm/jit/alpha/md.c (md_codegen_findmethod): Renamed to
+       md_codegen_get_pv_from_pc.
+       * src/vm/jit/i386/md.c: Likewise.
+       * src/vm/jit/mips/md.c: Likewise.
+       * src/vm/jit/powerpc/md.c: Likewise.
+       * src/vm/jit/powerpc64/md.c: Likewise.
+       * src/vm/jit/sparc64/md.c: Likewise.
+       * src/vm/jit/x86_64/md.c: Likewise.
+       
+       * src/vm/jit/i386/asmpart.S: Likewise.
+       * src/vm/jit/mips/asmpart.S: Likewise.
+       * src/vm/jit/powerpc/asmpart.S: Likewise.
+       * src/vm/jit/x86_64/asmpart.S: Likewise.
+       * src/vm/jit/intrp/asmpart.c: Likewise.
+       
+       * src/vm/jit/i386/patcher.c (patcher_wrapper): Fixed comment.
+       * src/vm/jit/x86_64/patcher.c: Likewise.
+
+2006-08-11 13:11  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.h: LA_WORD_SIZE renamed to
+       LA_SIZE_IN_POINTERS, value fixed
+       * src/vm/jit/powerpc64/linux/md-abi.c: LA_SIZE_IN_POINTERS rename
+       * src/vm/jit/powerpc64/linux/md.c (md_codegen_findmethod): PPC64 uses
+       r14
+       instead of r13 (as PPC) for PV so opcodes changed.
+       * src/vm/jit/powerpc64/asmpart.S: Using LA_SIZE instead of
+       LA_WORD_SIZE,
+       LA_SIZE_IN_POINTERS for SAVE_*_REGISTERS macros only.
+
+2006-08-11 10:13  twisti
+
+       * src/vm/jit/powerpc/linux/md-abi.h (LA_WORD_SIZE): Renamed to
+       LA_SIZE_IN_POINTERS.
+       
+       * src/vm/jit/powerpc/darwin/md-abi.h (LA_WORD_SIZE): Likewise.
+       
+       * src/vm/jit/powerpc/linux/md-abi.c (md_param_alloc): Use
+       LA_SIZE_IN_POINTERS instead of LA_WORD_SIZE.
+       
+       * src/vm/jit/powerpc/darwin/md-abi.c (md_param_alloc): Likewise.
+       
+       * src/vm/jit/powerpc/asmpart.S: Likewise.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Likewise.
+       (stack_analyse): Likewise.
+       
+       * src/vm/jit/reg.c (reg_setup): Likewise.
+
+2006-08-10 19:45  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.h: fixed linkage area defines for
+       64bit abi.
+       * src/vm/jit/powerpc64/linux/md-asm.h: fixed register name defines
+       and
+       SAVE/RESTORE macros.
+       * src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method): fixed no
+       argument method
+       call path, coming back to C now.
+
+2006-08-10 09:10  twisti
+
+       * src/boehm-gc/darwin_stop_world.c: Updated to version 6.8.
+       * src/boehm-gc/doc/README.changes: Likewise.
+       * src/boehm-gc/doc/README: Likewise.
+       * src/boehm-gc/include/gc.h: Likewise.
+       * src/boehm-gc/include/gc_config_macros.h: Likewise.
+       * src/boehm-gc/include/private/gcconfig.h: Likewise.
+       * src/boehm-gc/configure.in: Likewise.
+       * src/boehm-gc/version.h: Likewise.
+       * src/boehm-gc/malloc.c: Likewise.
+       * src/boehm-gc/pthread_support.c: Likewise.
+       * src/boehm-gc/os_dep.c: Likewise.
+       * src/boehm-gc/dyn_load.c: Likewise.
+
+2006-08-09 15:11  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Fixed ICMD_LMUL bug.
+
+2006-08-09 15:10  twisti
+
+       * src/vm/jit/i386/emit.c (emit_load_s1): Coding style changes.
+       (emit_load_s2): Likewise.
+       (emit_load_s3): Likewise.
+       (emit_load_s1_low): Likewise.
+       (emit_load_s2_low): Likewise.
+       (emit_load_s1_high): Likewise.
+       (emit_store): Likewise.
+
+2006-08-08 19:57  edwin
+
+       * src/vm/jit/jit.c (stackreq): Initialize this table statically.
+       (jit_init): Removed dynamic initialization of stackreq table.
+
+2006-08-08 19:23  edwin
+
+       * src/native/vm/java_lang_reflect_Method.c
+       (Java_java_lang_reflect_Method_invokeNative): Removed unused
+       variables.
+       
+       * src/native/vm/java_lang_reflect_Constructor.c (vm/access.h):
+       Include to fix warning.
+
+2006-08-08 19:18  edwin
+
+       * src/native/vm/java_lang_reflect_Field.c (cacao_get_field_address):
+       Use access_check_caller.
+
+2006-08-08 16:21  edwin
+
+       * src/vm/access.h, src/vm/access.c (access_check_caller): Added.
+       
+       * src/native/vm/java_lang_reflect_Method.c
+       (Java_java_lang_reflect_Method_invokeNative): Use access_check_caller
+       for the access check.
+       
+       * src/native/vm/java_lang_reflect_Constructor.c
+       (Java_java_lang_reflect_Constructor_constructNative): Likewise. This
+       should fix the mauve test case
+       java.lang.reflect.AccessibleObject.security.
+       
+       * src/cacaoh/headers.c (stacktrace_getClassContext): Added dummy
+       implementation.
+
+2006-08-08 14:24  twisti
+
+       * src/vm/jit/parse.h (new_block_insert): Renamed to
+       NEW_MARK_BASICBLOCK.
+       (block_insert): Renamed to MARK_BASICBLOCK.
+       
+       * src/vm/jit/parse.c (new_fillextable): Likewise.
+       (fillextable): Likewise.
+       (new_parse): Likewise.
+       (parse): Likewise.
+
+2006-08-08 13:25  twisti
+
+       * src/vm/jit/stack.c (new_stack_analyse): Replaced debug_nr with nr.
+       
+       * src/vm/jit/verify/typecheck.c (typestate_reach): Likewise.
+       (verify_basic_block): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       * src/vm/jit/powerpc/codegen.c (codegen): Likewise.
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+
+2006-08-08 13:03  twisti
+
+       * src/vm/jit/cfg.c (cfg_insert_predecessors): New method.
+       (cfg_build): Use cfg_insert_predecessors for TABLESWITCH and
+       LOOKUPSWITCH.
+
+2006-08-08 13:01  edwin
+
+       * src/vm/resolve.h, src/vm/resolve.c (new_resolve_method_lazy):
+       Removed curstack parameter.
+       (new_resolve_field_lazy): Likewise.
+       (new_constrain_unresolved_field): New function.
+       (new_constrain_unresolved_method): Likewise.
+       
+       * src/vm/jit/parse.c (new_parse): Use new_resolve_field_lazy and
+       new_resolve_method_lazy.
+
+2006-08-08 12:56  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): For INVOKE* instructions,
+       store the live-through stack slots as additional arguments after
+       the live-in slots. These live-through slots are needed by the
+       verifier and by on-stack replacement in order to create a replacement
+       point at the call site.
+       NOTE: Currently the live-through slots are also stored for builtins.
+       This should change in the final version.
+
+2006-08-08 12:46  edwin
+
+       * src/vm/jit/jit.h (NEW_INSTRUCTION_IS_RESOLVED): New macro.
+       (NEW_INSTRUCTION_IS_UNRESOLVED): Likewise.
+       (NEW_INSTRUCTION_MUST_CHECK): Likewise.
+
+2006-08-08 12:45  twisti
+
+       * src/vm/jit/cfg.h (CFG_UNKNOWN_PREDECESSORS): Defined.
+       
+       * src/vm/jit/stack.c (vm/jit/cfg.h): Added.
+       (new_stack_analyse): Set predecessorcount for EXH blocks to
+       CFG_UNKNOWN_PREDECESSORS.
+       (stack_analyse): Likewise.
+       
+       * src/vm/jit/show.c (new_show_basicblock): Print predecessor block
+       numbers.
+       (show_basicblock): Likewise.
+
+2006-08-07 16:10  twisti
+
+       * src/vm/jit/reorder.c (reorder): Iterate to m->basicblockcount + 1,
+       so we kind of set the last basic block too.
+
+2006-08-07 15:30  twisti
+
+       * src/vm/jit/jit.h (basicblock): Renamed debug_nr to nr.
+       (BASICBLOCK_INIT): Likewise.
+       
+       * src/vm/jit/reorder.c (reorder_place_next_unplaced_block): Likewise.
+       (reorder): Likewise.
+       
+       * src/vm/jit/show.c (new_show_method): Likewise.
+       (show_method): Likewise.
+       (new_show_basicblock): Likewise.
+       (show_basicblock): Likewise.
+       (SHOW_TARGET): Likewise.
+       (show_icmd): Likewise.
+       
+       * src/vm/jit/ifconv/ifconv.c (check): Likewise.
+       
+       * src/vm/jit/loop/analyze.c (insert_exception): Likewise.
+       (copy_handler): Likewise.
+       (create_static_checks): Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Likewise.
+       (typecheck_reset_flags): Likewise.
+       (typecheck): Likewise.
+       
+       * src/vm/jit/verify/typeinfo.c (typeinfo_print): Likewise.
+       (typeinfo_print_short): Likewise.
+       (typeinfo_print_stacktype): Likewise.
+
+2006-08-07 15:12  tbfg
+
+       * src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method, asm_cacheflush):
+       ppc64 abi needs function descriptor for function called from other
+       relocateable modules and uses direct calling for module intern calls.
+
+2006-08-07 11:15  twisti
+
+       * src/vm/jit/reorder.c (reorder): #ifdef debug output.
+
+2006-08-07 11:12  twisti
+
+       * src/vm/jit/Makefile.am (libjit_la_SOURCES): Add cfg.[ch] and
+       reorder.[ch] for debugging.
+
+2006-08-07 11:10  twisti
+
+       * src/vm/jit/jit.c (vm/jit/cfg.h): Added.
+       (vm/jit/reorder.h): Likewise.
+       (jit_recompile): Set JITDATA_FLAG_REORDER flag.
+       (jit_compile_intern): Call cfg_build and reorder.
+       (jit_complement_condition): New function.
+       
+       * src/vm/jit/jit.h (basicblock): Changed type of predecessors and
+       successors.
+       (jit_complement_condition): Added.
+       
+       * src/vm/jit/cfg.c (cfg_allocate_predecessors): New method.
+       (cfg_allocate_successors): Likewise.
+       (cfg_build): Finished implementation.
+       
+       * src/vm/jit/reorder.c (reorder_place_next_unplaced_block): New
+       function.
+       (reorder): Improved, still not working.
+       
+       * src/vm/jit/show.c (new_show_method): Walk the basic block chain to
+       find the last block, as this may change.
+       (show_method): Likewise.
+
+2006-08-04 14:50  twisti
+
+       * src/vm/jit/reorder.c: New file.
+       * src/vm/jit/reorder.h: Likewise.
+
+2006-08-04 14:42  twisti
+
+       * src/vm/jit/parse.c (new_parse): MZERO basicblock array.
+       (parse): Likewise.
+       
+       * src/vm/jit/jit.h (JITDATA_FLAG_REORDER): Added.
+       (JITDATA_HAS_FLAG_REORDER): Likewise.
+       (basicblock): Removed pre_count and added predecessorcount,
+       successorcount, predecessors, successors.
+       (BASICBLOCK_INIT): Don't zero fields.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Renamed pre_count to
+       predecessorcount.
+       (stack_analyse): Likewise and removed predecessor count calculation.
+       
+       * src/vm/jit/show.c (new_show_basicblock): Likewise.
+       (show_basicblock): Likewise.
+       
+       * src/vm/jit/ifconv/ifconv.c (ifconv_static): Likewise.
+
+2006-08-04 14:27  twisti
+
+       * src/vm/jit/cfg.c: New file.
+       * src/vm/jit/cfg.h: Likewise.
+
+2006-08-04 14:10  twisti
+
+       * src/vm/options.c (opt_foo): Added. This is a development option.
+       * src/vm/options.h (opt_foo): Likewise.
+       
+       * src/vm/vm.c (vm_create): Added OPT_FOO.
+
+2006-08-01 20:38  twisti
+
+       * autogen.sh: Recognize autoconf 2.60.
+
+2006-08-01 15:51  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_createnativestub): Set
+       JITDATA_FLAG_INSTRUMENT for opt_prof.
+
+2006-08-01 15:08  twisti
+
+       * src/vm/jit/recompile.c (recompile_thread): Check return value of
+       jit_recompile and print the exception in error case.
+
+2006-08-01 13:10  twisti
+
+       * src/vm/jit/parse.c (new_parse): Replaced opt_verify with
+       JITDATA_HAS_FLAG_VERIFY, because on recompilation we don't turn
+       verifying on.
+
+2006-07-31 20:42  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Load address for INVOKESTATIC
+       from data segment and pass the displacement to the patcher.
+       
+       * src/vm/jit/x86_64/patcher.c (patcher_get_putstatic): Use
+       displacement from patcher, not from the instruction.
+       (patcher_builtin_multianewarray): Don't patch BUILTIN_multianewarray
+       address, it's not required.
+       (patcher_invokestatic_special): Use displacement passed and patch the
+       data segment.
+       
+       * src/vm/jit/x86_64/md.c (md_stacktrace_get_returnaddress): Changed to
+       new INVOKESTATIC calling sequence.
+
+2006-07-31 16:30  twisti
+
+       * src/native/native.c
+       (native/include/java_lang_management_VMManagementFactory.h): Added.
+       (dummynativetable): Added VMManagementFactory methods.
+
+2006-07-31 16:26  twisti
+
+       * src/native/include/.cvsignore: Added
+       java_lang_management_VMManagementFactory.h.
+
+2006-07-31 16:25  twisti
+
+       * src/native/vm/java_lang_management_VMManagementFactory.c: New file.
+       
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       java_lang_management_VMManagementFactory.c.
+       
+       * src/native/include/Makefile.am
+       (ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADERS): Added
+       java_lang_management_VMManagementFactory.h.
+
+2006-07-31 15:35  twisti
+
+       * src/native/include/Makefile.am (DO_HEADER_FILES): Do not depend on
+       CACAO_VM_ZIP.
+
+2006-07-31 15:27  twisti
+
+       * src/native/include/.cvsignore: Added
+       gnu_java_lang_management_VMThreadMXBeanImpl.h and
+       java_lang_management_ThreadInfo.h.
+
+2006-07-31 15:26  twisti
+
+       * src/native/vm/gnu_java_lang_management_VMThreadMXBeanImpl.c: New
+       file.
+       
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       gnu_java_lang_management_VMThreadMXBeanImpl.c.
+       
+       * src/native/include/Makefile.am
+       (ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADERS): Added
+       gnu_java_lang_management_VMThreadMXBeanImpl.h and
+       java_lang_management_ThreadInfo.h.
+       (VM_ZIP): Removed.
+       
+       * src/native/jni.h (_Jv_JavaVM): Added total_started_thread_count.
+       
+       * src/threads/native/threads.c (threads_startup_thread): Count
+       total_started_thread_count.
+       
+       * src/cacao/cacao.c (main): Likewise.
+       
+       * src/cacaoh/headers.c (_Jv_jvm): Added.
+
+2006-07-31 14:43  twisti
+
+       * src/native/include: Updated ignore property.
+
+2006-07-31 14:35  twisti
+
+       * src/native/vm/gnu_java_lang_management_VMClassLoadingMXBeanImpl.c:
+       New file.
+       
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       gnu_java_lang_management_VMClassLoadingMXBeanImpl.c.
+       
+       * src/native/include/Makefile.am
+       (ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADER_FILES): Added
+       gnu_java_lang_management_VMClassLoadingMXBeanImpl.h.
+       
+       * src/native/include/.cvsignore: Likewise.
+       
+       * src/native/jni.h (_Jv_JavaVM): Added
+       Java_gnu_java_lang_management_VMClassLoadingMXBeanImpl_verbose.
+       
+       * src/native/native.c
+       (native/include/gnu_java_lang_management_VMClassLoadingMXBeanImpl.h):
+       Added.
+       (native/include/gnu_java_lang_management_VMMemoryMXBeanImpl.h):
+       Likewise.
+       (dummynativetable): Added VMClassLoadingMXBeanImpl and
+       VMMemoryMXBeanImpl functions.
+
+2006-07-31 14:21  twisti
+
+       * src/vm/classcache.c (classcache_number_of_loaded_classes): New
+       internal function.
+       (classcache_get_loaded_class_count): New function.
+       (classcache_jvmti_GetLoadedClasses): Renamed to
+       classcache_get_loaded_classes and reimplemented.
+       
+       * src/vm/classcache.h (classcache_get_loaded_class_count): Added.
+       (classcache_jvmti_GetLoadedClasses): Renamed to
+       classcache_get_loaded_classes.
+
+2006-07-31 12:29  twisti
+
+       * src/native/include/.cvsignore: Added
+       gnu_java_lang_management_VMMemoryMXBeanImpl.h and
+       java_lang_management_MemoryUsage.h.
+
+2006-07-31 12:28  twisti
+
+       *
+       src/lib/vm/reference/gnu/java/lang/management/VMMemoryMXBeanImpl.java:
+       New file.
+       
+       * src/lib/Makefile.am (VM_JAVA_FILES): Added
+       gnu/java/lang/management/VMMemoryMXBeanImpl.java.
+       (VM_CLASS_FILES): Likewise.
+       
+       * src/native/include/Makefile.am
+       (ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADERS): Added
+       gnu_java_lang_management_VMMemoryMXBeanImpl.h and
+       java_lang_management_MemoryUsage.h.
+       
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       gnu_java_lang_management_VMMemoryMXBeanImpl.c.
+       
+       * src/native/vm/gnu_java_lang_management_VMMemoryMXBeanImpl.c
+       (vm/loader.h): Added.
+
+2006-07-31 12:25  twisti
+
+       * src/mm/boehm.c (gc_get_total_bytes): New function.
+       * src/mm/boehm.h (gc_get_total_bytes): Added.
+
+2006-07-31 12:17  twisti
+
+       * src/lib/vm/reference/java/lang/VMClassLoader.java: Merged GNU
+       Classpath changes.
+
+2006-07-31 12:15  twisti
+
+       * src/native/Makefile.am (nativetable.inc): Renamed VM_ZIP to
+       CACAO_VM_ZIP.
+
+2006-07-28 13:24  twisti
+
+       * src/vm/jit/dseg.c (desg_increase): Removed.
+       (dseg_finish): New function.
+       (dseg_find_s4): Likewise.
+       (dseg_find_s8): Likewise.
+       (dseg_find_float): Likewise.
+       (dseg_find_double): Likewise.
+       (dseg_find_address): Likewise.
+       (dseg_add_s4_intern): Likewise.
+       (dseg_add_unique_s4): Likewise.
+       (dseg_add_s4): Likewise.
+       (dseg_add_s8_intern): Likewise.
+       (dseg_add_unique_s8): Likewise.
+       (dseg_add_s8): Likewise.
+       (dseg_add_float_intern): Likewise.
+       (dseg_add_unique_float): Likewise.
+       (dseg_add_float): Likewise.
+       (dseg_add_double_intern): Likewise.
+       (dseg_add_unique_double): Likewise.
+       (dseg_add_double): Likewise.
+       (dseg_add_address_intern): Likewise.
+       (dseg_add_unique_address): Likewise.
+       (dseg_add_address): Likewise.
+       
+       * src/vm/jit/dseg.h (dsegentry): New structure.
+       
+       * src/vm/jit/codegen-common.c (codegen_setup): Don't allocate memory
+       for data segment.
+       (codegen_finish): Call dseg_finish.
+       
+       * src/vm/jit/codegen-common.h (codegendata): Removed dsegtop and
+       dsegsize, added dseg.
+       
+       * src/vm/jit/powerpc/codegen.c: Use new dseg function names.
+       
+       * src/vm/jit/powerpc/emit.c (vm/jit/dseg.h): Added.
+       (emit_iconst): Use new dseg function names.
+
+2006-07-28 10:54  twisti
+
+       * src/vm/jit/powerpc/linux/md-abi.h (REG_ITMP23_PACKED): New define.
+       * src/vm/jit/powerpc/darwin/md-abi.h (REG_ITMP23_PACKED): Likewise.
+
+2006-07-28 10:12  twisti
+
+       * src/vm/loader.c (load_class_from_classbuffer): Enable "Extra bytes
+       at the end of class file"-check, since we are something like Java 1.5.
+
+2006-07-26 15:20  twisti
+
+       * src/vm/jit/jit.h (INSTRUCTION_UNRESOLVED_CLASS): Defined.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): First changes for duplicate
+       patcher removal.
+
+2006-07-26 14:50  twisti
+
+       * src/vm/jit/show.c (new_show_method): Print stub length in method
+       header.
+       (show_method): Likewise.
+       
+       * src/vm/jit/codegen-common.c (codegen_addpatchref): Don't cast to
+       u1*.
+
+2006-07-26 13:27  twisti
+
+       * src/vm/jit/parse.h (code_get_u1, code_get_s1, code_get_u2)
+       (code_get_s2, code_get_u4, code_get_s4): Removed.
+       
+       * src/vm/suck.h (SUCK_BE_S1, SUCK_BE_S2, SUCK_BE_S4, SUCK_BE_S8):
+       Defined.
+       
+       * src/vm/jit/parse.c (vm/suck.h): Added.
+       (new_parse): Use SUCK_BE_* macros instead of code_get_*.
+       (parse): Likewise.
+
+2006-07-26 11:04  twisti
+
+       * src/vm/builtin.c (builtin_print_argument): #ifndef NDEBUG.
+
+2006-07-26 10:16  twisti
+
+       * src/vm/jit/powerpc/linux/md-asm.h: Added register defines.
+
+2006-07-26 10:06  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h: Added fr register defines again,
+       we need them.
+       
+       * src/vm/jit/powerpc/asmpart.S (asm_replacement_out): Use internal
+       register defines instead of numbers, as darwin does not understand it.
+       (asm_replacement_in): Likewise.
+
+2006-07-26 09:59  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h (mach/ppc/asm.h): Removed. Don't
+       define the fr register names.
+
+2006-07-26 09:43  twisti
+
+       * src/vm/jit/powerpc/linux/md-asm.h (asm/ppc_asm.h): Removed, it's not
+       an official kernel header.
+       
+       * src/vm/jit/powerpc/asmpart.S: Use CACAO internal register defines or
+       simple register numbers.
+
+2006-07-25 18:30  twisti
+
+       * src/vm/global.h (IS_FLT_TYPE): Added.
+       (IS_DBL_TYPE): Likewise.
+
+2006-07-25 16:00  twisti
+
+       * src/vm/jit/i386/md-emit.h (emit_ialu): Removed.
+       (emit_ialuconst): Likewise.
+       (emit_lalu): Likewise.
+       (emit_laluconst): Likewise.
+       (emit_ishift): Likewise.
+       (emit_ishiftconst): Likewise.
+       (emit_ifcc_iconst): Likewise.
+
+2006-07-25 15:57  twisti
+
+       * src/vm/jit/jit.h (ICMD_ELSE_ICONST): Removed.
+       (ICMD_IFEQ_ICONST): Likewise.
+       (ICMD_IFNE_ICONST): Likewise.
+       (ICMD_IFLT_ICONST): Likewise.
+       (ICMD_IFGE_ICONST): Likewise.
+       (ICMD_IFGT_ICONST): Likewise.
+       (ICMD_IFLE_ICONST): Likewise.
+       
+       * src/vm/jit/jit.c (icmd_names): Set removed ICMDs to UNDEF.
+       
+       * src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
+       Removed ICMDs.
+       (allocate_scratch_registers): Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Likewise.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Likewise.
+       (stack_analyse): Likewise.
+       
+       * src/vm/jit/show.c (new_show_icmd): Likewise.
+       (show_icmd): Likewise.
+       
+       * src/vm/jit/alpha/arch.h (CONDITIONAL_LOADCONST): Removed.
+       * src/vm/jit/i386/arch.h: Likewise.
+       * src/vm/jit/mips/arch.h: Likewise.
+       * src/vm/jit/powerpc/arch.h: Likewise.
+       * src/vm/jit/powerpc64/arch.h: Likewise.
+       * src/vm/jit/sparc64/arch.h: Likewise.
+       * src/vm/jit/x86_64/arch.h: Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Removed ICMDs.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/sparc64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       
+       * src/vm/jit/i386/emit.c (emit_ifcc_iconst): Removed.
+
+2006-07-25 15:33  twisti
+
+       * src/vm/jit/x86_64/md.c (md_signal_handler_sigusr2): Fixed comment.
+       
+       * src/vm/jit/i386/linux/md-os.c (md_signal_handler_sigusr2): New
+       function.
+
+2006-07-25 13:52  twisti
+
+       * src/vm/jit/jit.h (TYPE_INT, TYPE_LNG, TYPE_FLT, TYPE_DBL, TYPE_ADR)
+       (IS_INT_LNG_TYPE, IS_FLT_DBL_TYPE, IS_2_WORD_TYPE)
+       (IS_INT_TYPE, IS_LNG_TYPE, IS_ADR_TYPE, IS_VOID_TYPE): Removed.
+       
+       * src/vm/global.h (TYPE_LONG, TYPE_FLOAT, TYPE_DOUBLE, TYPE_ADDRESS):
+       Removed.
+       (TYPE_INT, TYPE_LNG, TYPE_FLT, TYPE_DBL, TYPE_ADR)
+       (IS_INT_LNG_TYPE, IS_FLT_DBL_TYPE, IS_2_WORD_TYPE)
+       (IS_INT_TYPE, IS_LNG_TYPE, IS_ADR_TYPE, IS_VOID_TYPE): Added.
+       
+       * src/vm/loader.c (load_field): Use short TYPE_* defines.
+       (load_newly_created_array): Likewise.
+       
+       * src/vm/descriptor.c (descriptor_to_basic_type): Likewise.
+       (descriptor_typesize): Likewise.
+       (descriptor_to_typedesc): Likewise.
+       (descriptor_pool_parse_method_descriptor): Likewise.
+       (descriptor_debug_print_typedesc): Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (typestack_copy): Likewise.
+       (typestack_put_retaddr): Likewise.
+       (typestack_merge): Likewise.
+       (verify_basic_block): Likewise.
+       (verify_init_locals): Likewise.
+       
+       * src/vm/jit/verify/typeinfo.c (typevectorset_copymergedtype):
+       Likewise.
+       (typevectorset_store_retaddr): Likewise.
+       (typevectorset_store_twoword): Likewise.
+       (typevector_merge): Likewise.
+       (typeinfos_init_from_methoddesc): Likewise.
+       (typeinfo_test_parse): Likewise.
+       (typeinfo_print_type): Likewise.
+       (typeinfo_print_stacktype): Likewise.
+       
+       * src/vm/jit/verify/typeinfo.h (TYPE_IS_RETURNADDRESS): Likwise.
+       (TYPE_IS_REFERENCE): Likwise.
+       
+       * src/native/jni.c (_Jv_jni_vmargs_from_objectarray): Likewise.
+
+2006-07-25 12:33  twisti
+
+       * src/mm/memory.c (memory_cnew): When MAP_ANONYMOUS and MAP_ANON are
+       not defined, we use simply malloc. This is required for IRIX.
+
+2006-07-25 11:38  twisti
+
+       * configure.ac (AC_FUNC_MMAP): Added.
+       (AC_CHECK_FUNCS): Removed mprotect.
+       
+       * src/mm/memory.c (DEFAULT_CODEMEM_SIZE): Renamed to
+       DEFAULT_CODE_MEMORY_SIZE.
+       (codememlock): Renamed to lock_code_memory.
+       (codememptr): Renamed to code_memory.
+       (codememsize): Renamed to code_memory_size.
+       (pagesize): Added global static variable.
+       (memory_init): Use new variable names and set pagesize.
+       (memory_cnew): Don't use malloc/mprotect as this makes some problems
+       with selinux enabled distributions. Instead use mmap.
+
+2006-07-21 14:40  twisti
+
+       * src/boehm-gc/configure.in (MY_CFLAGS): Commented. We want to use the
+       top-level CFLAGS.
+       * src/boehm-gc/Makefile.am (LTCOMPILE): Likewise.
+       (LINK): Likewise.
+
+2006-07-21 14:15  twisti
+
+       * src/vm/jit/powerpc/linux/md-asm.h (__ASSEMBLY__): Defined. It's
+       required for <asm/ppc_asm.h> on my Debian system.
+
+2006-07-21 10:09  twisti
+
+       * src/vm/exceptions.c (new_verifyerror): Renamed to
+       exceptions_new_verifyerror.
+       (exceptions_throw_verifyerror): New function.
+       * src/vm/exceptions.h (new_verifyerror): Renamed to
+       exceptions_new_verifyerror.
+       (exceptions_throw_verifyerror): Added.
+       
+       * src/vm/resolve.c: Use exceptions_throw_verifyerror instead of
+       new_verifyerror.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/stack.c: Likewise.
+       * src/vm/jit/verify/typecheck.c: Likewise.
+       * src/vm/jit/verify/typeinfo.c: Likewise.
+       
+       * src/cacaoh/headers.c (new_verifyerror): Renamed to
+       exceptions_throw_verifyerror.
+
+2006-07-21 09:24  twisti
+
+       * src/vm/builtin.c (builtin_asm_get_exceptionptrptr): Removed.
+       * src/vm/builtin.h (builtin_get_exceptionptrptr): Likewise.
+
+2006-07-19 15:54  twisti
+
+       * src/vm/jit/mips/patcher.c (assert.h): Added.
+       (vm/exceptions.h): Added.
+       (vm/jit/methodheader.h): Likewise.
+       (patcher_wrapper): New function.
+       (patcher_get_putstatic): Removed monitor enter/exit, this is now done
+       by the wrapper.
+       (patcher_get_putfield): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+       
+       * src/vm/jit/mips/asmpart.S (asm_call_jit_compiler): Use
+       exceptions_get_and_clear_exception.
+       (asm_abstractmethoderror): Added missing .ent/.end.
+       (asm_wrapper_patcher): Use patcher_wrapper.
+
+2006-07-19 13:38  twisti
+
+       * src/vm/jit/show.c (new_show_method): Print data length.
+       (show_method): Likewise.
+
+2006-07-19 13:07  tbfg
+
+       * src/vm/jit/powerpc64/* (global): changed all powerpc references to
+       powerpc64.
+
+2006-07-19 12:09  twisti
+
+       * src/vm/jit/show.c (new_show_method): Print method's code length.
+       (show_method): Likewise.
+
+2006-07-19 09:13  twisti
+
+       * src/vm/jit/alpha/patcher.c (patcher_wrapper): Patch back the
+       original instruction on successful returns.
+       (patcher_get_putstatic): Removed instruction patching.
+       (patcher_get_putfield): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+
+2006-07-18 18:38  tbfg
+
+       * src/vm/jit/powerpc64/linux/md-abi.c (md_return_alloc): isleafmethod
+       has been moved to jitdata.
+       
+       * src/vm/jjit/powerpc64/codegen.c (global): fixes for isleafmethod
+       changes, BUILTIN_monitor* renamed to LOCK_monitor_*
+       codegen_add_classcastexception_ref api changed.
+       
+       * src/vm/jit/powerpc64/asmpart.S (global): fixed R_PPC64_ADDR32
+       issues (32 bit adresses) all jump tables data types from
+       long to quad and synched with powerpc asmpart.S.
+
+2006-07-18 14:05  twisti
+
+       * src/mm/memory.c (memory_cfree): New function.
+       * src/mm/memory.h (CFREE): Define to memory_cfree.
+       (memory_cfree): Added.
+
+2006-07-18 11:09  twisti
+
+       * src/native/jvmti/Makefile.am (lib_LTLIBRARIES): Removed libjdwp.la.
+       (libjdwp_la_SOURCES): Removed.
+       
+       * src/native/jvmti/VMjdwp.c: Removed.
+       * src/native/jvmti/VMjdwp.h: Likewise.
+       
+       * src/native/vm/Makefile.am [ENABLE_JVMTI] (lib_LTLIBRARIES): Added
+       libjdwp.la.
+       (libjdwp_la_SOURCES): Added.
+       
+       * src/native/vm/VMFrame.c: Removed.
+       * src/native/vm/VMMethod.c: Likewise.
+       * src/native/vm/VMVirtualMachine.c: Likewise.
+       
+       * src/native/vm/VMjdwp.c: Added.
+       * src/native/vm/VMjdwp.h: Likewise.
+       * src/native/vm/gnu_classpath_jdwp_VMVirtualMachine.c: Likewise.
+       * src/native/vm/gnu_classpath_jdwp_VMFrame.c: Likewise.
+       * src/native/vm/gnu_classpath_jdwp_VMMethod.c: Likewise.
+
+2006-07-18 11:02  motse
+
+       * src/native/jvmti/VMjdwp.c (Breakpoint): adapt BreakpointEvent
+       signature to changed gnu classpath jdwp implementation.
+       (fillidcache): idem
+
+2006-07-18 08:56  twisti
+
+       * src/vm/builtin.c (builtin_trace_args): Added missing
+       TRACE_ARGS_NUM >= 4 case.
+
+2006-07-18 08:36  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h (asm_wrapper_patcher): Renamed to
+       asm_patcher_wrapper.
+
+2006-07-18 08:19  twisti
+
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added package
+       prefix to filenames.
+       
+       * src/native/vm/VMClassLoader.c: Removed.
+       * src/native/vm/VMThrowable.c: Likewise.
+       * src/native/vm/VMAccessController.c: Likewise.
+       * src/native/vm/VMString.c: Likewise.
+       * src/native/vm/VMObject.c: Likewise.
+       * src/native/vm/VMStackWalker.c: Likewise.
+       * src/native/vm/Field.c: Likewise.
+       * src/native/vm/VMSystem.c: Likewise.
+       * src/native/vm/VMSystemProperties.c: Likewise.
+       * src/native/vm/VMClass.c: Likewise.
+       * src/native/vm/VMThread.c: Likewise.
+       * src/native/vm/Method.c: Likewise.
+       * src/native/vm/VMProxy.c: Likewise.
+       * src/native/vm/Constructor.c: Likewise.
+       * src/native/vm/VMRuntime.c: Likewise.
+       
+       * src/native/vm/gnu_classpath_VMStackWalker.c: Added.
+       * src/native/vm/java_lang_VMSystem.c: Likewise.
+       * src/native/vm/java_lang_reflect_Method.c: Likewise.
+       * src/native/vm/java_lang_VMObject.c: Likewise.
+       * src/native/vm/java_lang_VMString.c: Likewise.
+       * src/native/vm/gnu_classpath_VMSystemProperties.c: Likewise.
+       * src/native/vm/java_lang_VMRuntime.c: Likewise.
+       * src/native/vm/java_lang_reflect_Field.c: Likewise.
+       * src/native/vm/java_lang_VMThrowable.c: Likewise.
+       * src/native/vm/java_lang_VMClassLoader.c: Likewise.
+       * src/native/vm/java_lang_VMClass.c: Likewise.
+       * src/native/vm/java_lang_VMThread.c: Likewise.
+       * src/native/vm/java_security_VMAccessController.c: Likewise.
+       * src/native/vm/java_lang_reflect_VMProxy.c: Likewise.
+       * src/native/vm/java_lang_reflect_Constructor.c: Likewise.
+
+2006-07-18 08:16  twisti
+
+       * src/native/vm/gnu_java_lang_management_VMMemoryMXBeanImpl.c: New
+       file.
+
+2006-07-18 08:14  twisti
+
+       * src/native/vm/gnu_java_lang_management_VMRuntimeMXBeanImpl.c
+       (vm/vm.h): Added.
+       (getStartTime): Implemented.
+
+2006-07-18 08:05  twisti
+
+       * src/native/vm/VMSystemProperties.c (preInit): Added
+       gnu.java.compiler.name property.
+
+2006-07-17 16:11  twisti
+
+       * src/vm/jit/jit.h (IS_VOID_TYPE): Added.
+       
+       * src/vm/builtin.c (builtin_print_argument): New function.
+       (builtin_trace_args): Rewritten. Uses builtin_trace_args and prints
+       arguments much better.
+       (builtin_displaymethodstop): Likewise.
+
+2006-07-17 15:14  twisti
+
+       * src/native/jvmti/.cvsignore (TAGS): Added.
+       (cacaodbgserver): Likewise.
+
+2006-07-17 15:11  twisti
+
+       * configure.ac (CACAO_LIBDIR): Added.
+       
+       * src/vm/classcache.c [ENABLE_JVMTI] (lock_hashtable_classcache):
+       Don't export it.
+       (classcache_jvmti_GetLoadedClasses): New method.
+       
+       * src/vm/classcache.h (CLASSCACHE_LOCK): Don't define it.
+       (CLASSCACHE_UNLOCK): Likewise.
+       (lock_hashtable_classcache): Don't export it.
+       (classcache_jvmti_GetLoadedClasses): Added.
+       
+       * src/vm/vm.c (vm_create): Use CACAO_LIBDIR in OPT_XRUNJDWP.
+       
+       * src/native/jvmti/jvmti.c (GetLoadedClasses): Use
+       classcache_jvmti_GetLoadedClasses.
+       (jvmti_agentload): Some code cleanup.
+
+2006-07-17 13:50  twisti
+
+       * src/native/include/include/Makefile.am (GEN_JVMTI_HEADER_FILES):
+       Reordered.
+       
+       * src/native/include/include/.cvsignore
+       (gnu_classpath_jdwp_VMMethod.h): Added.
+       (gnu_classpath_jdwp_util_VariableTable.h): Likewise.
+
+2006-07-17 11:48  twisti
+
+       * src/vm/jit/asmpart.h (asm_wrapper_patcher): Renamed to
+       asm_patcher_wrapper.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+       * src/vm/jit/alpha/asmpart.S (asm_wrapper_patcher): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+       * src/vm/jit/i386/asmpart.S (asm_wrapper_patcher): Likewise.
+       
+       * src/vm/jit/mips/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+       * src/vm/jit/mips/asmpart.S (asm_wrapper_patcher): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+       * src/vm/jit/powerpc/asmpart.S (asm_wrapper_patcher): Likewise.
+       
+       * src/vm/jit/powerpc64/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+       * src/vm/jit/powerpc64/asmpart.S (asm_wrapper_patcher): Likewise.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+       (createnativestub): Likewise.
+       * src/vm/jit/x86_64/asmpart.S (asm_wrapper_patcher): Likewise.
+
+2006-07-17 11:09  twisti
+
+       * src/mm/boehm.c (heap_allocate): Changed signature. Some cleanup.
+       * src/mm/boehm.h (heap_allocate): Likewise.
+
+2006-07-17 10:00  twisti
+
+       * src/native/vm/VMRuntime.c (maxMemory): Comment fix.
+       (availableProcessors): Likewise.
+
+2006-07-17 09:47  twisti
+
+       * src/vm/jit/x86_64/patcher.c (vm/jit/x86_64/codegen.h): Added.
+       (vm/exceptions.h): Likewise.
+       (patcher_get_putstatic): Removed monitor enter/exit and return address
+       calculation, this is now done by the wrapper.
+       (patcher_get_putfield): Likewise.
+       (patcher_putfieldconst): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_class): Likewise.
+       (patcher_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+       
+       * src/vm/jit/x86_64/asmpart.S (asm_wrapper_patcher): Use
+       patcher_wrapper.
+
+2006-07-16 15:58  twisti
+
+       * src/native/jvmti/jvmti.c (DestroyRawMonitor): Don't pass
+       threadobject to lock_monitor_exit.
+       (RawMonitorEnter): Changed builtin_monitorenter to lock_monitor_enter.
+       (RawMonitorExit): Changed builtin_monitorexit to lock_monitor_exit.
+
+2006-07-16 15:38  twisti
+
+       * src/vm/jit/recompile.c (recompile_threadobject): Renamed to
+       recompile_vmthread and changed type to java_lang_VMThread.
+       (recompile_start_thread): Changed initialization of the thread
+       object. This fixes the not-exit bug.
+       
+       * src/vm/jit/profile/profile.c (profile_threadobject): Renamed to
+       profile_vmthread.
+       (profile_thread): Call codegen_get_pv_from_pc_nocheck instead of
+       codegen_findmethod.
+       (profile_start_thread): Changed initialization of the thread
+       object.
+       
+       * src/vm/jit/codegen-common.c (codegen_findmethod): Print a stacktrace
+       if no function was found and exit the VM.
+       (codegen_get_pv_from_pc_nocheck): New function. Like
+       codegen_findmethod, but can return NULL.
+       * src/vm/jit/codegen-common.h (codegen_get_pv_from_pc_nocheck): Added.
+
+2006-07-14 17:08  edwin
+
+       * src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
+       Fixed dupslots indices for ICMD_SWAP.
+
+2006-07-14 17:07  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): General handling of
+       INS_FLAG_UNRESOLVED.
+
+2006-07-14 17:06  edwin
+
+       * src/vm/jit/show.c (new_show_icmd): Fixed showing of LASTORECONST.
+
+2006-07-14 17:05  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Fixed propagation of
+       INS_FLAG_UNRESOLVED for PUTFIELDCONST/PUTSTATICCONST.
+
+2006-07-14 17:03  edwin
+
+       * src/vm/jit/stack.c (DUP_SLOT): Copy only TEMPVARs directly.
+
+2006-07-14 17:02  edwin
+
+       * src/vm/jit/parse.c (new_parse): No exception check for
+       MONITORENTER.
+
+2006-07-14 16:58  edwin
+
+       * src/vm/jit/show.c (new_show_stackvar): Show varkind and varnum for
+       variables with an invalid varkind.
+
+2006-07-14 16:56  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Use POPANY for DUP*
+       instructions, in order to set varkind correctly. The repeated
+       POPANY macros should probably be replaced by more efficient
+       code.
+
+2006-07-14 16:54  edwin
+
+       * src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
+       Fixed dupslots indices for ICMD_DUP_X1.
+
+2006-07-14 16:52  edwin
+
+       * src/vm/jit/parse.h (NEW_OP_STORE_ONEWORD): Store index in dst,
+       not in s1.
+       (NEW_OP_STORE_TWOWORD): Likewise.
+
+2006-07-13 11:54  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Use lock_monitor_enter/exit
+       instead of builtin_monitorenter/exit.
+
+2006-07-13 11:17  motse
+
+       * doc/handbook/jvmti.tex: documentation of the cacao jvmti
+       implementation added to the cacao handbook
+       * doc/handbook/arch.eps: idem
+       * doc/handbook/cacao.tex: idem
+       * doc/handbook/java.bib: idem
+       * doc/handbook/arm.tex: added bounding box for arm-double-memory.png
+
+2006-07-13 10:26  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): Use lock_monitor_enter/exit
+       instead of builtin_monitorenter/exit.
+       (createnativestub): Don't use builtin_get_exceptionptrptr, but
+       codegen_finish_native_call for exception check.
+
+2006-07-12 22:55  twisti
+
+       * src/mm/memory.c (vm/vm.h): Added.
+       (memory_cnew): Replaced throw_cacao_exception_exit with vm_abort.
+       (dump_release): Likewise.
+       
+       * src/toolbox/util.c (_Jv_getcwd): Likewise.
+
+2006-07-12 22:12  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Use lock_monitor_enter/exit
+       instead of builtin_monitorenter/exit.
+
+2006-07-12 21:59  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Use lock_monitor_enter/exit
+       instead of builtin_monitorenter/exit.
+
+2006-07-12 21:45  twisti
+
+       * src/vm/builtin.c (builtin_monitorenter): Removed.
+       (builtin_staticmonitorenter): Likewise.
+       (builtin_monitorexit): Likewise.
+       * src/vm/builtin.h: Likewise.
+       
+       * src/threads/native/lock.c (lock_monitor_enter): Don't pass
+       threadobject, get it in this function.
+       (lock_monitor_exit): Likewise.
+       
+       * src/threads/native/lock.h (lock_monitor_enter): Changed signature.
+       (lock_monitor_exit): Likewise.
+       (LOCK_monitor_enter): Defined.
+       (LOCK_monitor_exit): Likewise.
+       (LOCK_MONITOR_ENTER): Likewise.
+       (LOCK_MONITOR_EXIT): Likewise.
+       
+       * src/vm/suck.c: Use lock_monitor_enter/exit instead of
+       builtin_monitorenter/exit.
+       * src/vm/string.c: Likewise.
+       * src/vm/finalizer.c: Likewise.
+       * src/vm/classcache.c: Likewise.
+       * src/vm/initialize.c: Likewise.
+       * src/vm/jit/recompile.c: Likewise.
+       * src/vm/jit/show.c: Likewise.
+       * src/vm/jit/patcher.h: Likewise.
+       * src/vm/jit/parse.c: Likewise.
+       * src/vm/jit/x86_64/md.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/jit.c: Likewise.
+       * src/vm/builtintable.inc: Likewise.
+       * src/vm/exceptions.c: Likewise.
+       * src/vm/linker.c: Likewise.
+       * src/vm/utf8.c: Likewise.
+       * src/native/jni.c: Likewise.
+       * src/native/native.c: Likewise.
+       * src/toolbox/avl.c: Likewise.
+       * src/toolbox/list.c: Likewise.
+       * src/mm/memory.c: Likewise.
+       * src/cacaoh/headers.h: Likewise.
+
+2006-07-12 21:33  twisti
+
+       * src/threads/Makefile.am: Added path to header.
+
+2006-07-12 21:32  twisti
+
+       * src/vm/jit/Makefile.am (RECOMPILE_SOURCES): Added, compile recompile
+       only if threads are enabled.
+       
+       * src/vm/vm.c (vm_create): Call recompile_init only if threads are
+       enabled.
+
+2006-07-12 21:27  twisti
+
+       * src/threads/none/.cvsignore: New file.
+
+2006-07-12 21:26  twisti
+
+       * src/threads/none/Makefile.am: New file.
+       * src/threads/none/lock.h: Likewise.
+       * src/threads/Makefile.am (DIST_SUBDIRS): Added.
+       * configure.ac (AC_CONFIG_FILES): Added src/threads/none/Makefile.
+
+2006-07-12 20:27  twisti
+
+       * src/vm/jit/powerpc/darwin/md-abi.c (md_return_alloc): Use
+       jd->isleafmethod.
+
+2006-07-12 20:14  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Use jd->isleafmethod.
+       * src/vm/jit/powerpc/linux/md-abi.c (md_return_alloc): Likewise.
+
+2006-07-12 15:02  twisti
+
+       * src/vm/jit/recompile.c (recompile_replace_vftbl): #ifndef NDEBUG
+       debugging code.
+
+2006-07-12 14:55  twisti
+
+       * src/vm/jit/powerpc/linux/md-abi.c (vm/jit/abi.h): Added.
+       * src/vm/jit/powerpc/netbsd/md-abi.c: Likewise.
+       * src/vm/jit/powerpc/darwin/md-abi.c: Likewise.
+       * src/vm/jit/alpha/md-abi.c: Likewise.
+       * src/vm/jit/powerpc64/linux/md-abi.c: Likewise.
+       * src/vm/jit/i386/md-abi.c: Likewise.
+       
+       * src/vm/jit/sparc64/md-abi.c: Added GNU header.
+       (vm/jit/abi.h): Added.
+
+2006-07-12 14:53  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): Use jd->isleafmethod. Pass
+       register number to codegen_add_classcastexception_ref.
+       
+       * src/vm/jit/mips/md-abi.c (vm/jit/abi.h): Added.
+       (md_return_alloc): Changed signature.
+
+2006-07-12 14:42  edwin
+
+       * src/vm/jit/emit.h (emit_load): New function. This is a general
+       function for emitting loads that will keep its stackvar argument
+       after switching to the new instruction format. It will be used
+       for instructions with variable arguments, for example.
+       
+       * src/vm/jit/x86_64/emit.c (emit_load): New function.
+
+2006-07-12 13:52  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use jd->isleafmethod.
+       * src/vm/jit/x86_64/md-abi.c (md_return_alloc): Likewise.
+
+2006-07-12 13:47  twisti
+
+       * src/vm/jit/code.c (code_get_stack_frame_size): Commented code, we
+       need another implementation.
+
+2006-07-11 22:23  twisti
+
+       * src/vm/jit/x86_64/asmpart.S (asm_call_jit_compiler): Use
+       exceptions_get_and_clear_exception.
+       (asm_wrapper_patcher): Likewise.
+
+2006-07-11 19:17  twisti
+
+       * src/vm/jit/i386/emit.c: Changed prefix from i386_ to emit_.
+       (vm/jit/emit.h): Added.
+       (emit_load_s1_low): New function.
+       (emit_load_s2_low): New function.
+       
+       * src/vm/jit/i386/md.c (md_get_method_patch_address): Changed
+       instruction byte.
+       
+       * src/vm/jit/i386/md-emit.h: Changed prefix from i386_ to emit_. Added
+       architecture defines.
+       
+       * src/vm/jit/i386/codegen.c Changed the code generator to produce
+       RISC-like code. These are way too much changes to name them.
+       
+       * src/vm/jit/i386/codegen.h: Removed a lot of architecture stuff.
+       
+       * src/vm/jit/i386/patcher.c (vm/exceptions.h): Added.
+       (patcher_wrapper): New function.
+       (patcher_get_putstatic): Removed monitor enter/exit and return address
+       calculation, this is now done by the wrapper.
+       
+       (patcher_getfield): Likewise.
+       (patcher_putfield): Likewise.
+       (patcher_putfieldconst): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_class): Likewise.
+       (patcher_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+       
+       * src/vm/jit/i386/asmpart.S (asm_vm_call_method): Changed calling
+       sequence of asm_call_jit_compiler.
+       (asm_call_jit_compiler): Use jit_asm_compile.
+       (asm_wrapper_patcher): Use patcher_wrapper.
+
+2006-07-11 18:39  twisti
+
+       * src/vm/jit/emit.h [SIZEOF_VOID_P == 4] (emit_store_low): Added.
+       [SIZEOF_VOID_P == 4] (emit_store_high): Likewise.
+
+2006-07-11 18:35  twisti
+
+       * src/vm/jit/i386/md-asm.h (mptr): Added.
+
+2006-07-11 18:34  twisti
+
+       * src/vm/jit/i386/md-abi.h (REG_METHODPTR): Added.
+       (REG_ITMP12_PACKED): Likewise.
+       (REG_ITMP13_PACKED): Likewise.
+       (REG_ITMP23_PACKED): Likewise.
+       (REG_RESULT_PACKED): Likewise.
+       (EAX_EDX_PACKED): Likewise.
+
+2006-07-11 17:10  twisti
+
+       * src/vm/jit/alpha/patcher.c (patcher_wrapper): Added return address
+       calculation.
+       (patcher_get_putstatic): Removed return address calculation.
+       (patcher_get_putfield): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+
+2006-07-10 17:22  twisti
+
+       * configure.ac (disassembler): Disabled by default, made too many
+       problems.
+       
+       * src/vm/vm.c (toolbox/util.h): Added.
+       (vm_create): Save VM start time, #ifdef disassembler stuff.
+       
+       * src/native/jni.h (_Jv_JavaVM): Added starttime and
+       Java_gnu_java_lang_management_VMMemoryMXBeanImpl_verbose.
+       
+       * src/toolbox/util.c (config.h): Added.
+       (sys/time.h): Likewise.
+       (vm/vm.h): Likewise.
+       (util_current_time_millis): New function.
+       
+       * src/toolbox/util.h (config.h): Added.
+       (vm/types.h): Likewise.
+       (util_current_time_millis): New function.
+
+2006-07-10 14:47  twisti
+
+       * src/vm/jit/alpha/codegen.c codegen): CHECKCAST: Load s1 again before
+       exception check.
+
+2006-07-10 14:42  twisti
+
+       * src/vm/jit/i386/emit.c (i386_call_mem): Removed.
+
+2006-07-10 14:41  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): CHECKCAST: Load s1 again before
+       exception check.
+       (callgetexceptionptrptr): Removed.
+
+2006-07-10 14:22  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Use jd->isleafmethod.
+
+2006-07-10 14:20  twisti
+
+       * src/vm/jit/jit.c (jit_jitdata_new): New function.
+       (jit_compile): Use jit_jitdata_new.
+       (jit_recompile): Likewise.
+
+2006-07-10 14:11  twisti
+
+       * NEWS: Added ClassCastException and system assertions.
+       * src/vm/jit/stack.c (new_stack_analyse): Changed missing
+       jd->isleafmethod.
+       (stack_analyse): Likewise.
+
+2006-07-10 14:02  twisti
+
+       * src/vm/jit/code.h (codeinfo): Removed basicblocks and isleafmethod.
+       * src/vm/jit/jit.h (jitdata): Added isleafmethod.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Use jd->isleafmethod. Pass
+       register number to codegen_add_classcastexception_ref.
+       
+       * src/vm/jit/allocator/simplereg.c (interface_regalloc): Use
+       jd->isleafmethod.
+       (local_regalloc): Likewise.
+       
+       * src/vm/jit/parse.c (new_parse): Likewise.
+       (parse): Likewise.
+       
+       * src/vm/jit/parse.h (NEW_OP_BUILTIN_CHECK_EXCEPTION): Likewise.
+       (NEW_OP_BUILTIN_NO_EXCEPTION): Likewise.
+       (NEW_OP_BUILTIN_ARITHMETIC): Likewise.
+       (BUILTIN): Likewise.
+
+2006-07-10 13:53  twisti
+
+       * src/vm/jit/powerpc64/linux/.cvsignore: New file.
+       * src/vm/jit/powerpc64/.cvsignore: Likewise.
+
+2006-07-10 13:51  twisti
+
+       * src/vm/jit/alpha/patcher.c (assert.h): Added.
+       (vm/exceptions.h): Added.
+       (vm/jit/methodheader.h): Likewise.
+       (patcher_wrapper): New function.
+       (patcher_get_putstatic): Removed monitor enter/exit, this is now done
+       by the wrapper.
+       (patcher_get_putfield): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+       
+       * src/vm/jit/alpha/asmpart.S (asm_wrapper_patcher): Use
+       patcher_wrapper.
+       
+       * src/vm/jit/alpha/md-abi.c (md_return_alloc): Changed signature.
+
+2006-07-10 13:36  twisti
+
+       * src/vm/statistics.c (count_class_infos): Renamed to size_classinfo.
+       (size_fieldinfo): Added.
+       (size_methodinfo): Likewise.
+       (size_codeinfo): Likewise.
+       (print_stats): Print new variables.
+       
+       * src/vm/statistics.h (count_class_infos): Renamed to size_classinfo.
+       (size_fieldinfo): Added.
+       (size_methodinfo): Likewise.
+       (size_codeinfo): Likewise.
+       
+       * src/vm/class.c (class_create_classinfo): Renamed count_class_infos
+       to size_classinfo.
+       
+       * src/vm/loader.c (load_class_from_classbuffer): Likewise and use new
+       variables.
+       
+       * src/vm/jit/code.c [ENABLE_STATISTICS] (code_codeinfo_new): Add
+       codeinfo size.
+       [ENABLE_STATISTICS] (code_codeinfo_free): Subtract codeinfo size.
+
+2006-07-10 10:18  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Pass register number to
+       codegen_add_classcastexception_ref.
+
+2006-07-10 10:01  twisti
+
+       * src/lib/vm/reference/java/lang/VMClassLoader.java
+       (defaultAssertionStatus): Made native.
+       * src/native/vm/VMClassLoader.c (defaultAssertionStatus): Added.
+       
+       * src/native/jni.h (_Jv_JavaVM): Added
+       Java_java_lang_VMClassLoader_defaultAssertionStatus.
+       
+       * src/vm/vm.c (OPT_ESA): Added.
+       (OPT_DSA): Likewise.
+
+2006-07-08 22:07  twisti
+
+       * src/vm/jit/methodheader.h (ExEntrySize): Removed.
+       (ExStartPC): Likewise.
+       (ExEndPC): Likewise.
+       (ExHandlerPC): Likewise.
+       (ExCatchType): Likewise.
+
+2006-07-08 20:32  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Pass register number to
+       codegen_add_classcastexception_ref.
+
+2006-07-08 20:16  twisti
+
+       * src/vm/utf8.c (utf_java_lang_ClassCastException): Added.
+       (utf8_init): Initialize utf_java_lang_ClassCastException.
+       * src/vm/utf8.h (utf_java_lang_ClassCastException): Added.
+       
+       * src/vm/class.c (class_java_lang_ClassCastException): Added.
+       * src/vm/class.h (class_java_lang_ClassCastException): Likewise.
+       
+       * src/vm/exceptions.c (exceptions_init): Initialize
+       class_java_lang_ClassCastException.
+       
+       (new_classcastexception): Renamed to
+       exceptions_new_classcastexception, pass the failing class name to the
+       exception.
+       
+       * src/vm/exceptions.h (exceptionptr): Use thread object directly.
+       (new_classcastexception): Renamed to
+       exceptions_new_classcastexception.
+       
+       * src/vm/jit/stacktrace.c (stacktrace_inline_classcastexception):
+       Changed signature.
+       * src/vm/jit/stacktrace.h (stacktrace_inline_classcastexception):
+       Likewise.
+       
+       * src/vm/jit/codegen-common.c (codegen_add_classcastexception_ref):
+       Likewise.
+       * src/vm/jit/codegen-common.h (codegen_add_classcastexception_ref):
+       Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Pass register number to
+       codegen_add_classcastexception_ref.
+
+2006-07-08 19:08  twisti
+
+       * src/vm/jit/i386/codegen.c (createnativestub): Don't use
+       builtin_get_exceptionptrptr, but codegen_finish_native_call for
+       exception check.
+
+2006-07-08 18:28  twisti
+
+       * configure.ac: Use ARCH_CFLAGS and OPT_CFLAGS instead of CFLAGS and
+       pass the flags via AM_CFLAGS to Makefile's.
+
+2006-07-08 14:20  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_create): Added another code ==
+       NULL check.
+
+2006-07-06 22:52  twisti
+
+       * src/vm/jit/powerpc/darwin/md-abi.h (REG_ITMP12_PACKED): Added.
+       (REG_RESULT_PACKED): Added.
+       
+       * src/vm/jit/powerpc/darwin/md-asm.h (patcher_wrapper): Added.
+       
+       * src/vm/jit/powerpc/darwin/md-abi.c (md_return_alloc): Changed
+       signature.
+       
+       * src/vm/jit/powerpc/asmpart.S (L_patcher_wrapper$stub): Added.
+
+2006-07-06 14:19  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use code variables.
+       (createnativestub): Likewise and don't use
+       builtin_get_exceptionptrptr, but codegen_finish_native_call for
+       exception check.
+       
+       * src/vm/jit/x86_64/codegen.h (PROFILE_CYCLE_START): Use code
+       variables.
+       (PROFILE_CYCLE_STOP): Likewise.
+       
+       * src/vm/jit/x86_64/md-abi.c (md_return_alloc): Changed signature.
+
+2006-07-06 14:10  tbfg
+
+       fixed isleafmethod is now part of code issues
+
+2006-07-06 13:59  tbfg
+
+       powerpc64 compiles
+       arch.h and md-abi.h: modified PV register assignment
+
+2006-07-06 12:42  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Use code->isleafmethod.
+       * src/vm/jit/i386/md-abi.c (md_return_alloc): Changed signature.
+
+2006-07-06 11:36  twisti
+
+       * src/vm/method.h (methodinfo): Removed isleafmethod, frequency,
+       bbfrequency and cycles.
+       
+       * src/vm/jit/powerpc/linux/md-abi.c (md_return_alloc): Changed
+       signature, use code->isleafmethod.
+       
+       * src/vm/jit/powerpc/linux/md-abi.h (REG_IFTMP): Changed from 0 to 16.
+       (REG_ITMP12_PACKED): Added.
+       (REG_RESULT_PACKED): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (vm/jit/methodheader.h): Added.
+       (codegen): Use code->isleafmethod, added instrumentation code.
+       
+       * src/vm/jit/abi.h (md_return_alloc): Added.
+       
+       * src/vm/jit/stack.c (new_stack_analyse): Use code->isleafmethod.
+       (stack_analyse): Likewise.
+       
+       * src/vm/jit/stack.h (md_return_alloc): Removed.
+       
+       * src/vm/jit/code.c (code_codeinfo_new): Don't memset as NEW already
+       does that, set isleafmethod to true.
+       
+       * src/vm/jit/code.h (codeinfo): Added basicblockcount and basicblocks.
+       
+       * src/vm/jit/allocator/simplereg.c (interface_regalloc): Use
+       code->isleafmethod.
+       (local_regalloc): Likewise.
+       
+       * src/vm/jit/parse.c (new_parse): Likewise.
+       (parse): Likewise.
+       
+       * src/vm/jit/parse.h (NEW_OP_BUILTIN_CHECK_EXCEPTION): Likewise.
+       (NEW_OP_BUILTIN_NO_EXCEPTION): Likewise.
+       (NEW_OP_BUILTIN_ARITHMETIC): Likewise.
+       (BUILTIN): Likewise.
+       
+       * src/vm/jit/replace.c (replace_create_replacement_points): Don't set
+       code->isleafmethod, it's already set.
+       
+       * src/vm/jit/profile/profile.c (profile_printstats): Use code
+       variables.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Don't set m->isleafmethod.
+       
+       * src/cacaoh/headers.c: Use stackcount instead of isleafmethod.
+
+2006-07-05 11:48  twisti
+
+       * src/vm/descriptor.h: Removed space.
+
+2006-07-04 19:06  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h
+       (builtin_asm_get_exceptionptrptr): Removed.
+       (_no_threads_exceptionptr): Likewise.
+       (exceptions_get_and_clear_exception): Added.
+       
+       * src/vm/jit/powerpc/patcher.c (vm/exceptions.h): Added.
+       (vm/jit/methodheader.h): Likewise.
+       (patcher_wrapper): New function.
+       (patcher_get_putstatic): Removed monitor enter/exit, this is now done
+       by the wrapper.
+       (patcher_get_putfield): Likewise.
+       (patcher_aconst): Likewise.
+       (patcher_builtin_multianewarray): Likewise.
+       (patcher_builtin_arraycheckcast): Likewise.
+       (patcher_invokestatic_special): Likewise.
+       (patcher_invokevirtual): Likewise.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_flags): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+       (patcher_checkcast_class): Likewise.
+       (patcher_instanceof_class): Likewise.
+       (patcher_clinit): Likewise.
+       (patcher_athrow_areturn): Likewise.
+       (patcher_resolve_native): Likewise.
+       
+       * src/vm/jit/powerpc/asmpart.S (asm_call_jit_compiler): Use
+       exceptions_get_and_clear_exception.
+       (asm_wrapper_patcher): Likewise, use patcher_wrapper.
+       (L_builtin_asm_get_exceptionptrptr$stub): Removed.
+       (L_exceptions_get_and_clear_exception$stub): Added.
+       
+       * src/vm/jit/patcher.h (assert.h): Added.
+       (PATCHER_FLAG_PATCHED): Likewise.
+       (PATCHER_MONITORENTER): Added assert and return NULL.
+       (PATCHER_MARK_PATCHED_MONITOREXIT): Use PATCHER_FLAG_PATCHED.
+       (patcher_wrapper): Added.
+
+2006-07-04 18:24  twisti
+
+       * src/vm/jit/powerpc/codegen.c (createnativestub): Don't use
+       builtin_get_exceptionptrptr, but codegen_finish_native_call for
+       exception check.
+
+2006-07-04 16:56  twisti
+
+       * tests/regression/codepatching/test.java: Catch only thrown
+       exceptions.
+
+2006-07-04 16:05  twisti
+
+       * src/vm/jit/powerpc/darwin/md-os.c (md_signal_handler_sigusr2): New
+       function.
+       
+       * src/vm/jit/powerpc/darwin/md-asm.h (asm_handle_nullptr_exception):
+       Removed.
+       (asm_abstractmethoderror): Added.
+       (exceptions_asm_new_abstractmethoderror): Likewise.
+       * src/vm/jit/powerpc/asmpart.S
+       (L_exceptions_asm_new_abstractmethoderror$stub): Added.
+
+2006-07-04 16:02  twisti
+
+       * src/vm/jit/powerpc/darwin/md-abi.c (md_param_alloc): Code
+       beautifying.
+
+2006-07-03 14:06  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_call_jit_compiler): Use
+       exceptions_get_and_clear_exception.
+       (asm_wrapper_patcher): Likewise.
+
+2006-07-03 13:49  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_finish_native_call): Check for
+       exception and return it.
+       * src/vm/jit/codegen-common.h (codegen_finish_native_call): Changed
+       signature.
+       
+       * src/vm/jit/alpha/codegen.c (createnativestub): Don't use
+       builtin_get_exceptionptrptr, but codegen_finish_native_call for
+       exception check.
+       
+       * src/vm/jit/alpha/codegen.h (M_ASUB_IMM): Added.
+
+2006-07-03 13:46  twisti
+
+       * src/vm/jit/alpha/md-abi.c (nregdescint): Added comments.
+
+2006-07-03 13:45  twisti
+
+       * src/vm/jit/alpha/linux/md-os.c (md_signal_handler_sigusr2): New
+       method.
+       (thread_restartcriticalsection): Code cleanup.
+
+2006-07-03 12:06  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_abstractmethoderror): New method.
+
+2006-07-03 10:18  twisti
+
+       * src/vm/exceptions.c (exceptions_get_and_clear_exception): New
+       function.
+       * src/vm/exceptions.h (exceptions_get_and_clear_exception): Added.
+
+2006-07-02 18:31  twisti
+
+       * src/lib/vm/reference/gnu/java: Added.
+       * src/lib/vm/reference/gnu/java/lang: Likewise.
+       * src/lib/vm/reference/gnu/java/lang/management: Likewise.
+       *
+       src/lib/vm/reference/gnu/java/lang/management/VMRuntimeMXBeanImpl.java:
+       New file.
+       * src/lib/Makefile.am (VM_JAVA_FILES): Added
+       src/lib/vm/reference/gnu/java/lang/management/VMRuntimeMXBeanImpl.java.
+       (VM_CLASS_FILES): Added
+       classes/gnu/java/lang/management/VMRuntimeMXBeanImpl.class.
+       (vm.zip, nozip): Removed ecj check.
+       
+       * src/native/vm/gnu_java_lang_management_VMRuntimeMXBeanImpl.c: New
+       file.
+       * src/native/vm/Makefile.am (libnativevm_la_SOURCES): Added
+       gnu_java_lang_management_VMRuntimeMXBeanImpl.c.
+       
+       * src/native/include/.cvsignore: Added
+       gnu_java_lang_management_VMRuntimeMXBeanImpl.h.
+       * src/native/include/Makefile.am
+       (ADDITIONAL_IMPLEMENTED_VM_CLASSES_HEADER_FILES): Added
+       gnu_java_lang_management_VMRuntimeMXBeanImpl.h.
+       
+       * src/native/native.c
+       (native/include/gnu_java_lang_management_VMRuntimeMXBeanImpl.h):
+       Added.
+       (dummynativetable): Added
+       Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getInputArguments
+       and Java_gnu_java_lang_management_VMRuntimeMXBeanImpl_getStartTime.
+
+2006-07-02 18:24  twisti
+
+       * m4/ac_prog_javac.m4 (AC_PROG_JAVAC): Add -1.5 option when using ecj.
+
+2006-07-02 11:00  twisti
+
+       * m4/ac_prog_javac.m4 (AC_PROG_JAVAC): Added bootclasspath to compiler
+       checks.
+
+2006-07-02 10:42  twisti
+
+       * src/vm/jit/mips/asmpart.S (asm_abstractmethoderror): New function.
+
+2006-06-28 22:47  twisti
+
+       * NEWS: Added new release.
+
+2006-06-28 22:38  twisti
+
+       * src/lib/vm/reference/java/lang/VMThread.java: Updated to GNU
+       Classpath version.
+
+2006-06-28 21:52  twisti
+
+       * src/vm/jit/powerpc/asmpart.S (asm_abstractmethoderror): New
+       function.
+
+2006-06-28 21:51  twisti
+
+       * src/vm/exceptions.c (exceptions_handle_exception): Typo.
+
+2006-06-28 21:46  twisti
+
+       * src/vm/linker.c (link_class_intern): Fixed compiler warning, added
+       comment.
+       (linker_addinterface): Fixed compiler warning.
+
+2006-06-28 21:44  edwin
+
+       * src/vm/linker.c (link_class_intern): Converted the check against
+       creating a stubroutine twice into an assert. The check became
+       obsolete because abstract methods do no longer get compiler stubs.
+
+2006-06-28 21:01  edwin
+
+       * src/vm/linker.c (link_class_intern): Do not generate compiler
+       stubs for abstract methods.
+
+2006-06-28 20:33  edwin
+
+       * src/vm/jit/intrp/codegen.c (intrp_codegen): Changed MethodPointer
+       in method header to CodeinfoPointer.
+       (intrp_createcompilerstub): Likewise.
+       (intrp_createnativestub): Likewise.
+       (createcalljavafunction): Likewise.
+       
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception):
+       Changed MethodPointer in method header to CodeinfoPointer.
+
+2006-06-28 19:43  twisti
+
+       * src/vm/exceptions.c (exceptions_asm_new_abstractmethoderror): New
+       function.
+       * src/vm/exceptions.h (exceptions_asm_new_abstractmethoderror): Added.
+       
+       * src/vm/jit/x86_64/asmpart.S (asm_abstractmethoderror): Use
+       exceptions_asm_new_abstractmethoderror.
+       * src/vm/jit/i386/asmpart.S (asm_abstractmethoderror): Likewise.
+
+2006-06-28 19:11  twisti
+
+       * src/vm/utf8.c (utf_java_lang_AbstractMethodError): Added.
+       (utf8_init): Initialize utf_java_lang_AbstractMethodError.
+       * src/vm/utf8.h (utf_java_lang_AbstractMethodError): Added.
+       
+       * src/vm/class.c (class_java_lang_AbstractMethodError): Added.
+       (class_resolveclassmethod): Use exceptions_throw_abstractmethoderror.
+       * src/vm/class.h (class_java_lang_AbstractMethodError): Added.
+       
+       * src/vm/exceptions.c (exceptions_init): Initialize
+       class_java_lang_AbstractMethodError.
+       (exceptions_new_abstractmethoderror): New function.
+       (exceptions_throw_abstractmethoderror): Likewise.
+       * src/vm/exceptions.h (exceptions_new_abstractmethoderror)
+       (exceptions_throw_abstractmethoderror): Added.
+       
+       * src/vm/resolve.c (resolve_method_invokespecial_lookup): Use
+       exceptions_throw_abstractmethoderror.
+       
+       * src/vm/jit/asmpart.h (asm_abstractmethoderror): Added.
+       
+       * src/vm/jit/i386/asmpart.S (asm_abstractmethoderror): New function.
+       * src/vm/jit/x86_64/asmpart.S (asm_abstractmethoderror): Likewise.
+       
+       * src/vm/linker.c (link_class_intern): Fill empty slots in vftbl with
+       the AbstractMethodError stub.
+       (linker_addinterface): Insert the AbstractMethodError stub if no
+       suitable method was found.
+       
+       * src/cacaoh/headers.c (asm_abstractmethoderror): Added.
+       (exceptions_throw_abstractmethoderror): Likewise.
+
+2006-06-28 17:05  twisti
+
+       * src/vm/jit/jit.h (JITDATA_FLAG_INSTRUMENT)
+       (JITDATA_HAS_FLAG_INSTRUMENT): Likewise.
+       (ICMD_OPCODE_MASK, ICMD_CONDITION_MASK): Removed.
+       
+       * src/vm/jit/allocator/simplereg.c (allocate_scratch_registers):
+       Removed ICMD_OPCODE_MASK.
+       
+       * src/vm/jit/show.c (show_icmd): Commented conditional stuff, maybe I
+       need it again someday.
+       
+       * src/vm/jit/x86_64/emit.c (emit_store): Likewise.
+       (emit_cmovxx): Likewise.
+       * src/vm/jit/codegen-common.c (codegen_reg_of_var): Likewise.
+
+2006-06-28 15:39  twisti
+
+       * src/vm/jit/x86_64/md.c [ENABLE_THREADS] (threads/native/threads.h):
+       Added.
+       (md_signal_handler_sigusr2): New function.
+       (thread_restartcriticalsection): Code cleanup.
+
+2006-06-28 08:24  twisti
+
+       * src/scripts/.cvsignore: Removed cacao, jarsigner, javac and keytool.
+       * src/scripts: Updated svn:ignore.
+       
+       * src/scripts/Makefile.am (bin_SCRIPTS): Removed jarsigner and
+       keytool, there are now wrappers in GNU Classpath.
+       
+       * src/scripts/javac.in: Removed.
+       * src/scripts/jarsigner.in: Likewise.
+       * src/scripts/cacao.in: Likewise.
+       * src/scripts/keytool.in: Likewise.
+       
+       * configure.ac (AC_CONFIG_FILES): Removed src/scripts/jarsigner and
+       src/scripts/keytool.
+
+2006-06-23 12:07  twisti
+
+       * src/vm/string.c (javastring_toutf): Check for NULL and return
+       utf_null.
+       (literalstring_u2): Replaced list_addfirst with list_add_first.
+       
+       * src/vm/builtin.h (BUILTIN_MONITOR_ENTER, BUILTIN_MONITOR_EXIT):
+       Defined.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Don't use
+       BUILTIN_staticmonitorenter, use JITDATA_HAS_FLAG_VERBOSECALL instead
+       of opt_verbosecall.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/code.c: Smaller changes.
+       
+       * src/vm/jit/code.h (codeinfo): Added optlevel.
+       
+       * src/vm/jit/Makefile.am (libjit_la_SOURCES): Added recompile.[ch].
+       * src/vm/jit/recompile.c: New file.
+       * src/vm/jit/recompile.h: Likewise.
+       
+       * src/vm/jit/show.c (new_show_method, show_method)
+       (new_show_basicblock, show_basicblock): Use
+       JITDATA_HAS_FLAG_SHOWDISASSEMBLE instead of opt_showdisassemble.
+       
+       * src/vm/jit/profile/profile.c (vm/jit/jit.h): Added.
+       (list_method_entry): Moved to src/vm/jit/recompile.h.
+       (profile_thread): First real implementation.
+       (profile_start_thread): Better code.
+       (profile_printstats): Use codeinfo frequencies.
+       
+       * src/vm/jit/jit.c (jit_compile): Set jd->flags properly. Moved
+       codeinfo memory freeing before dump_release because we need jd, which
+       is allocated on dump memory.
+       (jit_recompile): New function.
+       (jit_compile_intern): Use jd->flags.
+       
+       * src/vm/jit/codegen-common.c (codegen_createnativestub): Set
+       jd->flags.
+       
+       * src/vm/jit/jit.h (JITDATA_FLAG_PARSE, JITDATA_FLAG_VERIFY)
+       (JITDATA_FLAG_SHOWINTERMEDIATE, JITDATA_FLAG_SHOWDISASSEMBLE)
+       (JITDATA_FLAG_VERBOSECALL): Added.
+       (JITDATA_HAS_FLAG_PARSE, JITDATA_HAS_FLAG_VERIFY)
+       (JITDATA_HAS_FLAG_IFCONV, JITDATA_HAS_FLAG_SHOWINTERMEDIATE)
+       (JITDATA_HAS_FLAG_SHOWDISASSEMBLE, JITDATA_HAS_FLAG_VERBOSECALL):
+       Likewise.
+       (jit_recompile): Likewise.
+       
+       * src/vm/vm.c (vm/jit/recompile.h): Added.
+       (vm_create): Call recompile_init and recompile_start_thread.
+       
+       * src/toolbox/list.h (config.h, vm/types.h, vm/global.h): Added.
+       (list): Added lock.
+       (list_init): Renamed to list_create.
+       (list_addfirst): Renamed to list_add_first.
+       (list_addlast): Renamed to list_add_last.
+       (list_add_last_unsynced): New function.
+       
+       * src/toolbox/list.c (mm/memory.h, threads/native/threads.h)
+       (vm/builtin.h): Added.
+       (list_init): Renamed to list_create.
+       (list_addfirst): Renamed to list_add_first and made synchronized.
+       (list_addlast): Likewise.
+       (list_add_last_unsynced): Likewise.
+       (list_add_before): Made synchronized.
+       (list_remove): Likewise.
+       (list_first): Likewise.
+       (list_last): Likewise.
+       (list_next): Likewise.
+       (list_prev): Likewise.
+       
+       * src/vm/suck.c (suck_init): Replaced list_init with list_create.
+       (suck_add): Replaced list_addlast with list_add_last.
+       
+       * src/vm/loader.c (load_constantpool): Replaced list_addfirst with
+       list_add_first.
+       (load_newly_created_array): Likewise.
+       
+       * src/vm/properties.c (properties_init): Replaced list_init with
+       list_create.
+       (properties_add): Use list_add_last_unsynced, as this is required
+       during bootstrapping.
+       
+       * src/threads/native/threads.h (THREAD_FLAG_JAVA)
+       (THREAD_FLAG_INTERNAL): Added.
+       (threadobject): Added flags.
+       
+       * src/threads/native/threads.c (threads_init): Flag main thread as
+       Java thread (required for profiling sampling).
+       (threads_startup_thread): Flag threads as Java or internal thread.
+
+2006-06-23 09:23  twisti
+
+       * src/vm/linker.c (vm/vm.h): Added.
+
+2006-06-22 18:48  twisti
+
+       * src/vm/utf8.c, src/vm/utf8.h (utf_null): Added.
+
+2006-06-22 14:39  twisti
+
+       * src/vm/utf8.c (utf8_init): Compile fix with ENABLE_STATISTICS.
+
+2006-06-21 16:29  ajordan
+
+       * configure.ac: Added support for compiling on sparc64
+       
+       * src/vm/jit/Makefile.am: Added sparc64 subdirectory
+       
+       * src/vm/jit/sparc64/*: Added files for the sparc64 JIT (which won't
+       compile yet)
+
+2006-06-21 08:30  twisti
+
+       * src/vm/jit/mips/linux/.cvsignore: Added TAGS.
+
+2006-06-20 15:50  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): Use codeinfo instead of
+       methodinfo.
+       (createcompilerstub): Likewise.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/mips/asmpart.S (asm_vm_call_method): Likewise.
+
+2006-06-20 11:55  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Use codeinfo instead of
+       methodinfo.
+       (createcompilerstub): Likewise.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/alpha/asmpart.S (asm_vm_call_method): Likewise.
+
+2006-06-20 09:10  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use codeinfo instead of
+       methodinfo.
+       (createcompilerstub): Likewise.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/x86_64/asmpart.S (asm_vm_call_method): Likewise.
+
+2006-06-19 22:53  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Use codeinfo instead of
+       methodinfo.
+       (createcompilerstub): Likewise.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/i386/asmpart.S (asm_vm_call_method): Likewise.
+
+2006-06-19 22:23  twisti
+
+       * src/threads/native/threads.h (threadobject): Added pc.
+
+2006-06-19 22:22  twisti
+
+       * src/vm/jit/methodheader.h (MethodPointer): Removed.
+       (CodeinfoPointer): Added.
+       
+       * src/vm/method.c (method_vftbl_lookup): Use CodeinfoPointer.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Use codeinfo instead of
+       methodinfo.
+       (createcompilerstub): Likewise.
+       (createnativestub): Likewise.
+       
+       * src/vm/jit/powerpc/asmpart.S: Likewise.
+       
+       * src/vm/jit/stacktrace.c (stacktrace_create_stackframeinfo):
+       Likewise.
+       (stacktrace_create_native_stackframeinfo): Likewise.
+       (stacktrace_add_method): Likewise.
+       (stacktrace_create): Likewise.
+       
+       * src/vm/exceptions.c (exceptions_handle_exception): Likewise.
+       
+       * src/vm/jit/codegen-common.c (codegen_findmethod): Define for all
+       architectures. Removed assert, we have to check that somewhere else.
+       (codegen_finish): Add the method for all architectures.
+       
+       * src/vm/jit/codegen-common.h (methodtree_element): Likewise.
+       
+       * src/vm/jit/profile/profile.c (profile_thread): First implementation.
+       * src/vm/jit/profile/profile.h (vm/global.h): Added.
+       
+       * src/vm/signal.c (signal_init): Install SIGUSR2 for profiling.
+       * src/vm/signallocal.h (md_signal_handler_sigusr2): Added.
+       * src/vm/jit/powerpc/linux/md-os.c (md_signal_handler_sigusr2): New
+       method.
+       
+       * src/vm/vm.c (vm_create): Call profile_start_thread only with
+       opt_prof.
+       
+       * src/cacaoh/headers.c (exceptions_throw_nosuchmethoderror): Added.
+
+2006-06-19 21:39  twisti
+
+       * src/vm/class.c (class_resolveinterfacemethod_intern): Smaller
+       changes.
+       (class_resolveclassmethod): Likewise.
+
+2006-06-19 21:04  twisti
+
+       * src/vm/linker.c (link_class_inter): Smaller changes.
+       (linker_addinterface): Likewise, added some comments about checks we
+       should do.
+
+2006-06-19 21:00  twisti
+
+       * src/vm/jit/powerpc/patcher.c (assert.h): Added.
+       (patcher_invokeinterface): Added XXX comments.
+
+2006-06-19 20:51  twisti
+
+       * configure.ac (profiling): Disable by default.
+
+2006-06-19 12:36  twisti
+
+       * src/native/jni.c (AttachCurrentThread): Removed dummy
+       implementation.
+       (GetEnv): Use switch instead of if's.
+
+2006-06-14 18:55  motse
+
+       * src/native/native.c (native_resolve_function): fix/add to my last
+       incomplete commit.
+
+2006-06-14 18:36  motse
+
+       * src/vm/loader.c (load_class_from_classloader): Add call to jvmti
+       Class Load and Prepare event.
+       
+       * src/native/jni.c (RegisterNatives): Add comment for calling jvmti
+       Native Method Bind event.
+       
+       * src/native/vm/VMClassLoader.c (defineClass): Add call to jvmti
+       Class File Load Hook event.
+       
+       * src/native/vm/VMObject.c (wait): Add call to jvmti Monitor Wait
+       and Waited event.
+       
+       * src/native/native.c (native_resolve_function): Add call to jvmti
+       Native Method Bind event.
+       
+       * src/native/jvmti/cacaodbg.c (jvmti_ClassFileLoadHook): new function
+       to supprt event.
+       (jvmti_ClassLoadPrepare): idem
+       (jvmti_MonitorContendedEntering): idem
+       (jvmti_MonitorWaiting): idem
+       (jvmti_ThreadStartEnd): idem
+       (jvmti_NativeMethodBind): idem
+       
+       * src/native/jvmti/cacaodbg.h: Add function headers for
+       jvmti_ClassFileLoadHook, jvmti_ClassLoadPrepare,
+       jvmti_MonitorContendedEntering, jvmti_MonitorWaiting,
+       jvmti_ThreadStartEnd, jvmti_NativeMethodBind.
+       
+       * src/native/jvmti/jvmti.c (execute_callback): Add support for Class
+       File Load Hook event.
+       (GetOwnedMonitorInfo): Adapt lock record iteration to new
+       data structure.
+       (GetCurrentContendedMonitor): idem
+       
+       * src/threads/native/lock.c (lock_monitor_enter): Add call to jvmti
+       Monitor Contended Enter and Entered event
+       
+       * src/threads/native/threads.c (threads_startup_thread): replace
+       breakpoint by direct call to jvmti Thread Start/End event
+       
+       * src/cacaoh/headers.c add dummy functions jvmti_ThreadStartEnd,
+       jvmti_ClassLoadPrepare and jvmti_MonitorContendedEntering
+
+2006-06-13 10:41  twisti
+
+       * src/lib/vm/reference/java/lang/VMThread.java: Updated and removed
+       our old thread variables.
+       * src/native/include/java_lang_VMThread.h: Regenerated.
+
+2006-06-12 21:34  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyze): Fixed warnings about
+       directive in macro argument.
+
+2006-06-12 21:27  edwin
+
+       * src/vm/jit/show.c (new_show_basicblock): Fixed warnings.
+       (new_show_stackvar): Likewise.
+
+2006-06-12 21:14  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Set dst field for IINC.
+       
+       * src/vm/jit/show.c (new_show_method): Use jitdata.new_rd.
+       Only show locals and interfaces if available.
+       (new_show_basicblock): Changed basicblock output format.
+       (new_show_stackvar): Copied&pasted full stackvar printing.
+       (new_show_icmd): Show some more ICMD operands.
+       
+       * src/vm/jit/allocator/simplereg.c (new_reg_mark_copy): Fixed
+       bug for the case nthrough != 0.
+
+2006-06-12 18:50  edwin
+
+       * src/vm/jit/allocator/simplereg.h, src/vm/jit/allocator/simplereg.c
+       (new_regalloc): New function for new instruction format.
+       (new_allocate_scratch_registers): Likewise.
+       
+       * src/vm/jit/show.c (new_show_stackvar): Show allocated register
+       for stage SHOW_REGS and above.
+       
+       * src/vm/jit/jit.h (jitdata): Added field new_rd for testing the
+       new simplereg allocator.
+
+2006-06-12 14:23  edwin
+
+       * src/vm/jit/stack.c (new_stack_analyse): Fixed new stack analysis
+       for ICMD_JSR.
+       
+       * src/vm/jit/show.c (new_show_icmd): Show operands of new instruction
+       format.
+       (new_show_basicblock): Removed obsolete stack display.
+
+2006-06-10 14:53  edwin
+
+       * src/vm/jit/stack.c (IF_INTRP): New macro.
+       (IF_JIT): New macro.
+       (STATISTICS_STACKDEPTH_DISTRIBUTION): New macro.
+       (new_stack_analyse): New function. Implemented stack analysis for
+       new instruction format. (Not used, yet.)
+       
+       * src/vm/jit/stack.h (NEWSTACK): Enclosed in do { } while(0).
+       
+       * src/vm/jit/show.h, src/vm/jit/show.c (new_show_method): New
+       function.
+       (new_show_basicblock): New function.
+       (new_show_icmd): New function.
+       
+       * src/vm/jit/parse.c (new_fillextable): New function.
+       (parse): Parsing of JSR changed. Fixed bptr->icount setting.
+       
+       * src/vm/jit/jit.h (new_instruction): New field s3.jsrtarget.
+       New field dst.dupslots.
+
+2006-06-08 07:26  twisti
+
+       * tests/regression/codepatching/test.java (aastoreconst): Fixed skip
+       case.
+
+2006-06-07 12:51  twisti
+
+       * src/vm/suck.c (suck_add_from_property): Always set namelist to NULL
+       before scandir.
+
+2006-06-07 12:19  twisti
+
+       * src/vm/global.h (bool): Changed to `unsigned int', as the MIPS Pro
+       compiler complains about signed bit fields. And I think that warning
+       is really ok.
+       
+       * src/vm/suck.c (scandir_filter): Changed the signature define, as
+       only linux seems to use const.
+
+2006-06-07 12:10  twisti
+
+       * src/vm/suck.c (suck_add_from_property): Check for scandir return
+       value in error case, as on some systems, like Linux, it returns NULL.
+
+2006-06-06 21:13  motse
+
+       src/native/vm/VMVirtualMachine.c (unregisterEvent): print error
+       message
+       
+       src/native/jvmti/cacaodbg.c (jvmti_cacao_debug_init): set variable
+       jvmti
+       
+       src/native/jvmti/VMjdwp.c: add jmethodID and jclass cache variables.
+       Add new callback functions to jvmti_jdwp_EventCallbacks
+       (ThreadStart/ThreadEnd/ClassPrepare/Breakpoint): add
+       ThreadStart/ThreadEnd event callbackes implementation who notify jdwp.
+       (Exception/MethodEntry): dummy implementation. There are no jdwp
+       exeception/MethodEntry events in gnu classpath yet.
+       (setup_jdwp_thread): use cache variables.
+       FINDCLASSWITHEXCEPTION/GETMIDWITHEXCEPTION: helper macros to ease
+       jni findclass and getmethodid.
+       (fillidcache): new function that fills valid jmethodIDs and jclasses
+       in the cache variables.
+       (VMInit): add call to fillidcache.
+       (Agent_OnLoad): do not enable all jvmti callbacks anymore. Only
+       enable needed VMInit callback. The other callbacks will be enable
+       with VMVirtualMachine.registerEvent by need.
+       
+       src/native/jvmti.c (dofireEvent): check if a valid event callback is
+       available before executing it.
+       (SetEventNotificationMode): ThreadStart/End event are no more
+       implemented as breakpoints but have direct function calls to
+       dofireEvent.
+       (SuspendThread/ResumeThread/getcacaostacktrace): sketch for further
+       implementation of this function. Final threads_suspend* functions are
+       not yet available.
+       (GetArgumentsSize): new implementation using parsed descriptors.
+       (GetMethodLocation): add checks for JVMTI_ERROR_NATIVE_METHOD
+       (Samuel Vinson). And return -1 as return values for this dummy
+       implementation.
+       (GetJLocationFormat): JLocationFormat probably will be
+       JVMTI_JLOCATION_OTHER
+       
+       src/native/jvmti/VMjdwp.h: add jdwpthread which stores the thread
+       object for the jdwp listening thread.
+       
+       src/threads/native/threads.h: remove jvmti_get_threads_breakpoints
+       beacause ThreadStart/End events are implemented as direct function
+       calls by now.
+       
+       src/threads/native/threads.c (threads_startup_thread): replace
+       ThreadStart/End event implementation.
+       (jvmti_get_threads_breakpoints): removed.
+       
+       src/cacaoh/headers.c (jvmti_fireEvent): added dummy implementation to
+       enable linking of cacaoh.
+
+2006-06-06 18:51  twisti
+
+       * tests/regression/extest.java: Get the maximum heap size and use it
+       for OOM checks.
+       * tests/regression/extest.2output: Updated.
+
+2006-06-06 18:05  twisti
+
+       * src/vm/jit/alpha/arch.h (SUPPORT_LONG_DIV_POW2)
+       (SUPPORT_LONG_REM_POW2): Added, as we probably support these two
+       instructions while the architecture does not support long division.
+       * src/vm/jit/i386/arch.h: Likewise.
+       * src/vm/jit/mips/arch.h: Likewise.
+       * src/vm/jit/powerpc/arch.h: Likewise.
+       * src/vm/jit/x86_64/arch.h: Likewise.
+       
+       * src/vm/jit/stack.c (stack_analyse): Use SUPPORT_LONG_DIV_POW2 and
+       SUPPORT_LONG_REM_POW2 instead of SUPPORT_LONG_DIV.
+
+2006-06-06 14:32  michi
+
+       * doc/handbook/arm.tex: Added.
+       * doc/handbook/arm-double-memory.png: Image describing doubles in
+       memory.
+       * doc/handbook/cacao.tex, doc/handbook/Makefile.am: Added arm.tex.
+
+2006-06-06 13:13  twisti
+
+       * tests/regression/Makefile.am (JAVAFLAGS): Use flat vm classes and
+       CLASSPATH_GLIBJ_ZIP.
+       * tests/regression/codepatching/Makefile.am: Likewise.
+       * tests/regression/native/Makefile.am: Likewise.
+
+2006-06-06 12:17  twisti
+
+       * .externalToolBuilders/CacaoConfigure.launch: Updated to new
+       configure options.
+
+2006-06-06 11:22  twisti
+
+       * configure.ac (VM_ZIP_STRING): Removed.
+       (--with-vm-zip): Added.
+       (--with-classpath-glibj-zip): Added.
+       (--with-flat-classpath): Removed.
+       
+       * contrib/setenvinstalled.in (BOOTCLASSPATH): Use hardcoded vm.zip and
+       @CLASSPATH_GLIBJ_ZIP@.
+       * contrib/setenvsource.in: Likewise.
+       
+       * src/vm/global.h (CACAO_VM_ZIP_PATH): Removed.
+       (CLASSPATH_GLIBJ_ZIP_PATH): Likewise.
+       * src/vm/vm.c (CACAO_VM_ZIP_PATH): Replaced with CACAO_VM_ZIP.
+       (CLASSPATH_GLIBJ_ZIP_PATH): Replaced with CLASSPATH_GLIBJ_ZIP.
+       * src/cacaoh/cacaoh.c: Likewise.
+       
+       * src/lib/Makefile.am (GLIBJ_ZIP): Removed and replaced with
+       CLASSPATH_GLIBJ_ZIP.
+       * src/native/include/Makefile.am (VM_ZIP): Removed and replaced with
+       flat classes in builddir.
+       (GLIBJ_ZIP): Removed and replaced with CLASSPATH_GLIBJ_ZIP.
+       * src/native/Makefile.am: Likewise.
+
+2006-06-01 22:53  edwin
+
+       * src/vm/jit/stack.h (NEW_CHECKOVERFLOW): New macro.
+
+2006-06-01 22:52  edwin
+
+       * src/vm/jit/parse.c (new_parse): Use temporary fields in jitdata,
+       instead of methodinfo fields. Check exceptions for MONITORENTER/EXIT.
+       Cleaned up.
+
+2006-06-01 22:49  edwin
+
+       * src/vm/jit/parse.h (new_block_insert): New macro.
+
+2006-06-01 22:46  edwin
+
+       * src/vm/jit/jit.h (jitdata): Added temporary fields for development
+       of new instruction format.
+       (NEW_INSTRUCTION_GET_METHODDESC): New macro.
+
+2006-06-01 16:00  edwin
+
+       * src/vm/resolve.c (new_resolve_field_lazy): New method. This will
+       become the resolve_field_lazy for the new instruction format.
+       (new_resolve_method_lazy): New method. This will
+       become the resolve_method_lazy for the new instruction format.
+       (new_create_unresolved_field): New method. This will
+       become the create_unresolved_field for the new instruction format.
+       (new_create_unresolved_method): New method. This will
+       become the create_unresolved_method for the new instruction format.
+       
+       * src/vm/jit/parse.c (new_parse): Further work for new format.
+       
+       * src/vm/jit/jit.h (NEW_INSTRUCTION_GET_FIELDREF): New macro.
+       (NEW_INSTRUCTION_GET_METHODREF): New macro.
+
+2006-06-01 15:09  edwin
+
+       * src/vm/jit/jit.c (jcommandsize): Reformatted prettily. Use comments
+       instead of duplicated #defines.
+
+2006-06-01 14:36  edwin
+
+       * src/vm/jit/jit.h (ICMD_CHECKNULL_POP): New ICMD.
+       * src/vm/jit/jit.c (ICMD_CHECKNULL_POP): Likewise.
+       
+       * src/vm/jit/parse.c (new_parse): Further work on parsing for new
+       instruction format. Zero flags where necessary. Clarify policy of
+       at most one instruction per byte of original bytecode. Use the new
+       ICMD_CHECKNULL_POP for MONITORENTER/EXIT without threads.
+
+2006-06-01 13:00  edwin
+
+       * src/vm/jit/parse.h: Reworked and documented macros for new
+       instruction set.
+
+2006-05-31 23:18  edwin
+
+       * src/vm/jit/jit.h: Whitespace cleanup and comments.
+
+2006-05-31 23:03  edwin
+
+       * src/vm/jit/parse.c (parse): Removed unnecessary variable `s4ptr`.
+
+2006-05-31 22:56  edwin
+
+       * src/vm/jit/parse.c (new_parse): Implement LOOKUPSWITCH and
+       TABLESWITCH for the new instruction format.
+       
+       * src/vm/jit/jit.h (branch_target_t): New union.
+       (lookup_target_t): New struct.
+       (s3_operand_t): lookupdefault is now a branch_target_t.
+       (dst_operand_t): Changed some field names and types.
+
+2006-05-31 22:07  twisti
+
+       * src/native/jvmti/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS.
+       (LIBS): Added, required for darwin.
+       (libjdwp_la_SOURCES): Removed trailing \.
+
+2006-05-31 21:31  edwin
+
+       * src/vm/jit/ifconv/ifconv.c (show.h): Include this instead of
+       stack.h.
+       * src/vm/jit/verify/typecheck.c (show.h): Likewise.
+       * src/vm/jit/inline/inline.c (show.h): Include.
+       * src/vm/jit/jit.c (show.h): Include.
+
+2006-05-31 21:10  edwin
+
+       * src/vm/jit/show.c (show_init): Do not define this function for
+       NDEBUG.
+
+2006-05-31 20:28  edwin
+
+       * src/vm/jit/show.h: New file.
+       * src/vm/jit/show.c: New file.
+       
+       * src/vm/jit/stack.h (stack_show_method): Moved to show.h, renamed to
+       show_method.
+       (stack_show_basicblock): Moved to show.h, renamed to show_basicblock.
+       (stack_show_icmd): Moved to show.h, renamed to show_icmd.
+       
+       * src/vm/jit/stack.c (lock_stack_show_icmd): Moved to show.c, renamed
+       to show_global_lock.
+       (stack_show_method): Moved to show.c, renamed to show_method.
+       (stack_show_basicblock): Moved to show.c, renamed to show_basicblock.
+       (stack_show_icmd): Moved to show.c, renamed to show_icmd.
+       (stack_init): This function is now empty.
+       
+       * src/vm/jit/ifconv/ifconv.c (stack_show_basicblock): Renamed to
+       show_basicblock.
+       
+       * src/vm/jit/inline/inline.c (stack_show_method): Renamed to
+       show_method.
+       (stack_show_icmd): Renamed to show_icmd.
+       
+       * src/vm/jit/inline/inline_debug.inc (stack_show_icmd): Renamed to
+       show_icmd.
+       
+       * src/vm/jit/jit.c (jit_init): Call show_init.
+       (stack_show_method): Renamed to show_method.
+       
+       * src/vm/jit/Makefile.am (show.c): Added.
+       (show.h): Added.
+       
+       * src/threads/native/lock.h (pthread.h): Included.
+
+2006-05-31 19:25  edwin
+
+       * src/vm/jit/jit.h (s3_operant_t): Typo fixed to s3_operand_t.
+       Thanks, twisti.
+
+2006-05-31 13:53  motse
+
+       src/native/vm/VMVirtualMachine.c (suspendThread): print error message
+       with printjvmtierror
+       (resumeThread): idem
+       (getAllLoadedClassCount): idem
+       (getAllLoadedClasses): idem
+       (getClassStatus): idem
+       (getAllClassMethods): idem
+       (getFrameCount): idem
+       (getThreadStatus): idem
+       (getSourceFile): idem
+       (registerEvent): idem
+       
+       src/native/vm/VMMethod.c (printjvmtierror): new helper function for
+       getting and print error messages
+       (getName): print error message with printjvmtierror, remove
+       signature, generic signature
+       (getSignature): print error message with printjvmtierror, remove
+       name, generic signature
+       (getModifiers): print error message with printjvmtierror
+       (getlinetable): idem
+       (fillVariableTable): new function for converting
+       jvmtiLocalVariableEntry to arguments for
+       gnu.classpath.jdwp.util.VariableTable constructor
+       (getVariableTable): new implementation. tries to get local variable
+       table and return gnu.classpath.jdwp.util.VariableTable.
+       
+       src/native/include/Makefile.am: add VariableTable
+       
+       src/native/jvmti/VMjdwp.c (printjvmtierror) new function (duplicate)
+       - this is a work around
+       (VMInit): print error message with printjvmtierror
+       
+       src/native/jvmti/jvmti.c (InterruptThread): new implentation
+       (GetThreadInfo): switch form using javastring_tochar (uses malloc)
+       to javastring_toutf/utf_sprint_convert_to_latin1
+       (GetOwnedMonitorInfo): fix error handling
+       (GetFrameLocation): idem
+       (DestroyRawMonitor): use heap_free
+       (GetClassSignature): fix error handling
+       (GetSourceFileName): use utf_bytes
+       (GetFieldName): fix error handling
+       (GetFieldDeclaringClass): add error handling
+       (GetFieldModifiers): idem
+       (GetMethodName): fix error handling
+       (GetClassLoaderClasses): idem
+       (GenerateEvents): add CHECK_CAPABILITY
+       can_generate_compiled_method_load_events
+       
+       src/native/jvmti/VMjdwp.h add printjvmtierror
+
+2006-05-31 13:10  twisti
+
+       * src/vm/jit/x86_64/md-emit.h (IS_IMM8, IS_IMM32): Removed.
+       * src/vm/jit/emit.h (IS_IMM8, IS_IMM32): Added.
+
+2006-05-31 12:33  twisti
+
+       * src/vm/jit/x86_64/emit.c: Use new emit methods, saves about 6k code
+       size.
+       (emit_membase32): New method.
+       (emit_memindex): Likewise.
+       * src/vm/jit/x86_64/md-emit.h (emit_membase32): Removed.
+       (emit_memindex): Likewise.
+
+2006-05-30 23:38  edwin
+
+       * src/vm/jit/parse.c (new_parse): Worked on implementing parsing for
+       the new instruction format. (Not used, yet.)
+       * src/vm/jit/parse.h: Likewise.
+       
+       * src/vm/jit/jit.h (INS_FLAG_UNRESOLVED, INS_FLAG_CLASS)
+       (INS_FLAG_ARRAY, INS_FLAG_NOCHECK): Added flag constants for new
+       instruction format.
+
+2006-05-30 12:24  edwin
+
+       * src/vm/jit/parse.h (new_instruction): Moved `bte` field to s3.
+       * src/vm/jit/jit.h: Likewise.
+
+2006-05-29 23:59  edwin
+
+       * src/vm/jit/jit.h (subroutineinfo): Removed unused typedef.
+
+2006-05-29 23:47  edwin
+
+       * src/vm/jit/parse.h: New macros for new instruction format (not
+       used,
+       yet).
+       
+       * src/vm/jit/jit.h (new_instruction, ...): Further development of new
+       instruction format (not used, yet).
+
+2006-05-29 22:37  edwin
+
+       * src/vm/jit/parse.h: Reordered and commented macros. No functional
+       changes.
+       (Changes): Added my name.
+
+2006-05-29 21:48  edwin
+
+       * src/vm/jit/parse.c (new_parse): New function. This will become the
+       parse function for the new instruction format.
+       (parse): Removed obsolete variable `gp`. (Was used for old inlining).
+       
+       * src/vm/jit/jit.h (jitdata): Added temporary fields
+       `new_instructions` and `new_instructioncount` for parallel
+       development of the new instruction format.
+
+2006-05-29 20:22  edwin
+
+       * src/vm/jit/jit.h (new_instruction): Committed the new instruction
+       struct (with name `new_instruction` so it can co-exist with the old
+       format `instruction`).
+       (resolve.h): Include for new instruction format.
+       
+       * src/vm/resolve.h (typeinfo.h): Include to resolve dependencies.
+       
+       * src/vm/jit/parse.h: Added a reminder comment.
+
+2006-05-29 19:28  twisti
+
+       * configure.ac (AC_INIT): Changed to 0.96+svn.
+       (CFLAGS): Changed to -O0.
+
+2006-05-29 18:53  twisti
+
+       * ChangeLog: Updated.
+
+2006-05-29 18:52  twisti
+
+       * configure.ac (AC_INIT): Changed to version 0.96.
+       (CFLAGS): Changed to -O2.
+       * NEWS: Changed date.
+
+2006-05-29 15:51  twisti
+
+       * src/vm/vm.c (usage): Removed new-line.
+
+2006-05-29 15:37  twisti
+
+       * src/vm/vm.c (OPT_GLIBJ): Added.
+       (Xusage): Added help for -Xglibj.
+       (version): Changed signature for conditional exit.
+       (main): Added OPT_GLIBJ. Print version after all commandline arguments
+       have been handled.
+
+2006-05-29 15:21  edwin
+
+       * src/vm/linker.c (link_class_intern): On i386 align all fields to
+       just 4 bytes as gcc does. This makes the offsets of Java fields match
+       the offset of native headers. This fixes a bug (java.lang.Double.value
+       had been at offset 16, but java_lang_Double.value is offset 12).
+
+2006-05-29 15:17  twisti
+
+       * src/threads/native/critical.h (signal.h): Added, build fix for some
+       older Darwin systems.
+
+2006-05-29 14:32  twisti
+
+       * NEWS: Added a lot of stuff.
+
+2006-05-29 14:31  twisti
+
+       * src/cacao/Makefile.am: Renamed libcacaovm.so to libjvm.so to be
+       binary compatible with Sun.
+
+2006-05-29 09:41  motse
+
+       src/native/jni.c: removed jvmti.h included cacaodbg.h for GetEnv -
+       jvmti
+       src/native/vm/VMVirtualMachine.c: formatting changes/removed debug
+       statements
+       src/native/vm/VMMethod.c:
+       (getName/getSignature/getModifiers/getLineTable): (Samuel Vinson) new
+       implementation. (partially changed by motse)
+       src/native/jvmti/cacaodbg.h: removed unused function declarations
+       src/native/jvmti/jvmti.c (getcacaostacktrace): new implementation -
+       does not yet handle traces of not current threads correctly.
+       (GetMethodName): fix: return JVMTI_ERROR_NULL_POINTER only on method
+       == NULL
+       (GetFrameCount/GetStackTrace): fixed check for valid thread argument.
+
+2006-05-26 16:24  edwin
+
+       * src/toolbox/logging.h (stdarg.h): Include it here, instead of in
+       logging.c.
+       * src/toolbox/logging.c: See above.
+
+2006-05-26 12:58  twisti
+
+       * src/vm/jit/powerpc/linux/md-os.c (thread_restartcriticalsection):
+       Removed assert.
+       * src/vm/jit/powerpc/darwin/md-os.c (thread_restartcriticalsection):
+       Compile fix. Removed assert.
+
+2006-05-26 12:46  edwin
+
+       * NEWS: Added unicode cleanup.
+
+2006-05-26 12:44  edwin
+
+       * NEWS: Added tasuki locks and other news.
+
+2006-05-26 12:31  motse
+
+       src/native/jvmti/jvmti.c (GetClassStatus): bugfix - only compare
+       class state
+
+2006-05-26 12:26  edwin
+
+       * src/vm/jit/stacktrace.c (stacktrace_remove_stackframeinfo):
+       Commented.
+
+2006-05-26 12:25  twisti
+
+       * src/vm/jit/powerpc/linux/md-os.c (thread_restartcriticalsection):
+       Implemented.
+       * src/vm/jit/powerpc/darwin/md-os.c: Likewise.
+
+2006-05-26 12:19  edwin
+
+       * src/vm/builtin.c (builtin_init): Documented.
+       (builtin_trace_args): Documented.
+       (builtin_displaymethodstop): Documented.
+       
+       * src/vm/jit/alpha/md-abi.c (md_param_alloc): Documented.
+       
+       * src/vm/jit/allocator/simplereg.c (allocate_scratch_registers):
+       Documented.
+       
+       * src/vm/jit/codegen-common.c (methodtree_comparator): Documented.
+       (codegen_insertmethod): Documented.
+       
+       * src/toolbox/util.c (getcwd): Documented.
+
+2006-05-26 12:09  edwin
+
+       * src/vm/loader.h: Comment update.
+       
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Removed obsolete
+       inlining check.
+       
+       * src/vm/jit/replace.c: Typo fixed.
+       
+       * src/vm/jit/reg.c: Avoid XXX as wildcard in comments.
+       * src/vm/jit/jit.h: Likewise.
+
+2006-05-26 11:57  twisti
+
+       * src/vm/properties.c (properties_system_add): Changed
+       javastring_new_from_ascii to javastring_new_from_utf_string.
+       
+       * src/native/jni.c (ThrowNew): Use a variable for clazz.
+       (JNI_CreateJavaVM): Release allocated memory if vm_create fails.
+       
+       * src/threads/native/threads.c: Comments reformatted.
+
+2006-05-26 11:48  edwin
+
+       * src/vm/class.c (class_resolveclassmethod): Removed obsolete XXX
+       comments.
+       (class_resolveinterfacemethod): Likewise.
+       (class_resolvefield): Likewise.
+       
+       * src/vm/classcache.h: Removed obsolete XXX comment.
+       
+       * src/vm/jit/allocator/lsra.h: Changed TYPE_XXX to TYPE_* in comments.
+       * src/vm/jit/jit.c: Likewise.
+       
+       * src/native/vm/VMObject.c (Java_java_lang_VMObject_clone):
+       Removed obsolete XXX comment.
+       
+       * src/mm/memory.c (dump_release): Removed obsolete debugging code.
+
+2006-05-26 11:22  edwin
+
+       * src/native/jni.c (DefineClass): Use javastring_new_from_utf_string.
+       (ThrowNew): Likewise.
+
+2006-05-26 09:30  twisti
+
+       * src/mm/boehm.c (stackcall_malloc_atomic): Removed.
+       (stackcall_malloc_uncollectable): Likewise.
+       (heap_alloc_uncollectable): Use macros directly.
+       (heap_allocate): Likewise.
+       
+       * src/vm/vm.c: Added -jvm options, which is available on darwin.
+       
+       * src/vm/suck.c (scandir_filter): Changed signature for darwin.
+
+2006-05-25 21:59  motse
+
+       src/vm/vm.c(usage): added information for jvmti agent for jdwp
+       (vm_create): jdwp code move to jvmti agent for jdwp (VMjdwp.c)
+       src/cacao/cacao.c (main): jdwp code move to jvmti agent for jdwp.
+       execute jvmti_set_phase only if needed
+       src/native/jvmti/cacaodbg.c (setup_jdwp_thread): jdwp code move to
+       jvmti agent for jdwp
+       src/native/jvmti/VMjdwp.c: change this to a jvmti complaint agent by
+       using jni/jvmti function instead of cacao specific functions and
+       implement a Agent_OnLoad as main entry point. Include
+       setup_jdwp_thread function.
+       src/native/jvmti/Makefile.am: add libjdwp.so
+       src/native/jvmti/cacaodbg.h: remove no more needed global jdwp
+       related variables
+       src/native/jvmti/jvmti.c: (Resume/SuspendThread(List)): add temporary
+       implementation for trying jdwp
+       (jvmti_agentload): bugfix in getting/passing libname/arguments
+
+2006-05-25 12:28  twisti
+
+       * vm/jit/intrp/intrp.h (global_sp): Added space, yeah, whatever...
+       * vm/jit/intrp/dynamic-super.c (vm/builtin.h): Added.
+       (vm/jit/disass.h): Likewise.
+       (gen_inst): Fixed compiler warnings.
+       * vm/jit/intrp/java.vmg: Fixed compiler warnings with
+       stacktrace_create_stackframeinfo.
+       * threads/native/threads.h (threadobject): Changed type of _global_sp
+       to u1*.
+
+2006-05-25 12:22  twisti
+
+       * NEWS: Sorry.
+
+2006-05-25 12:21  twisti
+
+       * src/vm/vm.c (HEAP_MAXSIZE): Changed to 128MB.
+       (STACK_SIZE): Changed to 64kB.
+       (Xusage): Calculate default sizes.
+       
+       * NEWS: New stuff added.
+
+2006-05-25 11:29  twisti
+
+       * src/vm/jit/x86_64/md-emit.h (emit_movl_reg_reg): Added.
+
+2006-05-25 11:24  edwin
+
+       * configure.ac: Disable inlining and lsra by default.
+
+2006-05-24 14:11  twisti
+
+       * src/threads/native/threads.c (threads_startup_thread): Allocate Java
+       stack on Java heap instead of hardware stack.
+
+2006-05-24 14:08  twisti
+
+       * configure.ac: Added INTRP_CFLAGS.
+       * src/vm/jit/intrp/Makefile.am (CFLAGS): Set to INTRP_CFLAGS.
+
+2006-05-24 11:00  motse
+
+       src/vm/vm.c (vm_exit): only set JVMTI_PHASE_DEAD if a jvmti agent or
+       a jvmti environment is loaded.
+       src/native/jvmti/cacaodbg.c (jvmti_cacaodbgserver_quit): bugfix: set
+       dbgcom = NULL only if all environments have been disposed.
+       src/native/jvmti/jvmti.c (GetLoadedClasses): remove debug statement
+
+2006-05-23 19:52  motse
+
+       src/vm/classcache.c: export CLASSCACHE_LOCK/UNLOCK and
+       lock_hashtable_classcache
+       src/vm/classcache.h: idem
+       src/native/jvmti/jvmti.c (GetLoadedClasses) implemented (sv/motse)
+       (GetClassSignature) fixed
+
+2006-05-23 15:31  motse
+
+       src/vm/vm.c (vm_create): rename jvmti function calls
+       
+       src/cacao/cacao.c (main): rename jvmti function calls
+       
+       src/native/jni.c (GetEnv): rename jvmti function calls. jvmti version
+       changed to JVMTI_VERSION_INTERFACE_JVMTI
+       
+       src/native/vm/VMVirtualMachine.c (getAllLoadedClassesCount): (Samuel
+       Vinson) implemented.
+       (getAllLoadedClassesCount): jvmti Deallocate call added. (sv):
+       CallObjectMethod fix
+       (getAllClassMethods): (Samuel Vinson) implemented.
+       (getClassMethod): (Samuel Vinson) implemented.
+       
+       src/native/jvmti/jvmti.h: added JVMTI_VERSION interface and mask
+       
+       src/native/jvmti/cacaodbgserver.h: msg queue/shared mem related
+       things removed. gdb related defines added.
+       
+       src/native/jvmti/dbg.h: remove ptrace related things
+       
+       src/native/jvmti/cacaodbg.c change setsysbrkpt name to
+       jvmti_set_system_breakpoint, addbrkpt to jvmti_add_breakpoint,
+       allthreads to jvmti_get_all_threads
+       (jvmti_cacao_debug_init): new function where fork/exec of
+       cacaodbgserver takes place
+       (jvmti_set_system_breakpoint): added functionality for brkpt delete
+       and asm label for cacaodbgserver support
+       (jvmti_cacaodbgserver_quit): new function for killing cacaodbgserver
+       properly
+       (jvmti_cacao_generic_breakpointhandler): new function. This is the
+       entry point for every breakpointhandler and start for a new jvmti
+       event
+       (jvmti_cacao_debug_init): new function for starting up
+       cacaodbgserver process.
+       
+       src/native/jvmti/VMjdwp.c (jvmti_VMjdwpInit): function renamed
+       
+       src/native/jvmti/Makefile.am: delete dbg.c. (sv) add compile/install
+       support for cacaodbgserver.
+       
+       src/native/jvmti/cacaodbg.h: breakpoint counter added to struct
+       _brkpt. change setsysbrkpt name to jvmti_set_system_breakpoint,
+       addbrkpt to jvmti_add_breakpoint, allthreads to
+       jvmti_get_all_threads, fireEvent to jvmti_fireEvent, agentload to
+       jvmti_agentload agentunload to jvmti_agentunload, getcurrentthread to
+       jvmti_get_current_thread, set_jvmti_phase to jvmti_set_phase,
+       new_jvmtienv to jvmti_new_environment, VMjdwpinit to
+       jvmti_VMjdwpInit. added breakpoint table constants. removed global
+       jdwp, jvmti, suspend, transport, agentarg variables
+       
+       src/native/jvmti/jvmti.c all jvmti-environment function changed to
+       static functions. execcallback renamed to execute_callback. fireEvent
+       renamed to jvmti_fireEvent.
+       (execute_callback): add phase checks
+       (GetClassMethods): bugfix in copying jmethodIDs
+       (DisposeEnvironment): relocate work to jvmti_cacaodbgserver_quit
+       (jvmti_new_environment) : relocate forking new process to
+       jvmti_cacao_debug_init
+       (CHECK_ADD_CAPABILITY): bugfix in adding capabilities
+       (GetClassMethods): bugfix coping methodinfo pointers
+       (SetEventNotificationMode): setsysbrkpt calls added.
+       rename jvmti function names.
+       
+       src/native/jvmti/cacaodbgserver.c changed to support gdb insted of
+       using ptrace directly.
+       (getchildprocptrace): removed
+       (waitloop): removed
+       (startgdb): new function. start a new gdb session.
+       (getgdboutput): new helper function for getting gdb output.
+       (dataevaluate): new helper function for getting value for a given
+       expression
+       (commonbreakpointhandler): new function which handles SIGTRAPs and
+       gdb breakpoint hits.
+       (controlloop) : new function handle communication with gdb
+       (main): removed old code. added calls to startgdb and controlloop
+       
+       src/native/jvmti/dbg.c removed
+       
+       src/threads/native/threads.h: removed
+       threads_set_current_threadobject. added jvmti_get_threads_breakpoints
+       
+       src/threads/native/threads.c: (threads_startup_thread) add thread
+       start/end asm lables
+       (threads_set_current_threadobject): removed jvmti thread start
+       support.
+       (jvmti_get_threads_breakpoints) new function that gets addresses of
+       asm lables.
+       
+       src/threads/native/lock.h: added definition of lock_global_pool_lock
+       and lock_global_pool
+
+2006-05-23 08:51  twisti
+
+       * src/vm/jit/x86_64/codegen.c: Changed the code generator to produce
+       RISC-like code. These are way too much changes to name them.
+       (createnativestub): Bugfix in argument saving.
+       * src/vm/jit/x86_64/codegen.h: Likewise.
+       * src/vm/jit/x86_64/emit.c: Likewise.
+       * src/vm/jit/x86_64/md-emit.h: Likewise.
+
+2006-05-23 08:42  twisti
+
+       * src/vm/options.c (opt_heapmaxsize, opt_heapstartsize): Added.
+       * src/vm/options.h: Likewise.
+       
+       * src/vm/vm.c (version): Print heap and stack information.
+       (vm_create): Use global option variables.
+
+2006-05-23 08:25  twisti
+
+       * src/vm/jit/x86_64/emit.c (emit_movl_reg_reg): New function.
+       
+       * src/vm/jit/x86_64/codegen.c (ICMD_L2I): Only move the low
+       32-bit. Otherwise this may cause a bug with e.g. array accesses, as
+       the index registers are treated as 64-bit.
+       
+       * src/vm/jit/x86_64/codegen.h (gen_bound_check): Bugfix: only read
+       32-bit.
+       (M_IMOV): Added.
+       (M_ICMP_MEMBASE): Likewise.
+
+2006-05-22 16:14  twisti
+
+       * configure.ac: Added --with-classpath-includedir.
+
+2006-05-22 09:07  twisti
+
+       * NEWS: Some news.
+
+2006-05-22 09:06  twisti
+
+       * src/vm/vm.c (vm_abort): New method.
+       * src/vm/vm.h: Likewise.
+       * src/cacaoh/headers.c: Likewise.
+       
+       * src/toolbox/logging.c (log_vprint): Made non-static.
+       * src/toolbox/logging.h (log_vprint): Added.
+       
+       * src/threads/native/threads.c (threads_sem_init): Use vm_abort.
+       (threads_sem_wait): Likewise.
+       (threads_sem_post): Likewise.
+       (threads_current_time_is_earlier_than): Likewise.
+       (threads_init): Check for pthread_attr_init error.
+       (threads_start_thread): Check for errors of pthread calls. Set the
+       threads stack size.
+
+2006-05-18 14:33  edwin
+
+       * src/threads/native/lock.h, src/threads/native/lock.c: Tasuki lock
+       implementation (without lock deflation). This is a straight-forward
+       implementation that uses an extra word in java_objectheader for the
+       FLC (flat lock contention) bit.
+       
+       * src/vm/global.h (java_objectheader): Added field `flcword`.
+       
+       * src/threads/native/lock.h (Authors): Changed to myself, as there
+       is none of the old code remaining in this file.
+       
+       * src/vm/jit/powerpc/codegen.c, src/vm/jit/alpha/codegen.c,
+       src/vm/jit/mips/codegen.c, src/vm/jit/i386/codegen.c,
+       src/vm/jit/x86_64/codegen.c (codegen, createnativestub): Add the
+       FLC word when creating the fake object header for patcher
+       synchronization.
+
+2006-05-18 14:06  twisti
+
+       * src/vm/properties.c (properties_get): Search the list backwards to
+       get the newest entry.
+
+2006-05-18 12:50  twisti
+
+       * src/vm/vm.c (version): Print default and runtime classpath
+       variables.
+       (vm_create): Add a default java.endorsed.dirs property.
+
+2006-05-17 22:06  twisti
+
+       * configure.ac: Don't export BOOTCLASSPATH, that makes problems.
+
+2006-05-17 12:10  twisti
+
+       * src/vm/jit/powerpc/codegen.c (createnativestub): Fixed bug and
+       changed argument saving and restoring.
+       
+       * src/vm/jit/powerpc/asmpart.S (asm_vm_call_method): Partially
+       implemented Darwin bits. Still some bugs with testarguments.
+
+2006-05-16 13:08  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Bugfix: use REG_ITMP3 in
+       ICMD_L{DIV,REM} for function address. This fixes
+       gnu.testlet.java.math.BigInteger.divide.
+
+2006-05-16 01:49  edwin
+
+       * src/threads/native/lock.c: Fixed comment formatting.
+
+2006-05-15 23:37  edwin
+
+       * src/vm/jit/i386/machine-instr.h (compare_and_swap): Fixed comment.
+
+2006-05-15 23:31  twisti
+
+       * configure.ac: Export BOOTCLASSPATH for javac check.
+       * src/cacao/Makefile.am (cacao_SOURCES)Removed cacao.h.
+       * src/vm/jit/inline/Makefile.am (libinline_la_SOURCES): Added
+       inline_debug.inc.
+       * src/vm/jit/powerpc/Makefile.am (DIST_SUBDIRS): Added netbsd.
+
+2006-05-15 23:22  edwin
+
+       * src/vm/jit/inline/inline_debug.c: Renamed to
+       src/vm/jit/inline/inline_debug.inc.
+       
+       * src/vm/jit/inline/inline.c: #include changed to
+       src/vm/jit/inline/inline_debug.inc.
+       
+       * src/vm/resolve.c: Typo fixed.
+
+2006-05-15 21:48  edwin
+
+       * src/threads/native/lock.c (lock_record_remove_waiter): Made static.
+       (lock_monitor_wait): Likewise.
+
+2006-05-15 21:32  edwin
+
+       * src/threads/native/lock.h, src/threads/native/lock.c
+       (lock_does_thread_hold_lock): Renamed to
+       lock_is_held_by_current_thread
+       and removed thread argument, as reliable checking is only possible for
+       the current thread, anyway.
+       
+       * src/native/vm/VMThread.c (lock_does_thread_hold_lock): Changed to
+       lock_is_held_by_current_thread.
+       
+       * src/native/jvmti/jvmti.c (lock_does_thread_hold_lock): Changed to
+       lock_is_held_by_current_thread.
+
+2006-05-15 18:24  edwin
+
+       * configure.ac (src/threads/green/Makefile): Removed from
+       AC_CONFIG_FILES.
+
+2006-05-15 15:06  edwin
+
+       * src/threads/native/lock.h (lock_record_pool_header_t): Documented.
+       (lock_record_pool_t): Documented.
+       
+       * src/threads/native/lock.c: Minor whitespace cleanup.
+
+2006-05-15 14:40  twisti
+
+       * THIRDPARTY: Removed green threads stuff.
+
+2006-05-15 14:39  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_perform_threadswitch)
+       (asm_initialize_thread_stack, asm_switchstackandcall): Removed (2nd
+       part of green threads removal).
+       * src/vm/jit/mips/asmpart.S: Likewise.
+       * src/vm/jit/i386/asmpart.S: Likewise.
+       * src/vm/jit/x86_64/asmpart.S: Likewise.
+
+2006-05-15 14:24  twisti
+
+       * src/vm/hashtable.h,
+       src/vm/class.c,,
+       src/vm/suck.c,
+       src/vm/loader.c,
+       src/vm/builtin.c,
+       src/vm/string.c,
+       src/vm/suck.h,
+       src/vm/builtin.h,
+       src/vm/loader.h,
+       src/vm/finalizer.c,
+       src/vm/classcache.c,
+       src/vm/initialize.c,
+       src/vm/jit/powerpc/linux/md-os.c,
+       src/vm/jit/powerpc/netbsd/md-os.c,
+       src/vm/jit/powerpc/darwin/md-os.c,
+       src/vm/jit/powerpc/darwin/md-asm.h,
+       src/vm/jit/powerpc/codegen.c,
+       src/vm/jit/powerpc/asmpart.S,
+       src/vm/jit/codegen-common.h,
+       src/vm/jit/alpha/codegen.c,
+       src/vm/jit/alpha/linux/md-os.c,
+       src/vm/jit/alpha/asmpart.S,
+       src/vm/jit/alpha/freebsd/md-os.c,
+       src/vm/jit/stack.c,
+       src/vm/jit/code.c,
+       src/vm/jit/verify/typecheck.c,
+       src/vm/jit/mips/codegen.c,
+       src/vm/jit/mips/linux/md-os.c,
+       src/vm/jit/mips/asmpart.S,
+       src/vm/jit/mips/irix/md-os.c,
+       src/vm/jit/patcher.h,
+       src/vm/jit/inline/inline.c,
+       src/vm/jit/allocator/simplereg.c,
+       src/vm/jit/i386/codegen.c,
+       src/vm/jit/i386/linux/md-os.c,
+       src/vm/jit/i386/asmpart.S,
+       src/vm/jit/i386/freebsd/md-os.c,
+       src/vm/jit/parse.c,
+       src/vm/jit/intrp/intrp.h,
+       src/vm/jit/intrp/codegen.c,
+       src/vm/jit/intrp/engine.c,
+       src/vm/jit/intrp/asmpart.c,
+       src/vm/jit/intrp/dynamic-super.c,
+       src/vm/jit/intrp/java.vmg,
+       src/vm/jit/asmpart.h,
+       src/vm/jit/x86_64/md.c,
+       src/vm/jit/x86_64/codegen.c,
+       src/vm/jit/x86_64/asmpart.S,
+       src/vm/jit/profile/profile.c,
+       src/vm/jit/stacktrace.c,
+       src/vm/jit/jit.c,
+       src/vm/jit/stacktrace.h,
+       src/vm/jit/codegen-common.c,
+       src/vm/jit/jit.h,
+       src/vm/global.h,
+       src/vm/builtintable.inc,
+       src/vm/signal.c,
+       src/vm/exceptions.c,
+       src/vm/vm.c,
+       src/vm/linker.c,
+       src/vm/exceptions.h,
+       src/vm/utf8.c,
+       src/vm/hashtable.c,
+       src/cacao/cacao.c,
+       src/cacao/Makefile.am,
+       src/native/tools/Makefile.am,
+       src/native/tools/gennativetable.c,
+       src/native/jni.c,
+       src/native/vm/VMObject.c,
+       src/native/vm/VMThread.c,
+       src/native/jni.h,
+       src/native/native.c,
+       src/native/jvmti/cacaodbg.c,
+       src/native/jvmti/cacaodbg.h,
+       src/native/jvmti/jvmti.c,
+       src/toolbox/avl.c,
+       src/toolbox/logging.c,
+       src/toolbox/avl.h,
+       src/mm/boehm.h,
+       src/mm/memory.c,
+       src/mm/boehm.c,
+       src/threads/green,
+       src/threads/native/threads.h,
+       src/threads/native/threads.c,
+       src/threads/Makefile.am,
+       src/cacaoh/cacaoh.c,
+       src/cacaoh/headers.h,
+       src/cacaoh/Makefile.am,
+       src/cacaoh/headers.c,
+       configure.ac: Green threads removal, USE_THREADS renamed to
+       ENABLE_THREADS, NATIVE_THREADS define removed.
+
+2006-05-15 13:13  twisti
+
+       * src/vm/jit/asmpart.h (calljava_xhandler2): Not required anymore.
+
+2006-05-15 12:23  twisti
+
+       * src/threads/native/threads.c (sem_init, sem_post, sem_wait)
+       (sem_destroy): Added a pthread implementation (taken from Boehm-GC)
+       for Darwin, as Darwin does not have an implementation for these
+       functions.
+       * src/threads/native/threads.h (sem_t): Added structure for Darwin.
+       * src/threads/native/lock.h (semaphore.h): Removed.
+
+2006-05-15 12:14  edwin
+
+       * src/threads/native/lock.c (THIN_UNLOCKED): Abstracted out the thin
+       unlocked state so we can toggle the shape bit meaning if we want.
+       (lock_pre_compute_thinlock): Likewise.
+       (lock_get_initial_lock_word): Likewise.
+       (lock_monitor_enter): Made void. Might save an instruction here and
+       there.
+       (lock_monitor_wait): lock_monitor_enter no longer returns the lock
+       record. Assert that it is still the same fat lock (it must be).
+
+2006-05-15 11:34  edwin
+
+       * src/threads/native/lock.c: Added reference to thin lock paper and
+       explained the lockword format.
+
+2006-05-14 22:41  edwin
+
+       * src/threads/native/lock.c: Thin lock implementation.
+       
+       * src/threads/native/threads.h (threadobject): Added thinlock field.
+       (Authors, Changes): Moved myself to Authors because of rewrite.
+       
+       * src/threads/native/threads.c (threads_preinit): Init index and
+       thinlock field of mainthreadobj here. (Needed early.)
+       (threads_table_add): Init pre-computed thinlock field here.
+       
+       * src/threads/native/lock.h (lock_pre_compute_thinlock): New function.
+
+2006-05-14 22:36  edwin
+
+       * src/threads/native/lock.c (lock_record_free_pools): Assert that
+       this function is not called. It does not match the new way lock
+       records are handled. We must find another way to free them.
+       
+       * src/threads/native/threads.c (threads_init): Do not call
+       lock_record_free_pools.
+       (threads_table_add): Removed debug code.
+       (threads_startup_thread): Likewise.
+
+2006-05-14 15:34  edwin
+
+       * src/threads/native/threads.c (threads_table_init): New function.
+       (threads_table_add): New function.
+       (threads_table_remove): New function.
+       (threads_table_dump): New function.
+       (threads_table): New global variable.
+       (threads_preinit): Call threads_table_init.
+       Call threads_table_add to add main thread.
+       (threads_init_threadobject): Initialize index to 0.
+       (threads_startup_thread): Call threads_table_add to add the thread
+       to the table, and threads_table_remove to remove if afterwards.
+
+2006-05-14 14:02  edwin
+
+       * src/threads/native/threads.h, src/threads/native/threads.c
+       (nativethread): Removed. This struct is now inlined in threadobject.
+       (threads_table_entry_t): New type.
+       (threads_table_t): New type.
+       Some further cleanup.
+       
+       * src/vm/builtin.h (THREADINFO): Becomes THREADOBJECT.
+       
+       * src/vm/jit/intrp/intrp.h (THREADINFO): Becomes THREADOBJECT.
+       
+       * src/vm/jit/stacktrace.c (_stackframeinfo): This is now directly
+       a field of threadobject.
+       
+       * src/vm/jit/stacktrace.h (THREADINFO): Becomes THREADOBJECT.
+       
+       * src/native/jni.h (THREADINFO): Becomes THREADOBJECT.
+       
+       * src/native/jvmti/jvmti.c (isSleeping): Renamed to sleeping.
+
+2006-05-14 12:22  edwin
+
+       * src/threads/native/lock.c, src/threads/native/lock.h: Rewritten
+       as a very basic fat lock implementation.
+       
+       * src/vm/jit/powerpc64/arch.h (USE_MD_THREAD_STUFF): Renamed to
+       USE_FAKE_ATOMIC_INSTRUCTIONS.
+       
+       * src/vm/jit/intrp/engine.c (USE_MD_THREAD_STUFF): Renamed to
+       USE_FAKE_ATOMIC_INSTRUCTIONS.
+       
+       * src/threads/native/threads.c (USE_MD_THREAD_STUFF): Renamed to
+       USE_FAKE_ATOMIC_INSTRUCTIONS.
+       (ee.lrpool): Renamed to ee.lockrecordpools.
+
+2006-05-14 12:15  edwin
+
+       * src/threads/native/threads.c (threads_calc_absolute_time): Optimize
+       waiting for the maximum 64-bit number of milliseconds to an unbounded
+       wait. This also avoids an overflow problem we seem to have with timed
+       waits.
+
+2006-05-13 23:25  edwin
+
+       * src/threads/native/lock.c (lock_init_thread_lock_record_pool):
+       Renamed to lock_init_execution_env. Cleanup and Comments.
+       
+       * src/threads/native/lock.h (lock_init_thread_lock_record_pool):
+       Renamed to lock_init_execution_env.
+       
+       * src/threads/native/threads.c (lock_init_thread_lock_record_pool):
+       Renamed to lock_init_execution_env.
+
+2006-05-13 23:10  edwin
+
+       * src/threads/native/threads.c, src/threads/native/threads.c: Further
+       cleanup. Still no functional changes.
+       Renamed external symbols are listed below.
+       
+       * src/threads/native/critical.h, src/threads/native/critical.c:
+       Cleanup.
+       
+       * src/threads/native/lock.h: Cleanup.
+       
+       * src/vm/jit/profile/profile.c (thread_sleep): Renamed to
+       threads_sleep.
+       
+       * src/vm/vm.c (joinAllThreads): Renamed to threads_join_all_threads.
+       
+       * src/native/jni.c (thread_getself): Renamed to
+       threads_get_current_threadobject.
+       
+       * src/native/vm/VMThread.c (thread): Typedef `thread` has been
+       removed.
+       (interruptThread): Renamed to threads_interrupt_thread.
+       (isInterruptedThread): Renamed to threads_thread_has_been_interrupted.
+       (setPriorityThread): Renamed to threads_java_lang_Thread_set_priority.
+       (yieldThread): Renamed to threads_yield.
+       (interruptedThread): Renamed to
+       threads_check_if_interrupted_and_reset.
+       
+       * src/native/jvmti/cacaodbg.c (thread_getself): Renamed to
+       threads_get_current_threadobject.
+       (setthreadobject): Renamed to threads_set_current_threadobject.
+       
+       * src/native/jvmti/jvmti.c (setthreadobject): Renamed to
+       threads_set_current_threadobject.
+       
+       * src/threads/green/threads.h (yieldThread): Renamed to threads_yield.
+       (setPriorityThread): Renamed to threads_java_lang_Thread_set_priority.
+       
+       * src/threads/green/threads.c (yieldThread): Renamed to threads_yield.
+       (setPriorityThread): Renamed to threads_java_lang_Thread_set_priority.
+
+2006-05-12 16:49  edwin
+
+       * src/threads/native/threads.c: The Big Thread Cleanup. No functional
+       changes,
+       only code motion, renaming, documenting. This file has been split into
+       threads.c, lock.c, and critical.c.
+       Externally used symbols that were renamed are listed below. Static
+       symbol
+       renames are not listed.
+       
+       * src/threads/native/threads.h: The Big Thread Cleanup. No functional
+       changes,
+       only code motion, renaming, documenting. This file has been split into
+       threads.h, lock.h, and critical.h.
+       
+       * src/cacaoh/cacaoh.c (initLocks): Renamed to lock_init (green
+       threads).
+       
+       * src/cacaoh/headers.c (threadcritnode): Renamed to
+       critical_section_node_t.
+       
+       * src/mm/memory.c (initObjectLock): Renamed to lock_init_object_lock.
+       
+       * src/native/jvmti/jvmti.c (lockRecordPool): Renamed to
+       lock_record_pool_t.
+       (pool_lock): Renamed to lock_global_pool_lock.
+       (global_pool): Renamed to lock_global_pool.
+       (ownerThread): Renamed to owner.
+       (threadHoldsLock): Renamed to lock_does_thread_hold_lock.
+       (monitorExit): Renamed to lock_monitor_exit.
+       (wait_cond_for_object): Renamed to lock_wait_for_object.
+       (signal_cond_for_object): Renamed to lock_notify_object.
+       (broadcast_cond_for_object): Renamed to lock_notify_all_object.
+       
+       * src/native/tools/gennativetable.c (initLocks): Renamed to lock_init
+       (green threads).
+       
+       * src/native/vm/VMObject.c (initObjectLock): Renamed to
+       lock_init_object_lock.
+       (wait_cond_for_object): Renamed to lock_wait_for_object.
+       (signal_cond_for_object): Renamed to lock_notify_object.
+       (broadcast_cond_for_object): Renamed to lock_notify_all_object.
+       
+       * src/native/vm/VMThread.c (threadHoldsLock): Renamed to
+       lock_does_thread_hold_lock.
+       
+       * src/threads/green/locks.c, src/threads/green/locks.h
+       (initLocks): Renamed to lock_init.
+       (wait_cond_for_object): Renamed to lock_wait_for_object.
+       (signal_cond_for_object): Renamed to lock_notify_object.
+       (broadcast_cond_for_object): Renamed to lock_notify_all_object.
+       (internal_broadcast_cond_for_object): Renamed to
+       internal_lock_notify_all_object.
+       
+       * src/threads/green/threads.c (initLocks): Renamed to lock_init.
+       (internal_broadcast_cond_for_object): Renamed to
+       internal_lock_notify_all_object.
+       
+       * src/threads/native/Makefile.am (lock.c, lock.h): Added new files.
+       (critical.c, critical.h): Added new files.
+       (Changes): Added my name.
+       
+       * src/threads/native/critical.c: New file.
+       
+       * src/threads/native/critical.h: New file.
+       
+       * src/threads/native/lock.c: New file.
+       
+       * src/threads/native/lock.h: New file.
+       
+       * src/toolbox/avl.c (initObjectLock): Renamed to
+       lock_init_object_lock.
+       
+       * src/vm/builtin.c (initObjectLock): Renamed to lock_init_object_lock.
+       (monitorEnter): Renamed to lock_monitor_enter.
+       (monitorExit): Renamed to lock_monitor_exit.
+       
+       * src/vm/class.c (initObjectLock): Renamed to lock_init_object_lock.
+       
+       * src/vm/classcache.c (initObjectLock): Likewise.
+       
+       * src/vm/finalizer.c (initObjectLock): Likewise.
+       (wait_cond_for_object): Renamed to lock_wait_for_object.
+       (signal_cond_for_object): Renamed to lock_notify_object.
+       
+       * src/vm/global.h (monitorLockRecord): Renamed to lock_record_t.
+       
+       * src/vm/hashtable.c (initObjectLock): Renamed to
+       lock_init_object_lock.
+       
+       * src/vm/jit/asmpart.h: Added #include "threads/native/critical.h"
+       (threadcritnode): Renamed to critical_section_node_t.
+       
+       * src/vm/jit/code.c: Comment changed.
+       
+       * src/vm/jit/codegen-common.c, src/vm/jit/codegen-common.h
+       (threadcritnode): Renamed to critical_section_node_t.
+       (threadcritnodetemp): Renamed to codegen_critical_section_t.
+       
+       * src/vm/jit/alpha/codegen.c (get_dummyLR): Renamed to
+       lock_get_initial_lock_word.
+       
+       * src/vm/jit/alpha/freebsd/md-os.c (thread_checkcritical): Renamed to
+       critical_find_restart_point.
+       * src/vm/jit/alpha/linux/md-os.c (thread_checkcritical): Renamed to
+       critical_find_restart_point.
+       
+       * src/vm/jit/i386/codegen.c (get_dummyLR): Renamed to
+       lock_get_initial_lock_word.
+       
+       * src/vm/jit/i386/freebsd/md-os.c (thread_checkcritical): Renamed to
+       critical_find_restart_point.
+       * src/vm/jit/i386/linux/md-os.c (thread_checkcritical): Renamed to
+       critical_find_restart_point.
+       
+       * src/vm/jit/intrp/dynamic-super.c (initObjectLock): Renamed to
+       lock_init_object_lock.
+       
+       * src/vm/jit/mips/codegen.c (get_dummyLR): Renamed to
+       lock_get_initial_lock_word.
+       
+       * src/vm/jit/mips/irix/md-os.c (thread_checkcritical): Renamed to
+       critical_find_restart_point.
+       * src/vm/jit/mips/linux/md-os.c (thread_checkcritical): Renamed to
+       critical_find_restart_point.
+       
+       * src/vm/jit/powerpc/codegen.c (get_dummyLR): Renamed to
+       lock_get_initial_lock_word.
+       
+       * src/vm/jit/profile/profile.c (wait_cond_for_object): Renamed to
+       lock_wait_for_object.
+       
+       * src/vm/jit/stack.c (initObjectLock): Renamed to
+       lock_init_object_lock.
+       
+       * src/vm/jit/x86_64/codegen.c (get_dummyLR): Renamed to
+       lock_get_initial_lock_word.
+       
+       * src/vm/jit/x86_64/md.c (thread_checkcritical): Renamed to
+       critical_find_restart_point.
+       
+       * src/vm/loader.c (initObjectLock): Renamed to
+       lock_init_object_lock.
+       (initLocks): Renamed to lock_init (green threads).
+       
+       * src/vm/string.c (initObjectLock): Renamed to
+       lock_init_object_lock.
+       
+       * src/vm/vm.c (initLocks): Renamed to lock_init (green threads).
+
+2006-05-12 14:32  twisti
+
+       * src/vm/jit/emit.h: Replaced __POWERPC__ #ifdef with
+       SIZEOF_VOID_P == 4.
+
+2006-05-11 14:02  twisti
+
+       * src/native/vm/VMClassLoader.c (nativeGetResources): Bugfix: utf_new
+       should be utfname.
+
+2006-05-11 13:43  twisti
+
+       * src/vm/jit/mips/codegen.c: Changed mcodeptr from u4* to u1*.
+       * src/vm/jit/mips/codegen.h: Likewise.
+
+2006-05-11 13:09  twisti
+
+       * src/vm/jit/mips/asmpart.S (asm_call_jit_compiler): Use new
+       jit_asm_compile method.
+
+2006-05-11 12:48  edwin
+
+       * src/threads/native/threads.c (monitorExit): Added an assert to
+       check that no existing waiter is overwritten by the suspicious
+       assignment.
+
+2006-05-11 12:36  edwin
+
+       * src/lib/vm/reference/java/lang/VMClassLoader.java
+       (getBootPackages): Merged patch to VMClassLoader.java of the
+       reference implementation. getBootPackages now works in the
+       presence of endorsed jars.
+
+2006-05-11 12:18  twisti
+
+       * src/native/jni.c (DeleteGlobalRef): Bugfix: handle the removal of
+       the first entry in the chain properly.
+
+2006-05-11 09:18  twisti
+
+       * src/vm/hashtable.c (threads/native/threads.h): Added.
+       (hashtable_create): Initialize lock object.
+       (hashtable_resize): New function.
+       (hashtable_free): Likewise.
+       * src/vm/hashtable.h (hashtable): Added header pointer.
+       (hashtable_resize): Added.
+       (hashtable_free): Likewise.
+       
+       * src/vm/vm.c (vm_create): Call jni_init before threads_init.
+       
+       * src/vm/utf8.c (lock_hashtable_utf): Removed.
+       (utf8_init): Allocate hashtable on heap.
+       (utf_new): Use new hashtable stuff.
+       
+       * src/native/native.c (native_init): Use new hashtable stuff.
+       (native_hashtable_library_add): Likewise.
+       
+       * src/native/jni.c (jni_init): Removed Java IdentityHashMap stuff and
+       create a hashtable.
+       (NewGlobalRef): Implemented with native hashtable.
+       (DeleteGlobalRef): Likewise.
+       
+       * src/native/jni.h (hashtable_global_ref_entry): Added.
+       
+       * src/vm/string.c (literalstring_u2): Removed check for
+       class_java_lang_String, we have an assert there.
+
+2006-05-10 16:14  twisti
+
+       * src/vm/jit/alpha/codegen.c: Changed mcodeptr from u4* to u1*.
+       * src/vm/jit/alpha/codegen.h: Likewise.
+
+2006-05-10 15:51  twisti
+
+       * src/vm/jit/codegen-common.h (codegendata): Use an u1* mcodeptr for
+       all architectures. This is necessary for the interpreter.
+       * src/vm/jit/codegen-common.c (codegen_setup): Removed #ifdef.
+       (codegen_increase): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c: Changed mcodeptr from u4* to u1*.
+       * src/vm/jit/powerpc/codegen.h: Likewise.
+
+2006-05-10 15:09  edwin
+
+       * src/vm/jit/inline/inline.c (inline_write_exception_handlers):
+       Correct cast for abused instruction->target.
+
+2006-05-10 13:12  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_call_jit_compiler): Use new
+       jit_asm_compile method.
+
+2006-05-08 11:09  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Added src/scripts/keytool.
+       * src/scripts/Makefile.am (bin_SCRIPTS): Added keytool.
+       * src/scripts/.cvsignore: Likewise.
+       * src/scripts/keytool.in: New file.
+
+2006-05-08 11:05  twisti
+
+       * src/vm/jit/powerpc/asmpart.S (asm_vm_call_method): Handle argument
+       passing properly for SysV ABIs. Darwin is left to do.
+
+2006-05-08 11:03  twisti
+
+       * tests/regression/native/testarguments.java: Added new test.
+       * tests/regression/native/testarguments.c: Likewise.
+       * tests/regression/native/testarguments.output: Likewise.
+
+2006-05-06 18:29  motse
+
+       * src/vm/vm.c (vm_create): make agentlib/agentpath work
+       * src/cacao/cacao.c (main): changes for jvmti/jdwp startup due to
+       removal of jdwp process
+       * src/native/jni.c (JNI_CreateJavaVM): change order vm_create and
+       initialization of _Jv_jvm due to jvmti agent support.
+       * src/native/vm/VMVirtualMachine.c: change name of jvmtienv and
+       bugfixes of Samuel Vinson
+       * src/native/include/Makefile.am: add VMMethod.h
+       * src/native/jvmti/Makefile.am: removal of cacaodbgserver
+       * src/native/jvmti/jvmti.c: remove jdwp process and convert to thread
+       * src/native/jvmti/cacaodbg.h: idem
+       * src/native/jvmti/jvmti.h: idem
+       * src/native/jvmti/dbg.h: idem
+       * src/native/jvmti/cacaodbg.c: idem
+       * src/native/jvmti/dbg.c: idem
+       * src/native/jvmti/cacaodbgserver.c: change to a autonomous program
+       and removal of jdwp thread.
+       * src/native/jvmti/VMjdwp.c (VMInit): different invocation due to
+       removal of jdwp thread
+       * src/native/jvmti/VMjdwp.h: export jvmti environment and event
+       callbacks.
+       * src/native/vm/VMMethod.c: initial/dummy implementation of VMMetod
+       native method
+
+2006-05-06 14:13  edwin
+
+       * src/native/vm/VMRuntime.c
+       (Java_java_lang_VMRuntime_mapLibraryName): Use new utf_ functions.
+       (Changes): Added my name.
+       (vim boilerplate): Added.
+
+2006-05-06 10:10  edwin
+
+       * src/native/vm/VMClassLoader.c
+       (Java_java_lang_VMClassLoader_nativeGetResources): Really create a
+       new utf string to search for if the trailing .class is stripped.
+
+2006-05-06 00:16  edwin
+
+       * src/vm/classcache.c (classcache_merge_class_entries):
+       Use utf_cat_classname.
+       (classcache_store): Likewise.
+       (classcache_store_defined): Likewise.
+
+2006-05-06 00:11  edwin
+
+       * src/native/vm/VMClassLoader.c
+       (Java_java_lang_VMClassLoader_nativeGetResources): Fixed and cleaned
+       up. Skip leading '/'. Remove '.class' only at end. Free char buffer.
+       Use correct utf_ functions. Check for exceptions.
+       
+       * src/vm/zip.c (zip_find): Documented.
+
+2006-05-05 19:31  edwin
+
+       * src/vm/utf8.h: Moved #include "config.h" up front.
+
+2006-05-05 19:22  edwin
+
+       * src/toolbox/logging.c (Changes): Added my name.
+       (vim boilerplate): Added.
+
+2006-05-05 19:21  edwin
+
+       * src/toolbox/logging.c (log_message_utf): Use new utf_ functions.
+       (log_message_class_message_class): Likewise.
+       (log_message_method): Likewise.
+
+2006-05-05 19:13  edwin
+
+       * src/vm/builtin.c (builtin_throw_exception): Use new utf_ functions.
+       (builtin_trace_exception): Likewise.
+       (builtin_trace_args): Likewise.
+       (builtin_displaymethodstop): Likewise.
+
+2006-05-05 18:58  edwin
+
+       * src/vm/suck.c (suck_start): Use new utf_ functions.
+
+2006-05-05 18:49  edwin
+
+       * src/vm/utf8.h, src/vm/utf8.c: Fixed header.
+
+2006-05-05 18:14  edwin
+
+       * src/vm/loader.c (load_class_from_classbuffer): Use new
+       utf_ functions.
+
+2006-05-05 18:08  edwin
+
+       * src/vm/resolve.c (resolve_class_from_name): Use new utf_ functions.
+       (resolve_subtype_check): Likewise.
+       (resolve_field_verifier_checks): Likewise.
+       (resolve_method_verifier_checks): Likewise.
+
+2006-05-05 17:34  edwin
+
+       * src/vm/utf8.h, src/vm/utf8.c: The Big utf_* Renaming.
+       The purpose of this change is to give the utf_* functions names
+       that make clear what these functions _really_ have been doing
+       all the time. I'm sure most callers would be surprised if they
+       knew. All call sites should be reviewed!
+       (utf_display): Renamed to utf_display_printable_ascii.
+       (utf_display_classname): Renamed to
+       utf_display_printable_ascii_classname.
+       (utf_sprint): Renamed to utf_sprint_convert_to_latin1.
+       (utf_sprint_classname): Renamed to
+       utf_sprint_convert_to_latin1_classname.
+       (utf_strcat): Renamed to utf_strcat_convert_to_latin1.
+       (utf_strcat_classname): Renamed to
+       utf_strcat_convert_to_latin1_classname.
+       (utf_fprint): Renamed to utf_fprint_printable_ascii.
+       (utf_fprint_classname): Renamed to
+       utf_fprint_printable_ascii_classname.
+       
+       * src/vm/class.c, src/vm/suck.c, src/vm/loader.c, src/vm/builtin.c,
+       src/vm/descriptor.c, src/vm/resolve.c, src/vm/method.c,
+       src/vm/classcache.c, src/vm/jit/stack.c, src/vm/jit/verify/typeinfo.c,
+       src/vm/jit/allocator/lsra.c, src/vm/jit/intrp/disass.c,
+       src/vm/jit/stacktrace.c, src/vm/jit/codegen-common.c,
+       src/vm/exceptions.c, src/vm/field.c, src/cacao/cacao.c,
+       src/native/tools/gennativetable.c, src/native/vm/VMClassLoader.c,
+       src/native/vm/VMRuntime.c, src/native/native.c, src/toolbox/logging.c,
+       src/threads/green/threads.c, src/threads/native/threads.c,
+       src/cacaoh/headers.c: The Big utf_ Renaming. All call sites of the
+       renamed functions should be reviewed! Calls outside debugging code
+       are probably incorrect and should use one of the new utf_ functions
+       that copies byte-for-byte.
+
+2006-05-05 17:09  edwin
+
+       * src/vm/exceptions.c (new_exception): Documented.
+       (new_exception_message): Documented. Use new_exception_javastring.
+       (new_exception_throwable): Documented.
+       (new_exception_utfmessage): Documented. Use new_exception_javastring.
+       (new_exception_javastring): Documented.
+       (new_exception_int): Documented.
+       (new_classformaterror): Documented. Use new byte-for-byte UTF-8
+       functions.
+       (exceptions_throw_classformaterror): Documented.
+       (new_classnotfoundexception): Documented. Check return value of
+       javastring_new.
+       (new_noclassdeffounderror): Documented. Check return value of
+       javastring_new.
+       (new_internalerror): Documented.
+       (exceptions_new_linkageerror): Documented. Use new byte-for-byte UTF-8
+       functions.
+       (exceptions_new_nosuchmethoderror): Documented. Use new byte-for-byte
+       UTF-8
+       functions.
+       (exceptions_throw_nosuchmethoderror): Documented.
+       (new_unsupportedclassversionerror): Documented. Use new byte-for-byte
+       UTF-8
+       functions.
+       (new_verifyerror): Likewise.
+       (exceptions_throw_verifyerror_for_stack): Likewise.
+       (exceptions_handle_exception): Documented.
+
+2006-05-05 16:51  edwin
+
+       * src/vm/utf8.c, src/vm/utf8.h (utf_copy): New function.
+       (utf_cat): New function.
+       (utf_copy_classname): New function.
+       (utf_cat_classname): New function.
+       These new functions copy the UTF-8 content byte-for-byte and thus
+       do not lead to losses by conversion like the utf_strcpy, etc.
+       functions.
+
+2006-05-05 15:26  edwin
+
+       * src/vm/string.c, src/vm/stringlocal.h, src/vm/utf8.c, src/vm/utf8.h
+       (Changes): Added my name.
+       (vim boilerplate): Added.
+
+2006-05-05 15:14  edwin
+
+       * src/vm/string.c, src/vm/stringlocal.h
+       (javastring_new_from_utf_buffer): New function.
+       (javastring_new_from_utf_string): New function.
+       
+       * src/vm/utf8.c (utf_get_number_of_u2s_for_buffer): New function.
+       (utf_get_number_of_u2s): Documented that this function may throw
+       exception.s.
+       
+       * src/vm/utf8.h (utf_get_number_of_u2s_for_buffer): New function.
+
+2006-05-05 14:36  edwin
+
+       * src/vm/string.c, src/vm/stringlocal.h (java_string_new_char):
+       Renamed to `java_string_new_from_ascii` to make more clear what this
+       function does. It is wrong to use this function to create a
+       java.lang.String from a buffer of UTF-8 characters!
+       
+       * src/vm/finalizer.c (finalizer_start_thread): Legitimate use.
+       * src/vm/jit/profile/profile.c (profile_start_thread): Likewise.
+       
+       * src/vm/exceptions.c
+       (exceptions_new_linkageerror): Definitely INCORRECT use.
+       (exceptions_new_nosuchmethoderror): Likewise.
+       * src/native/vm/VMRuntime.c
+       (Java_java_lang_VMRuntime_mapLibraryName): Likewise.
+       
+       * src/vm/exceptions.c (new_exception_message): Probably INCORRECT use.
+       * src/native/jni.c (DefineClass): Likewise.
+       (ThrowNew): Likewise.
+       * src/native/vm/VMClassLoader.c
+       (Java_java_lang_VMClassLoader_nativeGetResources): Likewise.
+       
+       * src/vm/properties.c (properties_system_add): Needs review.
+       * src/cacao/cacao.c (getmainclassnamefromjar): Likewise.
+       * src/native/jvmti/cacaodbg.c (setup_jdwp_thread): Likewise.
+       * src/native/jvmti/jvmti.c (CreateRawMonitor, GetSystemProperty)
+       (SetSystemProperty): Likewise.
+
+2006-05-05 13:56  edwin
+
+       * src/vm/utf8.c, src/vm/utf8.h (utf_bytes): New function.
+       Use this function to query the number of octets of a utf string.
+       This function will become the correct replacement for the old
+       utf_strlen in most places. The calling code will have to be
+       reviewed for that, however, and it will also require fixing
+       utf_strcat, utf_sprint, and so on, to do the right thing.
+
+2006-05-05 13:48  edwin
+
+       * src/vm/utf8.c, src/vm/utf8.h (utf_strlen): Renamed to
+       `utf_get_number_of_u2s` in order to reflect what this function
+       _really_ does. A long name was chosen intentionally to make it obvious
+       that this is _not_ the function to use as the normal strlen. Most
+       current uses of this function are invalid, as it must only be used
+       when the utf string will be **converted to UTF-16**.
+       
+       * src/vm/suck.c (suck_start): Renamed utf_strlen. RECONSIDER USE!
+       * src/vm/loader.c (load_class_from_classbuffer): Likewise.
+       * src/vm/builtin.c (various functions): Likewise.
+       * src/vm/resolve.c (various functions): Likewise.
+       * src/vm/exceptions.c (various functions): Likewise.
+       * src/native/vm/VMClassLoader.c
+       (Java_java_lang_VMClassLoader_nativeGetResources): Likewise.
+       * src/native/vm/VMRuntime.c
+       (Java_java_lang_VMRuntime_mapLibraryName): Likewise.
+       * src/native/native.c (native_resolve_function): Likewise.
+       * src/toolbox/logging.c (various functions): Likewise.
+       * src/cacaoh/headers.c (various functions): Likewise.
+       
+       * src/vm/string.c (javastring_new): Legitimate use.
+       (javastring_new_slash_to_dot): Likewise.
+       (literalstring_new) Likewise.
+
+2006-05-03 23:04  edwin
+
+       * src/threads/native/threads.c (wakeWaiters): Renamed
+       to threads_wake_waiters. Documented.
+
+2006-05-03 22:58  edwin
+
+       * src/threads/native/threads.c (handleWaiter): Renamed arguments.
+       Commented.
+       (monitorEnter): Documented.
+       (notifyOneOrAll): Cleaned up.
+
+2006-05-03 22:46  edwin
+
+       * src/threads/native/threads.c (setPriority): Renamed to
+       threads_set_thread_priority.
+       (removeFromWaiters): Renamed to threads_remove_waiter.
+       (timespec_less): Renamed to threads_timespec_earlier.
+       (timeIsEarlier): Renamed to threads_current_time_is_earlier_than.
+       (waitWithTimeout): Renamed to threads_wait_with_timeout. Removed
+       unused
+       argument `lr`.
+       (thread_sleep): There is no need to create a lock record for
+       calling threads_wait_with_timeout, as that does not use the
+       lock record anyway (formerly waitWithTimeout).
+       (various function): Lots of documentation and cleanup.
+
+2006-05-02 16:16  twisti
+
+       * src/vm/jit/stack.c (stack_analyse): Check for val.a == NULL on
+       SUPPORT_CONST_STORE_ZERO_ONLY architectures for ICMD_PUTSTATIC and
+       ICMD_PUTFIELD.
+
+2006-05-01 23:14  edwin
+
+       * src/threads/native/threads.c: Cleanup and documentation.
+
+2006-05-01 21:40  edwin
+
+       * src/threads/native/threads.h (threads_sem_init): New function.
+       (threads_sem_post): New function.
+       
+       * src/threads/native/threads.c (threads_sem_init): New function.
+       (threads_sem_wait): Added assertion.
+       (threads_sem_post): New function.
+       (various function): Use threads_sem_init and threads_sem_post.
+       
+       * src/native/jvmti/cacaodbg.c (getworkingdatalock): Use
+       threads_sem_post.
+       (cacaodbgfork): Use threads_sem_init.
+       
+       * src/native/jvmti/cacaodbgserver.c (contchild, waitloop).
+       Use threads_sem_post.
+
+2006-05-01 12:40  edwin
+
+       * src/threads/native/threads.c (threads_sem_wait): New function.
+       This function performs a non-interruptible sem_wait. This fixes
+       segfaults and deadlocks that resulted from sem_wait calls returning
+       prematurely.
+       (cast_stopworld): Use threads_sem_wait.
+       (threads_startup_thread): Likewise.
+       (threads_start_thread): Likewise.
+       (queueOnLockRecord): Likewise.
+       
+       * src/threads/native/threads.h (threads_sem_wait): New function.
+       
+       * src/native/jvmti/cacaodbg.c (msgqsendevent): Use threads_sem_wait
+       instead of sem_wait.
+       
+       * src/native/jvmti/cacaodbgserver.c (contchild, waitloop): Use
+       threads_sem_wait instead of sem_wait.
+
+2006-04-30 17:18  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Added src/scripts/jarsigner.
+       * src/scripts/Makefile.am (bin_SCRIPTS): Added jarsigner.
+       * src/scripts/.cvsignore: Likewise.
+       * src/scripts/jarsigner.in: New file.
+
+2006-04-30 16:17  edwin
+
+       * src/vm/resolve.c (resolve_method_verifier_checks)
+       (constrain_unresolved_method): Use ICMD_ACONST_CLASSREF_OR_CLASSINFO.
+       
+       * src/vm/jit/powerpc/codegen.c, src/vm/jit/alpha/codegen.c,
+       src/vm/jit/mips/codegen.c, src/vm/jit/i386/codegen.c,
+       src/vm/jit/intrp/codegen.c, src/vm/jit/x86_64/codegen.c
+       (codegen): Changes for new ACONST format.
+       
+       * src/vm/jit/stack.c (stack_analyse): Changes for new ACONST format.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Use the new
+       macros.
+       (verify_builtin, verify_multianewarray, verify_basic_block): Changes
+       for
+       new ACONST format.
+       
+       * src/vm/jit/verify/typeinfo.h (TYPEINFO_INIT_JAVA_LANG_CLASS): Take
+       a classref_or_classinfo as argument.
+       
+       * src/vm/jit/verify/typeinfo.c (typeinfo_init_class): Typo fixed.
+       (typeinfo_print): Changes for new ACONST format.
+       
+       * src/vm/jit/inline/inline.c (inline_write_exception_handlers):
+       Changes for new ACONST format.
+       
+       * src/vm/jit/parse.c (parse): Changes for new ACONST format.
+       
+       * src/vm/jit/parse.h (LOADCONST_A_CLASS): Removed.
+       (LOADCONST_A_BUILTIN): Changes for new ACONST format.
+       
+       * src/vm/jit/jit.h (INSTRUCTION_IS_RESOLVED,
+       INSTRUCTION_IS_UNRESOLVED):
+       Only check least significant bit of target (provisory flag).
+       (ICMD_ACONST_IS_CLASS, ICMD_ACONST_CLASSREF_OR_CLASSINFO)
+       (ICMD_ACONST_RESOLVED_CLASSINFO, ICMD_ACONST_UNRESOLVED_CLASSREF):
+       New macros.
+
+2006-04-30 15:58  edwin
+
+       * src/vm/jit/loop/tracing.c (tracing): Adapted to new format of
+       INVOKE
+       instructions.
+       * src/vm/jit/allocator/lsra.c (lsra_scan_registers_canditates)
+       (_test_lifetimes): Likewise.
+
+2006-04-28 12:25  edwin
+
+       * src/vm/jit/parse.c (parse): Added a comment.
+
+2006-04-28 12:24  twisti
+
+       * src/vm/jit/stack.c (stack_analyse): We need to split AASTORECONST
+       and PUT{STATIC,FIELD}CONST as they can store different values. I hope
+       the checks are correct now (until we get our new instruction
+       format). Edwin: Hint! Hint! Hint!
+       (stack_show_icmd): Again a smaller change.
+
+2006-04-28 11:50  twisti
+
+       * src/vm/jit/stack.c (stack_analyse): Check for
+       {AASTORE,PUTSTATIC,PUTFIELD}CONST if the instruction is resolved. We
+       don't have a patcher for that case.
+       (stack_show_icmd): Smaller change.
+
+2006-04-28 11:37  twisti
+
+       * tests/regression/codepatching/test.java: Added new test.
+       * tests/regression/codepatching/Makefile.am: Files updated.
+       
+       * tests/regression/codepatching/putfieldconstIF.java,
+       tests/regression/codepatching/putfieldconstJDL.java: Removed.
+       
+       * tests/regression/codepatching/putstaticconstJ.java,
+       tests/regression/codepatching/putstaticconstL.java,
+       tests/regression/codepatching/putfieldconstD.java,
+       tests/regression/codepatching/putfieldconstF.java,
+       tests/regression/codepatching/putstaticconstC.java,
+       tests/regression/codepatching/putfieldconstJ.java,
+       tests/regression/codepatching/putfieldconstL.java,
+       tests/regression/codepatching/putstaticconstI.java,
+       tests/regression/codepatching/putfieldconstC.java,
+       tests/regression/codepatching/putstaticconstD.java,
+       tests/regression/codepatching/putfieldconstI.java,
+       tests/regression/codepatching/putstaticconstF.java: New file.
+
+2006-04-28 11:24  edwin
+
+       * src/vm/resolve.c (resolve_method_lazy): Turn INVOKEVIRTUAL into
+       INVOKESPECIAL for monomorphic calls.
+
+2006-04-28 00:46  edwin
+
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_vm_call_method_int): Fix
+       build
+       errors. TWISTI, please review these changes.
+
+2006-04-28 00:31  edwin
+
+       * regression/codepatching/test.java: Added test for AASTORECONST
+       with unresolved class constant. Currently exposes a bug when
+       test.java is
+       compiled with -target 1.5.
+       
+       * regression/codepatching/aastoreconstClass.java: New file.
+
+2006-04-27 23:03  twisti
+
+       * src/vm/jit/stacktrace.h (STACKFRAMEINFO): Added parenthesis.
+       * src/vm/global.h (java_objectheader): Changed type of monitorPtr to
+       monitorLockRecord.
+       
+       * src/vm/vm.h (vm_arg): Added union.
+       * src/vm/vm.c (vm_vmargs_from_valist): Use union of vm_arg's data.
+       * src/native/jni.c (_Jv_jni_vmargs_from_objectarray): Likewise.
+       
+       * src/threads/native/threads.h (nativethread): Changed type of
+       _stackframeinfo to stackframeinfo*.
+       * src/threads/native/threads.c (monitorEnter): Cast compare_and_swap
+       return value correctly.
+
+2006-04-27 12:33  twisti
+
+       * src/vm/jit/x86_64/emit.c: Changed x86_64 function prefix to
+       emit. And some other stuff too.
+       * src/vm/jit/x86_64/md-emit.h: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.h: Likewise.
+
+2006-04-27 11:05  twisti
+
+       * src/native/vm/VMSystemProperties.c (preInit): Append "/jre" to
+       java.home property, as all JDKs and JREs do that. Fixed a problem with
+       jonas testsuite. General cleanup.
+
+2006-04-27 10:32  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h (jit_asm_compile): Renamed from
+       jit_compile.
+       * src/vm/jit/powerpc/asmpart.S: Likewise.
+
+2006-04-26 15:44  edwin
+
+       * src/vm/jit/stacktrace.c (stacktrace_getClassContext): Reverted the
+       hack that removes the first entry if this function is called by
+       java.lang.SecurityManager. This (undocumented) hack probably was done
+       to solve a problem that no longer exists.
+
+2006-04-26 14:09  twisti
+
+       * src/vm/jit/i386/Makefile.am (libarch_la_SOURCES): Removed
+       emitfuncs.c, emitfuncs.h and added emit.c, md-emit.h.
+       
+       * src/vm/jit/i386/emit.c (emit_load_s1): New method.
+       (emit_load_s2): Likewise.
+       (emit_load_s3): Likewise.
+       (emit_store): Likewise.
+       (emit_copy): Likewise.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Use emit_load/store functions
+       instead of macros.
+       
+       * src/vm/jit/i386/codegen.h (M_LNGMOVE): Added.
+       (M_LNGMEMMOVE): Removed.
+       (var_to_reg_int): Removed.
+       (var_to_reg_lng): Likewise.
+       (var_to_reg_flt): Likewise.
+       (store_reg_to_var_int): Likewise.
+       (store_reg_to_var_lng): Likewise.
+       (store_reg_to_var_flt): Likewise.
+       (M_FLD): Added.
+       (M_DLD): Likewise.
+       (M_FLD32): Likewise.
+       (M_DLD32): Likewise.
+       (M_FST): Likewise.
+       (M_DST): Likewise.
+
+2006-04-26 11:02  twisti
+
+       * src/vm/jit/i386/md-emit.h: Moved from src/vm/jit/i386/emitfuncs.h.
+       * src/vm/jit/i386/emit.c: Moved from src/vm/jit/i386/emitfuncs.c.
+
+2006-04-26 09:02  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Added src/scripts/rmic.
+       * src/scripts/Makefile.am (bin_SCRIPTS): Added rmic.
+       * src/scripts/java.in: Use ${1+"$@"} instead of $@.
+       * src/scripts/rmiregistry.in: Likewise.
+       * src/scripts/rmic.in: Updated to new rmic location.
+
+2006-04-26 08:57  twisti
+
+       * m4/ac_prog_javac.m4: Default to ecj.
+       * src/lib/Makefile.am: If JAVAC is ecj, use the -1.5 flag. This
+       produces much faster code regarding class$ (e.g. jonas startup time).
+
+2006-04-25 18:02  edwin
+
+       * src/vm/jit/disass-common.c (disass_printf): Avoid compiler warning.
+       
+       * src/vm/jit/profile/profile.c (profile_printstats): Avoid compiler
+       warnings.
+
+2006-04-25 17:57  edwin
+
+       * src/vm/jit/i386/disass.c (disassinstr): Avoid compiler warning.
+
+2006-04-25 17:53  edwin
+
+       * src/vm/jit/stack.c (stack_show_icmd): Removed unused variable `um`.
+
+2006-04-25 17:48  edwin
+
+       * src/vm/loader.c (load_method): Simplify initialization of
+       methodinfo by
+       clearing it explicitely in load_class_from_classbuffer, instead of
+       zeroing
+       individual fields here.
+       (load_class_from_classbuffer): MZERO methodinfo array.
+       (load_newly_created_array): Initialize `params` to NULL for the clone
+       method.
+
+2006-04-25 17:45  edwin
+
+       * src/mm/memory.h (MZERO): Added macro MZERO for convenient memory
+       cleaning.
+
+2006-04-25 17:42  edwin
+
+       * src/native/vm/VMSystemProperties.c
+       (Java_gnu_classpath_VMSystemProperties_preInit): Use strcpy instead of
+       strcat, since there is nothing to concat to and we may want to lift
+       the
+       assertion that MSET clears memory.
+
+2006-04-25 15:46  edwin
+
+       * src/vm/jit/i386/md.c (md_get_method_patch_address): Avoid compiler
+       warning.
+
+2006-04-25 15:31  edwin
+
+       * src/cacao/cacao.c (main): Avoid warning about unused label.
+       Cleaned up whitespace.
+
+2006-04-25 15:26  edwin
+
+       * src/vm/exceptions.c (exceptions_throw_verifyerror_for_stack): Avoid
+       compiler warning.
+
+2006-04-25 12:35  edwin
+
+       * src/vm/jit/verify/typecheck.c (typecheckverbose): Renamed to
+       opt_typecheckverbose.
+       * src/vm/jit/verify/typeinfo.h: Likewise.
+       
+       * src/vm/vm.c (OPT_VERBOSETC): Only define if both ENABLE_VERIFIER
+       and TYPECHECK_VERBOSE are defined.
+       (typecheckverbose): Renamed to opt_typecheckverbose.
+
+2006-04-25 12:25  edwin
+
+       * src/vm/options.h, src/vm/options.c (getloadingtime): Renamed to
+       opt_getloadingtime. Only defined for ENABLE_STATISTICS.
+       (getcompilingtime): Renamed to opt_getcompilingtime.
+       Only defined for ENABLE_STATISTICS.
+       
+       * src/vm/loader.c (getloadingtime, getcompilingtime): Renamed.
+       * src/vm/jit/jit.c: Likewise.
+       * src/vm/linker.c: Likewise.
+       * src/native/vm/VMClassLoader.c: Likewise.
+       
+       * src/vm/vm.c (OPT_TIME): Only defined for ENABLE_STATISTICS.
+       
+       * configure.ac (--enable-statistics): Now statistics are disabled by
+       default.
+
+2006-04-25 12:00  edwin
+
+       * src/vm/options.h (opt_verify): Only declare for ENABLE_VERIFIER.
+       (opt_liberalutf): Removed.
+       
+       * src/vm/options.c (opt_verify): Only declare for ENABLE_VERIFIER.
+       (opt_liberalutf): Removed.
+       
+       * src/vm/jit/inline/inline.c (test_inlining): Only verify if
+       ENABLE_VERIFIER.
+       
+       * src/vm/jit/parse.c (parse): Only check opt_verify if
+       ENABLE_VERIFIER.
+       
+       * src/vm/global.h (ENABLE_VERIFIER): Removed. This is now defined in
+       config.h.
+       
+       * src/vm/vm.c (OPT_NOVERIFY): Only define this option if
+       ENABLE_VERIFIER.
+       (OPT_LIBERALUTF): Removed.
+       
+       * configure.ac (--disable-verifier): Added configure option.
+       
+       * src/vm/jit/stacktrace.c (stacktrace_getStack): Gather a wider range
+       for the cycle count statistics.
+
+2006-04-25 10:36  edwin
+
+       * src/vm/cycles-stats.h (CYCLES_STATS_COUNT_OVER): Added.
+
+2006-04-24 18:28  edwin
+
+       * src/vm/cycles-stats.c: Cleaned up whitespace.
+
+2006-04-24 18:22  edwin
+
+       * src/vm/cycles-stats.c (cycles_stats_print_percentile): Also perform
+       measurement overhead compensation for cumulated cycle counts.
+
+2006-04-24 17:16  edwin
+
+       * src/vm/global.h (ACC_CLASS_REFLECT_MASK): Added.
+       (ACC_CLASS_HAS_POINTERS): Likewise.
+       (vim boilerplate): Added.
+       
+       * src/vm/loader.c (load_field): Set ACC_CLASS_HAS_POINTERS flag.
+       
+       * src/vm/linker.c (link_class_intern): OR ACC_CLASS_HAS_POINTERS flag.
+       
+       * src/vm/builtin.c (builtin_new): Use ACC_CLASS_HAS_POINTERS to
+       determine
+       which kind of memory to allocate.
+       
+       * src/native/vm/VMClass.c (Java_java_lang_VMClass_getModifiers): Mask
+       reported access flags with ACC_CLASS_REFLECT_MASK.
+
+2006-04-24 16:24  twisti
+
+       * src/vm/jit/x86_64/emit.c (x86_64_emit_ifcc): Changed signature of
+       codegen_addreference.
+       (x86_64_emit_if_lcc): Likewise.
+       (x86_64_emit_if_icmpcc): Likewise.
+       (x86_64_emit_if_lcmpcc): Likewise.
+
+2006-04-24 16:10  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Don't initialize mcode
+       variables. New dseg_addlinenumber signature fix.
+       (createnativestub): Don't initialize mcode variables.
+
+2006-04-24 16:06  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_increase): Changed signature.
+       (codegen_addreference): Likewise.
+       (codegen_add_exception_ref): Likewise.
+       (codegen_add_arithmeticexception_ref): Likewise.
+       (codegen_add_arrayindexoutofboundsexception_ref): Likewise.
+       (codegen_add_arraystoreexception_ref): Likewise.
+       (codegen_add_classcastexception_ref): Likewise.
+       (codegen_add_nullpointerexception_ref): Likewise.
+       (codegen_add_fillinstacktrace_ref): Likewise.
+       (codegen_addpatchref): Likewise.
+       (codegen_finish): Likewise.
+       * src/vm/jit/codegen-common.h: Likewise.
+       
+       * src/vm/jit/dseg.c (dseg_increase): Made static.
+       (dseg_adds4): Use dseg_increase.
+       (dseg_adds8): Likewise.
+       (dseg_addfloat): Likewise.
+       (dseg_adddouble): Likewise.
+       (dseg_adds4_increase): Removed.
+       (dseg_adds8_increase): Likewise.
+       (dseg_addfloat_increase): Likewise.
+       (dseg_adddouble_increase): Likewise.
+       (dseg_addlinenumber): Changed signature.
+       (dseg_addlinenumber_inline_start): Likewise.
+       (dseg_adddata): Likewise.
+       * src/vm/jit/dseg.h: Likewise.
+       
+       * src/vm/jit/alpha/emit.c (vm/jit/alpha/emit.h): Removed.
+       (vm/jit/emit.h): Added.
+       (emit_lconst): New method.
+       * src/vm/jit/alpha/Makefile.am (libarch_la_SOURCES): Added emit.c
+       
+       * src/vm/jit/alpha/codegen.c (vm/jit/emit.h): Added.
+       (codegen): Use cd->mcodeptr instead of mcodeptr, and emit_load/store
+       functions instead of macros. Saves over 50kB object code size. Use new
+       signatures of codegen-common and dseg functions.
+       * src/vm/jit/alpha/codegen.h (var_to_reg_int): Removed.
+       (var_to_reg_flt): Likewise.
+       (store_reg_to_var_int): Likewise.
+       (store_reg_to_var_flt): Likewise.
+       
+       * src/vm/jit/i386/codegen.c: Use new signatures of codegen-common and
+       dseg functions.
+       * src/vm/jit/i386/codegen.h: Likewise.
+       * src/vm/jit/intrp/codegen.c: Likewise.
+       * src/vm/jit/intrp/codegen.h: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/mips/codegen.h: Likewise.
+       * src/vm/jit/powerpc/codegen.c: Likewise.
+       * src/vm/jit/powerpc/codegen.h: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.h: Likewise.
+
+2006-04-24 15:43  edwin
+
+       * src/vm/jit/stacktrace.c (stacktrace_create): Do not free dump
+       memory here,
+       this is now done in the parent functions. Also removed the copy to gc
+       memory.
+       (stacktrace_fillInStackTrace): Copy stacktrace to gc memory.
+       Free dump memory.
+       (stacktrace_getClassContext): Free dump memory.
+       (stacktrace_getCurrentClass): Likewise.
+       (stacktrace_getStack): Likewise.
+       (stacktrace_dump_trace): Likewise.
+
+2006-04-24 11:40  edwin
+
+       * src/vm/jit/stacktrace.c (stacktrace_fillInStackTrace)
+       (stacktrace_getClassContext, stacktrace_getCurrentClass)
+       (stacktrace_getStack): Added cycle count statistics.
+       (stacktrace_print_cycles_stats): Added.
+       
+       * src/vm/jit/stacktrace.h (stacktrace_print_cycles_stats): Added.
+       
+       * src/vm/vm.c (vm_exit_handler): Call stacktrace_print_cycles_stats.
+
+2006-04-24 11:36  edwin
+
+       * src/vm/cycles-stats.h (CYCLES_STATS_END_WITH_OVERHEAD): Fix
+       arguments of
+       empty macro definition.
+
+2006-04-24 11:27  edwin
+
+       * src/vm/cycles-stats.h (CYCLES_STATS_DECLARE_AND_START)
+       (CYCLES_STATS_DECLARE_AND_START_WITH_OVERHEAD)
+       (CYCLES_STATS_END, CYCLES_STATS_END_WITH_OVERHEAD): Added convenience
+       macros.
+       
+       * src/vm/cycles-stats.c (cycles_stats_print): Fixed divide-by-zero.
+       Minor
+       output changes.
+
+2006-04-24 10:08  twisti
+
+       * src/vm/jit/mips/md.c (md_get_method_patch_address): Renamed from
+       md_assembler_get_patch_address.
+       * src/vm/jit/mips/asmpart.S (asm_call_jit_compiler): Renamed
+       md_assembler_get_patch_address to md_get_method_patch_address.
+
+2006-04-24 10:00  twisti
+
+       * src/vm/jit/powerpc/md.c (md_get_method_patch_address): New method.
+       * src/vm/jit/powerpc/asmpart.S (asm_call_jit_compiler): Use new
+       jit_asm_compile method. This fixes the ecj bugs seens with some mauve
+       tests and eclipse.
+
+2006-04-24 09:58  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Replaced those ugly
+       M_TINTMOVE macros. Use M_LLD macros where possible.
+       * src/vm/jit/powerpc/codegen.h (M_LNGMOVE): Check for equal registers.
+       (M_TINTMOVE): Removed.
+
+2006-04-24 00:19  edwin
+
+       * src/vm/jit/i386/asmpart.S (asm_get_cycle_count): Omit the
+       stackframe.
+       This saves a couple of cycles of measurement overhead.
+
+2006-04-23 23:03  twisti
+
+       * src/vm/jit/alpha/md.c (md_get_method_patch_address): Renamed from
+       md_assembler_get_patch_address.
+       * src/vm/jit/alpha/asmpart.S (asm_call_jit_compiler): Renamed
+       md_assembler_get_patch_address to md_get_method_patch_address.
+
+2006-04-23 19:18  edwin
+
+       * src/vm/cycles-stats.c (cycles_stats_print_percentile): Better
+       extrapolation.
+       * src/vm/cycles-stats.h (CYCLES_STATS_DECLARE, CYCLES_STATS_COUNT)
+       (CYCLES_STATS_PRINT, CYCLES_STATS_PRINT_OVERHEAD): Added total cycles
+       counter.
+
+2006-04-23 19:16  edwin
+
+       * src/vm/builtin.c (builtin_new): Renamed rt-timing identifier.
+       (builtin_newarray): Added rt-timing.
+       
+       * src/vm/rt-timing.h: Added rt-timing for builtin_newarray.
+       * src/vm/rt-timing.c: Likewise.
+
+2006-04-23 16:11  edwin
+
+       * src/vm/builtin.c (builtin_print_cycles_stats): Use
+       CYCLES_STATS_PRINT_OVERHEAD.
+       
+       * src/vm/cycles-stats.h (CYCLES_STATS_PRINT_OVERHEAD): Added.
+       
+       * src/vm/cycles-stats.c (cycles_stats_print_percentile): Added.
+       (cycles_stats_print): Added `overhead` argument and automatic
+       measurement overhead compensation.
+
+2006-04-23 15:39  edwin
+
+       * src/vm/builtin.c (builtin_new): Added rt-timing.
+       (builtin_print_cycles_stats): Removed unused variable.
+       (builtin_monitorenter): Removed rt-timing.
+       (builtin_monitorexit): Likewise.
+       
+       * src/vm/rt-timing.c: rt-timing for buitin_new.
+       * src/vm/rt-timing.h: Likewise.
+
+2006-04-23 15:31  edwin
+
+       * src/vm/cycles-stats.c (cycles_stats_get_cpu_MHz): Better error
+       handling.
+
+2006-04-23 15:24  edwin
+
+       * src/vm/builtin.c (builtin_new): Gather cycle count statistics.
+       (CYCLES_STATS_DECLARE): Moved declarations to beginning of file.
+       
+       * src/vm/cycles-stats.c (cycles_stats_get_cpu_MHz): Added function for
+       automatic CPU frequency detection via /proc/cpuinfo.
+       (cycles_stats_print): Calculate estimated CPU times.
+
+2006-04-22 09:35  edwin
+
+       * src/vm/cycles-stats.c (cycles_stats_print): Made count, floor, and
+       ceiling
+       of type u8. This should avoid overflow problems.
+       
+       * src/vm/cycles-stats.h (cycles_stats_print): Made count an u8.
+
+2006-04-21 21:36  edwin
+
+       * src/vm/cycles-stats.c: New file. Better cycle count statistics.
+       
+       * src/vm/cycles-stats.h (CYCLES_STATS_PRINT): This is now a wrapper
+       for
+       cycles_stats_print.
+       
+       * src/vm/Makefile.am (cycles-stats.c): Added to sources.
+
+2006-04-21 14:32  edwin
+
+       * src/vm/jit/stacktrace.c (stacktrace_inline_fillStackTrace): Assert
+       that
+       there is an exception before dereferencing it.
+       (stacktrace_create): Document that this function may return NULL.
+       (stacktrace_getClassContext): Check return value of stacktrace_create.
+       (stacktrace_getCurrentClass): Likewise.
+       (stacktrace_getStack): Likewise. Document that this function may
+       return NULL.
+
+2006-04-21 13:08  edwin
+
+       * src/vm/jit/stacktrace.c (stacktrace_getClassContext): Document that
+       return
+       value may be NULL (in case of an exception).
+       
+       * src/native/vm/VMStackWalker.c
+       (Java_gnu_classpath_VMStackWalker_getCallingClass): Check return
+       value of
+       stacktrace_getClassContext.
+       (Java_gnu_classpath_VMStackWalker_getCallingClassLoader): Likewise.
+       
+       * src/native/vm/Field.c (cacao_get_field_address): Check return value
+       of
+       stacktrace_getClassContext.
+       
+       * src/native/vm/Method.c (Java_java_lang_reflect_Method_invokeNative):
+       Check return value of stacktrace_getClassContext.
+
+2006-04-21 11:07  twisti
+
+       * src/vm/jit/i386/md.c (md_get_method_patch_address): New method.
+       (md_icacheflush): Added.
+       (md_dcacheflush): Likewise.
+
+2006-04-21 10:54  twisti
+
+       * src/vm/jit/jit.c (jit_asm_compile): New method.
+       * src/vm/jit/jit.h (jit_asm_compile): Added.
+       (md_get_method_patch_address): Likewise.
+       
+       * src/vm/jit/x86_64/asmpart.S (asm_vm_call_method): Store
+       asm_call_jit_compiler on stack as for the other architectures.
+       (asm_call_jit_compiler): Use new jit_asm_compile.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Use REG_ITMP3 for calling
+       methods. This is required for asm_vm_call_method to work.
+       
+       * src/vm/jit/x86_64/md.c (md_get_method_patch_address): New method.
+       (md_icacheflush): Added.
+       (md_dcacheflush): Added.
+       * src/vm/jit/x86_64/md-asm.h (mptr): Defined.
+
+2006-04-21 10:45  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_add_method_intern): Reformatted
+       comments.
+
+2006-04-21 00:00  edwin
+
+       * src/vm/linker.c (link_class_intern): Impose loading constraints on
+       the
+       more general types of the overwritten method, instead of on the over-
+       writing method. Don't impose loading constraints when "overwriting"
+       the
+       instance initializaton method <init>, as it is not called virtually.
+
+2006-04-20 22:28  edwin
+
+       * src/vm/classcache.c (classcache_add_constraint): Also constrain the
+       return type of the given method.
+
+2006-04-20 21:47  edwin
+
+       * src/vm/linker.c (linker_addinterface): Add loading constraints when
+       an
+       interface method is overwritten.
+       (link_class_intern): Check new return value of linker_addinterface.
+
+2006-04-20 20:40  edwin
+
+       * src/vm/linker.c (link_class_intern): Only record loading constraints
+       for ENABLE_VERIFIER.
+
+2006-04-20 20:38  edwin
+
+       * src/vm/classcache.c (classcache_add_constraints_for_params): Added.
+       (classcache_add_constraint): Only define for ENABLE_VERIFIER.
+       
+       * src/vm/classcache.h (classcache_add_constraints_for_params): Added.
+       (classcache_add_constraint): Only define for ENABLE_VERIFIER.
+       
+       * src/vm/linker.c (link_class_intern): When overwriting a method,
+       record loading constraints for the parameter types, as required
+       by the spec.
+
+2006-04-20 19:18  edwin
+
+       * src/mm/memory.c (Changes): Added my name.
+       (vim boilerplate): Added.
+
+2006-04-20 18:59  edwin
+
+       * src/mm/memory.c: Added comments and some cleanup.
+
+2006-04-20 18:04  edwin
+
+       * configure.ac (ENABLE_LOOP): Changed default to "no".
+       
+       * src/vm/options.h (opt_loops): Only define for ENABLE_LOOP.
+       
+       * src/vm/options.c (opt_loops): Only define for ENABLE_LOOP.
+       
+       * src/vm/vm.c (-oloop, -i): Only recognize these options if
+       enabled with ENABLE_LOOP/ENABLE_INLINING.
+       
+       * src/vm/jit/allocator/lsra.c (opt_loops): Only use for ENABLE_LOOP.
+
+2006-04-20 10:55  twisti
+
+       * src/vm/jit/x86_64/codegen.h (M_ALD32): Added.
+
+2006-04-20 10:42  twisti
+
+       * src/vm/jit/x86_64/md-abi.h (REG_METHODPTR): Added.
+
+2006-04-20 08:45  twisti
+
+       * src/lib/vm/reference/java/lang/VMClassLoader.java: Updated to GNU
+       Classpath version.
+
+2006-04-19 01:05  edwin
+
+       * src/vm/builtin.c (builtin_print_cycles_stats): Added.
+       (builtin_monitorenter): Gather cycle count statistics.
+       (builtin_monitorexit): Likewise.
+       
+       * src/vm/builtin.h (builtin_print_cycles_stats): Added.
+       
+       * src/vm/jit/i386/asmpart.S (asm_get_cycle_count): Added.
+       
+       * src/vm/jit/asmpart.h (asm_get_cycle_count): Added.
+       
+       * src/vm/vm.c (vm_exit_handler): Call builtin_print_cycles_stats.
+       
+       * src/vm/cycles-stats.h: New file.
+       
+       * src/vm/Makefile.am (CYCLES_STATS_SOURCE): Added.
+       
+       * src/cacaoh/headers.c (asm_get_cycle_count): Dummy implementation
+       added.
+       
+       * configure.ac (--enable-cycles-stats): Added configure option.
+
+2006-04-18 21:16  twisti
+
+       * src/vm/jit/x86_64/emitfuncs.c: Moved to emit.c.
+       * src/vm/jit/x86_64/emitfuncs.h: Moved to md-emit.h
+       
+       * src/vm/jit/x86_64/codegen.c (vm/jit/x86_64/emitfuncs.h): Removed.
+       (vm/jit/x86_64/md-emit.h): Added.
+       
+       * src/vm/jit/x86_64/Makefile.am (libarch_la_SOURCES): Added emit.c and
+       md-emit.h, removed emitfuncs.c and emitfuncs.h.
+
+2006-04-18 20:36  twisti
+
+       * src/vm/jit/jit.h (IS_ADR_TYPE): Changed to use ==.
+       (IS_INT_TYPE): Added.
+       (IS_LNG_TYPE): Likewise.
+
+2006-04-18 20:34  twisti
+
+       * src/vm/jit/x86_64/codegen.c (vm/jit/emit.h): Added.
+       (codegen): Use emit_load/store functions instead of macors. Saves over
+       25kB object code size.
+       
+       * src/vm/jit/x86_64/codegen.h (ALIGNCODENOP): Added.
+       (var_to_reg_int): Removed.
+       (var_to_reg_flt): Likewise.
+       (store_reg_to_var_int): Likewise.
+       (store_reg_to_var_flt): Likewise.
+       (M_INEG, M_LNEG, M_INEG_MEMBASE, M_LNEG_MEMBASE): Added.
+       (M_CMOVEQ_MEMBASE, M_CMOVNE_MEMBASE, M_CMOVLT_MEMBASE)
+       (M_CMOVLE_MEMBASE, M_CMOVGE_MEMBASE, M_CMOVGT_MEMBASE): Likewise.
+       
+       * src/vm/jit/x86_64/emitfuncs.c (emit_load_s1): Added.
+       (emit_load_s2): Likewise.
+       (emit_load_s3): Likewise.
+       (emit_store): Likewise.
+       (emit_copy): Likewise.
+       (emit_cmovxx): Likewise.
+       
+       * src/vm/jit/x86_64/emitfuncs.h (emit_cmovxx): Added.
+
+2006-04-18 20:20  twisti
+
+       * src/vm/jit/x86_64/md-abi.h (REG_IFTMP): Defined.
+
+2006-04-18 20:17  edwin
+
+       * src/vm/jit/stack.c (stack_show_icmd): Updated to use the correct
+       macros for
+       (un)resolved methods. Minor output format changes.
+       
+       * src/vm/field.c (field_print): Print the class name.
+
+2006-04-18 20:10  twisti
+
+       * src/vm/jit/alpha/Makefile.am (DISASS_SOURCES): Added.
+       * src/vm/jit/mips/Makefile.am: Likewise.
+
+2006-04-18 15:55  twisti
+
+       * configure.ac (intl): Check on NetBSD too.
+
+2006-04-18 15:40  twisti
+
+       * configure.ac: Fixed typos.
+
+2006-04-18 13:36  twisti
+
+       * src/vm/jit/mips/codegen.h (M_FLTMOVE): Removed.
+       (M_TFLTMOVE): Likewise.
+       (M_TFLD): Likewise.
+       (M_TFST): Likewise.
+       (M_CCFLTMOVE): Likewise.
+       (M_CCFLD): Likewise.
+       (M_CCFST): Likewise.
+       * src/vm/jit/mips/codegen.c (codegen): Use float and double
+       explicitely.
+       * src/vm/jit/mips/emit.c: Likewise.
+
+2006-04-17 15:49  edwin
+
+       * src/vm/jit/intrp/codegen.c (intrp_codegen): Cast mcodeptr to u1*.
+       This should fix intrp on archs with u4* mcodeptr.
+
+2006-04-17 15:20  edwin
+
+       * src/vm/builtin.c (builtin_monitorenter, builtin_monitorexit): Added
+       rt-timing.
+       
+       * src/vm/rt-timing.c, src/vm/rt-timing.h: rt-timing for locks.
+
+2006-04-17 11:47  twisti
+
+       * src/vm/jit/codegen-common.h (codegendata): Define lastmcodeptr on
+       all architectures. I think it does not matter.
+
+2006-04-14 23:50  edwin
+
+       * src/vm/jit/codegen-common.h: Typo fix.
+
+2006-04-14 23:48  edwin
+
+       * src/vm/jit/parse.c (parse): Removed unused variable `mi`.
+
+2006-04-14 23:46  edwin
+
+       * src/vm/rt-timing.c: include stdlib.h to fix warning.
+
+2006-04-14 12:40  twisti
+
+       * src/vm/jit/mips/emit.c: New file.
+       * src/vm/jit/mips/Makefile.am (libarch_la_SOURCES): Added emit.c
+       
+       * src/vm/jit/mips/codegen.c (vm/jit/emit.h): Added.
+       (codegen): Use cd->mcodeptr instead of mcodeptr, and emit_load/store
+       functions instead of macors. Saves over 50kB object code size.
+       
+       * src/vm/jit/mips/codegen.h (var_to_reg_int): Removed.
+       (var_to_reg_flt): Likewise.
+       (store_reg_to_var_int): Likewise.
+       (store_reg_to_var_flt): Likewise.
+
+2006-04-14 11:57  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_setup): Fixed compiler
+       warnings, set lastmcodeptr.
+       (codegen_increase): Fixed compiler warnings.
+       (codegen_finish): Likewise.
+       (codegen_createnativestub): Likewise.
+
+2006-04-14 11:28  twisti
+
+       * src/vm/jit/alpha/emit.h: Removed. There's now a common one in
+       src/vm/jit/.
+
+2006-04-14 11:20  twisti
+
+       * src/vm/jit/emit.h: New file.
+       * src/vm/jit/Makefile.am (noinst_HEADERS): Added emit.h.
+       
+       * src/vm/jit/powerpc/emit.c: New file.
+       * src/vm/jit/powerpc/Makefile.am (libarch_la_SOURCES): Added emit.c.
+       
+       * src/vm/jit/powerpc/codegen.c (vm/jit/emit.h): Added.
+       (codegen): Use cd->mcodeptr instead of mcodeptr, and emit_load/store
+       functions instead of macors. Saves over 100kB object code size.
+       
+       * src/vm/jit/powerpc/codegen.h (var_to_reg_int): Removed.
+       (var_to_reg_lng): Likewise.
+       (var_to_reg_lng_low): Likewise.
+       (var_to_reg_lng_high): Likewise.
+       (var_to_reg_flt): Likewise.
+       (var_to_reg_dbl): Likewise.
+       (store_reg_to_var_int): Likewise.
+       (store_reg_to_var_lng): Likewise.
+       (store_reg_to_var_adr): Likewise.
+       (store_reg_to_var_flt): Likewise.
+       (store_reg_to_var_dbl): Likewise.
+       (M_LLD_INTERN): Added.
+       (M_LLD): Likewise.
+       (M_LST_INTERN): Likewise.
+       (M_LST): Likewise.
+
+2006-04-13 20:45  edwin
+
+       * src/vm/loader.c (load_class_from_classloader): Detailed rt-timing.
+       (load_class_bootstrap): Likewise.
+       
+       * src/vm/rt-timing.c: Added rt-timing for loading from classloaders.
+       * src/vm/rt-timing.h: Likewise.
+
+2006-04-13 18:21  edwin
+
+       * src/vm/loader.c (load_class_from_classbuffer): Separate timing for
+       descriptor_pool_new.
+       
+       * src/vm/rt-timing.c: Likewise.
+       
+       * src/vm/rt-timing.h: Likewise.
+
+2006-04-13 18:00  edwin
+
+       * src/vm/loader.c (load_class_from_classbuffer): Added real-time
+       loading time
+       measurements.
+       
+       * src/vm/rt-timing.c: Likewise.
+       * src/vm/rt-timing.h: Likewise.
+
+2006-04-13 17:23  edwin
+
+       * src/vm/rt-timing.c: Added timing of linker stages.
+       * src/vm/rt-timing.h: Likewise.
+       * src/vm/linker.c: Likewise.
+
+2006-04-13 16:58  edwin
+
+       * src/vm/rt-timing.h (RT_TIMING_TIME_DIFF): Added.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Use RT_TIMING_TIME_DIFF.
+       
+       * src/vm/linker.c (link_class): Use rt-timing for measuring link time.
+       
+       * src/cacaoh/Makefile.am (cacaoh_LDFLAGS): Link with librt for
+       ENABLE_RT_TIMING.
+
+2006-04-13 16:48  edwin
+
+       * src/vm/rt-timing.c (rt_timing_stat): Added field `totalindex`.
+       (rt_timing_stat_defs): Likewise.
+       (rt_timing_diff): Renamed to rt_timing_time_diff.
+       (rt_timing_print_time_stats): Use `totalindex` to calculate
+       percentage.
+       
+       * src/vm/rt-timing.h (RT_TIMING_LINK_TOTAL): Added.
+       (rt_timing_diff): Renamed to rt_timing_time_diff.
+
+2006-04-13 14:09  twisti
+
+       * src/vm/jit/alpha/emit.c: New file.
+       * src/vm/jit/alpha/emit.h: Likewise.
+
+2006-04-13 13:10  twisti
+
+       * src/vm/jit/codegen-common.h (codegendata): Changed mcodeend to
+       u1*. Define mcodeptr to u4* for non-i386/x86_64 architectures.
+
+2006-04-13 09:32  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Use argument registers
+       directly in exception stubs, instead of temporary ones. This reduces
+       code-size about 150kB for -all.
+
+2006-04-13 09:19  twisti
+
+       * src/vm/jit/x86_64/emitfuncs.c (x86_64_emit_ishift): Bugfixes found
+       by javver.
+       (x86_64_emit_lshift): Likewise.
+
+2006-04-12 22:20  edwin
+
+       * src/vm/rt-timing.c: Added file.
+       * src/vm/rt-timing.h: Likewise.
+       
+       * src/vm/jit/jit.c: Moved real-time timing stuff to rt-timing.[ch]
+       * src/vm/jit/jit.h: Likewise.
+       
+       * src/vm/vm.c (vm_exit_handler): Call rt_timing_print_time_stats.
+       
+       * src/vm/Makefile.am (rt-timing.c, rt-timing.h): Added.
+
+2006-04-12 22:16  edwin
+
+       * src/vm/jit/allocator/simplereg.c (allocate_scratch_registers): Fixed
+       compiler warning.
+
+2006-04-12 20:06  edwin
+
+       * src/vm/jit/parse.c (parse): New unresolved reference scheme: Data
+       structures
+       for unresolved fields/methods are only created if really needed.
+       Otherwise
+       a lazy resolving is done on-the-fly. This reduced compile time by
+       over 10% for
+       SpecJVM98 and eclipse.
+       
+       * src/vm/resolve.c (resolve_subtype_check): Added.
+       (resolve_lazy_subtype_checks): Likewise.
+       (resolve_and_check_subtype_set): Use resolve_subtype_check. Return
+       resolve_result_t instead of bool. Removed `checked` argument.
+       (resolve_class): Use resolve_subtype_check.
+       (resolve_field_verifier_checks): Added.
+       (resolve_field_lazy): Added.
+       (resolve_field): Use resolve_field_verifier_checks.
+       (resolve_method_invokespecial_lookup): Added.
+       (resolve_method_verifier_checks): Added.
+       (resolve_method_lazy): Added.
+       (resolve_method): Use resolve_method_invokespecial_lookup and
+       resolve_method_verifier_checks.
+       (constrain_unresolved_method): Adapted to new unresolved reference
+       scheme.
+       (constrain_unresolved_field): Likewise.
+       (unresolved_field_debug_dump): Likewise.
+       (unresolved_method_debug_dump): Likewise.
+       
+       * src/vm/jit/patcher.h (intrp_patcher_get_putstatic_clinit): Added.
+       
+       * src/vm/jit/intrp/intrp.h (vm_Cell2afi): Added.
+       (vm_afi2Cell): Likewise.
+       (printarg_afi): Added.
+       (vim boilerplate): Added.
+       (Changes): Added my name.
+       
+       * src/vm/jit/intrp/patcher.c (intrp_patcher_get_putstatic_clinit):
+       Added.
+       
+       * src/vm/jit/intrp/disass.c (printarg_afi): Added.
+       (Changes): Added my name.
+       (vim boilerplate): Added.
+       
+       * src/vm/jit/intrp/java.vmg (GETSTATIC_CELL, GETSTATIC_INT,
+       GETSTATIC_FLOAT)
+       (GETSTATIC_LONG, PUTSTATIC_CELL, PUTSTATIC_INT, PUTSTATIC_FLOAT)
+       (PUTSTATIC_LONG, GETFIELD_CELL, GETFIELD_INT, GETFIELD_FLOAT)
+       (GETFIELD_LONG, PUTFIELD_CELL, PUTFIELD_INT, PUTFIELD_FLOAT)
+       (PUTFIELD_LONG): Now take a fieldinfo instead of an unresolved_field.
+       (INVOKEVIRTUAL, INVOKESTATIC, INVOKESPECIAL, INVOKEINTERFACE): Now
+       take
+       a methodinfo instead of an unresolved_method.
+       (PATCHER_GETSTATIC_CLINIT_INT, PATCHER_GETSTATIC_CLINIT_FLOAT)
+       (PATCHER_GETSTATIC_CLINIT_LONG, PATCHER_GETSTATIC_CLINIT_CELL): Added.
+       (PATCHER_PUTSTATIC_CLINIT_INT, PATCHER_PUTSTATIC_CLINIT_FLOAT)
+       (PATCHER_PUTSTATIC_CLINIT_LONG, PATCHER_PUTSTATIC_CLINIT_CELL): Added.
+       
+       * src/vm/jit/allocator/simplereg.c (allocate_scratch_registers):
+       Use INSTRUCTION_GET_METHODDESC to get method descriptor.
+       
+       * src/vm/jit/stack.c (stack_analyse): Ported to new unresolved
+       reference
+       scheme.
+       (stack_show_icmd): Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Ported to new
+       unresolved
+       reference scheme.
+       (verify_basic_block): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Ported to new unresolved
+       reference
+       scheme.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Ported to new unresolved
+       reference
+       scheme.
+       
+       * src/vm/jit/mips/codegen.c (codegen): Ported to new unresolved
+       reference
+       scheme.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Ported to new unresolved
+       reference
+       scheme.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Ported to new unresolved
+       reference
+       scheme.
+       
+       * src/vm/jit/intrp/codegen.c (codegen): Ported to new unresolved
+       reference
+       scheme.
+       (Changes): Added my name.
+       
+       * src/vm/jit/intrp/codegen.h (vim boilerplate): Added.
+
+2006-04-12 18:07  edwin
+
+       * src/vm/resolve.h (resolve_result_t): Added.
+       (resolve_method_lazy): Added prototype.
+       (resolve_field_lazy): Added prototype.
+       (resolve_and_check_subtype_set): Removed prototype. This function is
+       becoming static.
+
+2006-04-12 17:51  edwin
+
+       * src/vm/class.c (class_showconstantpool): Use the new functions
+       method_methodref_print and field_fieldref_print.
+       
+       * src/vm/loader.c (load_constantpool): Use p.index in constant_FMIref.
+       (load_class_from_classbuffer): Likewise.
+       
+       * src/vm/jit/stack.c (stack_show_icmd): Use p.index in
+       constant_FMIref.
+       
+       * src/vm/jit/verify/typecheck.c (verify_invocation): Use p.index in
+       constant_FMIref.
+       
+       * src/vm/resolve.c (resolve_field, resolve_method,
+       constrain_unresolved_field)
+       (unresolved_field_debug_dump, unresolved_method_debug_dump):
+       Use p.index in constant_FMIref.
+       
+       * src/vm/method.c, src/vm/method.h (method_methodref_print): Added.
+       (method_methodref_println): Likewise.
+       
+       * src/vm/field.c, src/vm/field.h (field_fieldref_print): Added.
+       (field_fieldref_println): Likewise.
+       
+       * src/vm/references.h (constant_FMIref): Changed field `classref`
+       into a
+       union that is used for caching of already resolved fields/methods.
+       (IS_FMIREF_RESOLVED): Added.
+       (METHODREF_CLASSNAME): Added.
+       (FIELDREF_CLASSNAME): Added.
+       
+       * src/vm/jit/jit.h (INSTRUCTION_IS_RESOLVED): Added. This is a
+       preparation
+       for the lazy resolving rewrite.
+       (INSTRUCTION_IS_UNRESOLVED): Likewise.
+       (INSTRUCTION_GET_FIELDREF): Likewise.
+       (INSTRUCTION_GET_METHODREF): Likewise.
+       (INSTRUCTION_GET_FIELDDESC): Likewise.
+       (INSTRUCTION_GET_METHODDESC): Likewise.
+       (INSTRUCTION_UNRESOLVED_METHOD): Likewise.
+       (INSTRUCTION_UNRESOLVED_FIELD): Likewise.
+       (INSTRUCTION_RESOLVED_FMIREF): Likewise.
+       (INSTRUCTION_RESOLVED_FIELDINFO): Likewise.
+       (INSTRUCTION_RESOLVED_METHODINFO): Likewise.
+       
+       * src/vm/jit/intrp/disass.c (printarg_auf): Use METHODREF_CLASSNAME.
+
+2006-04-12 11:51  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Use directly argument
+       registers in exception stubs, instead of temporary ones. This reduces
+       code-size about 200kB for -all.
+
+2006-04-12 09:49  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Fixed displacement overflow
+       problem when restoring LR. We can't use r0 here.
+
+2006-04-12 09:30  twisti
+
+       * NEWS: Line-number fix added.
+
+2006-04-12 09:20  edwin
+
+       * src/vm/jit/parse.c (parse): Skip line number entries that span over
+       zero
+       bytecode instructions.
+
+2006-04-12 08:52  edwin
+
+       * src/vm/method.h (methodinfo): Forward declaration moved to
+       refereneces.h.
+       * src/vm/field.h (fieldinfo): Forward declaration moved to
+       refereneces.h.
+       * src/vm/references.h (methodinfo, fieldinfo): Added forward
+       references.
+
+2006-04-12 08:34  edwin
+
+       * src/vm/class.c (class_showconstanti): Removed.
+       (class_showconstantpool): Documented.
+       (class_showmethods): Documented.
+       (vim boilerplate): Added.
+       (Changes): Finally added my name.
+
+2006-04-11 13:13  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Changed signature to use
+       jitdata. Renamed reg_of_var by codegen_reg_of_var.
+       * src/vm/jit/x86_64/codegen.h (M_COPY): Likewise.
+
+2006-04-11 10:54  twisti
+
+       * tests/regression/clinitexception.2output: Updated.
+       * tests/regression/native/checkjni.output: Likewise.
+       * tests/regression/extest.2output: Likewise.
+
+2006-04-11 10:20  twisti
+
+       * src/vm/builtin.c (builtin_throw_exception): Changed return type and
+       return NULL. This is less error-prone in asm_vm_call_method.
+       * src/vm/builtin.h: Likewise.
+       
+       * src/vm/jit/alpha/asmpart.S (asm_vm_call_method_exception_handler):
+       Don't set v0 to NULL. This is now done in builtin_throw_exception.
+       * src/vm/jit/i386/asmpart.S: Likewise.
+       * src/vm/jit/mips/asmpart.S: Likewise.
+       * src/vm/jit/powerpc/asmpart.S: Likewise.
+       * src/vm/jit/x86_64/asmpart.S: Likewise.
+
+2006-04-11 10:04  twisti
+
+       * src/vm/jit/ifconv/ifconv.c (ifconv_static): Keep compiler happy.
+
+2006-04-11 09:00  edwin
+
+       * src/vm/jit/stack.c (stack_print_stack): Only use `regs` if
+       ENABLE_DISASSEMBLER is defined.
+       (stack_show_method): Likewise.
+       
+       * src/vm/jit/replace.c (replace_executionstate_println): Likewise.
+
+2006-04-11 05:10  edwin
+
+       * src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Do not
+       trace
+       exception when NDEBUG.
+       
+       * src/vm/jit/intrp/dynamic-super.c (disassemble_prim): Only enable for
+       ENABLE_DISASSEMBLER.
+       (dynamic_super_init): Only call disassemble_prim for
+       ENABLE_DISASSEMBLER.
+       
+       * src/vm/jit/intrp/java.vmg: Disable builtin_displaymethodstop and
+       builtin_trace_args for NDEBUG.
+
+2006-04-06 12:54  twisti
+
+       * src/vm/jit/mips: Added TAGS.
+       * src/vm/jit/mips/irix: Likewise.
+       * src/vm/jit/mips/irix/.cvsignore: Likewise.
+       * src/vm/jit/mips/.cvsignore: Likewise.
+
+2006-04-06 12:51  twisti
+
+       * src/vm/jit/mips/codegen.c (codegen): Changed signature to use
+       jitdata. Renamed reg_of_var by codegen_reg_of_var.
+       (createcompilerstub): Replaced docacheflush by md_cacheflush.
+       * src/vm/jit/mips/codegen.h (M_COPY): Likewise.
+       * src/vm/jit/mips/md.c (sys/mman.h): Removed.
+       (docacheflush): Likewise.
+
+2006-04-06 00:33  edwin
+
+       * configure.ac: Added host type `armv5l`.
+
+2006-04-05 20:31  edwin
+
+       * src/vm/jit/parse.h, src/vm/jit/parse.c (OP1LOAD):
+       Split into OP1LOAD_ONEWORD and OP1LOAD_TWOWORD. Index is only checked
+       if
+       ENABLE_VERIFIER.
+       (OP1STORE): Split into OP1STORE_ONEWORD and OP1STORE_TWOWORD. Index
+       is
+       only checked if ENABLE_VERIFIER.
+
+2006-04-05 19:58  edwin
+
+       * src/vm/jit/parse.c (parse): Cleaned up and reordered an if.
+
+2006-04-05 19:44  edwin
+
+       * src/vm/jit/parse.c (parse): Remove the `if (!iswide)` check for
+       each opcode
+       by making JAVA_WIDE continue directly to the label fetch_opcode.
+       (This also
+       removed a part of the iswide check at the end of the loop.)
+
+2006-04-05 18:48  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen, createnativestub): Remove
+       opt_verbosecall code for NDEBUG builds.
+
+2006-04-05 18:13  edwin
+
+       * src/vm/jit/parse.c (parse): Only do verifier checks if
+       ENABLE_VERIFIER.
+       Cleaned up an obsolete printf.
+
+2006-04-05 12:56  edwin
+
+       * configure.ac (ENABLE_RT_TIMING): Added.
+       
+       * src/vm/jit/jit.c (ENABLE_RT_TIMING): Added code for real-time timing
+       of compiler passes.
+       
+       * src/vm/jit/jit.h (jit_print_time_stats): Added.
+       
+       * src/vm/vm.c (vm_exit_handler): Call jit_print_time_stats.
+
+2006-04-05 11:32  edwin
+
+       * src/vm/jit/inline/inline.c (create_block): Use BASICBLOCK_INIT.
+
+2006-04-05 10:02  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_vm_call_method): Removed !NDEBUG as
+       builtin_throw_exception actually posts the thrown exception to the VM
+       system.
+       * src/vm/jit/powerpc/asmpart.S: Likewise.
+       * src/vm/jit/mips/asmpart.S: Likewise.
+       * src/vm/jit/x86_64/asmpart.S: Likewise.
+
+2006-04-05 09:57  edwin
+
+       * src/vm/jit/jit.h (instruction): Removed `method` field.
+       (insinfo_inline): Added.
+       (basicblock): Added `method` field.
+       
+       * src/vm/jit/dseg.c (dseg_addlinenumber_inline_start)
+       (dseg_addlinenumber_inline_end): Use new insinfo_inline struct.
+       
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Removed unused
+       variable `myclass`.
+       
+       * src/vm/jit/inline/inline.c (emit_inlining_prolog,
+       emit_inlining_epilog):
+       Use insinfo_inline struct.
+       (inline_write_exception_handlers): Removed `method` field.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Use insinfo_inline struct.
+       
+       * src/vm/jit/parse.h (several macros): Removed `method` field from
+       instruction.
+       
+       * src/vm/jit/stack.c (stack_show_icmd): Adapted to new insinfo_inline
+       struct.
+
+2006-04-05 09:54  twisti
+
+       Fixes GCC Bugzilla Bug #26990.
+       * src/vm/vm.c (vm_exit): Don't check for exception of System.exit().
+
+2006-04-04 21:31  edwin
+
+       * src/vm/builtin.c (builtin_throw_exception): No twisti, we don't
+       turn off
+       exceptions just because it is NDEBUG ;)
+       * src/vm/jit/i386/asmpart.S (asm_vm_call_method_exception_handler):
+       Likewise.
+
+2006-04-04 18:14  edwin
+
+       * src/vm/jit/i386/Makefile.am: Do not build disassebmler for
+       --disable-disassembler
+       * src/vm/jit/i386/codegen.c (codegen): disable verbosecall code for
+       NDEBUG
+
+2006-04-04 18:11  edwin
+
+       * src/vm/jit/ifconv/ifconv.c (ifconv_static): #ifdef debug code.
+       (check): Likewise.
+
+2006-04-04 09:17  twisti
+
+       * src/threads/native/threads.c (tablelock): Removed.
+       (tables_lock, tables_unlock): Likewise.
+       (criticalcompare): Removed tablelock initialization.
+       * src/vm/hashtable.h (tables_lock, tables_unlock): Removed.
+       * src/vm/global.h (VFTBLINTERFACETABLE): Likewise.
+       (cast_lock, cast_unlock): Likewise.
+
+2006-04-04 09:14  twisti
+
+       * src/vm/exceptions.c (exceptions_new_nosuchmethoderror): Print
+       classname with dots.
+       (exceptions_handle_exception): Compiler warning fix.
+
+2006-04-04 09:13  edwin
+
+       * src/vm/jit/verify/typeinfo.c (CLASSINFO_IMPLEMENTS_INTERFACE):
+       Removed the
+       single use of the macro VFTBLINTERFACETABLE
+
+2006-04-04 08:45  twisti
+
+       * src/native/vm/VMClass.c: Reordered methods like in the
+       VMClass.java. This eases the 1.5 changes addition.
+
+2006-04-04 08:30  edwin
+
+       * src/vm/jit/parse.c (parse): Removed obsolete variable
+       `skipBasicBlockChange`.
+
+2006-04-04 08:24  edwin
+
+       * src/vm/jit/parse.c (parse): Removed obsolete variable `firstlocal`.
+       (Was used for the old inliner.)
+
+2006-04-03 15:36  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Changed signature to use
+       jitdata. Renamed reg_of_var by codegen_reg_of_var.
+       * src/vm/jit/powerpc/codegen.h (M_COPY): Likewise.
+
+2006-04-03 13:59  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Renamed parentargs_base to
+       stackframesize.
+       (codegen_trace_args): Likewise.
+
+2006-04-02 16:17  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Implemented inlining of
+       synchronized
+       methods (INLINE_START, INLINE_END do monitorenter/exit).
+
+2006-04-02 16:16  edwin
+
+       * src/vm/jit/inline/inline.c (inline_node): Added fields for inlining
+       synchronized methods.
+       (inline_context): Added `master` pointer to outermost caller. Added
+       field
+       `calls_others`. (Leaf method detection should really be done after
+       inlining).
+       (several methods): Implemented inlining of synchronized methods.
+       (inline_new_stackslot): Added.
+       (inline_write_exception_handlers): Added.
+
+2006-04-01 21:03  edwin
+
+       * src/vm/jit/intrp/codegen.c (createcalljavafunction): Create
+       codeinfo with
+       the right methodinfo pointer.
+
+2006-04-01 21:00  edwin
+
+       * src/vm/jit/codegen-common.h (intrp_createnativestub): Takes a
+       `jitdata *` now.
+       
+       * src/vm/jit/intrp/codegen.c (intrp_codegen, intrp_createnativestub)
+       (createcalljavafunction): Use jitdata.
+
+2006-03-31 12:38  edwin
+
+       * src/vm/jit/inline/inline.c, src/vm/jit/inline/inline_debug.c:
+       Adapted to
+       twisti's jitdata changes.
+
+2006-03-31 07:50  twisti
+
+       * src/vm/jit/powerpc/asmpart.S (asm_vm_call_method): Replaced $stub
+       symbols with old symbols and define them for darwin in the
+       corresponding md-asm.h.
+       (asm_call_jit_compiler): Likewise.
+       (asm_wrapper_patcher): Likewise.
+       (asm_replacement_out): Likewise.
+       * src/vm/jit/powerpc/darwin/md-asm.h (builtin_asm_get_exceptionptrptr)
+       (builtin_throw_exception, exceptions_handle_exception, jit_compile)
+       (replace_me, stacktrace_create_extern_stackframeinfo)
+       (stacktrace_remove_stackframeinfo): Changed to $stub symbol.
+       (stacktrace_extern_fillInStackTrace): Removed.
+       
+       * src/vm/jit/powerpc/linux/md-abi.c (regs): Added.
+
+2006-03-31 07:14  twisti
+
+       * src/vm/jit/powerpc/patcher.c
+       (patcher_checkcast_instanceof_interface): Compile fix (typo).
+
+2006-03-30 12:01  twisti
+
+       * src/vm/jit/alpha/asmpart.S (vm/jit/abi.h): Changed to
+       vm/jit/abi-asm.h.
+       * src/vm/jit/mips/asmpart.S: Likewise.
+       * src/vm/jit/i386/asmpart.S: Likewise.
+       * src/vm/jit/x86_64/asmpart.S: Likewise.
+
+2006-03-30 11:59  twisti
+
+       * src/vm/jit/powerpc/codegen.c (codegen): Changed signature to use
+       jitdata. Renamed reg_of_var by codegen_reg_of_var.
+       * src/vm/jit/powerpc/codegen.h (M_COPY): Likewise.
+       
+       * src/vm/jit/powerpc/asmpart.S (vm/jit/abi.h): Changed to
+       vm/jit/abi-asm.h.
+       (asm_vm_call_method_exception_handler): Export it.
+       (asm_vm_call_method): Don't put label addresses into the
+       "data-segment", as it's located in the .text area and that may be
+       read-only. Changed to use PIC code. Linux stuff is still missing.
+       
+       * src/vm/jit/powerpc/Makefile.am (DISASS_SOURCES): Added.
+       * src/vm/jit/powerpc/disass.c (regs): Removed.
+
+2006-03-30 10:26  twisti
+
+       * src/vm/jit/ifconv/Makefile.am (AM_CPPFLAGS): Added OS_DIR.
+       (LIBS): Added.
+
+2006-03-30 10:23  twisti
+
+       * src/vm/jit/Makefile.am (noinst_HEADERS): Added abi-asm.h.
+       * src/vm/jit/abi.h (vm/jit/abi-asm.h): Added.
+       (nregdescint, regs, nregdescfloat): Added.
+       * src/vm/jit/abi-asm.h: New file.
+       * src/vm/jit/reg.h (nregdescint, nregdescfloat): Removed.
+       * src/vm/jit/reg.c (vm/jit/abi.h): Added.
+       * src/vm/jit/replace.c: Likewise.
+       * src/vm/jit/allocator/lsra.c: Likewise.
+       * src/vm/jit/powerpc/darwin/md-asm.h
+       (asm_vm_call_method_exception_handler): Added.
+       * src/vm/jit/powerpc/darwin/md-abi.c (regs): Added.
+
+2006-03-30 10:14  twisti
+
+       * src/vm/jit/codegen-common.c: Use ENABLE_DISASSEMBLER.
+       * src/vm/jit/codegen-common.h: Likewise.
+       * src/vm/jit/stack.c: Likewise. Plus ENABLE_LSRA.
+       * src/vm/jit/disass.h: Likewise.
+       * src/vm/jit/jit.c: Likewise. Plus ENABLE_LOOP.
+
+2006-03-30 10:10  twisti
+
+       * src/vm/jit/powerpc/patcher.c (patcher_invokevirtual): Use disp
+       variable for code patching. This will ease the overflow code
+       comming.
+       (patcher_invokeinterface): Likewise.
+       (patcher_checkcast_instanceof_interface): Likewise.
+
+2006-03-30 09:52  twisti
+
+       * src/vm/exceptions.c (exceptions_handle_exception): Check for special
+       * start/endpc-NULL case. This makes asmpart stuff much easier, like on
+       * Darwin or IRIX.
+       
+       * src/vm/jit/asmpart.h (asm_vm_call_method_exception_handler): Added.
+       
+       * src/vm/jit/alpha/asmpart.S (asm_vm_call_method_exception_handler):
+       Export it.
+       (asm_vm_call_method): Don't put label addresses into the
+       "data-segment", as it's located in the .text area and that may be
+       read-only.
+       * src/vm/jit/i386/asmpart.S: Likewise.
+       * src/vm/jit/mips/asmpart.S: Likewise.
+       * src/vm/jit/x86_64/asmpart.S: Likewise.
+
+2006-03-30 09:20  twisti
+
+       * src/vm/jit/mips/asmpart.S (asm_vm_call_method): Return NULL for
+       exception.
+
+2006-03-30 08:48  twisti
+
+       * configure.ac (opcodes): Check for disassembler symbol as
+       init_disassemble_info isn't defined everywhere, like NetBSD.
+
+2006-03-29 23:11  twisti
+
+       * src/vm/jit/powerpc/netbsd: New directory.
+       * src/vm/jit/powerpc/netbsd/md-abi.h: New file.
+       * src/vm/jit/powerpc/netbsd/md-os.c: Likewise.
+       * src/vm/jit/powerpc/netbsd/md-asm.h: Likewise.
+       * src/vm/jit/powerpc/netbsd/Makefile.am: Likewise.
+       * src/vm/jit/powerpc/netbsd/md-abi.c: Likewise.
+       * src/vm/jit/powerpc/netbsd/.cvsignore: Likewise.
+       * configure.ac (host_os): Added NetBSD.
+       (AC_CONFIG_FILES): Added src/vm/jit/powerpc/netbsd/Makefile.
+
+2006-03-28 15:43  twisti
+
+       * tests/regression/codepatching/test.java: Made functions static
+       final.
+       --This line, and those below, will be ignored--
+       
+       M test.java
+
+2006-03-28 15:41  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Changed signature to use
+       jitdata. Renamed reg_of_var by codegen_reg_of_var.
+       * src/vm/jit/i386/codegen.h (M_COPY): Likewise.
+
+2006-03-28 15:14  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Added src/vm/jit/ifconv/Makefile.
+
+2006-03-28 15:10  twisti
+
+       * src/vm/jit/Makefile.am (DIST_SUBDIRS): Added ifconv.
+       * src/vm/jit/ifconv: New directory.
+       * src/vm/jit/ifconv/ifconv.c: New file.
+       * src/vm/jit/ifconv/Makefile.am: Likewise.
+       * src/vm/jit/ifconv/ifconv.h: Likewise.
+       * src/vm/jit/ifconv/.cvsignore: Likewise.
+
+2006-03-28 14:52  twisti
+
+       * src/vm/method.h (vm/jit/code.h): Added.
+       (codeinfo, rplpoint, executionstate, sourcestate): typedef's removed.
+       
+       * src/vm/jit/codegen-common.c (codegendata): Removed code.
+       (codegen_setup, codegen_finish, createnativestub, codegen)
+       (intrp_codegen): Changed signature to use jitdata.
+       (reg_of_var): Renamed to codegen_reg_of_var. Changed signature.
+       (codegen_free): Removed.
+       * src/vm/jit/codegen-common.h: Likewise.
+       
+       * src/vm/jit/stack.c (lock_show_icmd): Renamed to
+       lock_stack_show_icmd.
+       (analyse_stack): Renamed to stack_analyse. Changed signature to use
+       jitdata.
+       (ICMD_IF_ICMPxx): Make ICMD_IFxx last instruction in basic block. This
+       is required for if-conversion.
+       (stack_print): Renamed to stack_print_stack.
+       (show_icmd_method): Renamed to stack_show_method. Changed signature to
+       use jitdata.
+       (show_icmd_block): Renamed to stack_show_basicblock. Changed signature
+       to use jitdata.
+       (show_icmd): Renamed to stack_show_icmd.
+       * src/vm/jit/stack.h: Likewise.
+       
+       * src/vm/jit/code.h (codeinfo): Added typedef.
+       
+       * src/vm/jit/dseg.c (assert.h): Moved.
+       (dseg_resolve_datareferences, dseg_display): Changed signature to use
+       jitdata.
+       * src/vm/jit/dseg.h: Likewise.
+       
+       * src/vm/jit/verify/typecheck.c (typecheck): Changed signature to use
+       jitdata.
+       * src/vm/jit/verify/typecheck.h: Likewise.
+       
+       * src/vm/jit/loop/loop.c (analyseGraph): Changed signature to use
+       jitdata.
+       * src/vm/jit/loop/loop.h: Likewise.
+       * src/vm/jit/loop/graph.c (depthFirst): Likewise.
+       * src/vm/jit/loop/graph.h: Likewise.
+       * src/vm/jit/loop/analyze.c (optimize_loops): Likewise.
+       * src/vm/jit/loop/analyze.h: Likewise.
+       * src/vm/jit/allocator/lsra.c (lsra): Likewise.
+       * src/vm/jit/allocator/lsra.h: Likewise.
+       * src/vm/jit/allocator/simplereg.c (interface_regalloc)
+       (local_regalloc,allocate_scratch_registers): Likewise.
+       * src/vm/jit/allocator/simplereg.h: Likewise.
+       * src/vm/jit/parse.c (parse): Likewise.
+       * src/vm/jit/replace.c (replace_create_replacement_points): Likewise.
+       * src/vm/jit/intrp/codegen.c (intrp_codegen): Likewise.
+       * src/vm/jit/reg.c (reg_setup): Likewise.
+       * src/vm/jit/reg.h: Likewise.
+       
+       * src/vm/jit/jit.c (jit_compile): Use new function signatures and
+       jitdata structure.
+       (jit_compile_intern): Changed signature to use jitdata.
+       * src/vm/jit/jit.h (jitdata): Added.
+       (ICMD_OPCODE_MASK): Likewise.
+       (ICMD_CONDITION_MASK): Likewise.
+       
+       * src/vm/jit/replace.h (rplpoint, executionstate, sourcestate):
+       typedef's added.
+       (replace_create_replacement_points): Changed signature to use jitdata.
+       
+       * src/vm/jit/parse.h (INDEX_ONEWORD, INDEX_TWOWORD): Use goto.
+       (parse): Changed signature to use jitdata.
+
+2006-03-28 14:31  twisti
+
+       * src/vm/jit/x86_64/md.c (md_signal_handler_sigsegv)
+       (md_signal_handler_sigfpe): Comment changes.
+
+2006-03-28 14:30  twisti
+
+       * src/vm/jit/i386/codegen.c (createnativestub): Replaced _exceptionptr
+       by _no_threads_exceptionptr.
+
+2006-03-28 14:22  twisti
+
+       * NEWS: Added upcoming 0.96 release. Added miranda-methods fix.
+
+2006-03-28 14:21  twisti
+
+       * src/tests/regression/native/checkjni.c (PushLocalFrame): New method.
+       * src/tests/regression/native/checkjni.java (PushLocalFrame):
+       Likewise.
+       (equal(int,int)): Likewise.
+       * src/tests/regression/native/Makefile.am (NOTESTNAMES): Added.
+
+2006-03-28 11:54  twisti
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Renamed parentargs_base to
+       stackframesize.
+       * tests/regression/extest.2output: Updated.
+
+2006-03-28 10:42  twisti
+
+       * src/vm/Makefile.am (noinst_LTLIBRARIES): Reformatted.
+
+2006-03-28 10:21  twisti
+
+       * src/native/vm/VMClassLoader.c (loadClass): Smaller changes.
+
+2006-03-28 09:41  twisti
+
+       * src/native/native.c (dummynativetable): Renamed getModifiers
+       functions to getModifiersInternal due to GNU Classpath VM interface
+       changes.
+       * src/native/vm/Constructor.c (getModifiers): Renamed to
+       getModifiersInternal.
+       * src/native/vm/Field.c (getModifiers): Likewise.
+       * src/native/vm/Method.c (getModifiers): Likewise.
+
+2006-03-27 11:37  twisti
+
+       * src/vm/class.c: Don't initialize classes to NULL.
+       
+       * src/vm/loader.c (loader_load_all_classes): Added NDEBUG.
+       * src/vm/builtin.c (builtin_new): Likewise.
+       * src/vm/jit/codegen-common.c (codegen_createnativestub): Likewise.
+       (codegen_disassemble_nativestub): Likewise.
+       * src/vm/jit/codegen-common.h (codegen_disassemble_nativestub):
+       Likewise.
+       * src/vm/jit/stack.c (stack_print): Likewise.
+       * src/vm/jit/stack.h (stack_print, show_icmd_method, show_icmd_block)
+       (show_icmd): Likewise.
+       * src/vm/exceptions.c (exceptions_handle_exception): Likewise.
+       * src/vm/linker.c (link_class_intern): Likewise.
+       * src/cacao/cacao.c (main): Likewise.
+       
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/x86_64/asmpart.S (asm_vm_call_method): Likewise.
+       * src/vm/jit/x86_64/Makefile.am (DISASS_SOURCES): Added. Put into
+       ENABLE_DISASSEMBLER.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Added ENABLE_LOOP.
+       * src/vm/vm.c (vm_create): Added ENABLE_PROFILING.
+       (vm_exit_handler): Likewise.
+       
+       * configure.ac (AC_ENABLE_SHARED, AC_DISABLE_STATIC): Removed. Set it
+       manually.
+       (EXPORT_SYMBOLS_FLAGS): Removed.
+       (--enable-disassembler): Added.
+       (--ensable-loop): Likewise.
+       (--ensable-profiling): Likewise.
+       (--ensable-libjvm): Likewise.
+       (--ensable-inlining): Moved.
+       
+       * src/vm/jit/Makefile.am (LOOP_LIB): Added. Put into ENABLE_LOOP.
+       (PROFILE_LIB): Put into ENABLE_PROFILING.
+       * src/cacao/Makefile.am (cacao_LDFLAGS): Use -export-dynamic and let
+       libtool do the work. Add -all-static for ENABLE_STATICVM.
+       
+       * src/lib/Makefile.am: Made it -j aware.
+       
+       * src/vm/resolve.c (config.h, vm/global.h): Added.
+       * src/vm/classcache.c (config.h): Moved to top.
+       
+       * src/vm/exceptions.h: Small change.
+
+2006-03-27 11:15  twisti
+
+       * src/vm/utf8.c: Removed superfluous comment.
+
+2006-03-24 11:50  motse
+
+       * src/cacao/cacao.c (main): remove debug code
+
+2006-03-23 12:48  edwin
+
+       * src/vm/jit/parse.h (bound_check): Renamed to CHECK_BYTECODE_INDEX,
+       made
+       a NOP for ENABLE_VERIFIER undefined.
+       (bound_check_exclusive): Renamed to CHECK_BYTECODE_INDEX_EXCLUSIVE,
+       made
+       a NOP for ENABLE_VERIFIER undefined.
+       
+       * src/vm/jit/parse.c (fillextable): Cleaned up.
+       (bound_check): Renamed to CHECK_BYTECODE_INDEX.
+       (bound_check_exclusive): Renamed to CHECK_BYTECODE_INDEX_EXCLUSIVE.
+       (parse): Only do checks if ENABLE_VERIFIER is defined.
+
+2006-03-23 11:22  edwin
+
+       * src/vm/jit/parse.c (CHECK_END_OF_BYTECODE): Added a macro for
+       checking
+       the end of the bytecode that becomes a NOP if ENABLE_VERIFIER is
+       undefined.
+
+2006-03-23 02:06  edwin
+
+       * src/vm/jit/parse.c (parse): Uncuddled else's.
+
+2006-03-23 00:56  edwin
+
+       * src/vm/jit/powerpc/darwin/md-asm.h (_asm_replacement_out)
+       (_asm_replacement_in, _replace_me): Added #defines for Darwin.
+
+2006-03-23 00:30  edwin
+
+       * src/vm/jit/stack.h (CHECK_STACK_DEPTH): Added. Uses goto to a common
+       label for stack depth mismatches.
+       (MARKREACHED): Use CHECK_STACK_DEPTH, which becomes a NOP if
+       ENABLE_VERIFIER is undefined.
+       
+       * src/vm/jit/stack.c (anaylse_stack): Use CHECK_STACK_DEPTH.
+       Added common label `throw_stack_depth_error` for stack depth
+       mismatches.
+       Uncuddled else's.
+
+2006-03-23 00:08  edwin
+
+       * src/vm/global.h (TYPECHECK_STACK_COMPCAT): Replaced by
+       ENABLE_VERIFIER.
+       The separation made no sense, anyway.
+       
+       * src/vm/jit/stack.c (TYPECHECK_STACK_COMPCAT): Replaced by
+       ENABLE_VERIFIER.
+       (analyse_stack): Removed code duplication by branching to a common
+       label
+       for all computational category errors: throw_stack_category_error.
+
+2006-03-22 23:51  edwin
+
+       * src/vm/jit/stack.h (BBEND): Inlined this macro (used only once) at
+       its
+       call site in stack.c.
+       
+       * src/vm/jit/stack.c (analyse_stack): Inlined BBEND macro and cleaned
+       up
+       the code.
+
+2006-03-22 23:29  edwin
+
+       * src/vm/jit/stack.c (analyse_stack): Removed obsolete label
+       `icmd_store`.
+
+2006-03-22 23:27  edwin
+
+       * src/vm/jit/jit.h (ICMD_READONLY_ARG, ICMD_CLEAR_ARGREN): Removed.
+       
+       * src/vm/jit/stack.c (analyse_stack): Removed obsolete argument
+       renaming.
+       
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Removed
+       ICMD_READONLY_ARG and ICMD_CLEAR_ARGREN.
+
+2006-03-22 23:17  edwin
+
+       * src/vm/jit/stack.h (TYPE_VERIFYERROR): Changed to CHECK_BASIC_TYPE.
+       This
+       macro now becomes a NOP if ENABLE_VERIFIER is undefined. Otherwise it
+       uses
+       a goto to the common label throw_stack_type_error in order to save
+       space.
+       
+       * src/vm/jit/stack.c (analyse_stack): Added variable `expectedtype`
+       for use
+       by CHECK_BASIC_TYPE. Added label throw_stack_type_error.
+
+2006-03-22 20:59  edwin
+
+       * src/vm/jit/i386/asmpart.S (asm_vm_call_method): Save/restore stack
+       pointer
+       properly. Fixed copy&paste error in restoring callee-save registers.
+
+2006-03-22 18:32  edwin
+
+       * src/vm/jit/stack.c (analyse_stack): Added throw_stack_overflow
+       label.
+       
+       * src/vm/jit/stack.h (CHECKOVERFLOW): Make this a NOP if
+       ENABLE_VERIFIER
+       is undefined.
+       (REQUIRE): Use #if defined(...)
+
+2006-03-22 17:25  edwin
+
+       * src/vm/jit/stack.h (REQUIRE): Made a NOP if ENABLE_VERIFIER is
+       undefined.
+       
+       * src/vm/jit/stack.c (analyse_stack): Only define
+       throw_stack_underflow
+       if ENABLE_VERIFIER is defined.
+       (jit_type): Do not define that for NDEBUG.
+
+2006-03-22 17:14  edwin
+
+       * src/vm/jit/stack.h (REQUIRE): Avoid duplication of exception
+       throwing code.
+       
+       * src/vm/jit/stack.c (analyse_stack): Added label
+       throw_stack_underflow
+       for the REQUIRE macro.
+
+2006-03-22 15:30  edwin
+
+       * src/vm/jit/powerpc/md.c (DISASSINSTR): #ifdef'ed
+       * src/vm/jit/alpha/md.c (DISASSINSTR): #ifdef'ed
+       * src/vm/jit/i386/md.c (DISASSINSTR): #ifdef'ed
+       * src/vm/jit/x86_64/md.c (DISASSINSTR): #ifdef'ed
+       * src/vm/jit/mips/md.c (DISASSINSTR): #ifdef'ed
+
+2006-03-22 12:35  edwin
+
+       * src/vm/jit/inline/inline.c (stack_depth): Moved here from
+       inline_debug.c.
+       (NDEBUG): Put debug stuff inside #ifndef NDEBUG.
+       
+       * src/vm/jit/inline/inline_debug.c (stack_depth): Moved to inline.c
+
+2006-03-22 09:19  edwin
+
+       * src/vm/jit/inline/inline_debug.c (debug_dump_stack): Fixed warning
+       on
+       platforms that don't define NULL as a pointer.
+
+2006-03-22 01:22  edwin
+
+       * src/vm/jit/inline/inline.c (relocate_stack_ptr_inter,
+       rewrite_method):
+       Fixed warnings.
+       
+       * src/vm/jit/inline/inline_debug.c (DEBUG_SLOT, dump_inline_tree):
+       Fixed warnings.
+
+2006-03-21 14:07  twisti
+
+       * src/vm/jit/i386/codegen.h (ALIGNCODENOP): Added.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Renamed to parentargs_base to
+       stackframesize. Align stack to 16-bytes.
+       (ICMD_GOTO): Use ALIGNCODENOP.
+       
+       * src/vm/jit/i386/asmpart.S (asm_vm_call_method): Align stack to
+       16-bytes. Use register defines for better readability.
+
+2006-03-21 11:58  twisti
+
+       * src/vm/jit/Makefile.am: Removed ifconv. Again...
+
+2006-03-21 11:50  twisti
+
+       * configure.ac (AC_INIT): Changed cvs to svn.
+       (--enable-inlining): Added.
+       
+       * src/vm/jit/Makefile.am (DIST_SUBDIRS): Added ifconv.
+       (ENABLE_IFCONV): Added. Use IFCONV_LIB.
+       (USE_INLINING): Renamed to ENABLE_INLINING.
+
+2006-03-21 07:57  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Comment 16-byte stack
+       alignment.
+       
+       * src/vm/jit/alpha/asmpart.S (asm_replacment_out): Fix comment about
+       stack layout.
+
+2006-03-21 07:42  edwin
+
+       * src/vm/jit/alpha/asmpart.S (REPLACEMENT_ROOM): Fixed deleted
+       characters.
+
+2006-03-21 04:14  edwin
+
+       * src/vm/jit/inline/Makefile.am (AM_CPPFLAGS): Added OS include dir.
+
+2006-03-21 03:15  edwin
+
+       * src/vm/jit/inline/inline_debug.c: Added file.
+
+2006-03-21 00:13  edwin
+
+       * src/vm/jit/inline/inline.c: Committed the inliner. This code works
+       but
+       it is still in prototyping stage.
+       
+       * src/vm/jit/parse.c (parse): Added (#if 0-ed) code for storing the
+       exception table that the inliner uses.
+
+2006-03-21 00:04  motse
+
+       major rework of jvmti. now we have three processes in jvmti mode.
+       there are still many debug statements
+
+2006-03-20 23:56  edwin
+
+       * src/vm/jit/code.h (codeinfo): Comment that profiling fields
+       will be removed.
+
+2006-03-20 15:41  edwin
+
+       * src/vm/jit/alpha/asmpart.S (asm_replacement_out): 16-byte align
+       stack.
+
+2006-03-20 15:37  edwin
+
+       * doc/stack_frames.txt: Some fixes, described PowerPC stack frames.
+
+2006-03-20 15:12  twisti
+
+       * src/vm/jit/alpha/codegen.c (codegen): Align stack to 16-bytes in
+       replacement stub.
+       * src/vm/jit/alpha/asmpart.S (asm_replacement_out): Load GP before
+       symbolic jumps.
+
+2006-03-20 14:43  twisti
+
+       * autogen.sh, src/boehm-gc/autogen.sh: Prefix all shell variables with
+       CACAO_ to prevent problems on OpenBSD.
+
+2006-03-20 14:27  twisti
+
+       * src/boehm-gc/darwin_stop_world.c,
+       src/boehm-gc/threadlibs.c,
+       src/boehm-gc/doc/README.changes,
+       src/boehm-gc/doc/README,
+       src/boehm-gc/doc/gcinterface.html,
+       src/boehm-gc/mark.c,
+       src/boehm-gc/include/gc.h,
+       src/boehm-gc/include/gc_cpp.h,
+       src/boehm-gc/include/gc_pthread_redirects.h,
+       src/boehm-gc/include/leak_detector.h,
+       src/boehm-gc/include/gc_config_macros.h,
+       src/boehm-gc/include/private/gc_priv.h,
+       src/boehm-gc/include/private/gcconfig.h,
+       src/boehm-gc/include/private/gc_pmark.h,
+       src/boehm-gc/include/private/gc_locks.h,
+       src/boehm-gc/configure.in,
+       src/boehm-gc/allchblk.c,
+       src/boehm-gc/powerpc_darwin_mach_dep.s,
+       src/boehm-gc/dbg_mlc.c,
+       src/boehm-gc/version.h,
+       src/boehm-gc/pthread_stop_world.c,
+       src/boehm-gc/malloc.c,
+       src/boehm-gc/headers.c,
+       src/boehm-gc/pthread_support.c,
+       src/boehm-gc/Makefile.direct,
+       src/boehm-gc/os_dep.c,
+       src/boehm-gc/Makefile.am,
+       src/boehm-gc/dyn_load.c,
+       src/boehm-gc/alloc.c,
+       src/boehm-gc/misc.c: Updated to upstream version 6.7.
+
+2006-03-19 19:46  edwin
+
+       * src/vm/jit/code.c (code_get_stack_frame_size): Implement stack
+       alignment
+       for MIPS.
+       
+       * src/vm/jit/mips/md.c (md_patch_replacement_point): Added.
+       
+       * src/vm/jit/mips/codegen.c (codegen): Handle replacement points.
+       8-byte align blocks that start with replacement points.
+       
+       * src/vm/jit/mips/asmpart.S (asm_replacement_out): Added.
+       (asm_replacement_in): Likewise.
+       
+       * src/vm/jit/replace.c (replace_activate_replacement_point): Activated
+       for MIPS.
+       (replace_deactivate_replacement_poin): Likewise.
+       (replace_me): Likewise.
+       (replace_read_executionstate): MIPS also keeps returnAddress in ITMP1.
+       (replace_write_executionstate): Likewise.
+       
+       * doc/stack_frames.txt: Documented MIPS stack frames.
+       
+       * src/vm/jit/powerpc/asmpart.S (asm_replacement_out): Fixed comment.
+
+2006-03-18 04:14  edwin
+
+       * src/vm/jit/powerpc/md.c (md_patch_replacement_point): Added.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Handle replacement points.
+       
+       * src/vm/jit/powerpc/asmpart.S (asm_replacement_out): Added.
+       (asm_replacement_in): Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Added missing initialization
+       of `replacementpoint`.
+       
+       * src/vm/jit/alpha/asmpart.S (asm_replacement_out): Store PV register.
+       
+       * src/vm/jit/code.c (code_get_sync_slot_count): Ported to PowerPC.
+       (code_get_stack_frame_size): Likewise.
+       
+       * src/vm/jit/replace.c (replace_activate_replacement_point)
+       (replace_deactivate_replacement_poin): Activated for PowerPC.
+       (replace_read_value, replace_write_value): Added.
+       (replace_read_executionstate): Ported to PowerPC, more complete
+       data type handling.
+       (replace_write_executionstate): Ported to Ported, more complete
+       data type handling, fixed missing initialization of `topslot`.
+       (replace_me): Activated for PowerPC.
+
+2006-03-16 23:32  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Use `disp` for displacement.
+
+2006-03-16 21:12  edwin
+
+       * src/vm/jit/alpha/md.c (Changes): Added my name.
+
+2006-03-16 21:11  edwin
+
+       * src/vm/jit/alpha/md.c (md_patch_replacement_point): Added.
+       (vim boilerplate): Added.
+       
+       * src/vm/jit/replace.c (replace_activate_replacement_point)
+       (replace_deactivate_replacement_point, replace_me):
+       Activated replacement for alpha.
+
+2006-03-16 20:31  edwin
+
+       * src/vm/jit/alpha/asmpart.S (asm_replacement_out)
+       (asm_replacement_in): Use stt/ldt for float registers.
+       
+       * src/vm/jit/alpha/codegen.c (codegen): Put replacement-out stub
+       generation in correct scope. Fix warnings.
+
+2006-03-16 19:55  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Handle replacement points.
+       
+       * src/vm/jit/alpha/asmpart.S (asm_replacement_out): Added.
+       (asm_replacement_in): Likewise.
+       (vim boilerplate): Added.
+
+2006-03-16 19:36  edwin
+
+       * src/vm/jit/replace.c (replace_read_executionstate)
+       (replace_write_executionstate): Position of synchronization slot must
+       be calculated from low addresses up, instead of backwards from stack
+       base.
+
+2006-03-16 19:00  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_points): Set
+       isleafmethod.
+
+2006-03-16 18:57  edwin
+
+       * src/vm/jit/code.c (code_codeinfo_new): Set codeinfo.isleafmethod.
+
+2006-03-16 18:44  edwin
+
+       * src/vm/jit/x86_64/codegen.c (codegen): Reuse `disp` variable.
+       * src/vm/jit/i386/codegen.c (codegen): Likewise.
+
+2006-03-16 18:38  edwin
+
+       * src/vm/jit/i386/asmpart.S (asm_replacement_out): Added pv.
+       * src/vm/jit/x86_64/asmpart.S (asm_replacement_out): Added pv.
+       
+       * src/vm/jit/replace.c (replace_read_executionstate)
+       (replace_write_executionstate): Prepared for alpha. Some cleanup.
+       
+       * src/vm/jit/replace.c (replace_write_executionstate):
+       Calculate stack pointer from given stack base.
+       (replace_executionstate_println): Added pv.
+       (replace_sourcestate_println): Added stackbase.
+       
+       * src/vm/jit/replace.h (executionstate): Added pv.
+       (sourcestate): Added stackbase.
+       
+       * src/vm/jit/tools/genoffsets.c (main): Added offes_pv.
+       
+       * doc/stack_frames.txt: Clarifications.
+
+2006-03-16 18:32  edwin
+
+       * src/vm/jit/code.c (code_get_sync_slot_count): No synchronization
+       slots
+       if USE_THREADS is undefined.
+       (code_get_stack_frame_size): Added x86_64 alignment slot.
+
+2006-03-16 17:29  edwin
+
+       * doc/stack_frames.txt: Added description of x86_64 stack frames.
+
+2006-03-16 17:24  twisti
+
+       * src/vm/jit/mips/md.c (sys/cachectl.h): Added.
+       (md_cacheflush, md_icacheflush, md_dcacheflush): New method.
+       
+       * src/vm/jit/mips/codegen.c: Use new exception stubs.
+       * src/vm/jit/mips/codegen.h (gen_nullptr_check, gen_bound_check)
+       (gen_div_check): Use new add reference functions.
+       
+       * src/vm/jit/mips/patcher.c: Replaced cacheflush with md_icacheflush
+       or md_dcacheflush.
+       
+       * src/vm/jit/mips/asmpart.S: (asm_calljavafunction): Removed.
+       (asm_calljavafunction2): Renamed to asm_vm_call_method. Pointer to
+       vm_arg block is now in a2. Use new defines.
+
+2006-03-16 17:22  edwin
+
+       * doc/stack_frames.txt: Added description of alpha stack frames.
+
+2006-03-16 17:16  twisti
+
+       * src/vm/vm.c (version): Check if __VERSION__ is defined.
+
+2006-03-16 15:36  twisti
+
+       * src/vm/jit/x86_64/md.c (md_cacheflush): New method.
+
+2006-03-16 15:28  edwin
+
+       * src/vm/jit/alpha/codegen.c (codegen): Cast to avoid compiler
+       warning.
+
+2006-03-16 15:19  twisti
+
+       * src/vm/jit/alpha, src/vm/jit/alpha/linux,
+       src/vm/jit/alpha/linux/.cvsignore, src/vm/jit/alpha/freebsd,
+       src/vm/jit/alpha/freebsd/.cvsignore, src/vm/jit/alpha/.cvsignore:
+       Added TAGS.
+
+2006-03-16 15:16  twisti
+
+       * src/vm/jit/alpha/md.c (md_cacheflush, md_icacheflush): New method.
+       * src/vm/jit/alpha/asmpart.S (asm_sync_instruction_cache): Renamed to
+       asm_cacheflush.
+       * src/vm/jit/alpha/patcher.c: Replaced asm_sync_instruction_cache with
+       md_icacheflush.
+
+2006-03-16 14:29  twisti
+
+       * src/vm/jit/i386/md.c (md_cacheflush): New method.
+
+2006-03-16 14:23  twisti
+
+       * src/vm/jit/powerpc, src/vm/jit/powerpc/linux,
+       src/vm/jit/powerpc/linux/.cvsignore, src/vm/jit/powerpc/darwin,
+       src/vm/jit/powerpc/darwin/.cvsignore, src/vm/jit/powerpc/.cvsignore:
+       Added TAGS.
+
+2006-03-16 14:19  twisti
+
+       * src/vm/jit/jit.h (md_cacheflush, md_icacheflush, md_dcacheflush):
+       Added.
+       * src/vm/jit/asmpart.h (asm_sync_instruction_cache): Removed.
+       
+       * src/vm/jit/codegen-common.c (codegen_finish): Call md_cacheflush for
+       the dynamic superinstructions (intrp) and the generated code.
+       
+       * src/vm/jit/powerpc/codegen.c: Use new exception stubs.
+       * src/vm/jit/powerpc/codegen.h (gen_nullptr_check, gen_bound_check):
+       Use new add reference functions.
+       
+       * src/vm/jit/powerpc/md.c (vm/jit/asmpart.h): Added.
+       (md_cacheflush, md_icacheflush, md_dcacheflush): New function.
+       * src/vm/jit/powerpc/patcher.c: Use new cache flush functions.
+
+2006-03-16 14:00  twisti
+
+       * src/cacao/cacao.c (mm/boehm.h, mm/memory.h): Removed.
+
+2006-03-16 13:59  twisti
+
+       * src/vm/jit/intrp/engine.c (USE_spTOS): Define it for __POWERPC__,
+       __POWERPC64__, __SPARC__. We know we need it there.
+
+2006-03-16 13:56  twisti
+
+       * tests/regression/native/Makefile.am (AM_CPPFLAGS): Added OS_DIR.
+
+2006-03-16 12:53  twisti
+
+       * src/vm/jit/tools/Makefile.am, src/vm/jit/verify/Makefile.am,
+       src/vm/jit/loop/Makefile.am, src/vm/jit/profile/Makefile.am,
+       src/cacao/Makefile.am, src/native/tools/Makefile.am,
+       src/native/vm/Makefile.am, src/native/Makefile.am,
+       src/toolbox/Makefile.am, src/mm/Makefile.am, src/cacaoh/Makefile.am
+       (AM_CPPFLAGS): Added OS_DIR.
+
+2006-03-16 12:03  twisti
+
+       * src/vm/jit/alpha/codegen.c: Use new exception stubs.
+       * src/vm/jit/alpha/codegen.h (gen_nullptr_check, gen_bound_check): Use
+       new add reference functions.
+
+2006-03-16 04:38  edwin
+
+       * src/vm/jit/replace.h (RPLPOINT_SBR): Removed obsolete flag constant.
+
+2006-03-16 04:17  edwin
+
+       * src/vm/jit/code.c (code_codeinfo_new): Commented.
+       (code_get_sync_slot_count): Added.
+       (code_get_stack_frame_size): Commented.
+       (code_codeinfo_free): Commented.
+       (code_free_code_of_method): Commented. Some cleanup.
+       
+       * src/vm/jit/code.h (code_get_sync_slot_count): Added.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Use cd->lastmcodeptr to avoid
+       patching over basic block boundaries.
+       * src/vm/jit/x86_64/codegen.c (codegen): Likewise.
+       
+       * src/vm/jit/replace.h (rplpoint): `type` and `flags` added,
+       `hashlink` removed.
+       (sourcestate): Added slots for synchronized methods.
+       
+       * src/vm/jit/replace.c (replace_create_replacement_points): Store
+       basicblock
+       type.
+       (replace_read_executionstate, replace_write_executionstate):
+       Handle 2-word locals. Special handling for BBTYPE_SBR and BBTYPE_EXH
+       blocks.
+       Transfer synchronization slots.
+
+2006-03-16 00:05  edwin
+
+       * src/vm/jit/code.c (code_get_stack_frame_size): Deal with 4/8-byte
+       stackslots.
+       
+       * src/vm/jit/tools/genoffsets.c (main): Offsets of intregs and
+       fltregs.
+       
+       * src/vm/jit/i386/asmpart.S (asm_replacement_out): Renamed regs to
+       intregs. Some cleanup.
+       
+       * src/vm/jit/replace.c (replace_activate_replacement_point)
+       (replace_deactivate_replacement_point): Enabled on x86_64.
+       (replace_read_executionstate, replace_write_executionstate):
+       Deal with 4/8-byte stackslots. Handle float registers.
+       (replace_executionstate_println, replace_sourcestate_println):
+       Print register names where possible.
+       
+       * src/vm/jit/x86_64/md.c (md_patch_replacement_point): Added.
+       (vim boilerplate): Added.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Handle replacement points.
+       Generate replacement-out stubs.
+       
+       * src/vm/jit/x86_64/asmpart.S (asm_replacement_out,
+       asm_replacement_in):
+       Added.
+       (vim boilerplate): Added.
+       
+       * src/vm/jit/replace.h (executionstate): Separate registers into int
+       and float registers. Some cleanup, use INT_REG_CNT, FLT_REG_CNT
+       macros.
+
+2006-03-15 21:27  edwin
+
+       * src/vm/jit/replace.c (replace_read_executionstate): Commented.
+       (replace_write_executionstate): Likewise, and set new PC here.
+       (replace_me): Target PC is now set in replace_write_executionstate.
+
+2006-03-15 20:53  edwin
+
+       * src/vm/jit/code.h (codeinfo): Changed regalloc to use rplalloc
+       structs.
+       Added fields storing stack slot counts.
+       
+       * src/vm/jit/code.c, src/vm/jit/code.h (code_get_stack_frame_size):
+       Added.
+       
+       * src/vm/jit/replace.c (replace_create_replacement_points): Store full
+       allocation info for locals and stack slots in rplalloc structs. Store
+       number of stack slots.
+       
+       * src/vm/jit/replace.c (replace_read_executionstate): Added.
+       (replace_write_executionstate): Likewise.
+       
+       * src/vm/jit/replace.c (replace_me): Use dump memory for sourcestate.
+       Read an write executionstate. Do actual replace by calling
+       asm_replace_in.
+       
+       * src/vm/jit/replace.c (replace_replacement_point_println)
+       (replace_executionstate_println): Print new fields. Show correct
+       number
+       of stack slots.
+       (replace_sourcestate_println): Added.
+       
+       * src/vm/jit/replace.h (rplalloc): Added.
+       (rplpoint): Changed regalloc fields to use rplalloc structs.
+       (executionstate): Removed saved regs.
+       (sourcestate): Added saved regs.
+       (replace_executionstate_println): Now takes codeinfo* argument.
+       (replace_sourcestate_println): Added.
+
+2006-03-15 20:43  edwin
+
+       * doc/stack_frames.txt: Added arrows indicating increasing
+       addresses/indices.
+
+2006-03-15 20:42  edwin
+
+       * src/vm/jit/asmpart.h (asm_replacement_in): Added prototype.
+
+2006-03-15 20:40  edwin
+
+       * src/vm/jit/i386/asmpart.S (asm_replacement_out): Save all integer
+       registers,
+       add space between stack frame and executionstate to accomodate
+       changing stack
+       frame size.
+       
+       * src/vm/jit/i386/asmpart.S (asm_replacement_in): Added.
+
+2006-03-15 20:38  edwin
+
+       * src/vm/jit/tools/genoffsets.c (main): Added offset of pc and sp
+       in executionstate.
+
+2006-03-15 17:17  twisti
+
+       * src/vm/jit/i386/codegen.c: Use new exception stubs. Don't cast with
+       M_MOV_IMM.
+       * src/vm/jit/i386/codegen.h (M_MOV_IMM, M_IST_IMM, M_IST32_IMM)
+       (M_PUSH_IMM): Added cast.
+       (M_CMP, M_CMP_MEMBASE, M_CMP_IMM_MEMBASE): Added.
+
+2006-03-15 16:36  twisti
+
+       * src/vm/jit/codegen-common.h (branchref): Removed.
+       (codegendata): Removed xboundrefs, xnullrefs, xcastrefs, xstorerefs,
+       xdivrefs and xexceptionrefs. Added exceptionrefs.
+       (codegen_addxboundrefs, codegen_addxcastrefs, codegen_addxdivrefs)
+       (codegen_addxstorerefs, codegen_addxnullrefs)
+       (codegen_addxexceptionrefs): Removed.
+       (codegen_add_arithmeticexception_ref)
+       (codegen_add_arrayindexoutofboundsexception_ref)
+       (codegen_add_arraystoreexception_ref)
+       (codegen_add_classcastexception_ref)
+       (codegen_add_nullpointerexception_ref)
+       (codegen_add_fillinstacktrace_ref): New function.
+       * src/vm/jit/codegen-common.c: Likewise.
+       
+       * src/vm/jit/dseg.h (exceptionref): New structure.
+       
+       * src/vm/jit/x86_64/codegen.c: Use new exception stubs. Don't cast
+       with M_MOV_IMM.
+       * src/vm/jit/x86_64/codegen.h (M_MOV_IMM, M_IMOV_IMM): Added cast.
+       
+       * src/vm/jit/stacktrace.c (stacktrace_inline_fillInStackTrace): Moved.
+       * src/vm/jit/stacktrace.h (STACKTRACE_inline_arithmeticexception)
+       (STACKTRACE_inline_arrayindexoutofboundsexception)
+       (STACKTRACE_inline_arraystoreexception)
+       (STACKTRACE_inline_classcastexception)
+       (STACKTRACE_inline_nullpointerexception)
+       (STACKTRACE_inline_fillInStackTrace): Added functionptr defines.
+       
+       * src/vm/jit/jit.h (branchref): Added.
+
+2006-03-15 12:14  edwin
+
+       * doc/stack_frames.txt: Added slots for synched methods.
+
+2006-03-15 12:04  edwin
+
+       * doc/stack_frames.txt: Added file.
+       
+       * src/vm/jit/code.h (codeinfo): Rearranged fields.
+       
+       * src/vm/jit/i386/md.c, src/vm/jit/i386/asmpart.S,
+       src/vm/jit/replace.c:
+       Comment changes.
+
+2006-03-15 11:38  edwin
+
+       * src/vm/jit/i386/md.c (md_patch_replacement_point): Generalized to
+       activation and deactivation of replacement points.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Prepare machine code for
+       patching replacement points.
+       
+       * src/vm/jit/replace.c, src/vm/jit/replace.h
+       (replace_deactivate_replacement_point): Added.
+       
+       * src/vm/jit/replace.c
+       (replace_replacement_point_println): Print machine code.
+       
+       * src/vm/jit/replace.h (rplpoint): Added `mcode` field.
+
+2006-03-15 11:18  twisti
+
+       * src/vm/jit/i386/codegen.c (GETFIELD, PUTFIELD, PUTFIELDCONST): Use
+       M_ILD32 and M_LLD32 macros.
+       (patcher): Save REG_ITMP3. Don't allocate a codegendata structure,
+       just do it as on Alpha.
+       * src/vm/jit/i386/codegen.h (var_to_reg_lng): Added.
+       (store_reg_to_var_lng): Likewise.
+       (M_ILD32, M_LLD, M_LLD32, M_IST32, M_IST32_IMM, M_LST, M_LST32)
+       (M_LST_IMM, M_LST32_IMM): Likewise.
+       
+       * src/vm/jit/i386/patcher.c: Changed position of return address due to
+       saving of REG_ITMP3.
+       * src/vm/jit/i386/asmpart.S (asm_wrapper_patcher): Changed due to
+       saving of REG_ITMP3.
+
+2006-03-15 10:34  edwin
+
+       * src/vm/jit/replace.c (replace_create_replacement_points): Don't use
+       rd->locals in the interpreter -- it's NULL there.
+
+2006-03-15 05:13  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_finish): Removed a compiler
+       warning.
+
+2006-03-15 05:08  edwin
+
+       * src/vm/jit/replace.h, src/vm/jit/i386/md.c
+       (md_patch_replacement_point):
+       Fixed return type.
+       
+       * src/vm/jit/replace.c (replace_activate_replacement_point): Only call
+       md_patch_replacement_point if ENABLE_JIT is defined.
+
+2006-03-15 04:57  edwin
+
+       * src/vm/jit/replace.c (replace_activate_replacement_point): Do not
+       use
+       the symbol md_patch_replacement_point on platforms where it does not
+       exist, yet.
+
+2006-03-15 04:43  edwin
+
+       * src/vm/jit/replace.h, src/vm/jit/replace.c
+       (replace_activate_replacement_point): Added.
+       (replace_activate): Added prototype.
+       (md_patch_replacement_point): Added prototype.
+       (replace_me): Added.
+       (replace_replacement_point_println): Added.
+       (replace_show_replacement_points): Cleaned up.
+       (replace_executionstate_println): Added.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Generate replacement-out stubs.
+       
+       * src/vm/jit/codegen-common.c (codegen_finish): Resolve replacement
+       points.
+       
+       * src/vm/jit/asmpart.h, src/vm/jit/i386/asmpart.S
+       (asm_replacement_out): Added.
+       
+       * src/vm/method.h (executionstate): Typo fixed.
+       
+       * src/vm/jit/stack.c (src/vm/jit/stack.c): Minor output change.
+       
+       * src/vm/jit/tools/genoffsets.c (executionstate): Added size and
+       offset.
+       
+       * src/vm/jit/i386/md.c (md_patch_replacement_point): Added.
+
+2006-03-15 01:50  edwin
+
+       * src/vm/jit/replace.h, src/vm/jit/replace.c
+       (replace_replacement_info_print): Renamed to
+       replace_show_replacement_points.
+       * src/vm/jit/stack.c: Likewise.
+
+2006-03-15 01:39  edwin
+
+       * src/vm/jit/replace.c, src/vm/jit/replace.h
+       (replace_create_replacement_points): Added.
+       (replace_free_replacement_points): Added.
+       (replace_replacement_info_print): Added.
+       
+       * src/vm/jit/replace.h (rplpoint): Changed fields, made fixed length.
+       
+       * src/vm/jit/code.h (codeinfo): Changed replacement point fields.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Create replacement points.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Use already allocated
+       codeinfo
+       for do-nothing methods.
+       
+       * src/vm/jit/code.c (code_codeinfo_free): Free replacement points.
+       
+       * src/vm/jit/stack.c (show_icmd_method): Print replacement points.
+
+2006-03-15 00:06  edwin
+
+       * src/vm/jit/stack.c, src/vm/jit/stack.h (icmd_print_stack): Renamed
+       to
+       stack_print. Documented.
+       (show_icmd_method, show_icmd_block, show_icmd): Documented.
+       (show_icmd_block): Print basicblock.bitflags.
+       
+       * src/vm/jit/stack.h (MARKREACHED): Mark targets of backward branches
+       as replacement points (BBFLAG_REPLACEMENT)
+
+2006-03-14 23:49  edwin
+
+       * src/vm/jit/jit.h (basicblock): Added `bitflags` field. Note: The
+       flags
+       of this struct should really be cleaned up.
+       
+       * src/vm/jit/jit.h (BASICBLOCK_INIT): Added, so we have a central
+       place
+       where to put initialization of the fields.
+       
+       * src/vm/jit/parse.c (parse): Cleaned up basicblock allocation.
+
+2006-03-14 23:16  edwin
+
+       * src/vm/jit/jit.h (basicblock): Comment.
+
+2006-03-14 23:00  edwin
+
+       * src/vm/jit/parse.c (fillextable): Removed unused label_index.
+       (parse): Likewise.
+       
+       * src/vm/jit/replace.h: Comment moved.
+
+2006-03-14 22:30  edwin
+
+       * src/native/jvmti/jvmti.c (GetMethodLocation): Use the new
+       m->code field to get to the location of the method.
+
+2006-03-14 22:16  edwin
+
+       * src/vm/method.h (methodinfo): Moved `entrypoint` to `codeinfo`.
+       * src/vm/loader.c (load_method): Likewise.
+       
+       * src/vm/loader.c (load_newly_created_array): Use codeinfo.entrypoint.
+       * src/vm/builtin.c (builtin_trace_exception): Likewise. Note:
+       Currently
+       we always use the current codeinfo. This is preliminary.
+       
+       * src/vm/jit/powerpc/codegen.c (codegen): Use cd->code->entrypoint.
+       * src/vm/jit/alpha/codegen.c (createnativestub): Likewise.
+       * src/vm/jit/dseg.c (dseg_resolve_datareferences): Likewise.
+       * src/vm/jit/mips/codegen.c (codegen, createnativestub): Likewise.
+       * src/vm/jit/i386/codegen.c (createnativestub): Likewise.
+       * src/vm/jit/intrp/codegen.c (intrp_codegen, intrp_createnativestub)
+       (createcalljavafunction): Likewise.
+       * src/vm/jit/x86_64/codegen.c (createnativestub): Likewise.
+       
+       * src/vm/jit/intrp/codegen.c (nativecall): Use m->code->entrypoint.
+       
+       * src/vm/jit/codegen-common.h, src/vm/jit/codegen-common.c,
+       src/cacaoh/headers.c (codegen_createnativestub): Now returns
+       the created codeinfo instead of the entrypoint.
+       
+       * src/vm/jit/stacktrace.c (stacktrace_add_method): Find the codeinfo
+       that contains the current PC. Note: This is preliminary. We should
+       find the codeinfo * via the PV of the code containing the PC.
+       
+       * src/vm/jit/jit.c (jit_compile): Use m->code. Create a codeinfo
+       for native stubs and the do-nothing stub
+       
+       * src/vm/jit/codegen-common.c (codegen_finish): Set entrypoint
+       in codeinfo instead of in methodinfo.
+
+2006-03-14 20:59  edwin
+
+       * src/vm/jit/code.c, src/vm/jit/replace.c, src/vm/jit/replace.h:
+       Added GPL header and boilerplate.
+
+2006-03-14 20:57  edwin
+
+       * src/vm/jit/code.h: Added GPL header and boilerplate.
+
+2006-03-14 20:51  edwin
+
+       * src/vm/jit/code.c, src/vm/jit/code.h: Files added.
+       
+       * src/vm/jit/replace.c, src/vm/jit/replace.h: Files added.
+       
+       * src/vm/jit/Makefile.am (code.[ch], replace.[ch]): Added.
+       
+       * src/vm/method.h (methodinfo): Added field `code`. Each method
+       may now have zero or more codeinfo:s associated with it. A
+       codeinfo represents the machine code of a particular version
+       of the compiled method. Note: Some fields in methodinfo that
+       may need to be moved to codeinfo where marked XXX.
+       
+       * src/vm/jit/codegen-common.h (codegendata): Added field `code`.
+       
+       * src/vm/jit/codegen-common.c (codegen_setup): Allocate
+       a new codeinfo.
+       (codegen_finish): Use `code` field of codegendata.
+       (codegen_createnativestub): Likewise.
+       
+       * src/vm/jit/stack.c (show_icmd_method, show_icmd_block):
+       Use `code` field of codegendata.
+       * src/vm/jit/dseg.c (dseg_display): Likewise.
+       * src/vm/jit/jit.c (jit_compile_intern): Likewise. Switch
+       current codeinfo after compilation is complete.
+       
+       * src/cacaoh/headers.c (code_free_code_of_method): Added stub.
+       
+       * src/vm/method.c (method_free): Free codeinfo:s of method.
+       
+       * src/vm/loader.c (load_method): Initialize m->code.
+
+2006-03-14 16:40  twisti
+
+       * src/cacao/Makefile.am (ENABLE_STATICVM): Added cacao_LDFLAGS,
+       otherwise the sumbols are not exported.
+       
+       * src/native/include/Makefile.am (ENABLE_STATICVM): Renamed to
+       WITH_STATIC_CLASSPATH.
+
+2006-03-14 16:30  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_create): We have to check for an
+       OOM when allocating from the heap. Fixes a crash in Jonas.
+
+2006-03-14 15:00  edwin
+
+       * doc/design_onstack_replacement.txt: More design options added.
+
+2006-03-13 21:26  edwin
+
+       * design_onstack_replacement.txt: Added file.
+
+2006-03-13 11:35  twisti
+
+       * src/vm/vm.c (vm_create): Only put .jar file into classpath. Fixes
+       startup bug with knopflerfish.
+
+2006-03-13 08:02  edwin
+
+       * src/native/vm/VMClass.c (Java_java_lang_VMClass_getComponentType):
+       Link class before accessing c->vftbl->arraydesc.
+
+2006-03-13 07:06  edwin
+
+       * src/native/vm/VMClass.c (Java_java_lang_VMClass_getSuperclass): We
+       must not
+       assume that the class is already linked, so we have to resolve the
+       super class
+       reference. This fixes a NPE bug with Jonas.
+
+2006-03-12 23:23  twisti
+
+       * src/vm/suck.c (suck_start): We really should close class files after
+       reading it.
+
+2006-03-11 21:34  edwin
+
+       * src/vm/resolve.c (resolve_class_from_typedesc): Safer check for
+       reference types.
+
+2006-03-11 20:41  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_finish): When setting the
+       entrypoint of a method, be sure not to overwrite an already set
+       entrypoint.
+
+2006-03-11 20:34  edwin
+
+       * src/vm/references.h (IS_XCLASSREF): Commented.
+
+2006-03-11 20:32  edwin
+
+       * src/vm/references.h (IS_XCLASSREF): Added.
+       (CLASSREF_OR_CLASSINFO_NAME): Added.
+
+2006-03-11 20:30  edwin
+
+       * src/vm/class.c, src/vm/class.h (class_classref_print): Added.
+       (class_classref_println): Added.
+
+2006-03-11 16:06  edwin
+
+       * src/vm/jit/jit.c (jit_compile_intern): Check if the method has been
+       compiled during static class initialization.
+
+2006-03-11 15:03  edwin
+
+       * src/vm/method.c (vim boilerplate): Added.
+
+2006-03-11 15:01  edwin
+
+       * src/vm/method.c (method_vftbl_lookup): Check ACC_INTERFACE on the
+       class, instead of on the method, where it is not set. Do not check
+       ACC_ABSTRACT here, because non-interface ACC_ABSTRACT methods are
+       looked up just like non-abstract non-interface methods.
+
+2006-03-10 22:22  twisti
+
+       * src/native/vm/VMRuntime.c (vm/options.h): Added.
+       (nativeLoad): Print dlerror output when dlopen fails.
+
+2006-03-09 16:13  twisti
+
+       * autogen.sh: Fixed typo.
+
+2006-03-09 13:51  twisti
+
+       * src/vm/jit/powerpc/darwin/md-asm.h (asm_calljavafunction): Removed.
+       (asm_calljavafunction_int): Likewise.
+       (asm_calljavafunction2): Likewise.
+       (asm_calljavafunction2int): Likewise.
+       (asm_calljavafunction2long): Likewise.
+       (asm_calljavafunction2float): Likewise.
+       (asm_calljavafunction2double): Likewise.
+       (_exceptionptr): Likewise.
+       (asm_vm_call_method): Define added.
+       (asm_vm_call_method_int): Likewise.
+       (asm_vm_call_method_long): Likewise.
+       (asm_vm_call_method_float): Likewise.
+       (asm_vm_call_method_double): Likewise.
+
+2006-03-09 13:46  twisti
+
+       * src/vm/jit/powerpc/patcher.c (patcher_get_putfield): Check for the
+       instruction order on long fields.
+
+2006-03-09 13:26  twisti
+
+       * autogen.sh: Check for installed programs and exit if no proper one
+       was found.
+       * src/boehm-gc/autogen.sh: Use the programs found by top-level
+       autogen.
+
+2006-03-08 09:44  twisti
+
+       * src/native/jni.c (PushLocalFrame): Implemented.
+       (PopLocalFrame): Likewise.
+       (DeleteLocalRef): Walk through all local frames.
+       (NewLocalRef): Allocate a new local frame if the current frame is out
+       of space.
+       (EnsureLocalCapacity): Implemented.
+       * src/vm/jit/codegen-common.c (codegen_finish_native_call): Release
+       all local reference frames.
+
+2006-03-07 20:44  twisti
+
+       * src/native/vm/VMClassLoader.c (nativeGetResources): Check if
+       resource is a directory and don't add it.
+
+2006-03-07 19:32  twisti
+
+       * src/vm/vm.c (usage): Small change.
+       
+       * src/native/vm/VMSystemProperties.c (preInit): Set java.ext.dirs to
+       $JAVA_HOME/jre/lib/ext.
+
+2006-03-07 18:18  twisti
+
+       * src/cacaoh/headers.c (intrp_main_stack): Changed type.
+
+2006-03-07 17:21  twisti
+
+       test
+
+2006-03-07 17:19  twisti
+
+       test
+
+2006-03-07 10:48  twisti
+
+       * src/native/jni.c (_Jv_jni_CallIntMethodA): New function.
+       (CallBooleanMethodA): Implemented.
+
+2006-03-07 10:36  twisti
+
+       * src/vm/string.c (string_java_lang_StringIndexOutOfBoundsException):
+       Added.
+       * src/vm/stringlocal.h: Likewise.
+       
+       * src/vm/exceptions.c
+       (exceptions_new_stringindexoutofboundsexception): New function.
+       (exceptions_throw_stringindexoutofboundsexception): Likewise.
+       * src/vm/exceptions.h: Likewise.
+       
+       * src/native/jni.c (GetStringRegion): Implemented.
+
+2006-03-07 09:40  twisti
+
+       * src/vm/vm.c (_Jv_jvm): Changed type to _Jv_JavaVM.
+       * src/vm/vm.h (_Jv_jvm): Added.
+       
+       * src/native/jni.c (ptr_jvm): Removed.
+       (ptr_env): Likewise.
+       (CallStaticObjectMethodA): Implemented.
+       (GetJavaVM): Return _Jv_jvm as vm.
+       (AttachCurrentThread): Return _Jv_env as env.
+       (GetEnv): Likewise.
+       (JNI_JavaVMTable): Renamed to _Jv_JNIInvokeInterface.
+       (JNI_JNIEnvTable): Renamed to _Jv_JNINativeInterface.
+       (JNI_CreateJavaVM): Allocate a _Jv_JavaVM structure and set it up
+       correctly, this fixes the usage in C++ programs.
+       * src/native/jni.h (_Jv_JavaVM): Added.
+       
+       * src/native/jvmti/jvmti.c: Renamed JNI_JavaVMTable to
+       _Jv_JNIInvokeInterface and JNI_JNIEnvTable to _Jv_JNINativeInterface.
+
+2006-03-06 18:45  christian
+
+       * src/vm/jit/stack.c (analyse_stack): Bugfix for copy elimination.
+
+2006-03-06 13:03  twisti
+
+       * src/vm/jit/powerpc/linux/Makefile.am (LIBS): Added defined empty, as
+       * this makes problems on darwin and actually we do not need to link
+       * the configured libraries into convenience libraries.
+       * src/vm/jit/powerpc/darwin/Makefile.am: Likewise.
+       * src/vm/jit/powerpc/Makefile.am: Likewise.
+       * src/vm/jit/alpha/linux/Makefile.am: Likewise.
+       * src/vm/jit/alpha/Makefile.am: Likewise.
+       * src/vm/jit/alpha/freebsd/Makefile.am: Likewise.
+       * src/vm/jit/tools/Makefile.am: Likewise.
+       * src/vm/jit/verify/Makefile.am: Likewise.
+       * src/vm/jit/mips/linux/Makefile.am: Likewise.
+       * src/vm/jit/mips/Makefile.am: Likewise.
+       * src/vm/jit/mips/irix/Makefile.am: Likewise.
+       * src/vm/jit/loop/Makefile.am: Likewise.
+       * src/vm/jit/inline/Makefile.am: Likewise.
+       * src/vm/jit/allocator/Makefile.am: Likewise.
+       * src/vm/jit/i386/linux/Makefile.am: Likewise.
+       * src/vm/jit/i386/Makefile.am: Likewise.
+       * src/vm/jit/i386/freebsd/Makefile.am: Likewise.
+       * src/vm/jit/schedule/Makefile.am: Likewise.
+       * src/vm/jit/intrp/Makefile.am: Likewise.
+       * src/vm/jit/x86_64/Makefile.am: Likewise.
+       * src/vm/jit/profile/Makefile.am: Likewise.
+       * src/vm/jit/Makefile.am: Likewise.
+       * src/vm/Makefile.am: Likewise.
+       * src/native/tools/Makefile.am: Likewise.
+       * src/native/vm/Makefile.am: Likewise.
+       * src/native/Makefile.am: Likewise.
+       * src/toolbox/Makefile.am: Likewise.
+       * src/mm/Makefile.am: Likewise.
+       * src/threads/native/Makefile.am: Likewise.
+       * src/fdlibm/Makefile.am: Likewise.
+       
+       * src/cacaoh/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS.
+
+2006-03-06 00:30  twisti
+
+       * src/vm/jit/powerpc/asmpart.S (asm_calljavafunction): Removed.
+       (asm_calljavafunction2): Renamed to asm_vm_call_method.
+
+2006-03-05 23:53  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_calljavafunction): Removed.
+       (asm_calljavafunction2): Renamed to asm_vm_call_method.
+
+2006-03-05 23:35  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_init): Removed
+       asm_calljavafunction.
+       * src/vm/jit/i386/asmpart.S (asm_calljavafunction): Removed.
+       (asm_calljavafunction2): Renamed to asm_vm_call_method.
+
+2006-03-05 23:24  twisti
+
+       * src/vm/vm.c (vm_call_method_intern): Removed.
+       (vm_vmargs_from_valist): Added.
+       (vm_vmargs_from_jvalue): Likewise.
+       (vm_call_method): New function.
+       (vm_call_method_valist): Likewise.
+       (vm_call_method_jvalue): Likewise.
+       (vm_call_method_vmarg): Likewise.
+       (vm_call_method_int): Likewise.
+       (vm_call_method_int_valist): Likewise.
+       (vm_call_method_int_jvalue): Likewise.
+       (vm_call_method_int_vmarg): Likewise.
+       (vm_call_method_long): Likewise.
+       (vm_call_method_long_valist): Likewise.
+       (vm_call_method_long_jvalue): Likewise.
+       (vm_call_method_long_vmarg): Likewise.
+       (vm_call_method_float): Likewise.
+       (vm_call_method_float_valist): Likewise.
+       (vm_call_method_float_jvalue): Likewise.
+       (vm_call_method_float_vmarg): Likewise.
+       (vm_call_method_double): Likewise.
+       (vm_call_method_double_valist): Likewise.
+       (vm_call_method_double_jvalue): Likewise.
+       (vm_call_method_double_vmarg): Likewise.
+       * src/vm/vm.h: Likewise.
+       
+       * src/native/jni.c (_Jv_jni_fill_vmargs_from_vargs): Removed.
+       (_Jv_jni_vmargs_from_args): Likewise.
+       (_Jv_jni_CallObjectMethodA): New function.
+       (_Jv_jni_CallObjectMethod): Use vm_call_method.
+       (_Jv_jni_CallIntMethod): Likewise.
+       (_Jv_jni_CallLongMethod): Likewise.
+       (_Jv_jni_CallFloatMethod): Likewise.
+       (_Jv_jni_CallDoubleMethod): Likewise.
+       (_Jv_jni_CallVoidMethod): Likewise.
+       (_Jv_jni_CallVoidMethodA): Likewise.
+       (_Jv_jni_invokeNative): Likewise.
+       (CallObjectMethodA): Implemented.
+       
+       * src/vm/loader.c (load_class_from_sysloader): Replaced
+       vm_call_method_intern by vm_call_method.
+       (load_class_from_classloader): Likewise.
+       * src/vm/finalizer.c (finalizer_run): Likewise.
+       * src/vm/initialize.c (initialize_class_intern): Likewise.
+       * src/vm/jit/stacktrace.c (stacktrace_inline_fillInStackTrace):
+       Likewise.
+       * src/vm/exceptions.c (throw_exception_exit_intern): Likewise.
+       (new_arrayindexoutofboundsexception): Likewise.
+       * src/vm/properties.c (properties_system_add): Likewise.
+       * src/cacao/cacao.c (setup_debugger_process): Likewise.
+       (getmainclassnamefromjar): Likewise.
+       (main): Likewise.
+       * src/native/vm/VMClassLoader.c (nativeGetResources): Likewise.
+       * src/native/native.c (native_new_and_init): Likewise.
+       (native_new_and_init_string): Likewise.
+       (native_new_and_init_int): Likewise.
+       (native_new_and_init_throwable): Likewise.
+       * src/threads/native/threads.c (threads_init): Likewise.
+       (threads_startup_thread): Likewise.
+       * src/cacaoh/headers.c: Likewise.
+       
+       * src/vm/jit/x86_64/asmpart.S (asm_calljavafunction): Removed.
+       (asm_calljavafunction2): Renamed to asm_vm_call_method.
+       * src/vm/jit/intrp/asmpart.c: Likewise.
+       * src/vm/jit/asmpart.h: Likewise.
+
+2006-03-05 23:05  twisti
+
+       * tests/regression/native/testarguments.c (nlsub): Use %llx on all
+       architectures.
+       (ndsub): Likewise.
+
+2006-03-05 21:54  christian
+
+       * src/vm/jit/allocator/simplereg.c (allocate_scratch_registers):
+       Bugfix and reformatting.
+
+2006-03-05 15:51  twisti
+
+       * src/vm/jit/i386/asmpart.S (asm_calljavafunction2): Pointer to vm_arg
+       block is now in a2. Use new defines.
+
+2006-03-04 18:35  twisti
+
+       * src/vm/jit/alpha/asmpart.S (asm_calljavafunction2): Pointer to
+       vm_arg block is now in a2. Use new defines.
+
+2006-03-04 18:01  twisti
+
+       * src/vm/jit/powerpc/asmpart.S (asm_calljavafunction2): Pointer to
+       vm_arg block is now in a2. Use new defines.
+
+2006-03-04 17:19  twisti
+
+       * src/vm/jit/asmpart.h (ASM_CALLJAVAFUNCTION): Removed.
+       (ASM_CALLJAVAFUNCTION_ADR): Likewise.
+       (ASM_CALLJAVAFUNCTION_INT): Likewise.
+       (ASM_CALLJAVAFUNCTION2): Likewise.
+       (ASM_CALLJAVAFUNCTION2_ADR): Likewise.
+       (ASM_CALLJAVAFUNCTION2_INT): Likewise.
+       (ASM_CALLJAVAFUNCTION2_LONG): Likewise.
+       (ASM_CALLJAVAFUNCTION2_FLOAT): Likewise.
+       (ASM_CALLJAVAFUNCTION2_DOUBLE): Likewise.
+       (asm_calljavafunction2int): Changed signature.
+       (asm_calljavafunction2long): Likewise.
+       (asm_calljavafunction2float): Likewise.
+       (asm_calljavafunction2double): Likewise.
+
+2006-03-04 17:15  twisti
+
+       * src/vm/global.h (jni_callblock): Removed.
+       
+       * src/vm/vm.c (vm/vm.h): Added.
+       (vm_call_method_intern): New function.
+       (vm_call_method_intern_int): Likewise.
+       (vm_call_method): Likewise.
+       (vm_call_method_int): Likewise.
+       (vm_call_method_long): Likewise.
+       (vm_call_method_float): Likewise.
+       (vm_call_method_double): Likewise.
+       * src/vm/vm.h (vm_arg): Structure added.
+       (vm_call_method_intern): New function.
+       (vm_call_method_intern_int): Likewise.
+       (vm_call_method): Likewise.
+       (vm_call_method_int): Likewise.
+       (vm_call_method_long): Likewise.
+       (vm_call_method_float): Likewise.
+       (vm_call_method_double): Likewise.
+       
+       * src/vm/jit/tools/genoffsets.c (vm/vm.h): Added.
+       (sizejniblock): Renamed to sizevmarg.
+       (offjniitemtype): Renamed to offvmargtype.
+       (offjniitem): Renamed to offvmargdata.
+       * src/vm/jit/x86_64/asmpart.S (asm_calljavafunction2): Pointer to
+       vm_arg block is now in a2. Use new defines.
+       
+       * src/vm/jit/stacktrace.c (vm/vm.h): Added.
+       (ASM_CALLJAVAFUNCTION): Replaced with vm_call_method_intern.
+       * src/vm/exceptions.c: Likewise.
+       * src/vm/properties.c: Likewise.
+       * src/vm/loader.c: Likewise.
+       * src/vm/finalizer.c: Likewise.
+       * src/vm/initialize.c: Likewise.
+       * src/cacao/cacao.c: Likewise.
+       * src/native/vm/VMClassLoader.c: Likewise.
+       * src/threads/native/threads.c: Likewise.
+       
+       * src/cacaoh/headers.c (asm_calljavafunction): Removed.
+       (intrp_asm_calljavafunction): Likewise.
+       (vm_call_method_intern): New function.
+       
+       * src/native/jni.c (fill_callblock_from_vargs): Renamed to
+       _Jv_jni_vmargs_from_vargs.
+       (fill_callblock_from_objectarray): Renamed to
+       _Jv_jni_vmargs_from_objectarray.
+       (_Jv_jni_vmargs_from_objectarray): New function.
+       (_Jv_jni_CallVoidMethodA): Likewise.
+       (ASM_CALLJAVAFUNCTION2): Replaced with appropriate vm_call_method
+       function.
+       (NewObjectA): Implemented.
+       (CallVoidMethodA): Likewise.
+       (CallNonvirtualVoidMethodA): Likewise.
+       (CallStaticVoidMethodA): Likewise.
+
+2006-03-03 00:00  twisti
+
+       * src/vm/linker.c (link_class_intern): Handle miranda methods
+       properly.
+       * src/vm/global.h (ACC_MIRANDA): Defined.
+       * src/native/vm/VMClass.c (getDeclaredMethods): Don't return miranda
+       methods.
+
+2006-03-01 17:00  twisti
+
+       * src/vm/options.c: Renamed runverbose to opt_verbosecall.
+       * src/vm/options.h: Likewise.
+       * src/vm/jit/alpha/codegen.c: Likewise.
+       * src/vm/jit/i386/codegen.c: Likewise.
+       * src/vm/jit/intrp/codegen.c: Likewise.
+       * src/vm/jit/mips/codegen.c: Likewise.
+       * src/vm/jit/powerpc/codegen.c: Likewise.
+       * src/vm/jit/x86_64/codegen.c: Likewise.
+       * src/vm/jit/intrp/asmpart.c: Likewise.
+       * src/vm/jit/intrp/dynamic-super.c: Likewise.
+       * src/vm/jit/intrp/java.vmg: Likewise.
+       
+       * src/vm/builtin.c (builtin_trace_exception): Renamed runverbose to
+       opt_verbosecall. Removed stacktrace printing code.
+       * src/vm/exceptions.c (exceptions_handle_exception): Renamed
+       runverbose to opt_verbosecall. Print exception stacktrace when caught.
+       
+       * src/vm/vm.c: Support Sun's commandline options and ignore them if
+       not supported. Reordered options.
+       
+       * src/native/vm/VMObject.c (notify): Removed debug output.
+       (notifyAll): Likewise.
+       (wait): Likewise.
+       * src/native/vm/VMThread.c (suspend): Likewise.
+       (resume): Likewise.
+       (nativeSetPriority): Likewise.
+       (nativeStop): Likewise.
+       (yield): Likewise.
+       
+       * src/native/vm/VMThrowable.c (fillInStackTrace): Renamed par1 to t.
+
+2006-02-23 14:08  twisti
+
+       * src/vm/jit/intrp/dynamic-super.c (disassemble_prim): New function.
+       (dynamic_super_init): Added disassembling of IADD, ILOAD and
+       GETFIELD_INT.
+
+2006-02-22 14:03  twisti
+
+       * src/vm/jit/i386/codegen.c (createnativestub): Renamed _exceptionptr
+       to _no_threads_exceptionptr.
+
+2006-02-22 13:34  twisti
+
+       * src/vm/jit/i386/codegen.c (mm/memory.h): Added.
+
+2006-02-21 16:17  twisti
+
+       * configure.ac (VERSION_CONFIGURE_ARGS, VERSION_CC, VERSION_CFLAGS):
+       Added define.
+       * src/vm/vm.c (version): Print configure options, compiler version and
+       CFLAGS.
+
+2006-02-21 16:06  twisti
+
+       * src/vm/jit/intrp/java.vmg (MULTIANEWARRAY): Use malloc instead of a
+       dynamic-sized array (-fomit-frame-pointer).
+
+2006-02-21 13:43  twisti
+
+       * src/vm/jit/intrp/codegen.c (cacao/cacao.h): Removed.
+       (vm/vm.h): Added.
+       (createnativestub): Replaced ENABLE_STATICVM with
+       WITH_STATIC_CLASSPATH and &env by _Jv_env.
+       
+       * src/vm/jit/intrp/patcher.c: Replaced ENABLE_STATICVM by
+       WITH_STATIC_CLASSPATH.
+       * src/vm/jit/intrp/java.vmg: Likewise.
+       
+       * src/vm/vm.c (mm/memory.h): Added.
+       (vm_create): Allocate the main thread interpreter stack on the Java
+       heap.
+
+2006-02-21 13:40  twisti
+
+       * src/vm/jit/jit.c (jit_compile_intern): Replaced ENABLE_STATICVM by
+       WITH_STATIC_CLASSPATH.
+
+2006-02-21 13:39  twisti
+
+       * src/cacao/cacao.c (main): Added main utf variable for better
+       debugability.
+
+2006-02-21 13:37  twisti
+
+       * src/native/native.c: Small changes.
+
+2006-02-21 13:35  twisti
+
+       * src/vm/loader.c (load_class_from_classloader): Added name
+       java.lang.String variable for better debugability.
+
+2006-02-21 12:41  twisti
+
+       * src/vm/jit/powerpc/asmpart.S: Rewritten for PIC code.
+
+2006-02-21 10:47  twisti
+
+       * src/vm/jit/alpha/asmpart.S: Rewritten for PIC code.
+
+2006-02-21 10:39  twisti
+
+       * src/vm/jit/x86_64/codegen.c (cacao/cacao.h): Removed.
+       (vm/vm.h): Added.
+       (createnativestub): Replaced ENABLE_STATICVM with
+       WITH_STATIC_CLASSPATH and &env by _Jv_env.
+
+2006-02-21 10:25  twisti
+
+       * src/vm/jit/i386/.cvsignore, src/vm/jit/i386/linux/.cvsignore: Added
+       TAGS.
+
+2006-02-21 09:34  twisti
+
+       * src/vm/jit/i386/asmpart.S: Rewritten for PIC code.
+
+2006-02-21 09:31  twisti
+
+       * src/threads/native/threads.c (vm/vm.h): Added.
+       (threads_startup_thread): Compiler warning fix.
+
+2006-02-21 09:25  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_getCurrentClassLoader): Renamed
+       to stacktrace_getCurrentClass and it returns the first Java method's
+       class on the stack.
+       * src/vm/jit/stacktrace.h (stacktrace_getCurrentClassLoader):
+       Likewise.
+
+2006-02-21 09:18  twisti
+
+       * src/vm/jit/intrp/engine.c (cacao/cacao.h): Removed.
+
+2006-02-21 09:14  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Remvoed ifconv, not yet.
+
+2006-02-21 09:11  twisti
+
+       * configure.ac: Default to AC_ENABLE_SHARED and AC_DISABLE_STATIC.
+       (ifconv): Added.
+       (jni.h): Check for jni.h in GNU Classpath.
+       (static-classpath): Added.
+       
+       * src/vm/vm.c, src/vm/vm.h: New files, contain the JVM startup code.
+       * src/vm/Makefile.am (libvm_la_SOURCES): Added vm.[ch].
+       
+       * src/cacao/cacao.c: Removed JVM startup code.
+       * src/cacao/cacao.h: Removed.
+       * src/cacao/Makefile.am: Replaced ENABLE_STATICVM by
+       WITH_STATIC_CLASSPATH.
+       (ENABLE_STATICVM): Build a shared library when not defined.
+       
+       * src/vm/options.c, src/vm/options.h (mm/memory.h, native/jni.h):
+       Added.
+       (native/jni.h): Added.
+       (opt_ind): Renamed to opt_index.
+       (opt_jar, opt_run, opt_method, opt_signature, opt_ifconv): Added.
+       (get_opt): Renamed to options_get.
+       (options_prepare): New method.
+       
+       * src/cacaoh/cacaoh.c (main): Use new option handling.
+       
+       * src/vm/jit/alpha/codegen.c, src/vm/jit/arm/codegen.c,
+       src/vm/jit/i386/codegen.c, src/vm/jit/mips/codegen.c,
+       src/vm/jit/powerpc/codegen.c (cacao/cacao.h): Removed.
+       (vm/vm.h): Added.
+       (createnativestub): Replaced ENABLE_STATICVM with
+       WITH_STATIC_CLASSPATH and &env by _Jv_env.
+       
+       * src/vm/jit/patcher.h, src/vm/jit/alpha/patcher.c,
+       src/vm/jit/arm/patcher.c, src/vm/jit/i386/patcher.c,
+       src/vm/jit/mips/patcher.c, src/vm/jit/powerpc/patcher.c,
+       src/vm/jit/x86_64/patcher.c: Replaced ENABLE_STATICVM by
+       WITH_STATIC_CLASSPATH.
+       
+       * src/vm/jit/x86_64/asmpart.S: Rewritten for PIC code.
+       
+       * src/vm/signal.c (cacao/cacao.h): Removed.
+       (vm/vm.h): Added.
+       (signal_handler_sigint): Use vm_* functions.
+       
+       * src/native/native.c: Replaced ENABLE_STATICVM by
+       WITH_STATIC_CLASSPATH.
+       (cacao/cacao.h): Removed.
+       (native_resolve_function): Smaller changes.
+       
+       * src/native/vm/VMRuntime.c: Replaced ENABLE_STATICVM by
+       WITH_STATIC_CLASSPATH.
+       (cacao/cacao.h): Removed.
+       (vm/vm.h): Added.
+       (execInternal): Removed.
+       (exit): Use vm_shutdown.
+       
+       * src/native/native.h: Replaced ENABLE_STATICVM by
+       WITH_STATIC_CLASSPATH.
+       * src/native/Makefile.am: Likewise.
+       * src/native/vm/VMSystemProperties.c: Likewise.
+       
+       * src/threads/native/threads.c (cacao/cacao.h): Removed.
+       
+       * src/native/jni.h: Removed our JNI stuff and include GNU Classpath's.
+       * src/native/jni.c: Adapt to the new jni.h header.
+       (Release<type>ArrayElements): Copy correct element type.
+       (Get<type>ArrayRegion): Likewise.
+       (Set<type>ArrayRegion): Likewise.
+
+2006-02-20 23:35  twisti
+
+       * src/vm/global.h: Sorted java_<type>array definitions.
+
+2006-02-20 23:31  twisti
+
+       * src/vm/linker.c (link_class_intern): Comment reformatted.
+
+2006-02-20 15:19  twisti
+
+       * src/vm/jit/intrp/engine.c (USE_spTOS): Disable per default.
+
+2006-02-20 14:08  twisti
+
+       * src/vm/classcache.c (classcache_new_name): Keep c89 compilers happy.
+
+2006-02-19 22:27  christian
+
+       * src/vm/jit/jit.h: added define STKEEP
+       
+       * src/vm/jit/simplereg.c (reg_free_tmp_func): SAVEDTMP and TMPARG
+       flags are not cleared anymore from Stackslots.
+       (reg_alloc_dup): TEMPVARs are not reused as SAVEDVARs anymore. This
+       has to be checked for conflicts.
+       (reg_mark_copy): Added. TEMPVAR Destination Stackslots are marked here
+       with STCOPY, if they use a duplicated register/memory location. Not
+       reused register/memory locations of TEMPVAR source Stacklots are freed
+       again.
+       (allocate_scratch_registers): ICMD_DUPx and ICMD_SWAP use now the new
+       reg_mark_copy.
+
+2006-02-16 19:39  christian
+
+       * src/vm/jit/stack.h (COPY): Prevent setting varkind to STACKVAR for
+       stackslots copied by DUPx and SWAP.
+       (DUP) Likewise.
+       * src/vm/jit/stack.c (analyse_stack): Copy elimination and needed
+       conflict resolution was implemented as
+       described in the CACAO paper. As "potential exception throwing
+       instruction" for now only INVOKE*s are
+       regarded. Conflict resolution over DUPx and SWAP should be refined to
+       be less conservative.
+       * src/vm/jit/jit.c (jit_init): Stackreq for JAVA_IINC is set to 0
+       again, since no dummy stackslot is
+       needed anymore for conflict resolution with XSTORE.
+       * src/vm/jit/allocator/simplereg.c (interface_regalloc): Reuse unused
+       float and int argument registers
+       for interfaces, too.
+       (reg_free_temp): Regard the new stackslot flag STCOPY, before freeing
+       a register/memory location.
+       (reg_alloc_dup): New function to allocate, if possible, the same
+       register/memory location for stackslot
+       copied by DUPx and SWAP.
+       (allocate_scratch_registers): The new function reg_alloc_dup is used
+       now for allocation at ICMD_DUPx and
+       ICMD_SWAP, if possible.
+       * src/vm/jit/jit.h: Added STCOPY as stackslot flag to mark
+       simultanously live stackslots with same
+       register after DUPx and SWAP.
+       * doc/stack.txt: Updated invariants to show the change with IINC (no
+       dummy stacklot anymore).
+
+2006-02-14 20:27  edwin
+
+       * src/native/jni.c (_Jv_jni_invokeNative): Cleanup.
+       
+       * src/native/jni.c (Changes): Added my name.
+       
+       * src/native/jni.c (vim boilerplate): Added.
+
+2006-02-14 20:10  edwin
+
+       * src/native/jni.c (_Jv_jni_invokeNative): Look up _all_ instance
+       methods
+       in the vftbl.
+
+2006-02-14 20:09  edwin
+
+       * src/vm/linker.c (link_class_intern): Do not override
+       package-private methods
+       from other packages.
+       
+       * src/vm/linker.c (vim boilerplate): Added.
+
+2006-02-14 15:53  edwin
+
+       * src/vm/classcache.c, src/vm/classcache.h: Merge cache entries when
+       they are resolved to the same class.
+
+2006-02-14 15:34  edwin
+
+       * src/vm/utf8.c, src/vm/utf8.h (utf_full_hashkey): Added.
+
+2006-02-14 11:01  twisti
+
+       * configure.ac (AC_INIT): Changed version number to 0.95+cvs.
+       (CFLAGS): Changed optimization back to -O0.
+
+2006-02-14 10:30  twisti
+
+       * ChangeLog: Updated for release 0.95.
+
+2006-02-14 10:14  twisti
+
+       * configure.ac: Updated version to 0.95, set optimization level to
+       -O2, some indent changes.
+       * ChangeLog-2005: Removed 2006 entries.
+
+2006-02-14 01:10  twisti
+
+       * src/vm/jit/profile/profile.c (profile_thread): Fixed compiler
+       warning.
+
+2006-02-14 01:05  twisti
+
+       * src/vm/jit/intrp/codegen.c (createcompilerstub): Store the
+       methodinfo pointer in the same place as in the methodheader for
+       compiled methods.
+
+2006-02-14 00:41  twisti
+
+       * src/vm/jit/x86_64/codegen.c (createcompilerstub): Store the
+       methodinfo pointer in the same place as in the methodheader for
+       compiled methods.
+
+2006-02-14 00:33  twisti
+
+       * contrib/svn2cl.xsl: New file.
+       * THIRDPARTY (contrib/svn2cl.xsl): Added copyright message.
+
+2006-02-14 00:05  twisti
+
+       * NEWS: Updated 0.95 release notes.
+
+2006-02-14 00:03  twisti
+
+       * src/vm/loader.c (load_field): Removed f->xta.
+       
+       * src/vm/class.h (vm/method.h): Added.
+       (vm/jit/inline/sets.h): Removed.
+       
+       * src/vm/method.h (vm/jit/inline/parseXTA.h): Removed.
+       
+       * src/vm/field.h (vm/jit/inline/parseXTA.h): Likewise.
+       (fieldinfo): Removed member xta.
+       
+       * src/lib/Makefile.am (EXTRA_DIST): Fixed typo.
+
+2006-02-14 00:01  twisti
+
+       * src/vm/jit/inline/sets.c, src/vm/jit/inline/parseRTstats.c,
+       src/vm/jit/inline/parseRT.c, src/vm/jit/inline/parseRTflags.h,
+       src/vm/jit/inline/parseRTprint.h, src/vm/jit/inline/sets.h,
+       src/vm/jit/inline/parseRTstats.h, src/vm/jit/inline/parseRT.h,
+       src/vm/jit/inline/parseXTA.c, src/vm/jit/inline/parseXTA.h: Removed.
+
+2006-02-13 23:45  twisti
+
+       * src/vm/class.c (class_findmethod_approx): Removed.
+       * src/vm/class.h (class_findmethod_approx): Likewise.
+       (class_resolvemethod_approx): Likewise.
+
+2006-02-13 23:16  edwin
+
+       * NEWS: Added JNI method resolution fix.
+
+2006-02-13 18:55  twisti
+
+       * src/vm/method.c (assert.h): Added.
+       (vm/linker.h): Likewise.
+       (vm/jit/methodheader.h): Likewise.
+       (method_vftbl_lookup): New method.
+       
+       * src/vm/method.h (vm/linker.h): Added.
+       (method_vftbl_lookup): New method.
+       
+       Fixes bug #17 and #18.
+       * src/native/jni.c: Complete rewrite of Call*Method code.
+
+2006-02-13 10:53  twisti
+
+       * src/vm/utf8.c (utf_display): Some reformatting.
+       (utf_display_classname): Likewise.
+
+2006-02-13 00:12  twisti
+
+       * src/vm/jit/mips/codegen.c (createcompilerstub): Store the methodinfo
+       pointer in the same place as in the methodheader for compiled methods.
+
+2006-02-12 23:43  twisti
+
+       * src/vm/jit/alpha/md.c (md_assembler_get_patch_address): New method.
+       (md_codegen_findmethod): Use assert's directly.
+       
+       * src/vm/jit/mips/md.c (md_assembler_get_patch_address): Likewise.
+       (md_codegen_findmethod): Likewise.
+       
+       * src/vm/jit/alpha/codegen.c (createcompilerstub): Store the
+       methodinfo pointer in the same place as in the methodheader for
+       compiled methods and pass the pointer in REG_ITMP1.
+       
+       * src/vm/jit/alpha/md-asm.h (mptr): Defined.
+       
+       * src/vm/jit/powerpc/asmpart.S (asm_call_jit_compiler): methodinfo
+       pointer is passed via itmp1. Use md_assembler_get_patch_address to
+       get the patch address.
+       (asm_calljavafunction, asm_calljavafunction2): Pass methodinfo pointer
+       via itmp1.
+
+2006-02-12 23:22  twisti
+
+       * src/vm/jit/powerpc/codegen.c (createcompilerstub): Store the
+       methodinfo pointer in the same place as in the methodheader for
+       compiled methods.
+       
+       * src/vm/jit/powerpc/asmpart.S (asm_call_jit_compiler): methodinfo
+       pointer is passed via itmp1.
+       (asm_calljavafunction, asm_calljavafunction2): Pass methodinfo pointer
+       via itmp1.
+
+2006-02-12 22:08  edwin
+
+       * src/threads/native/threads.c (threads_dump): Removed unused
+       variable 'ee'.
+
+2006-02-12 21:57  edwin
+
+       * src/native/vm/VMClass.c (Java_java_lang_VMClass_getDeclaredMethods):
+       Cast to java_lang_Class in order to avoid compiler warning.
+       
+       * src/native/vm/VMClass.c (Changes): Added my name.
+       
+       * src/native/vm/VMClass.c (vim biolerplate): Added.
+
+2006-02-12 21:47  edwin
+
+       * src/threads/native/threads.c (allocLockRecordSimple): Fixed
+       declaration
+       after code error.
+
+2006-02-12 16:28  twisti
+
+       * src/vm/jit/i386/codegen.c (createcompilerstub): Store the
+       methodinfo* in the same place as in the methodheader for compiled
+       methods.
+
+2006-02-12 16:24  edwin
+
+       * NEWS: Added directory check bugfix.
+
+2006-02-12 16:10  edwin
+
+       * NEWS: Added two bugfixes.
+
+2006-02-12 16:02  edwin
+
+       * src/vm/loader.c, src/vm/loader.h (vim boilerplate): Added.
+
+2006-02-12 13:11  twisti
+
+       * src/vm/zip.c (zip_open): Don't add directories to the zipfile
+       hashtable. We use the trailing `/' to identify a directory (i hope
+       that's correct).
+
+2006-02-12 12:59  christian
+
+       * src/vm/jit/x86_64/md-abi.c (md_param_alloc): Regard use of A0 for
+       returning float values.
+
+2006-02-12 02:18  edwin
+
+       * src/native/vm/VMClassLoader.c (vim boilerplate): Added.
+
+2006-02-12 02:17  edwin
+
+       * src/vm/classcache.c (classcache_store): Made classcache_store
+       idempotent.
+       
+       * src/native/vm/VMClassLoader.c
+       (Java_java_lang_VMClassLoader_defineClass):
+       Store defined class with classcache_store instead of just with
+       classcache_store_defined, so it an initiating loader is recorded for
+       the
+       class. This should solve problems with classes that are defined
+       outside
+       of a loadClass context (e.g. by java.lang.reflect.Proxy).
+
+2006-02-12 00:30  twisti
+
+       * src/native/vm/VMClass.c (getDeclaredMethods): Set the method's class
+       in java.lang.reflect.Method.
+       
+       * src/native/vm/Method.c (toolbox/logging.h, vm/jit/stacktrace.h):
+       Removed.
+       
+       * src/native/vm/VMSystem.c (identityHashCode): Use casts.
+
+2006-02-12 00:25  twisti
+
+       * src/vm/exceptions.c, src/vm/exceptions.h
+       (exceptions_throw_nosuchmethoderror): New method.
+
+2006-02-11 21:25  christian
+
+       * src/vm/jit/stack.h (COPY) All copied stackslots set to TEMPVAR.
+       This prevents conflicts with LOCALVAR
+       and
+       (DUP) Likewise.
+       STACKVARS.
+
+2006-02-07 23:18  edwin
+
+       * src/vm/jit/stack.h (TYPE_VERIFYERROR): Converted most of body to a
+       function.
+       
+       * src/vm/exceptions.c, src/vm/exceptions.h
+       (exceptions_throw_verifyerror_for_stack): Added.
+       
+       * src/vm/exceptions.c, src/vm/exceptions.h (vim boilerplate): Added.
+
+2006-02-07 21:27  edwin
+
+       * src/vm/jit/stack.h (vim boilerplate): Fixed.
+
+2006-02-07 21:15  twisti
+
+       * NEWS: Added some stuff.
+
+2006-02-07 17:28  edwin
+
+       * src/vm/jit/intrp/codegen.c (createcalljavafunction):
+       Removed t_inlining_globals.
+
+2006-02-07 17:22  edwin
+
+       * src/vm/jit/codegen-common.c, src/vm/jit/codegen-common.h
+       (codegen_setup):
+       Removed t_inlining_globals argument.
+       
+       * src/vm/jit/codegen-common.c (codegen_finish): Prepared for inlined
+       line
+       number tables. References with line number <-3 will not be relocated.
+       
+       * src/vm/jit/codegen-common.c (codegen_createnativestub):
+       Removed t_inlining_globals and inlining_setup.
+       
+       * src/vm/jit/codegen-common.h (Changes): Added my name to 'Changes'.
+       
+       * src/vm/jit/inline/inline.c, src/vm/jit/inline/inline.h: Ripped out
+       old
+       inliner.
+       
+       * src/vm/jit/jit.c: Removed inlining headers.
+       
+       * src/vm/jit/jit.c (INLINE_GOTO): Added instruction name to table.
+       
+       * src/vm/jit/jit.c (jit_compile_intern): Removed t_inlining_globals
+       argument.
+       
+       * src/vm/jit/codegen-common.c, src/vm/jit/codegen-common.h,
+       src/vm/jit/inline/inline.c, src/vm/jit/inline/inline.h (vim
+       boilerplate):
+       Added.
+
+2006-02-07 16:52  edwin
+
+       * src/vm/jit/i386/codegen.c (codegen): Prepared for inlining. The
+       icmds
+       ICMD_INLINE_START, ICMD_INLINE_END, ICMD_INLINE_GOTO were
+       implemented, and
+       at the start of exception handlers the indepth is no longer assumed
+       to be 1.
+
+2006-02-07 16:47  edwin
+
+       * src/vm/jit/jit.h (Changes): Fixed tabs.
+
+2006-02-06 21:06  twisti
+
+       * src/threads/native/threads.c, src/threads/native/threads.h
+       (sleepThread): Renamed to thread_sleep.
+
+2006-02-06 21:01  twisti
+
+       * src/cacao/cacao.c (vm/jit/profile.h): Changed to
+       vm/jit/profile/profile.h.
+       (main): profile_init and profile_start_thread calls added.
+
+2006-02-06 18:50  twisti
+
+       * configure.ac (AC_CONFIG_FILES): Added src/vm/jit/profile/Makefile.
+
+2006-02-06 18:49  twisti
+
+       * src/vm/jit/Makefile.am (DIST_SUBDIRS): Added profile.
+       (PROFILE_LIB): Added.
+       (PROFILE_SOURCES): Removed.
+
+2006-02-06 18:48  twisti
+
+       * src/vm/jit/profile/profile.c (profile_init): New method.
+       (profile_thread): Likewise.
+       (profile_start_thread): Likewise.
+       * src/vm/jit/profile/profile.h (profile_init): Added.
+       (profile_start_thread): Likewise.
+       * src/vm/jit/profile/Makefile.am: New file.
+       * src/vm/jit/profile/.cvsignore: Likewise.
+
+2006-02-06 18:34  twisti
+
+       * src/vm/jit/profile.h: Moved to src/vm/jit/profile/.
+
+2006-02-06 18:33  twisti
+
+       * src/vm/jit/profile.c: Moved to src/vm/jit/profile/.
+       * src/vm/jit/profile: Added.
+
+2006-02-06 18:32  twisti
+
+       * src/vm/jit/profile: Ooops.
+
+2006-02-06 18:31  twisti
+
+       * src/vm/jit/profile.c: Moved to src/vm/jit/profile/.
+
+2006-02-06 18:14  twisti
+
+       * src/vm/jit/allocator/Makefile.am: Use tabs instead of space.
+       (INCLUDE): Renamed to AM_CPPFLAGS.
+
+2006-02-06 08:22  edwin
+
+       * doc/Makefile.am (EXTRA_DIST): Added inlining_stacktrace.txt and
+       native_threads.txt.
+
+2006-02-06 06:49  edwin
+
+       * src/threads/native/threads.c: Minor cleanup.
+
+2006-02-06 06:46  edwin
+
+       * src/threads/native/threads.c: Uncuddled `else`s and other cleanup.
+
+2006-02-06 06:16  edwin
+
+       * doc/inlining_stacktrace.txt: Clarified, added entry after the
+       inlined body
+       for the rest of the line after the call.
+
+2006-02-06 05:00  edwin
+
+       * src/vm/jit/i386/machine-instr.h (compare_and_swap): Commented.
+
+2006-02-06 04:50  edwin
+
+       * doc/native_threads.txt: Added.
+
+2006-02-06 04:46  edwin
+
+       * src/threads/native/threads.c (allocLockRecordPool): Relink the free
+       list
+       of lock records when reusing a pool from the global_pool. This avoids
+       cross-linking of lock record owned by different threads, and hopefully
+       fixes our long-standing deadlock problem.
+       
+       * src/threads/native/threads.c (allocLockRecordSimple,
+       recycleLockRecord)
+       (initObjectLock): Temporarily added assertions to shake out possible
+       further bugs in the free list handling.
+       
+       * src/threads/native/threads.c (monitorEnter, monitorExit): Commented.
+       
+       * src/threads/native/threads.c (Changes): Added my name to 'Changes'.
+       
+       * src/threads/native/threads.c (vim boilerplate): Added.
+
+2006-02-06 01:28  edwin
+
+       * src/vm/jit/stacktrace.c (stacktrace_add_method_intern): Added.
+       (stacktrace_add_method): Documented. Now uses
+       stacktrace_add_method_intern.
+       (stacktrace_getCurrentClassLoader): Documented.
+       (stacktrace_dump_trace): Removed unused variable.
+       (Changes): Added my name to 'Changes'.
+
+2006-02-06 01:08  edwin
+
+       * src/vm/jit/verify/typecheck.c (verify_basic_block): Teach the
+       verifier
+       about the new inline instructions ICMD_INLINE_START, ICMD_INLINE_END,
+       and ICMD_INLINE_GOTO.
+
+2006-02-06 01:02  edwin
+
+       * src/vm/jit/stack.c (analyse_stack): Set bptr->stack for each visited
+       block.
+       (show_icmd): Implemented printing of new inline instructions.
+
+2006-02-06 00:02  edwin
+
+       * src/vm/jit/allocator/simplereg.c (ICMD_INLINE_GOTO): Added.
+       (Changes): Added my name to 'Changes'.
+       (vim boilerplate): Added.
+
+2006-02-05 23:34  edwin
+
+       * src/vm/jit/allocator/lsra.c, src/vm/jit/allocator/lsra.h (lsra,
+       lsra_init):
+       Removed t_inlining_globals argument.
+       (Changes): Added my name to 'Changes'.
+       (vim boilerplate): Added.
+       
+       * src/vm/jit/jit.c (lsra): Removed t_inlining_globals argument.
+
+2006-02-05 23:24  edwin
+
+       * src/vm/jit/jit.c (reg_setup): Removed t_inlining_globals argument.
+       
+       * src/vm/jit/codegen-common.c (reg_setup): Removed t_inlining_globals
+       argument.
+       
+       * src/vm/jit/reg.c, src/vm/jit/reg.h (reg_setup): Removed
+       t_inlining_globals
+       argument.
+       (Changes): Added my name to 'Changes'.
+       (vim boilerplate): Added.
+
+2006-02-05 23:09  edwin
+
+       * src/vm/jit/jit.h (Changes): Added my name to 'Changes'.
+
+2006-02-05 23:07  edwin
+
+       * src/vm/jit/jit.h (ICMD_INLINE_GOTO): Added. Not used, yet.
+       
+       * src/vm/jit/jit.h (basicblock): Added 'stack' field. Not used, yet.
+       
+       * src/vm/jit/jit.h, src/vm/jit/jit.c (vim boilerplate): Added.
+
+2006-02-05 23:02  edwin
+
+       * src/vm/jit/parse.c (parseRT.h, parseXTA.h, inline.h,
+       parseRTprint.h):
+       No longer included.
+       (parse): Removed t_inlining_globals * from arguments.
+       
+       * src/vm/jit/jit.c (parse): Removed t_inlining_globals * from
+       arguments.
+
+2006-02-05 22:47  edwin
+
+       * src/vm/jit/parse.c, src/vm/jit/parse.h (inline_env): Removed most
+       occurences.
+       (bound_check1): Renamed to bound_check_exclusive.
+
+2006-02-05 22:22  edwin
+
+       * src/vm/jit/parse.c (useinlining): Removed.
+
+2006-02-05 17:36  edwin
+
+       * doc/inlining_stacktrace.txt: Added warning about signedness.
+       Fixed copy&paste errors.
+
+2006-02-05 15:26  edwin
+
+       * doc/inlining_stacktrace.txt: Added.
+       
+       * src/vm/jit/dseg.c (dseg_addlinenumber_inline_start): Added.
+       (dseg_addlinenumber_inline_end): Added.
+       (dseg_addlinenumber): Commented.
+       (vim boilerplate): Added.
+       
+       * src/vm/jit/dseg.h (linenumberref): Changed for inlining stacktraces.
+       Made targetmpc a ptrint, made linenumber s4, reordered fields.
+       (dseg_addlinenumber_inline_start): Added.
+       (dseg_addlinenumber_inline_end): Added.
+       (vim boilerplate): Added.
+
+2006-02-05 13:52  stefan
+
+       * src/threads/native/threads.h: waiting is correctly typed now
+       (previous checkin was wrong).
+
+2006-02-05 13:39  stefan
+
+       * src/threads/native/threads.c: Let's see if this improves the dead
+       lock situation (waiter handling changed slightly).
+
+2006-02-05 12:22  twisti
+
+       * tests/regression/native/.cvsignore (*.h, *.so): Added.
+
+2006-02-05 12:20  twisti
+
+       * tests/regression/native/Makefile.am,
+       tests/regression/codepatching/Makefile.am,
+       tests/regression/Makefile.am (JAVAFLAGS): Use VM_ZIP_STRING and
+       GLIBJ_ZIP_STRING.
+
+2006-02-05 12:03  twisti
+
+       * src/vm/jit/powerpc/asmpart.S, src/vm/jit/alpha/asmpart.S,
+       src/vm/jit/mips/asmpart.S, src/vm/jit/i386/asmpart.S,
+       src/vm/jit/x86_64/asmpart.S, src/vm/jit/arm/asmpart.S: Disable
+       executable stacks, this is required for Gentoo and we actually don't
+       need them.
+
+2006-02-05 00:40  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_create): Get the value of
+       _no_threads_stackframeinfo, since it's a pointer, not a structure.
+       (stacktrace_print_trace): Check for NULL value and return.
+       * src/vm/exceptions.c (exceptions_handle_exception): Compiler warning
+       fixed.
+       (exceptions_print_exception): Check for NULL value, print it and
+       return.
+
+2006-02-05 00:16  twisti
+
+       * src/mm/memory.h (string.h): Moved after config.h.
+       (OFFSET): Use internal datatypes.
+       (NEW, MNEW): Use the proper GC macro when Gc is disabled.
+
+2006-02-05 00:13  twisti
+
+       * src/mm/nogc.c (config.h): Moved in front of system headers.
+       (heap_allocate): Call exceptions_throw_outofmemory_exit.
+       (nogc_init): Likewise.
+
+2006-02-05 00:01  twisti
+
+       * src/threads/none/: New.
+       * src/threads/none/threads.h: New file. We need this one for
+       e.g. stacktrace.c where we use thread stuff in the code.
+
+2006-02-04 23:59  twisti
+
+       * src/vm/access.c (assert.h): Move after config.h.
+       * src/vm/properties.c (mm/memory.h): Added.
+       * src/vm/jit/stacktrace.c (mm/memory.h): Likewise.
+       (threads.h): Added.
+       (stacktrace_create): Handle stackframeinfo when threads disabled
+       properly.
+
+2006-02-04 23:56  twisti
+
+       * src/vm/jit/allocator/simplereg.c (allocate_scratch_registers):
+       Generate an exception instead of exiting.
+       * src/vm/jit/allocator/lsra.c (lsra_scan_registers_canditates):
+       Likewise.
+
+2006-02-04 20:15  twisti
+
+       * src/vm/jit/stacktrace.h (stacktrace_getCallingClassLoader): Renamed
+       to stacktrace_getCurrentClassLoader.
+       
+       * src/cacaoh/headers.c (nativelyoverloaded): Fixed compiler warning.
+
+2006-02-04 19:09  twisti
+
+       * src/native/native.c (native_resolve_function): Print failed is the
+       symbol was not found.
+
+2006-02-04 19:08  twisti
+
+       * src/vm/jit/stacktrace.h (STACKTRACE_CAPACITY_DEFAULT)
+       (STACKTRACE_CAPACITY_INCREMENT): Changed default from 40 to 80, seems
+       this is what eclipse and tomcat want.
+       (stacktracebuffer): Changed entries from an array to a pointer.
+
+2006-02-04 19:04  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_add_entry): Reallocate to
+       stb->entries.
+       (stacktrace_create): Do two dump and heap allocs, does not affect
+       performance.
+       (stacktrace_getCallingClassLoader): Renamed to
+       stacktrace_getCurrentClassLoader.
+       
+       * src/native/jni.c (FindClass): Renamed
+       stacktrace_getCallingClassLoader to stacktrace_getCurrentClassLoader.
+       
+       * src/native/vm/VMStackWalker.c (getCallingClassLoader): Revert to old
+       implementation.
+
+2006-02-04 17:39  edwin
+
+       * doc/stack.txt: Typos fixed.
+
+2006-02-04 17:31  edwin
+
+       * doc/stack.txt: Expanded tabs.
+       * doc/Makefile.am (stack.txt): Added EXTRA_DIST entry for stack.txt.
+
+2006-02-04 17:25  edwin
+
+       * doc/stack.txt: Added. This file describes some details about the
+       stack representation.
+
+2006-02-04 00:43  twisti
+
+       * src/native/Makefile.am (CLEANFILES): Always clean nativetable.inc.
+       ($(srcdir)/native.c): Moved inside if ENABLE_STATICVM where it
+       belongs! Dammit!
+
+2006-02-04 00:33  twisti
+
+       * src/native/Makefile.am: Accidentally moved the library into if
+       ENABLE_STATICVM.
+       * src/native/include/Makefile.am: Enable accidentally removed
+       dependencies.
+
+2006-02-04 00:13  edwin
+
+       * src/vm/jit/verify/typecheck.c (logging): Adapted to new logging API.
+
+2006-02-04 00:08  edwin
+
+       * src/vm/jit/stack.h (MARKREACHED): Use BBREACHED for readability.
+       (vim boilerplate): Added.
+
+2006-02-04 00:04  edwin
+
+       * src/vm/method.h (methodinfo): Fixed copy&paste error in comment.
+       (vim boilerplate): Added.
+
+2006-02-04 00:00  edwin
+
+       * src/vm/jit/stacktrace.c (vim boilerplate): Added.
+
+2006-02-03 22:57  twisti
+
+       * configure.ac (VM_ZIP_STRING): Added.
+       (GLIBJZ): Renamed to GLIBJ_ZIP_STRING.
+       * src/vm/global.h (CACAO_VM_ZIP_PATH): Use GLIBJ_ZIP_STRING.
+       * src/lib/Makefile.am (GLIBJ_ZIP): Likewise.
+       * src/native/include/Makefile.am, src/native/Makefile.am (VM_ZIP): Use
+       VM_ZIP_STRING.
+       (GLIBJ_ZIP): Use GLIBJ_ZIP_STRING.
+       * contrib/setenvinstalled.in, contrib/setenvsource.in: Likewise.
+
+2006-02-03 22:53  twisti
+
+       * src/native/vm/VMRuntime.c (nativeLoad): #ifdef ENABLE_STATICVM
+       warning fix.
+
+2006-02-03 22:24  twisti
+
+       * src/vm/global.h (CACAO_VM_ZIP_PATH): Removed accidentally commited
+       VM_ZIP_FILE.
+       * src/native/Makefile.am (VM_ZIP): Likewise.
+       * src/native/include/Makefile.am (VM_ZIP): Likewise.
+
+2006-02-03 22:03  twisti
+
+       * src/vm/global.h (CACAO_VM_ZIP_PATH): Set correctly for ifndef
+       ENABLE_ZLIB.
+       * src/lib/Makefile.am (JAVA_VM_FILES): Renamed to VM_JAVA_FILES.
+       (VM_CLASS_FILES): Added.
+       (pkgdata_DATA): Set to class files for ifndef ENABLE_ZLIB.
+       * src/native/include/Makefile.am (VM_ZIP): Set correctly for ifndef
+       ENABLE_ZLIB.
+       * src/native/Makefile.am (VM_ZIP): Likewise.
+
+2006-02-03 21:58  twisti
+
+       * src/vm/suck.c (suck_add): Fixed compiler warning with #ifndef
+       ENABLE_ZLIB.
+
+2006-02-03 21:51  twisti
+
+       * src/native/tools/.cvsignore (TAGS): Added.
+
+2006-02-03 20:54  twisti
+
+       * src/native/Makefile.am (VM_ZIP, GLIBJ_ZIP, CLASSPATH): Added.
+
+2006-02-03 20:53  twisti
+
+       * src/native/tools/gennativetable.c (main): Don't free bootclasspath,
+       do proper initalization of subsystems, don't link classes.
+
+2006-02-03 19:44  twisti
+
+       * src/native/Makefile.am (nativetable.inc): Pass classpath on
+       commandline, environment variable support was removed.
+
+2006-02-03 19:42  twisti
+
+       * src/native/tools/gennativetable.c: Updated to work again.
+
+2006-02-03 19:27  twisti
+
+       * src/cacao/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS.
+       (CLASSPATH_PREFIX): Renamed to CLASSPATH_LIBDIR.
+
+2006-02-03 18:45  twisti
+
+       * configure.ac (ENABLE_SOFTFLOAT): Added.
+       (NDEBUG): Bugfix for AM_CONDITIONAL.
+
+2006-02-03 14:14  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_entry): Wrong return value,
+       added some checks.
+
+2006-02-03 13:19  twisti
+
+       * src/vm/jit/stacktrace.c, src/vm/jit/stacktrace.h
+       (lineNumberTableEntry): Renamed to linenumbertable_entry.
+       (addEntry): Renamed to stacktrace_add_entry.
+       (stacktrace_fillInStackTrace_methodRecursive): Removed.
+       (stacktrace_fillInStackTrace_method): Renamed to
+       stacktrace_add_method.
+       (cacao_stacktrace_fillInStackTrace): Renamed to stacktrace_create.
+       (stackTraceCollector): Removed.
+       (cacao_stacktrace_NormalTrace): Renamed to
+       stacktrace_fillInStackTrace.
+       (classContextCollector): Removed.
+       (cacao_createClassContextArray): Renamed to
+       stacktrace_getClassContext.
+       (stacktrace_classLoaderCollector): Removed.
+       (cacao_currentClassLoader): Renamed to
+       stacktrace_getCallingClassLoader.
+       (getStackCollector): Removed.
+       (cacao_getStackForVMAccessController): Renamed to stacktrace_getStack.
+       
+       * src/native/jni.c (jni_init): Use new GCNEW.
+       (FindClass): Renamed cacao_currentClassLoader to
+       stacktrace_getCallingClassLoader.
+       
+       * src/native/vm/VMAccessController.c (getStack): Renamed
+       cacao_getStackForVMAccessController to stacktrace_getStack.
+       
+       * src/native/vm/VMStackWalker.c (getClassContext): Renamed
+       cacao_createClassContextArray to stacktrace_getClassContext.
+       (getCallingClass): Likewise.
+       (getCallingClassLoader): Call stacktrace_getCallingClassLoader.
+       
+       * src/native/vm/Method.c (config.h): Added.
+       (invokeNative): Renamed cacao_createClassContextArray to
+       stacktrace_getClassContext.
+       
+       * src/native/vm/Field.c (config.h): Added.
+       (cacao_get_field_address): Renamed cacao_createClassContextArray to
+       stacktrace_getClassContext. Check for CLASS_INITIALIZED.
+       
+       * src/native/vm/VMThrowable.c
+       (native/include/gnu_classpath_Pointer.h): Added.
+       (fillInStackTrace): Call stacktrace_fillInStackTrace.
+       (getStackTrace): Adapted.
+       
+       * src/mm/memory.h (GCNEW): Use only 1 parameter, like NEW.
+       (GCMNEW): Added.
+
+2006-02-03 12:46  twisti
+
+       * src/threads/native/threads.h (THREADOBJECT): Don't cast to
+       java_lang_VMThread*, we don't need that.
+
+2006-02-03 12:38  twisti
+
+       * src/vm/method.c (method_printflags, method_print): Check for NULL.
+       * src/vm/field.c (field_printflags, field_print) Likewise.
+       (stdio.h): Added.
+       * src/vm/class.c (class_printflags, class_print): Likewise.
+
+2006-02-02 09:16  twisti
+
+       * configure.ac (AC_PROG_JAR): Added.
+       * m4/ac_prog_jar.m4: New file.
+       * src/lib/Makefile.am (VM_ZIP): Added.
+       (vm.zip): Check if $(JAR) is zip or jar type.
+
+2006-02-02 08:51  twisti
+
+       * src/vm/loader.c (loader_load_all_classes): Added missing #ifde
+       ENABLE_ZLIB.
+
+2006-02-02 08:45  twisti
+
+       * configure.ac (NDEBUG): Added missing WITH_BINUTILS_DISASSEMBLER
+       conditional.
+       (zlib): Fixed handling.
+
+2006-01-31 23:54  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Added basic block frequency
+       count code.
+
+2006-01-31 23:45  twisti
+
+       * src/vm/jit/profile.c ("mm/memory.h,vm/options.h): Added.
+       (list_method_entry): Likewise.
+       (profile_printstats): Sort methods into a list and print it sorted,
+       added basic block frequency output.
+
+2006-01-31 23:43  twisti
+
+       * src/vm/method.h (methodinfo): Renamed executioncount to
+       frequency. Added bbfrequency and cycles.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Added cycle profiling code.
+       
+       * src/vm/jit/x86_64/codegen.h (M_FMOV): Added.
+       (M_IADD_MEMBASE, M_IADC_MEMBASE, M_ISUB_MEMBASE, M_ISBB_MEMBASE):
+       Likewise.
+       (M_RDTSC, PROFILE_CYCLE_START, PROFILE_CYCLE_STOP): Likewise.
+       
+       * src/vm/jit/x86_64/emitfuncs.c (x86_64_inc_membase)
+       (x86_64_incl_membase): Fixed.
+       (emit_rdtsc): Added.
+       
+       * src/vm/jit/jit.c (jit_compile): Free m->bbfrequency memory.
+       (jit_compile_intern): Allocate m->bbfrequency memory.
+       
+       * src/vm/jit/jit.h: Reformatting.
+
+2006-01-31 23:29  twisti
+
+       * src/vm/statistics.c, src/vm/jit/inline/inline.c: Removed inlining
+       statistics stuff.
+
+2006-01-31 23:27  twisti
+
+       * src/vm/options.c, src/vm/options.h (opt_rt, opt_xta, opt_vta):
+       Removed.
+       (opt_prof_bb): Added.
+       * src/cacao/cacao.c: Likewise.
+       (OPT_PROF_OPTION): Added.
+
+2006-01-31 22:31  twisti
+
+       * src/vm/jit/stack.c (show_icmd_block): Print the basic block type.
+
+2006-01-31 22:27  twisti
+
+       * src/toolbox/list.c, src/toolbox/list.h (list_add_before): Added.
+
+2006-01-31 15:41  twisti
+
+       * src/vm/jit/powerpc/codegen.c, src/vm/jit/alpha/codegen.c,
+       src/vm/jit/mips/codegen.c, src/vm/jit/i386/codegen.c (codegen): Use
+       CLASS_IS_OR_ALMOST_INITIALIZED macro, saves some code space.
+
+2006-01-31 15:35  twisti
+
+       Fixes Debian bug #350729
+       * src/vm/jit/i386/asmpart.S (asm_md_init): Added, puts the FPU to
+       64-bit precision mode.
+       * src/vm/jit/i386/md.c (md_init): Call asm_md_init.
+       
+       * src/vm/jit/asmpart.h (asm_md_init): Added.
+       (has_no_x_instr_set): Removed.
+       * src/vm/options.c, src/vm/options.h (has_ext_instr_set): Removed.
+       * src/vm/jit/jit.c (jit_init): Removed has_no_x_instr_set call.
+       * src/vm/jit/alpha/asmpart.S (has_no_x_instr_set): Renamed to
+       asm_md_init.
+       * src/vm/jit/alpha/md.c (has_ext_instr_set): Added.
+       (md_init): Call asm_md_init.
+       * src/vm/jit/alpha/md.h (has_ext_instr_set): Added.
+
+2006-01-31 15:18  edwin
+
+       * src/vm/classcache.c: Added a formal description of the classcache.
+
+2006-01-31 14:24  twisti
+
+       * src/vm/signal.c (signal_handler_sigint): Typo, reported by Chris
+       Burdess on irc.
+
+2006-01-30 16:25  twisti
+
+       * src/vm/jit/i386/codegen.c (codegen): Added profiling code.
+       (ICMD_IINC): Use macros.
+       * src/vm/jit/i386/codegen.h (ucontext.h): Removed.
+       (thread_restartcriticalsection): Likewise.
+       (M_IADD_IMM_MEMBASE): Added.
+
+2006-01-30 15:44  twisti
+
+       * src/vm/options.h, src/vm/options.c (opt_prof): Added.
+       * src/cacao/cacao.c (OPT_PROF): Added.
+       (exit_handler): Added profile_printstats when opt_prof is enabled.
+       
+       * src/vm/class.h (classinfo): Members classUsed and impldBy removed.
+       * src/vm/loader.c (load_class_from_classbuffer): Likewise.
+       * src/vm/linker.c (link_primitivetype_table): Likewise.
+       (link_class_intern): Likewise.
+       * src/vm/jit/inline/inline.c: Likewise.
+       
+       * src/vm/method.h (methodinfo): Added member executioncount.
+       
+       * src/vm/jit/x86_64/codegen.c (codegen): Added profiling code. Some
+       code reordering, using more macros and save some code space.
+       * src/vm/jit/x86_64/codegen.h (M_ILD32, M_LLD32, M_IST_IMM, M_IST32)
+       (M_LST32, M_IST32_IMM, M_LST32_IMM32, M_IINC_MEMBASE, M_ITEST)
+       (M_CMP_IMM_MEMBASE, M_ICMP, M_ICMP_IMM, M_ICMP_IMM_MEMBASE, M_CMOVEQ)
+       (M_CMOVNE, M_CMOVLT, M_CMOVLE, M_CMOVGE, M_CMOVGT, M_CMOVB, M_CMOVA)
+       (M_CMOVP, M_CLR): Added.
+       
+       * src/vm/jit/x86_64/emitfuncs.c (x86_64_emit_ifcc): Use macros.
+       (x86_64_call_mem): Changed mem argument to ptrint type.
+       * src/vm/jit/x86_64/emitfuncs.h (x86_64_call_mem): Likewise.
+       
+       * src/vm/jit/profile.c, src/vm/jit/profile.h: New files.
+       * src/vm/jit/Makefile.am (DISASS_OBJ): Renamed to DISASS_SOURCES.
+       (PROFILE_SOURCES): Added.
+
+2006-01-30 14:24  christian
+
+       * src/vm/jit/allocator/simplereg.c (interface_regalloc): Used
+       m->parseddesc->arg[int|flt|adr]reguse to enable use of unused
+       argumentregisters in leadmethods.
+       (local_regalloc): Likewise.
+       (reg_init_temp): Likewise.
+
+2006-01-30 11:26  christian
+
+       * src/vm/jit/allocator/simplereg.c: Ensured proper alignment of all
+       doubles and longs if ALIGN_[DOUBLES|LONGS]_IN_MEMORY is defined.
+       (local_regalloc): Fixed error for HAS_ADREDD_REGISTER_FILE - else was
+       missing. Ensured use of unused argument register in leafmethod before
+       use of saved registers. Regarded PACK_REGS for
+       SUPPORT_COMBINE_INTEGER_REGISTER archs for unused integer argument
+       registers.
+       * src/vm/jit/i386/arch.h: Added defines for
+       ALIGN_[DOUBLES|LONGS]_IN_MEMORY.
+       * src/vm/jit/powerpc/arch.h: Likewise.
+
+2006-01-29 17:27  twisti
+
+       * src/vm/jit/stack.c (show_icmd): Fixed ICMD_ELSE_ICONST output.
+
+2006-01-28 14:42  twisti
+
+       * src/vm/jit/powerpc/linux/md-abi.c,
+       src/vm/jit/powerpc/darwin/md-abi.c (md_return_alloc): Use
+       m->parseddesc->paramcount instead of m->paramcount.
+       * src/vm/jit/schedule/schedule.c (schedule_init): Likewise.
+       
+       * src/vm/jit/powerpc/codegen.c, src/vm/jit/alpha/codegen.c,
+       src/vm/jit/mips/codegen.c, src/vm/jit/i386/codegen.c (codegen):
+       Removed first MCODECHECK since it not required.
+       
+       * src/vm/jit/methodheader.h: Added comment.
+
+2006-01-28 14:25  twisti
+
+       * src/vm/jit/x86_64/.cvsignore: Added TAGS.
+
+2006-01-28 14:21  twisti
+
+       * src/vm/loader.c (load_method): Removed reference to
+       nativelyoverloaded, monoPoly, subRedefs, subRedefsUsed, xta.
+       (load_newly_created_array): Removed reference to monoPoly.
+
+2006-01-28 14:18  twisti
+
+       * src/vm/method.c (method_descriptor2types): Removed.
+       * src/vm/method.h (methodinfo): Removed members returntype,
+       returnclass, paramcount, paramtypes, paramclass, xta, methodXTAparsed,
+       methodUsed, monoPoly, subRedefs, subRedefsUsed, and
+       nativelyoverloaded, this saves about 3.2MB of classinfo memory for
+       -all.
+       (method_descriptor2types): Removed.
+       
+       * src/vm/jit/inline/inline.c (inlining_analyse_method): Use
+       m->parseddesc->paramcount instead of m->paramcount.
+       * src/vm/jit/allocator/simplereg.c (local_regalloc): Likewise.
+       * src/vm/jit/x86_64/md-abi.c (md_return_alloc): Likewise.
+       
+       * src/vm/jit/jit.c (jit_compile): Removed RT_jit_parse and
+       XTA_jit_parse calls.
+       (jit_compile_intern): Removed method_descriptor2types call.
+       
+       * src/cacaoh/cacaoh.c (main): Call string_init. Removed
+       nativemethod_chain and nativeclass_chain stuff.
+       
+       * src/cacaoh/headers.c (nativemethod_chain): Removed.
+       (nativeclass_chain): Likewise.
+       (printmethod): Use m->isleafmethod instead of m->nativelyoverloaded.
+       (headerfile_generate): Likewise.
+
+2006-01-28 11:26  twisti
+
+       * src/vm/jit/inline/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS.
+       (libinline_la_SOURCES): Don't build RTA/XTA stuff.
+
+2006-01-28 11:24  twisti
+
+       * Makefile.am (EXTRA_DIST): Added THIRDPARTY.
+
+2006-01-27 19:05  stefan
+
+       * src/threads/native/threads.c: Removed a superfluous (I hope) NULL
+       check.
+
+2006-01-27 18:53  stefan
+
+       * src/threads/native/threads.c: Repaired thread_getself.
+
+2006-01-27 17:35  twisti
+
+       * src/toolbox/logging.c, src/toolbox/logging.h (log_start): Added.
+       (log_vprint): Likewise.
+       (log_print): Likewise.
+       (log_println): Likewise.
+       (log_finish): Likewise.
+       (log_plain): Removed.
+       (log_nl): Removed.
+       (log_flush): Likewise.
+       (dolog_plain): Likewise.
+       (get_logfile): Likewise.
+       (log_utf): Likewise.
+       (log_plain_utf): Likewise.
+       (log_text): Removed but added a define until we have ported all files.
+       (dolog): Likewise.
+       * src/vm/statistics.c (print_stats): Started to use new logging
+       functions. Print some ratios.
+
+2006-01-27 16:32  twisti
+
+       * src/native/vm/VMSystemProperties.c (preInit): Don't add . to
+       java.library.path per default.
+
+2006-01-27 12:43  twisti
+
+       * NEWS: Added powerpc fixes found by javver.
+
+2006-01-24 19:09  twisti
+
+       * src/vm/jit/powerpc/codegen.h (var_to_reg_dbl): Added.
+       (M_COPY): Handle doubles properly.
+
+2006-01-24 13:52  twisti
+
+       * src/vm/jit/powerpc/codegen.h (M_LNGMOVE): Added.
+       (var_to_reg_lng): Likewise.
+       (M_COPY): Support longs. This was actually never implemented and never
+       worked, grrr.
+
+2006-01-24 10:30  twisti
+
+       * src/vm/jit/stacktrace.c (cacao_stacktrace_fillInStackTrace): Use
+       method_print. Fixed typo.
+       * src/vm/jit/powerpc/md.c (md_codegen_findmethod): Handle 2
+       instruction returns properly.
+
+2006-01-24 10:28  twisti
+
+       * src/vm/builtin.c (builtin_f2i): Enable for interpreter.
+       (builtin_d2i): Likewise.
+       * src/vm/jit/stack.c (icmd_print_stack): Fixed for ENABLE_INTRP and
+       SUPPORT_COMBINE_INTEGER_REGISTERS.
+
+2006-01-23 16:03  twisti
+
+       * src/vm/jit/stack.c (show_icmd_method): Fixed basic block count
+       output.
+       
+       * src/vm/jit/i386/codegen.c (codegen): Use disp instead of a. Usage of
+       some more macros.
+       * src/vm/jit/i386/codegen.h (M_BLT): Added.
+       (M_BLE): Likewise.
+       (M_BGE): Likewise.
+       (M_BGT): Likewise.
+       (M_BBE): Likewise.
+       (M_BAE): Likewise.
+
+2006-01-23 01:12  twisti
+
+       * configure.ac (AC_INIT): Changed version number to 0.94+cvs.
+       (CFLAGS): Changed optimization back to -O0.
+
+2006-01-23 01:01  twisti
+
+       * ChangeLog: Updated for 0.94 release.
+
+2006-01-22 23:42  twisti
+
+       * configure.ac (AC_INIT): Changed version number to 0.94.
+       (CFLAGS): Changed optimization to -O2.
+
+2006-01-22 23:33  twisti
+
+       * Updated header: Added 2006. Changed address of FSF. Changed email
+       address.
+
+2006-01-22 23:16  twisti
+
+       * Updated svn:ignore propset.
+
+2006-01-22 23:00  twisti
+
+       * src/vm/jit/intrp/Makefile.am (EXTRA_DIST): Added gray.fs and
+       BUILT_SOURCES.
+
+2006-01-22 22:46  twisti
+
+       * tests/regression/extest.java: Typo.
+
+2006-01-22 22:36  twisti
+
+       * NEWS: Added releases 0.90, 0.91, 0.92, 0.93, 0.94.
+
+2006-01-22 22:34  twisti
+
+       * README: Updated.
+
+2006-01-22 21:42  twisti
+
+       * src/vm/jit/intrp/codegen.c (cacaotype2ffitype): Revert edwin's
+       bugfix, but we can't use ffi_type_slong as it's defined as 64-bit
+       value on 32-bit machines.
+
+2006-01-22 21:40  twisti
+
+       * src/native/Makefile.am (INCLUDES): Renamed to AM_CPPFLAGS.
+       (libnative_la_SOURCES): Removed nativecalls.inc.
+
+2006-01-22 21:39  twisti
+
+       * tests/Makefile.am (SUBDIRS): Removed native.
+
+2006-01-22 21:38  twisti
+
+       * tests/regression/native/testarguments.output: Updated.
+       * tests/regression/native/Makefile.am: Made it work with distcheck.
+       * tests/regression/codepatching/Makefile.am: Likewise.
+       * tests/regression/Makefile.am: Likewise.
+       
+       * tests/regression/extest.java: Comment changed.
+
+2006-01-22 21:22  twisti
+
+       * configure.in: Renamed to configure.ac.
+
+2006-01-22 21:21  twisti
+
+       * configure.in (AC_CONFIG_FILES): Removed tests/native/Makefile, added
+       tests/regression/native/Makefile.
+
+2006-01-22 20:21  twisti
+
+       * tests/native: Moved to tests/regression/native.
+
+2006-01-22 20:00  twisti
+
+       * src/vm/jit/asmpart.h (asm_handle_exception)
+       (asm_handle_nat_exception): #ifdef ENABLE_JIT.
+
+2006-01-22 19:59  twisti
+
+       * src/vm/jit/jit.c (jit_compile_intern): Use
+       CLASS_IS_OR_ALMOST_INITIALIZED to check uninitialized.
+
+2006-01-22 19:57  twisti
+
+       * src/vm/jit/stacktrace.c (stacktrace_create_inline_stackframeinfo):
+       Compiler warning fix.
+
+2006-01-22 19:56  twisti
+
+       * src/vm/jit/intrp/java.vmg: Some reformatting.
+
+2006-01-22 19:55  twisti
+
+       * src/vm/jit/intrp/asmpart.c (vm/loader.h): Added.
+       (intrp_asm_calljavafunction_intern): Use u1* instead of entrypoint.
+       (jni_invoke_java_intern): Likewise.
+
+2006-01-22 19:50  twisti
+
+       * .cvsignore, src/toolbox/.cvsignore, src/vm/jit/inline/.cvsignore,
+       src/vm/jit/allocator/.cvsignore: TAGS added.
+
+2006-01-22 19:37  twisti
+
+       * src/boehm-gc/.cvsignore, src/boehm-gc/include/.cvsignore,
+       src/vm/.cvsignore, src/vm/jit/tools/.cvsignore,
+       src/vm/jit/verify/.cvsignore, src/vm/jit/loop/.cvsignore,
+       src/vm/jit/.cvsignore, src/vm/jit/intrp/.cvsignore,
+       src/cacao/.cvsignore, src/native/vm/.cvsignore,
+       src/native/include/.cvsignore, src/native/.cvsignore,
+       src/mm/.cvsignore, src/threads/native/.cvsignore,
+       src/threads/.cvsignore, src/fdlibm/.cvsignore, src/.cvsignore,
+       src/cacaoh/.cvsignore: TAGS added.
+
+2006-01-22 19:29  edwin
+
+       * src/vm/jit/intrp/codegen.c (nativecall): Fixed calculation of the
+       stackframeinfo address.
+
+2006-01-22 14:44  twisti
+
+       * src/vm/jit/codegen-common.c (codegen_addreference): The last fix was
+       not correct if only the intrp is built.
+
+2006-01-22 14:39  twisti
+
+       * src/vm/class.c (class_showmethods): Use class_printflags.
+       * src/vm/loader.c, src/vm/loader.h (fprintflags): Removed.
+       (printflags): Likewise.
+       * src/vm/jit/inline/sets.c (printFldSet): Use field_println instead of
+       field_display.
+       * src/vm/field.c, src/vm/field.h (field_display): Removed.
+       (field_printflags): Added.
+       (field_print): Likewise.
+       (field_println): Likewise.
+
+2006-01-22 00:45  edwin
+
+       * src/vm/jit/intrp/codegen.c (cacaotype2ffitype): Use ffi_type_sint
+       for
+       values of TYPE_INT. This fixes the interpreter on i386, though I'm not
+       sure if it is a correct and complete solution.
+
+2006-01-21 21:46  edwin
+
+       * src/vm/jit/codegen-common.c (codegen_addreference): Fixed bug when
+       both ENABLE_INTRP and ENABLE_JIT were defined.
+
+2006-01-21 20:22  edwin
+
+       * src/vm/jit/verify/typecheck.c (typestack_copy,
+       typestack_separable_with)
+       (typestack_separable_from, verify_basic_block): Comment-only changes.
+       (verify_basic_block): Small typo fix in string.
+
+2006-01-20 14:49  twisti
+
+       * src/native/jni.c (fill_callblock_from_objectarray): Fixed typo.
+       (jni_method_invokeNativeHelper): Major code rewrite and speed
+       improvement, renamed to _Jv_jni_invokeNative.
+       (cacao_jni_CallVoidMethod): Fixed interpreter bug, renamed to
+       _Jv_jni_CallVoidMethod.
+       (callLongMethod): Renamed to _Jv_jni_CallLongMethod.
+       * src/native/jni.h (jni_method_invokeNativeHelper): Renamed to
+       _Jv_jni_invokeNative.
+       * src/native/vm/Method.c (Java_java_lang_reflect_Method_invokeNative):
+       Renamed jni_method_invokeNativeHelper to _Jv_jni_invokeNative.
+       * src/native/vm/Constructor.c: Updated includes.
+       (Java_java_lang_reflect_Constructor_constructNative): Renamed
+       jni_method_invokeNativeHelper to _Jv_jni_invokeNative.
+
+2006-01-20 13:41  twisti
+
+       * tests/regression/Makefile.am (EXTRA_DIST): Made it more readable.
+
+2006-01-20 13:40  twisti
+
+       * src/vm/jit/intrp/intrp.h (ffi.h): Removed, not required in this
+       file.
+       * src/vm/jit/intrp/codegen.c (nativecall): Removed unused big-endian
+       code.
+       * src/vm/jit/intrp/asmpart.c (asm_calljavafunction_intern): Renamed to
+       intrp_asm_calljavafunction_intern, just to be sure.
+
+2006-01-20 13:33  twisti
+
+       * src/vm/jit/mips/irix/md-os.c (md_signal_handler_sigsegv): Missed the
+       actal rename from the previous commit.
+
+2006-01-20 13:28  twisti
+
+       * src/vm/signal.c (vm/signallocal.h): Added.
+       * src/vm/signallocal.h (md_signal_handler_sigfpe): #ifdef for i386 and
+       x86_64.
+
+2006-01-20 13:25  twisti
+
+       * src/vm/jit/powerpc/linux/md-os.c, src/vm/jit/powerpc/darwin/md-os.c,
+       src/vm/jit/alpha/linux/md-os.c, src/vm/jit/alpha/freebsd/md-os.c,
+       src/vm/jit/mips/linux/md-os.c, src/vm/jit/mips/irix/md-os.c
+       (signal_handler_sigsegv): Renamed to md_signal_handler_sigsegv.
+       * src/vm/jit/i386/linux/md-os.c, src/vm/jit/i386/freebsd/md-os.c,
+       src/vm/jit/x86_64/md.c (signal_handler_sigsegv): Renamed to
+       md_signal_handler_sigsegv.
+       (signal_handler_sigfpe): Renamed to md_signal_handler_sigfpe.
+       * src/vm/signal.c (signal_init): Renamed signal_handler_sigsegv to
+       md_signal_handler_sigsegv and signal_handler_sigfpe to
+       md_signal_handler_sigfpe respectively.
+       * src/vm/signallocal.h (md_signal_handler_sigsegv): Added.
+       (md_signal_handler_sigfpe): Likewise.
+
+2006-01-20 13:19  twisti
+
+       * src/vm/jit/alpha/codegen.h (ucontext.h): Removed.
+       (thread_restartcriticalsection): Removed.
+
+2006-01-20 13:06  twisti
+
+       * src/vm/jit/x86_64/disass.c (dis-asm.h): Added.
+       (vm/global.h): Likewise.
+       (mm/memory.h): Removed.
+
+2006-01-20 13:05  twisti
+
+       * src/vm/class.c, src/vm/class.h (class_printflags): Added.
+       (class_print): Likewise.
+       (class_println): Likewise.
+
+2006-01-20 12:58  twisti
+
+       * src/vm/jit/i386/disass.c (disassinstr): Set the read_memory_func in
+       disassemble_info to disass_buffer_read_memory.
+       (disassemble): Removed.
+
+2006-01-20 12:57  twisti
+
+       * src/vm/jit/stack.c (show_icmd_method): Print basic blocks count and
+       better basic block header output.
+       ICMD_MULTIANEWARRAY: Changed iptr->target and iptr->val.a value.
+       ICMD_IFLE_ICONST, ICMD_ELSE_ICONST: Print values better.
+
+2006-01-20 12:01  twisti
+
+       * src/vm/jit/powerpc/disass.c (disassinstr): Set the read_memory_func
+       in disassemble_info to disass_buffer_read_memory.
+       (disassemble): Removed.
+
+2006-01-20 11:38  twisti
+
+       * src/vm/jit/disass-common.c, src/vm/jit/disass.h: Added
+       disassemble_info and disass_initialized.
+       (disassemble): Added.
+       (buffer_read_memory): Renamed to disass_buffer_read_memory.
+       * src/vm/jit/x86_64/disass.c (disassinstr): Set the read_memory_func
+       in disassemble_info to disass_buffer_read_memory.
+       (disassemble): Removed.
+
+2006-01-20 10:15  twisti
+
+       * regression/extest.java: Removed asmpart exceptions as they are now
+       checked with codepatching.
+       * regression/extest.2output: Regenerated.
+       * regression/extest_clinit.java: Added.
+
+2006-01-20 10:08  twisti
+
+       * src/vm/jit/alpha/md.c (md_init): Moved #include and extern's to the
+       top of the file, since this broke compilation on debian unstable.
+
+2006-01-19 23:40  edwin
+
+       * src/vm/jit/parse.h: Added vim boilerplate.
+
+2006-01-19 23:35  edwin
+
+       * src/vm/jit/stack.c: Added vim boilerplate.
+
+2006-01-19 22:21  twisti
+
+       * configure.in (AC_CONFIG_FILES): Removed tests/codepatching/Makefile
+       and added tests/regression/codepatching/Makefile.
+       * tests/Makefile.am (SUBDIRS): Removed codepatching.
+       * tests/regression/Makefile.am (SUBDIRS) Added with codepatching.
+       * tests/regression/codepatching/Makefile.am (JAVAFLAGS): Added.
+
+2006-01-19 22:11  edwin
+
+       * src/vm/jit/parse.c (parse): Removed inlining code.
+
+2006-01-19 22:06  edwin
+
+       * src/vm/options.c, src/vm/options.h (useinliningm): Removed.
+
+2006-01-19 22:05  twisti
+
+       * tests/codepatching: Moved to tests/regression/codepatching.
+
+2006-01-19 21:31  edwin
+
+       * src/vm/jit/jit.c (jit_compile): Removed the INAFTERMAIN hack.
+
+2006-01-19 21:27  edwin
+
+       * src/vm/jit/inline/inline.c (inlining_setup): Removed INAFTERMAIN
+       hack.
+
+2006-01-19 21:26  edwin
+
+       * src/cacao/cacao.c (main): Disabled useinlining and useinliningm.
+
+2006-01-19 20:56  twisti
+
+       * src/vm/jit/intrp/codegen.c, src/vm/jit/intrp/java.vmg (FALOAD)
+       (FASTORE): Added, required for big-endian machines.
+       * src/vm/jit/intrp/engine.c (access_array_float): Likewise.
+
+2006-01-19 20:53  twisti
+
+       * src/vm/global.h (java_floatarray): Typo.
+
+2006-01-19 20:28  edwin
+
+       * src/vm/jit/parse.c (parse, fillextable): Removed debugging code.
+       Minor cleanup.
+
+2006-01-19 20:13  edwin
+
+       * src/vm/jit/parse.c (parse): Removed commented out debugging code.
+
+2006-01-19 20:03  twisti
+
+       * src/vm/class.c (class_showmethods): Replaced method_display with
+       method_println.
+
+2006-01-19 20:00  twisti
+
+       * src/vm/jit/inline/inline.c, src/vm/jit/inline/sets.c,
+       src/vm/jit/inline/parseRTstats.c, src/vm/jit/inline/parseRT.c,
+       src/vm/jit/inline/parseRTprint.h, src/vm/jit/inline/parseXTA.c:
+       Replaced method_display and method_display_w_class calls with
+       method_println.
+
+2006-01-19 19:49  twisti
+
+       * src/vm/method.c, src/vm/method.h (method_display): Removed.
+       (method_display_w_class): Likewise.
+       (method_printflags): Added.
+       (method_print): Likewise.
+       (method_println): Likewise.
+       Removed. --This line, and those below, will be ignored--
+       
+       M method.c
+       M method.h
+
+2006-01-19 17:02  twisti
+
+       * src/vm/jit/powerpc/linux/Makefile.am (INCLUDES): Renamed to
+       AM_CPPFLAGS.
+       * src/vm/jit/powerpc/Makefile.am (AM_CPPFLAGS): Added missing
+       $(OS_DIR) include.
+
+2006-01-19 16:02  twisti
+
+       * INCLUDES: Replaced with AM_CPPFLAGS as Tom Tromey suggested on irc,
+       as this is more common these days.
+
+2006-01-19 11:58  edwin
+
+       * alpha, mips, nat: removed obsolete directories resurrected by svn
+       migration
+
+2006-01-19 09:47  twisti
+
+       * INCLUDES: Replaced with AM_CPPFLAGS as Tom Tromey suggested on irc,
+       as this is more common these days.
+
+2006-01-18 21:41  edwin
+
+       * havoc.class: fix corruption by svn eol-style conversion
+
+2006-01-18 15:43  twisti
+
+       * AC_CHECK_HEADER: Added ansidecl.h, symcat.h, bfd.h and zconf.h.
+
+2006-01-18 15:41  twisti
+
+       * main: Call nogc_init for DISABLE_GC.
+
+2006-01-17 18:51  twisti
+
+       * Removed extern stuff that was removed from the lib.
+
+2006-01-17 18:37  twisti
+
+       * Updated to new classpath configure options.
+
+2006-01-17 18:24  twisti
+
+       * CLASSPATH_INSTALL_DIR: Renamed to CLASSPATH_PREFIX.
+
+2006-01-17 17:06  twisti
+
+       * CACAO_INSTALL_PREFIX: Renamed to CACAO_PREFIX.
+       * NDEBUG: Check for libintl on cygwin and darwin.
+       * --with-classpath-install-dir: Renamed to --with-classpath-prefix.
+       * --with-classpath-libdir: Added to support 64-bit platforms where the
+       libdir may be /usr/lib64.
+
+2006-01-17 16:59  twisti
+
+       * main: Removed CACAO_INSTALL_PREFIX and CLASSPATH_INSTALL_DIR since
+       CACAO_VM_ZIP_PATH and CLASSPATH_GLIBJ_ZIP_PATH are now full paths.
+
+2006-01-17 16:58  twisti
+
+       * Java_gnu_classpath_VMSystemProperties_preInit: Renamed
+       CACAO_INSTALL_PREFIX to CACAO_PREFIX.
+
+2006-01-17 16:57  twisti
+
+       * CACAO_VM_ZIP_PATH: Prepend CACAO_PREFIX.
+       * CLASSPATH_GLIBJ_ZIP_PATH: Prepend CLASSPATH_PREFIX.
+       * CLASSPATH_LIBRARY_PATH: Prepend CLASSPATH_LIBDIR.
+
+2006-01-17 16:55  twisti
+
+       * CLASSPATH_INSTALL_DIR: Renamed to CLASSPATH_PREFIX.
+
+2006-01-17 16:53  twisti
+
+       * Added.
+
+2006-01-17 16:51  twisti
+
+       * m4/as-ac-expand.m4: Added.
+
+2006-01-16 00:07  twisti
+
+       * jni_init: Fixed small typo.
+
+2006-01-16 00:04  twisti
+
+       * Java_gnu_classpath_VMSystemProperties_preInit: Use the same os.arch
+       property values as SUN and others do, so we are compatible (e.g.
+       jogl had
+       some problems), file.encoding removed as it's set by GNU Classpath,
+       hardcode values for gnu.cpu.endian.
+
+2006-01-15 23:32  twisti
+
+       * utf_java_nio_DirectByteBufferImpl_ReadWrite: Removed.
+       * utf_gnu_classpath_Pointer{32,64}: Likewise.
+       * class_java_nio_Buffer: Added, load and link this class in
+       jni_init().
+       * class_java_nio_DirectByteBufferImpl: Likewise.
+       * NewDirectByteBuffer: Removed debug output.
+       * GetDirectBufferAddress: Added instanceof check.
+       * GetDirectBufferCapacity: Likewise.
+
+2006-01-15 14:12  twisti
+
+       * native_new_and_init: Ooops, reverting last change and added an
+       explaining
+       comment.
+
+2006-01-15 13:32  twisti
+
+       * CLASSPATH_LIBRARY_PATH, CLASSPATH_GLIBJ_ZIP_PATH: Temporary bugfix.
+
+2006-01-15 12:28  twisti
+
+       * native_findfunction: #ifdef ENABLE_STATICVM.
+       * native_new_and_init: Fixed return value.
+
+2006-01-15 01:56  twisti
+
+       * math.h: Added for isnan.
+
+2006-01-15 00:37  twisti
+
+       * JAVAC: Removed.
+
+2006-01-15 00:36  twisti
+
+       * Java_gnu_classpath_VMSystemProperties_preInit: Set user.country
+       instead
+       of user.region, set en_US if none is defined,
+       java.protocol.handler.pkgs
+       removed.
+
+2006-01-14 20:02  twisti
+
+       * builtin_trace_args: Added callcount to verbose call output.
+
+2006-01-14 17:19  edwin
+
+       * src/native/vm/Method.c (invokeNative): check class access rights
+
+2006-01-13 19:37  twisti
+
+       * codegen_setup: #ifdef datareferences.
+
+2006-01-13 18:51  twisti
+
+       * This class does not differ from the GNU classpath upstream version.
+
+2006-01-13 18:49  twisti
+
+       * defineClassWithTransformers: Added, updated to generics version.
+
+2006-01-13 15:29  twisti
+
+       * codegendata: #ifdef datareferences member.
+       * codegen_finish: Moved data segment reference resolving into
+       dseg_resolve_datareferences.
+
+2006-01-13 15:28  twisti
+
+       * dseg_resolve_datareferences: Added.
+
+2006-01-13 15:27  twisti
+
+       * Small reformatting.
+
+2006-01-13 10:47  twisti
+
+       * src/vm/jit/{i386,x86_64}/{dis-asm.h,i386-dis.c}: Removed.
+       * src/vm/jit/powerpc/{ppc.h,ppc-dis.c,ppc-opc.c}: Likewise.
+       * m4/{ac_prog_javac.m4,ac_prog_javac_works.m4}: Added.
+
+2006-01-13 10:42  twisti
+
+       * ICMD_MULTIANEWARRAY: Usage of iptr->val.a and iptr->target changed.
+
+2006-01-13 10:11  twisti
+
+       * codegen.h: Added when ENABLE_JIT defined.
+       * codegen_addpatchref: Set lastmcodeptr when ENABLE_JIT is defined
+       and the
+       architecture requires it.
+
+2006-01-13 10:09  twisti
+
+       * ICMD_MULTIANEWARRAY: Usage of iptr->val.a and iptr->target changed.
+
+2006-01-12 23:54  twisti
+
+       * ICMD_MULTIANEWARRAY: Usage of iptr->val.a and iptr->target changed.
+
+2006-01-12 23:33  twisti
+
+       * arch.h: Added.
+       * GC_test_and_set: Removed 64-bit version since the 32-bit seems to be
+       sufficient and works.
+
+2006-01-12 23:31  twisti
+
+       * show_icmd: Use CLASS_IS_OR_ALMOST_INITIALIZED.
+       * initialize_class: Use CLASS_IS_OR_ALMOST_INITIALIZED.
+
+2006-01-12 23:30  twisti
+
+       * CLASS_IS_OR_ALMOST_INITIALIZED: Added.
+
+2006-01-12 23:27  twisti
+
+       * GETSTATIC_FLOAT, PUTSTATIC_FLOAT, GETFIELD_FLOAT, PUTFIELD_FLOAT:
+       Added.
+       * PATCHER_GETSTATIC_FLOAT, PATCHER_PUTSTATIC_FLOAT,
+       PATCHER_GETFIELD_FLOAT,
+       PATCHER_PUTFIELD_FLOAT: Likewise.
+       * TRACENATIVECALL: Removed codegen_findmethod, use methodinfo* from
+       threaded code stream.
+       * TRACECALL, TRACERETURN, TRACELRETURN: Likewise.
+
+2006-01-12 23:23  twisti
+
+       * Some 64-bit big-endian bugfixes.
+       * Use CLASS_IS_OR_ALMOST_INITIALIZED macro.
+
+2006-01-12 23:21  twisti
+
+       * 64-bit big-endian bugfix: replace s4 with ptrint.
+
+2006-01-12 23:10  twisti
+
+       * Imported for the interpreter.
+
+2006-01-12 23:09  twisti
+
+       * Added powerpc64 target.
+
+2006-01-12 23:08  twisti
+
+       * intrp_disassinstr, intrp_disassemble: Added.
+
+2006-01-12 23:07  twisti
+
+       * vm/options.h: Added.
+
+2006-01-12 23:05  twisti
+
+       * config.h, vm/types.h: Added.
+
+2006-01-12 23:03  twisti
+
+       * Use ASM_CALLJAVAFUNCTION* macros.
+
+2006-01-12 22:42  twisti
+
+       * thread_addstaticcritical: Quick hack: #ifdef ENABLE_JIT
+       asm_criticalsections.
+       * sigsuspend_handler: Quick hack: #ifdef ENABLE_JIT
+       thread_restartcriticalsection.
+
+2006-01-12 22:41  twisti
+
+       * vm/options.h: Added.
+       * descriptor_pool_parse_method_descriptor: #ifdef ENABLE_JIT
+       md_param_alloc
+       call.
+       * descriptor_params_from_paramtypes: Likewise.
+
+2006-01-12 22:40  twisti
+
+       * Fixed a lot of compiler warnings (functionptr -> u1*).
+
+2006-01-12 22:39  twisti
+
+       * regs: Removed.
+       * disassinstr, disassemble: Prefixed with intrp_.
+
+2006-01-12 22:38  twisti
+
+       * ICMD_MULTIANEWARRAY: Usage of iptr->val.a and iptr->target changed.
+
+2006-01-12 22:37  twisti
+
+       * builtin_gen_table: #if function according to arch.h.
+       * codegen: Prefixed with intrp_, usage of iptr->val.a and iptr->target
+       changed.
+       * codegen_createlinenumbertable: Renamed to
+       dseg_createlinenumbertable.
+       * createcompilerstub: Prefixed with intrp_.
+       * createnativestub: Likewise.
+
+2006-01-12 22:35  twisti
+
+       * verify_multianewarray: Usage iptr->val.a and iptr->target changed.
+       * JAVA_MULTIANEWARRAY: Pass c in iptr->val.a and cr in iptr->target.
+
+2006-01-12 22:34  twisti
+
+       * codegen_createnativestub: #ifdef ENABLE_JIT md_param_alloc call.
+       * codegen_disassemble_nativestub: Use DISASSEMBLE macro.
+
+2006-01-12 22:32  twisti
+
+       * analyse_stack: #ifdef ENBALE_JIT md_return_alloc call.
+       * icmd_print_stack: Print regs correctly for jit.
+       * show_icmd_method: Likewise.
+
+2006-01-12 21:55  twisti
+
+       * builtintable_internal: Removed ICMD_CHECKCAST.
+
+2006-01-12 21:39  twisti
+
+       * Prefixed functions with intrp_.
+       * md_init, md_stacktrace_get_returnaddress: Prefixed with intrp_.
+       * thread_restartcriticalsection, md_param_alloc, md_return_alloc:
+       Removed.
+
+2006-01-12 21:38  twisti
+
+       * Prefix functions with intrp_.
+
+2006-01-12 21:37  twisti
+
+       * Use ptrint instead of s8 in some places.
+
+2006-01-12 21:36  twisti
+
+       * Use DISASSINSTR macro.
+
+2006-01-12 21:36  michi
+
+       * Comment updated (for asm_cacheflush)
+
+2006-01-12 21:35  twisti
+
+       * intrp_createcompilerstub, intrp_createnativestub, intrp_codegen:
+       Added.
+       * codegen.h: Include only for some archs.
+       * md-abi.h: Include only for arm.
+       * codegen_init: Changed #ifdef to ENABLE_JIT.
+       * codegen_createnativestub: Call reg_setup only for jit, #ifdef
+       createnativestub to support interpreter.
+
+2006-01-12 21:30  twisti
+
+       * intrp_md_stacktrace_get_returnaddress: Added.
+       * cacao_stacktrace_fillInStackTrace: #ifdef
+       md_stacktrace_get_returnaddress
+       to support interpreter.
+
+2006-01-12 21:29  twisti
+
+       * Seperate ENABLE_JIT and ENABLE_INTRP.
+
+2006-01-12 21:17  twisti
+
+       * config.h: Added.
+       * intrp_patcher_get_putstatic, intrp_patcher_get_putfield,
+       intrp_patcher_aconst, intrp_patcher_builtin_multianewarray,
+       intrp_patcher_builtin_arraycheckcast,
+       intrp_patcher_invokestatic_special,
+       intrp_patcher_invokevirtual, intrp_patcher_invokeinterface,
+       intrp_patcher_checkcast_instanceof, intrp_patcher_resolve_native:
+       Likewise.
+
+2006-01-12 21:16  twisti
+
+       * jit_compile_intern: #ifdef codegen call to support interpreter, use
+       DISASSEMBLE macro.
+
+2006-01-12 21:15  twisti
+
+       * DISASSINSTR, DISASSEMBLE: Added.
+
+2006-01-12 21:14  twisti
+
+       * Use ASM_CALLJAVAFUNCTION macro.
+
+2006-01-12 21:13  twisti
+
+       * Use ASM_CALLJAVAFUNCTION_INT macro.
+
+2006-01-12 21:11  twisti
+
+       * intrp_asm_calljavafunction, intrp_createcompilerstub,
+       intrp_asm_getclassvalues_atomic: Added.
+
+2006-01-12 21:08  twisti
+
+       * Use ASM_CALLJAVAFUNCTION macros.
+       * main: #ifdef md_init call to support interpreter.
+       * link_class_intern: #ifdef createcompilerstub call to support
+       interpreter.
+
+2006-01-12 21:07  twisti
+
+       * Use ASM_CALLJAVAFUNCTION macros.
+
+2006-01-12 21:06  twisti
+
+       * Use ASM_CALLJAVAFUNCTION_ADR macro.
+       * Use ASM_CALLJAVAFUNCTION macro.
+
+2006-01-12 21:04  twisti
+
+       * intrp_md_init: Added.
+
+2006-01-12 20:57  twisti
+
+       * Check explicitly for isnan.
+
+2006-01-12 18:25  twisti
+
+       * print_dynamic_super_statistics: Added from intrp.
+
+2006-01-12 18:09  michi
+
+       * Included md-abi.h (needed for REG_SPLIT on Arm)
+
+2006-01-12 17:52  twisti
+
+       * We have to use a machine dependent arch.h.
+
+2006-01-11 12:16  twisti
+
+       * vm/jit/codegen.inc.h: Removed.
+       * Fixed compiler warnings.
+
+2006-01-11 10:35  twisti
+
+       * ICMD_F2I, ICMD_D2I, ICMD_F2L, ICMD_D2L: #if 0.
+
+2006-01-11 10:01  twisti
+
+       * SUPPORT_FMOD: Removed.
+       * SUPPORT_IFCVT: Replaced with SUPPORT_I2F, SUPPORT_I2D or
+       SUPPORT_L2F,
+       SUPPORT_L2D.
+       * SUPPORT_LONG_ICVT: Replaced with SUPPORT_F2L or SUPPORT_D2L.
+       * SUPPORT_LONG_FCVT: Replaced with SUPPORT_L2F or SUPPORT_L2D.
+
+2006-01-10 22:44  twisti
+
+       * SUPPORT_FMOD: Removed.
+       * SUPPORT_IFCVT: Replaced with SUPPORT_I2F, SUPPORT_I2D or
+       SUPPORT_L2F,
+       SUPPORT_L2D.
+       * SUPPORT_LONG_ICVT: Replaced with SUPPORT_F2L or SUPPORT_D2L.
+       * SUPPORT_LONG_FCVT: Replaced with SUPPORT_L2F or SUPPORT_L2D.
+
+2006-01-10 22:38  twisti
+
+       * SUPPORT_FMOD: Removed.
+       * SUPPORT_IFCVT: Replaced with SUPPORT_I2F, SUPPORT_I2D or
+       SUPPORT_L2F,
+       SUPPORT_L2D.
+       * SUPPORT_LONG_ICVT: Replaced with SUPPORT_F2L or SUPPORT_D2L.
+       * SUPPORT_LONG_FCVT: Replaced with SUPPORT_L2F or SUPPORT_L2D.
+
+2006-01-10 22:22  twisti
+
+       * EXTRA_DIST: Added ChangeLog-2005.
+
+2006-01-10 22:18  twisti
+
+       * SUPPORT_FMOD: Removed.
+       * SUPPORT_IFCVT: Replaced with SUPPORT_I2F, SUPPORT_I2D or
+       SUPPORT_L2F,
+       SUPPORT_L2D.
+       * SUPPORT_LONG_ICVT: Replaced with SUPPORT_F2L or SUPPORT_D2L.
+       * SUPPORT_LONG_FCVT: Replaced with SUPPORT_L2F or SUPPORT_L2D.
+
+2006-01-10 22:11  twisti
+
+       * asm_getclassvalues_atomic: Replaced with ASM_GETCLASSVALUES_ATOMIC.
+       * SUPPORT_IFCVT: Replaced with SUPPORT_I2F or SUPPORT_I2D.
+       * SUPPORT_FICVT: Replaced with SUPPORT_F2I.
+       * SUPPORT_LONG_FCVT: Replaced with SUPPORT_L2F.
+       * SUPPORT_LONG_ICVT: Replaced with SUPPORT_F2L or SUPPORT_D2L.
+
+2006-01-10 22:09  twisti
+
+       * ASM_CALLJAVAFUNCTION, ASM_CALLJAVAFUNCTION_ADR,
+       ASM_CALLJAVAFUNCTION_INT,
+       ASM_CALLJAVAFUNCTION2, ASM_CALLJAVAFUNCTION2_ADR,
+       ASM_CALLJAVAFUNCTION2_INT, ASM_CALLJAVAFUNCTION2_LONG,
+       ASM_CALLJAVAFUNCTION2_FLOAT, ASM_CALLJAVAFUNCTION2_DOUBLE: Macros
+       added,
+       these macros hide the selection between jit and intrp functions.
+       * ASM_GETCLASSVALUES_ATOMIC: Likewise.
+       * intrp_asm_calljavafunction, intrp_asm_calljavafunction_int: Added.
+       * intrp_asm_calljavafunction2, intrp_asm_calljavafunction2int,
+       intrp_asm_calljavafunction2long, intrp_asm_calljavafunction2float,
+       intrp_asm_calljavafunction2double: Likewise.
+       * intrp_asm_getclassvalues_atomic: Likewise.
+
+2006-01-10 21:58  twisti
+
+       * SUPPORT_IFCVT: Replaced with SUPPORT_I2F or SUPPORT_I2D.
+       * SUPPORT_LONG_FCVT: Replaced with SUPPORT_L2F or SUPPORT_L2D.
+       * SUPPORT_LONG_ICVT: Replaced with SUPPORT_F2I, SUPPORT_F2L or
+       SUPPORT_D2I,
+       SUPPORT_D2L.
+
+2006-01-10 21:11  twisti
+
+       * exceptions_throw_negativearraysizeexception: Use
+       * builtin_throw_exception: #ifndef NDEBUG.
+       * builtin_trace_exception: Likewise.
+       * builtin_trace_args: Likewise.
+       * builtin_displaymethodstop: Likewise.
+       * builtin_*: #if the function regarding the defines in arch.h.
+
+2006-01-10 20:57  twisti
+
+       * exceptions_throw_classformaterror,
+       exceptions_throw_arrayindexoutofboundsexception,
+       exceptions_throw_illegalargumentexception,
+       exceptions_throw_negativearraysizeexception,
+       exceptions_throw_nullpointerexception: Added.
+       * exceptions_print_exception: #ifndef NDEBUG.
+
+2006-01-10 20:56  twisti
+
+       * exceptions_throw_classformaterror: Use this function.
+
+2006-01-10 20:55  twisti
+
+       * exceptions_throw_nullpointerexception: Use this function.
+
+2006-01-10 20:50  twisti
+
+       * exceptions_throw_nullpointerexception,
+       exceptions_throw_arrayindexoutofboundsexception: Use these
+       functions.
+
+2006-01-10 20:48  twisti
+
+       * exceptions_throw_nullpointerexception,
+       exceptions_throw_illegalargumentexception: Use these functions.
+
+2006-01-10 20:46  twisti
+
+       * exceptions_throw_illegalargumentexception,
+       exceptions_throw_negativearraysizeexception,
+       exceptions_throw_arrayindexoutofboundsexception,
+       exceptions_throw_nullpointerexception: Use these functions.
+
+2006-01-10 20:44  twisti
+
+       * exceptions_throw_classformaterror,
+       exceptions_throw_negativearraysizeexception,
+       exceptions_throw_nullpointerexception: Added.
+
+2006-01-10 15:52  twisti
+
+       * Not required anymore.
+
+2006-01-10 15:50  twisti
+
+       * use_class_as_object, create_property, copy_vftbl, create_methodsig:
+       Removed.
+       * classMeth, nativeCall, methodCall, nativeMethod, nativeCompCall,
+       methodCompCall, nativeCompMethod: Likewise.
+       * natcall2utf, printNativeCall, markNativeMethodsRT: Likewise.
+
+2006-01-10 15:48  twisti
+
+       * nativeCalls, nativeCompCalls: Removed.
+       * copy_vftbl, create_methodsig: Likewise.
+       * printNativeCall, printCompNativeCall, findNativeMethodCalls,
+       findNativeClassCalls, utfNativeCall, natcall2utf: Likewise.
+
+2006-01-10 10:59  twisti
+
+       * codegen_ncode_increase: Typo.
+
+2006-01-09 20:52  twisti
+
+       * disass_buf: Fixed typo.
+
+2006-01-09 20:28  twisti
+
+       * disass_printf: Ooops, #ifdef was wrong.
+
+2006-01-09 20:19  twisti
+
+       * Removed, we now link against libbfd and libopcodes.
+       * stdarg.h, string.h, assert.h, vm/jit/powerpc/dis-asm.h: Removed.
+       * dis-asm.h, stdio.h, vm/jit/disass.h: Added.
+       * myprintf, buffer_read_memory, perror_memory, generic_print_address,
+       generic_symbol_at_address, bfd_getb32, bfd_getl32, sprintf_vma:
+       Removed.
+       * Use disass-common.c stuff.
+
+2006-01-09 20:15  twisti
+
+       * libarch_la_SOURCES: Removed dis-asm.h, ppc-dis.c, ppc-opc.c and
+       ppc.h.
+
+2006-01-09 19:21  twisti
+
+       * assert.h, stdarg.h, vm/jit/x86_64/dis-asm.h: Removed.
+       * stdio.h, vm/jit/disass.h: Added.
+       * myprintf, buffer_read_memory, generic_symbol_at_address,
+       generic_print_address, perror_memory: Likewise.
+       * Use disass-common.c stuff.
+
+2006-01-09 16:37  twisti
+
+       * string.h, vm/jit/i386/dis-asm.h: Removed.
+       * mylinebuf, mylen: Likewise.
+       * myprintf, buffer_read_memory, generic_symbol_at_address,
+       generic_print_address, perror_memory: Likewise.
+       * Use disass-common.c stuff.
+
+2006-01-09 16:36  twisti
+
+       * WITH_BINUTILS_DISASSEMBLER: Added, define DISASS_OBJ.
+       * noinst_LTLIBRARIES: Added DISASS_OBJ.
+
+2006-01-09 16:30  twisti
+
+       * This file contains the common functions required when we use the
+       binutils
+       disassembler.
+
+2006-01-09 16:29  twisti
+
+       * WITH_BINUTILS_DISASSEMBLER: Added.
+       * disass_printf: Added.
+
+2006-01-09 16:26  twisti
+
+       * WITH_BINUTILS_DISASSEMBLER: Added.
+
+2006-01-09 12:12  twisti
+
+       * Removed, we now link against libbfd and libopcodes.
+
+2006-01-09 12:10  twisti
+
+       * libarch_la_SOURCES: Removed dis-asm.h and i386-dis.c.
+
+2006-01-09 10:37  twisti
+
+       * AC_CHECK_HEADER checks for ansidecl.h, bfd.h and symcat.h removed.
+       * AC_CHECK_HEADER check for dis-asm.h added.
+       * AC_CHECK_LIB checks for libbfd and libopcodes added.
+
+2006-01-09 10:35  twisti
+
+       * Removed, we now link against libbfd and libopcodes.
+       * libarch_la_SOURCES: Removed dis-asm.h and i386-dis.c, we now link
+       against
+       libbfd and libopcodes.
+
+2006-01-08 23:37  twisti
+
+       * Updated from GNU Classpath:
+       
+       2005-12-17 Guilhem Lavaux <guilhem@kaffe.org>
+       
+       * native/fdlibm/fdlibm.h
+       (isnan): Define explicitly isnan if it is not a macro.
+
+2006-01-08 23:00  twisti
+
+       * loader_load_all_classes: Print exception when loading failed.
+
+2006-01-08 22:38  twisti
+
+       * SUCK_xx_xx: We can only optimize little endian loads on i386 and
+       x86_64
+       machines. All others have problems with alignment.
+
+2006-01-08 22:12  twisti
+
+       * Ignore *.class files.
+
+2006-01-08 22:11  twisti
+
+       * java-assert.h: Unused, removed.
+
+2006-01-08 22:01  twisti
+
+       * Added VM interface change to be consistent:
+       
+       2005-11-13 Archie Cobbs <archie@dellroad.org>
+       
+       * vm/reference/gnu/classpath/VMStackWalker.java (getClassLoader()):
+       added to fix an infinite loop bug.
+       * NEWS: note VM interface change.
+
+2006-01-08 21:32  twisti
+
+       * suck_add: Check for lce != NULL before adding it to the list, since
+       zip_open can return NULL.
+
+2006-01-08 19:14  twisti
+
+       * JAVAC: Removed.
+
+2006-01-08 19:13  twisti
+
+       * SOURCE_FILES: Added.
+       * JAVAC: Removed.
+       * checkall: Renamed to check.
+
+2006-01-08 19:12  twisti
+
+       * Use $(mkdir_p), $(JAVAC) and $(ZIP) variables.
+
+2006-01-08 19:11  twisti
+
+       * AM_PROG_MKDIR_P: Added.
+       * Added headers checks for ansidecl.h, bfd.h, and symcat.h if we have
+       debugging enabled.
+       * AC_PROG_JAVAC: Added.
+       * AC_PATH_PROG: Added check for zip.
+
+2006-01-08 19:09  twisti
+
+       * Macros to check for a Java compiler, taken from
+       http://ac-archive.sourceforge.net/.
+
+2006-01-04 09:35  twisti
+
+       * Removed src/toolbox/avl.[ch] copyright.
+
+2006-01-04 09:34  twisti
+
+       * avl_dump: Only print node->data.
+
+2006-01-03 23:46  twisti
+
+       * Use new avl tree code.
+       * Rewritten.
+
+2006-01-03 23:44  twisti
+
+       * exit_handler: Removed print_dynamic_super_statistics.
+       * print_stats: Added print_dynamic_super_statistics.
+
+2006-01-03 23:43  twisti
+
+       * threads.h: Added.
+       * builtin.h: Likewise.
+
+2006-01-03 23:08  twisti
+
+       * CallNonvirtualBooleanMethodA: Added missing ;.
+
+2006-01-03 23:05  twisti
+
+       * ENABLE_STATISTICS: Fixed typo.
+
+2006-01-02 21:01  christian
+
+       typeing error
+
+2006-01-02 17:13  twisti
+
+       * nregdescint, nregdescfloat: Moved to md-abi.c.
+
+2006-01-02 17:12  twisti
+
+       * nregdescint, nregdescfloat: Added.
+
+2006-01-02 17:11  twisti
+
+       * noinst_HEADERS: Removed md-abi.inc.
+
+2006-01-02 16:40  twisti
+
+       * signal_handler_sigsegv: Replaced functionptr with u1*.
+
+2006-01-02 16:18  twisti
+
+       * nregdescint, nregdescfloat: Moved to md-abi.c.
+
+2006-01-02 16:17  twisti
+
+       * nregdescint, nregdescfloat: Added.
+       * noinst_HEADERS: Removed md-abi.inc.
+
+2006-01-02 16:12  twisti
+
+       * INCLUDES: Added OS_DIR, some archs have their md-abi.* files in the
+       os
+       directory.
+
+2006-01-02 16:08  christian
+
+       *** empty log message ***
+
+2006-01-02 16:04  twisti
+
+       * nregdescint, nregdescfloat: Moved to md-abi.c.
+
+2006-01-02 16:03  twisti
+
+       * nregdescint, nregdescfloat: Added.
+       * noinst_HEADERS: Removed md-abi.inc.
+
+2006-01-02 14:32  christian
+
+       Removed old debug message
+
+2006-01-02 14:26  twisti
+
+       * md-abi.inc: Removed.
+
+2006-01-02 14:25  twisti
+
+       * nregdescint, nregdescfloat: Moved to md-abi.c.
+
+2006-01-02 14:24  twisti
+
+       * nregdescint, nregdescfloat: Added.
+       * noinst_HEADERS: Removed md-abi.inc.
+
+2006-01-02 14:11  christian
+
+       Corrected \"\" to \<\> for system header include
+
+2006-01-02 14:07  twisti
+
+       * nregdescint, nregdescfloat: Moved to md-abi.c.
+       * noinst_HEADERS: Removed md-abi.inc.
+
+2006-01-02 14:06  twisti
+
+       * nregdescint, nregdescfloat: Added.
+       * disassinstr: Some code improvement.
+
+2006-01-02 14:05  twisti
+
+       * md-abi.inc: Removed.
+
+2006-01-02 13:05  christian
+
+       Changed register allocator .inc to .c files and moved them to
+       src/vm/jit/allocator
+
+2006-01-02 12:59  christian
+
+       Changed register allocator .inc to .c files and moved them to
+       src/vm/jit/allocator
+
+2006-01-02 12:22  twisti
+
+       * Fixed result message for debug.
+
+2006-01-02 12:10  twisti
+
+       * Typo.
+
+2006-01-02 12:04  twisti
+
+       * Added ltdl.h check.
+
+2006-01-02 11:34  twisti
+
+       * Fixed ltdl.h include path.
+
+2006-01-02 01:34  twisti
+
+       * Fixed ltdl.h include path.
+
+2006-01-02 01:15  twisti
+
+       * I don't think we really need them, but they are still in Attic.
+
+2006-01-02 01:10  twisti
+
+       * Generated changelog for 2005.
+
+2006-01-02 01:05  twisti
+
+       * unzip.[ch], libffi, libltdl: Removed.
+
+2006-01-01 21:53  twisti
+
+       * Removed libltdl.
+
+2006-01-01 21:38  twisti
+
+       * We now use the system libltdl.
+
+2006-01-01 21:32  twisti
+
+       * Changed text of kaffe's stuff, dalibor pointed this out.
+
+2006-01-01 21:29  twisti
+
+       * AC_LIBLTDL_CONVENIENCE, AC_SUBST(LIBLTDL): Removed.
+       * AC_COMPILE_CHECK_SIZEOF: Replaced with AC_CHECK_SIZEOF.
+
+2006-01-01 21:22  twisti
+
+       * m4 macros have a different copyright header.
+
+2006-01-01 21:13  twisti
+
+       * Lists all third party software we use. This list contains all
+       stuff we
+       used in 0.93. Stuff that has been ripped will be deleted after that
+       commit, this is for the records.
+
+2006-01-01 20:55  twisti
+
+       * Not required.
+
+2006-01-01 19:39  twisti
+
+       * Removed libltdlc.la.
+       * DIST_SUBDIRS: Removed libltdl.
+       * SUBDIRS: Likewise.
+
+2006-01-01 19:38  twisti
+
+       * Added libltdl check.
+       * AC_CONFIG_SUBDIRS: Removed src/libltdl.
+
+2006-01-01 18:39  twisti
+
+       * libarch_la_SOURCES: Removed symcat.h.
+
+2006-01-01 18:34  twisti
+
+       * Use system one.
+
+2006-01-01 18:33  twisti
+
+       * libarch_la_SOURCES: Removed symcat.h.
+
+2006-01-01 18:30  twisti
+
+       * generic_symbol_at_address: Print only 8 bytes.
+
+2006-01-01 18:21  twisti
+
+       * Use system ones.
+       * generic_symbol_at_address: Added, they were implemented in dis-buf.c
+       which was removed.
+       * generic_print_address: Likewise.
+       * perror_memory: Likewise.
+
+2006-01-01 18:20  twisti
+
+       * libarch_la_SOURCES: Removed ansidecl.h, bfd.h and dis-buf.c.
+       * config.h, vm/jit/codegen-common.h: Added.
+
+2006-01-01 16:40  twisti
+
+       * Changed include to use system headers.
+
+2006-01-01 16:39  twisti
+
+       * Use system ones.
+       * generic_symbol_at_address: Added, they were implemented in dis-buf.c
+       which was removed.
+       * generic_print_address: Likewise.
+       * perror_memory: Likewise.
+
+2006-01-01 16:37  twisti
+
+       * libarch_la_SOURCES: Removed ansidecl.h, bfd.h and dis-buf.c.
+
+2006-01-01 16:35  twisti
+
+       * DEC OSF cc only defines __alpha.
+
+2006-01-01 16:34  twisti
+
+       * class_resolvefield: Renamed except to throwexception since some
+       compilers
+       have a builtin except macro (like DEC OSF cc).
+       * class_resolveclassmethod: Likewise.
+       * class_resolveinterfacemethod: Likewise.
+
+2006-01-01 16:31  twisti
+
+       * zip_open: Handle compiler error with DEC OSF's cc.
index b7b0dd9d87e57ddd2e4334268a0b9acb51789d77..e3acb1c61ad1668e5f1ed9dc642ebce805767b99 100644 (file)
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4379 2006-01-28 11:24:57Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 ACLOCAL_AMFLAGS = -I m4
 
index 830fdbf3140e06b2860963c0ace782550cbb22fa..c804bed90de7a54d6026b28316005b1eb401697a 100644 (file)
@@ -211,7 +211,12 @@ Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net>
 See contrib/vmlog/COPYING for the full text of the license.
 
 
-* contrib/mapfile-vers-product, src/lib/gnu/sun/misc/Unsafe.java
+* contrib/mapfile-vers-product, src/lib/gnu/sun/misc/Unsafe.java,
+  src/lib/gnu/sun/reflect/ConstantPool.java,
+  src/lib/gnu/sun/reflect/annotation/AnnotationParser.java,
+  src/lib/gnu/sun/reflect/annotation/AnnotationType.java,
+  src/lib/gnu/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java,
+  src/lib/gnu/sun/reflect/annotation/TypeNotPresentExceptionProxy.java
 
 Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
index 2db70071921f72f3cca9c6634451a1d9819a8e1d..94ba4b3187efb8383cb63d59329f004c3009542e 100644 (file)
@@ -21,8 +21,6 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
-dnl 
-dnl $Id: configure.ac 8359 2007-08-20 17:02:14Z michi $
 
 dnl Process this file with autoconf to produce a configure script.
 
@@ -51,56 +49,69 @@ case "$host_cpu" in
 alpha | alphaev56 | alphapca56 )
     ARCH_DIR="alpha"
     ARCH_CFLAGS="-mieee -D__ALPHA__"
+    JAVA_ARCH="alpha"
     ;;
 
 arm | armv4 | armv4tl | armv5b | armv5l )
     ARCH_DIR="arm"
     ARCH_CFLAGS="-D__ARM__"
+    JAVA_ARCH="arm"
     ;;
 
 hppa2.0 )
     ARCH_DIR="parisc"
     ARCH_CFLAGS="-D__PARISC__"
+    JAVA_ARCH="hppa"
     ;;
 
 i386 | i486 | i586 | i686 )
     ARCH_DIR="i386"
     ARCH_CFLAGS="-D__I386__"
+    JAVA_ARCH="i386"
     ;;
 
 m68k )
     ARCH_DIR="m68k"
     ARCH_CFLAGS="-D__M68K__"
+    JAVA_ARCH="m68k"
     ;;
 
 mips | mipsel )
     ARCH_DIR="mips"
     ARCH_CFLAGS="-D__MIPS__"
+    dnl Is this correct for mipsel?
+    JAVA_ARCH="mips"
     ;;
 
 powerpc )
     ARCH_DIR="powerpc"
     ARCH_CFLAGS="-D__POWERPC__"
+    JAVA_ARCH="ppc"
     ;;
 
 powerpc64 )
     ARCH_DIR="powerpc64"
     ARCH_CFLAGS="-D__POWERPC64__"
+    JAVA_ARCH="ppc64"
     ;;
 
 s390 )
     ARCH_DIR="s390"
     ARCH_CFLAGS="-D__S390__"
+    JAVA_ARCH="s390"
     ;;
 
 sparc | sparc64 )
     ARCH_DIR="sparc64"
     ARCH_CFLAGS="-mcpu=v9 -m64 -D__SPARC_64__"
+    dnl Is this correct for 64-bits?
+    JAVA_ARCH="sparc"
     ;;
 
 x86_64 )
     ARCH_DIR="x86_64"
     ARCH_CFLAGS="-D__X86_64__"
+    JAVA_ARCH="amd64"
     ;;
 
 xdspcore )
@@ -194,6 +205,7 @@ AC_DEFINE_UNQUOTED(VERSION_CFLAGS, "$OPT_CFLAGS $ARCH_CFLAGS", [CFLAGS used])
 
 dnl define and substitute some architecture specific variables
 AC_DEFINE_UNQUOTED([ARCH_DIR], "${ARCH_DIR}", [architecture directory])
+AC_DEFINE_UNQUOTED([JAVA_ARCH], "${JAVA_ARCH}", [Java architecture name])
 AC_SUBST(ARCH_DIR)
 AC_SUBST(OS_DIR)
 AC_SUBST(USE_SCHEDULER)
@@ -215,6 +227,7 @@ AC_HEADER_STDC
 
 dnl keep them alpha-sorted!
 AC_CHECK_HEADERS([fcntl.h])
+AC_CHECK_HEADERS([libgen.h])
 AC_CHECK_HEADERS([netdb.h])
 AC_CHECK_HEADERS([stdlib.h])
 AC_CHECK_HEADERS([string.h])
@@ -261,12 +274,14 @@ AC_FUNC_MMAP
 
 dnl keep them alpha-sorted!
 AC_CHECK_FUNCS([accept])
+AC_CHECK_FUNCS([access])
 AC_CHECK_FUNCS([atoi])
 AC_CHECK_FUNCS([atol])
 AC_CHECK_FUNCS([calloc])
 AC_CHECK_FUNCS([close])
 AC_CHECK_FUNCS([confstr])
 AC_CHECK_FUNCS([connect])
+AC_CHECK_FUNCS([dirname])
 AC_CHECK_FUNCS([fflush])
 AC_CHECK_FUNCS([fopen])
 AC_CHECK_FUNCS([fprintf])
@@ -290,6 +305,7 @@ AC_CHECK_FUNCS([malloc])
 AC_CHECK_FUNCS([mmap])
 AC_CHECK_FUNCS([mprotect])
 AC_CHECK_FUNCS([open])
+AC_CHECK_FUNCS([readlink])
 AC_CHECK_FUNCS([recv])
 AC_CHECK_FUNCS([scandir])
 AC_CHECK_FUNCS([select])
@@ -832,22 +848,7 @@ dnl because libtool uses them to build the correct libraries.
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 
-dnl check if CACAO should be linked statically
-AC_MSG_CHECKING(whether to link CACAO statically)
-AC_ARG_ENABLE([staticvm],
-              [AS_HELP_STRING(--enable-staticvm,link CACAO statically [[default=no]])],
-              [case "${enableval}" in
-                  yes) ENABLE_STATICVM=yes
-                       AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
-                       ;;
-                  *) ENABLE_STATICVM=no;;
-               esac],
-              [ENABLE_STATICVM=no])
-AC_MSG_RESULT(${ENABLE_STATICVM})
-AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
-AC_SUBST(ENABLE_STATICVM)
-
-
+AC_CHECK_ENABLE_STATICVM
 AC_CHECK_ENABLE_ANNOTATIONS
 
 
@@ -868,19 +869,7 @@ AC_CHECK_WITH_CLASSPATH_CLASSES
 AC_CHECK_WITH_CLASSPATH_LIBDIR
 AC_CHECK_WITH_CLASSPATH_INCLUDEDIR
 
-
-dnl if we compile for a JRE-style directory layout
-AC_MSG_CHECKING(if we compile for a JRE-style directory layout)
-AC_ARG_WITH([jre-layout],
-            [AS_HELP_STRING(--with-jre-layout,compile for JRE-style directory layout [[default=no]])],
-            [case "${enableval}" in
-                yes) WITH_JRE_LAYOUT=yes
-                     AC_DEFINE([WITH_JRE_LAYOUT], 1, [with JRE layout])
-                     ;;
-                *) WITH_JRE_LAYOUT=no;;
-             esac],
-            [WITH_JRE_LAYOUT=no])
-AC_MSG_RESULT(${WITH_JRE_LAYOUT})
+AC_CHECK_WITH_JRE_LAYOUT
 
 
 dnl check if GNU Classpath should be linked statically into CACAO
@@ -1040,4 +1029,4 @@ AC_OUTPUT
 ## c-basic-offset: 4
 ## tab-width: 8
 ## compile-command: "automake --add-missing"
-## End:
+## End:
\ No newline at end of file
index 133d0f90821834e8af9fab0099718c02997d94cd..bc7f7372ade15eeffb22948ed8a163c4a8c85733 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 7789 2007-04-21 16:42:52Z edwin $
 
 ## Process this file with automake to produce Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index 943288b..89e83cf
@@ -17,7 +17,7 @@
 # You may want to edit the opt_ignore options below.
 #
 # Author  : Edwin Steiner
-# Revision: $Id: log2xml.pl 2308 2005-04-15 09:33:34Z edwin $
+# Revision:
 #
 # $Log$
 # Revision 1.5  2005/04/15 09:33:34  edwin
diff --git a/contrib/mapfile-vers-product b/contrib/mapfile-vers-product
new file mode 100644 (file)
index 0000000..5d23dfa
--- /dev/null
@@ -0,0 +1,286 @@
+#
+# @(#)mapfile-vers-product     1.17 07/05/05 17:03:55
+#
+
+#
+# Copyright 2002-2006 Sun Microsystems, Inc.  All Rights Reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+# CA 95054 USA or visit www.sun.com if you need additional information or
+# have any questions.
+#  
+#
+
+# Define public interface.
+
+SUNWprivate_1.1 {
+        global:
+                # CACAO
+                vm_createjvm;
+                vm_run;
+
+                # JNI
+                JNI_CreateJavaVM;
+                JNI_GetCreatedJavaVMs;
+                JNI_GetDefaultJavaVMInitArgs;
+
+                # JVM
+                JVM_Accept;
+                JVM_ActiveProcessorCount;
+                JVM_AllocateNewArray;
+                JVM_AllocateNewObject;
+                JVM_ArrayCopy;
+                JVM_AssertionStatusDirectives;
+                JVM_Available;
+                JVM_Bind;
+                JVM_ClassDepth;
+                JVM_ClassLoaderDepth;
+                JVM_Clone;
+                JVM_Close;
+                JVM_CX8Field;
+                JVM_CompileClass;
+                JVM_CompileClasses;
+                JVM_CompilerCommand;
+                JVM_Connect;
+                JVM_ConstantPoolGetClassAt;
+                JVM_ConstantPoolGetClassAtIfLoaded;
+                JVM_ConstantPoolGetDoubleAt;
+                JVM_ConstantPoolGetFieldAt;
+                JVM_ConstantPoolGetFieldAtIfLoaded;
+                JVM_ConstantPoolGetFloatAt;
+                JVM_ConstantPoolGetIntAt;
+                JVM_ConstantPoolGetLongAt;
+                JVM_ConstantPoolGetMethodAt;
+                JVM_ConstantPoolGetMethodAtIfLoaded;
+                JVM_ConstantPoolGetMemberRefInfoAt;
+                JVM_ConstantPoolGetSize;
+                JVM_ConstantPoolGetStringAt;
+                JVM_ConstantPoolGetUTF8At;
+                JVM_CountStackFrames;
+                JVM_CurrentClassLoader;
+                JVM_CurrentLoadedClass;
+                JVM_CurrentThread;
+                JVM_CurrentTimeMillis;
+                JVM_DefineClass;
+                JVM_DefineClassWithSource;
+                JVM_DesiredAssertionStatus;
+                JVM_DisableCompiler;
+                JVM_DoPrivileged;
+                JVM_DumpAllStacks;
+                JVM_DumpThreads;
+                JVM_EnableCompiler;
+                JVM_Exit;
+                JVM_FillInStackTrace;
+                JVM_FindClassFromClass;
+                JVM_FindClassFromClassLoader;
+                JVM_FindLibraryEntry;
+                JVM_FindLoadedClass;
+                JVM_FindPrimitiveClass;
+                JVM_FindSignal;
+                JVM_FreeMemory;
+                JVM_GC;
+                JVM_GetAllThreads;
+                JVM_GetArrayElement;
+                JVM_GetArrayLength;
+                JVM_GetCPClassNameUTF;
+                JVM_GetCPFieldClassNameUTF;
+                JVM_GetCPFieldModifiers;
+                JVM_GetCPFieldNameUTF;
+                JVM_GetCPFieldSignatureUTF;
+                JVM_GetCPMethodClassNameUTF;
+                JVM_GetCPMethodModifiers;
+                JVM_GetCPMethodNameUTF;
+                JVM_GetCPMethodSignatureUTF;
+                JVM_GetCallerClass;
+                JVM_GetClassAccessFlags;
+                JVM_GetClassAnnotations;
+                JVM_GetClassCPEntriesCount;
+                JVM_GetClassCPTypes;
+                JVM_GetClassConstantPool;
+                JVM_GetClassContext;
+                JVM_GetClassDeclaredConstructors;
+                JVM_GetClassDeclaredFields;
+                JVM_GetClassDeclaredMethods;
+                JVM_GetClassFieldsCount;
+                JVM_GetClassInterfaces;
+                JVM_GetClassLoader;
+                JVM_GetClassMethodsCount;
+                JVM_GetClassModifiers;
+                JVM_GetClassName;
+                JVM_GetClassNameUTF;
+                JVM_GetClassSignature;
+                JVM_GetClassSigners;
+                JVM_GetComponentType;
+                JVM_GetDeclaredClasses;
+                JVM_GetDeclaringClass;
+                JVM_GetEnclosingMethodInfo;
+                JVM_GetFieldAnnotations;
+                JVM_GetFieldIxModifiers;
+                JVM_GetHostName;
+                JVM_GetInheritedAccessControlContext;
+                JVM_GetInterfaceVersion;
+                JVM_GetLastErrorString;
+                JVM_GetManagement;
+                JVM_GetMethodAnnotations;
+                JVM_GetMethodDefaultAnnotationValue;
+                JVM_GetMethodIxArgsSize;
+                JVM_GetMethodIxByteCode;
+                JVM_GetMethodIxByteCodeLength;
+                JVM_GetMethodIxExceptionIndexes;
+                JVM_GetMethodIxExceptionTableEntry;
+                JVM_GetMethodIxExceptionTableLength;
+                JVM_GetMethodIxExceptionsCount;
+                JVM_GetMethodIxLocalsCount;
+                JVM_GetMethodIxMaxStack;
+                JVM_GetMethodIxModifiers;
+                JVM_GetMethodIxNameUTF;
+                JVM_GetMethodIxSignatureUTF;
+                JVM_GetMethodParameterAnnotations;
+                JVM_GetPrimitiveArrayElement;
+                JVM_GetProtectionDomain;
+                JVM_GetSockName;
+                JVM_GetSockOpt;
+                JVM_GetStackAccessControlContext;
+                JVM_GetStackTraceDepth;
+                JVM_GetStackTraceElement;
+                JVM_GetSystemPackage;
+                JVM_GetSystemPackages;
+                JVM_GetThreadStateNames;
+                JVM_GetThreadStateValues;
+                JVM_GetVersionInfo;
+                JVM_Halt;
+                JVM_HoldsLock;
+                JVM_IHashCode;
+                JVM_InitAgentProperties;
+                JVM_InitProperties;
+                JVM_InitializeCompiler;
+                JVM_InitializeSocketLibrary;
+                JVM_InternString;
+                JVM_Interrupt;
+                JVM_InvokeMethod;
+                JVM_IsArrayClass;
+                JVM_IsConstructorIx;
+                JVM_IsInterface;
+                JVM_IsInterrupted;
+                JVM_IsNaN;
+                JVM_IsPrimitiveClass;
+                JVM_IsSameClassPackage;
+                JVM_IsSilentCompiler;
+                JVM_IsSupportedJNIVersion;
+                JVM_IsThreadAlive;
+                JVM_LatestUserDefinedLoader;
+                JVM_Listen;
+                JVM_LoadClass0;
+                JVM_LoadLibrary;
+                JVM_Lseek;
+                JVM_MaxObjectInspectionAge;
+                JVM_MaxMemory;
+                JVM_MonitorNotify;
+                JVM_MonitorNotifyAll;
+                JVM_MonitorWait;
+                JVM_NanoTime;
+                JVM_NativePath;
+                JVM_NewArray;
+                JVM_NewInstanceFromConstructor;
+                JVM_NewMultiArray;
+                JVM_OnExit;
+                JVM_Open;
+                JVM_PrintStackTrace;
+                JVM_RaiseSignal;
+                JVM_RawMonitorCreate;
+                JVM_RawMonitorDestroy;
+                JVM_RawMonitorEnter;
+                JVM_RawMonitorExit;
+                JVM_Read;
+                JVM_Recv;
+                JVM_RecvFrom;
+                JVM_RegisterSignal;
+                JVM_ReleaseUTF;
+                JVM_ResolveClass;
+                JVM_ResumeThread;
+                JVM_Send;
+                JVM_SendTo;
+                JVM_SetArrayElement;
+                JVM_SetClassSigners;
+                JVM_SetLength;
+                JVM_SetPrimitiveArrayElement;
+                JVM_SetProtectionDomain;
+                JVM_SetSockOpt;
+                JVM_SetThreadPriority;
+                JVM_Sleep;
+                JVM_Socket;
+                JVM_SocketAvailable;
+                JVM_SocketClose;
+                JVM_SocketShutdown;
+                JVM_StartThread;
+                JVM_StopThread;
+                JVM_SuspendThread;
+                JVM_SupportsCX8;
+                JVM_Sync;
+                JVM_Timeout;
+                JVM_TotalMemory;
+                JVM_TraceInstructions;
+                JVM_TraceMethodCalls;
+                JVM_UnloadLibrary;
+                JVM_Write;
+                JVM_Yield;
+                JVM_handle_linux_signal;
+
+                # Old reflection routines
+                # These do not need to be present in the product build in JDK 1.4
+                # but their code has not been removed yet because there will not
+                # be a substantial code savings until JVM_InvokeMethod and
+                # JVM_NewInstanceFromConstructor can also be removed; see
+                # reflectionCompat.hpp.
+                JVM_GetClassConstructor;
+                JVM_GetClassConstructors;
+                JVM_GetClassField;
+                JVM_GetClassFields;
+                JVM_GetClassMethod;
+                JVM_GetClassMethods;
+                JVM_GetField;
+                JVM_GetPrimitiveField;
+                JVM_NewInstance;
+                JVM_SetField;
+                JVM_SetPrimitiveField;
+
+                # Needed for dropping VM into JDK 1.3.x, 1.4
+                _JVM_native_threads;
+                jdk_sem_init;
+                jdk_sem_post;
+                jdk_sem_wait;
+                jdk_pthread_sigmask;
+                jdk_waitpid;
+
+                # miscellaneous functions
+                jio_fprintf;
+                jio_printf;
+                jio_snprintf;
+                jio_vfprintf;
+                jio_vsnprintf;
+               fork1;
+
+                # Needed because there is no JVM interface for this.
+                sysThreadAvailableStackWithSlack;
+
+                # This is for Forte Analyzer profiling support.
+                AsyncGetCallTrace;
+        local:
+                *;
+};
+
diff --git a/contrib/vmlog/COPYING b/contrib/vmlog/COPYING
new file mode 100644 (file)
index 0000000..3912109
--- /dev/null
@@ -0,0 +1,340 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/contrib/vmlog/Makefile.am b/contrib/vmlog/Makefile.am
new file mode 100644 (file)
index 0000000..b722a8e
--- /dev/null
@@ -0,0 +1,47 @@
+
+SUBDIRS = t
+
+AM_CPPFLAGS = \
+       -I$(top_srcdir)/src \
+       -I$(top_srcdir)/src/native \
+       -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@ \
+       -I$(top_srcdir)/src/vm/jit/@ARCH_DIR@/@OS_DIR@ \
+       -DVMLOG_HAVE_PTRINT
+
+if ENABLE_VMLOG
+noinst_PROGRAMS = vmlogdump vmlogindex vmlogdiff
+if ENABLE_VMLOGFILTER
+noinst_PROGRAMS += vmlogfilter
+endif
+endif
+
+COMMON_SOURCES = \
+       vmlog.c \
+       vmlog.h
+
+vmlogdump_SOURCES = \
+       $(COMMON_SOURCES) \
+       vmlogdump.c
+
+vmlogindex_SOURCES = \
+       $(COMMON_SOURCES) \
+       vmlogdiff.c
+
+vmlogdiff_SOURCES = \
+       $(COMMON_SOURCES) \
+       vmlogdiff.c
+
+vmlogfilter_SOURCES = \
+       $(COMMON_SOURCES) \
+       vmlogfilter.c
+
+EXTRA_DIST = \
+       COPYING \
+       maintain.mk \
+       README \
+       vmlog_cacao.c \
+       vmlog_cacao.h \
+       vmlog_jamvm.c \
+       vmlog_jamvm.h \
+       vmlog_jamvm.patch
+
diff --git a/contrib/vmlog/maintain.mk b/contrib/vmlog/maintain.mk
new file mode 100644 (file)
index 0000000..3821b68
--- /dev/null
@@ -0,0 +1,50 @@
+VERSION=0.0.5
+RELEASENAME=vmlog-$(VERSION)
+TARBALL=releases/$(RELEASENAME).tar.gz
+
+CFLAGS=-g -ansi -std=c99 -pedantic -Wall -Wno-long-long -Wno-unused-function -I/home/edwin/local/classpath/include
+#CFLAGS_TOOL=-O2 -DNDEBUG -ansi -std=c99 -march=pentium4m -pedantic -Wall -Wno-long-long
+CFLAGS_TOOL=-g3 -pedantic -ansi -std=c99 -Wall -Wno-long-long -Wno-unused-function
+
+all: vmlog.o vmlogdump vmlogindex vmlogdiff
+
+runtests: t/hash.run t/memdup.run t/string.run t/threadhash.run t/file.run t/log.run t/concat.run t/ring.run t/opt.run t/tags.run
+
+test: cleantests runtests
+       cat TESTRESULTS
+
+cleantests:
+       @rm -f TESTIDX TESTSTR TESTLOG? TESTFILE TESTRESULTS
+       
+%.run: %.c t/prolog.h vmlog.c vmlog.h
+       $(CC) $(CFLAGS) -I. -o $* $<
+       echo $* >>TESTRESULTS
+       { $* || echo "FAILED: exitcode == $$?" ; } | uniq -c >>TESTRESULTS
+
+vmlogdump: vmlogdump.c vmlog.c vmlog.h
+       $(CC) $(CFLAGS_TOOL) -o $@ vmlogdump.c vmlog.c
+vmlogindex: vmlogindex.c vmlog.c vmlog.h
+       $(CC) $(CFLAGS_TOOL) -o $@ vmlogindex.c vmlog.c
+vmlogdiff: vmlogdiff.c vmlog.c vmlog.h
+       $(CC) $(CFLAGS_TOOL) -o $@ vmlogdiff.c vmlog.c
+
+cscope:
+       cscope -b *.[ch] t/*.[ch]
+
+clean: cleantests
+       rm -f *.o
+       rm -f vmlogdump vmlogindex vmlogdiff
+       rm -f cscope.out
+       rm -f t/hash t/memdup t/string t/threadhash t/file t/log t/concat t/ring t/opt t/tags
+
+checkedin:
+       if (cg-status | grep ^[AMD]) ; then echo "difference to repository!"; exit 1; else /bin/true ; fi
+
+distprep: clean all test clean
+       mkdir $(RELEASENAME)
+       cp -a --parents `git-ls-files` $(RELEASENAME)
+       tar cfz $(TARBALL) $(RELEASENAME)/*
+       rm -rf $(RELEASENAME)
+
+dist: checkedin distprep
+       cg-tag $(VERSION)
diff --git a/contrib/vmlog/t/Makefile.am b/contrib/vmlog/t/Makefile.am
new file mode 100644 (file)
index 0000000..d10d05c
--- /dev/null
@@ -0,0 +1,13 @@
+EXTRA_DIST = \
+       concat.c \
+       file.c \
+       hash.c \
+       log.c \
+       memdup.c \
+       opt.c \
+       prolog.h \
+       ring.c \
+       string.c \
+       tags.c \
+       threadhash.c
+
diff --git a/contrib/vmlog/t/concat.c b/contrib/vmlog/t/concat.c
new file mode 100644 (file)
index 0000000..46b4da0
--- /dev/null
@@ -0,0 +1,34 @@
+#include "t/prolog.h"
+
+int main(int argc,char **argv) 
+{
+       char *p;
+       int len;
+
+       p = vmlog_concat3("foo","","bar",&len);
+       NOTNULL(p);
+       IS(len,6);
+       TRUE(strcmp(p,"foobar") == 0);
+
+       p = vmlog_concat3("","","",&len);
+       NOTNULL(p);
+       IS(len,0);
+       TRUE(strcmp(p,"") == 0);
+
+       p = vmlog_concat3("This is a"," stupid ","test.",&len);
+       NOTNULL(p);
+       IS(len,strlen("This is a stupid test."));
+       TRUE(strcmp(p,"This is a stupid test.") == 0);
+
+       p = vmlog_concat4len("eins",2,"zwei",4,"drei",0,"vier",4,&len);
+       NOTNULL(p);
+       IS(len,10);
+       TRUE(strcmp(p,"eizweivier") == 0);
+       
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
+
diff --git a/contrib/vmlog/t/file.c b/contrib/vmlog/t/file.c
new file mode 100644 (file)
index 0000000..e9cee58
--- /dev/null
@@ -0,0 +1,58 @@
+#include "t/prolog.h"
+
+int main(int argc,char **argv) 
+{
+       vmlog_file file;
+       int x;
+       int fd;
+       struct stat st;
+       int r;
+       int len;
+       char buf[100];
+
+       vmlog_file_open(&file,"TESTFILE",vmlogTruncateAppend);
+       IS(file.fnamelen,8);
+       TRUE(strcmp(file.fname,"TESTFILE") == 0);
+
+       len = 0;
+       IS(file.ofs,0);
+       vmlog_file_append(&file,"foo",3); len += 3;
+       IS(file.ofs,len);
+       vmlog_file_append(&file,"",1); len += 1;
+       IS(file.ofs,len);
+       vmlog_file_append(&file,"",0);
+       IS(file.ofs,len);
+       x = 0;
+       vmlog_file_append(&file,&x,sizeof(int)); len += sizeof(int);
+       IS(file.ofs,len);
+       vmlog_file_append(&file,"ENDE",4); len += 4;
+       IS(file.ofs,len);
+       
+       vmlog_file_close(&file);
+       IS(file.fd,-1);
+       IS(file.fname,NULL);
+       IS(file.fnamelen,0);
+
+       fd = open("TESTFILE",O_RDONLY);
+       TRUE(fd != -1);
+       r = fstat(fd,&st);
+       TRUE(r != -1);
+       IS(st.st_size,len);
+
+       r = read(fd,buf,len);
+       IS(r,len);
+
+       TRUE(memcmp(buf,"foo",3) == 0);
+       IS(buf[3],0);
+       TRUE(*(int*)(buf+4) == 0);
+       TRUE(memcmp(buf+len-4,"ENDE",4) == 0);
+       
+       close(fd);
+
+       return 0;
+}
+
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/t/hash.c b/contrib/vmlog/t/hash.c
new file mode 100644 (file)
index 0000000..dc9d532
--- /dev/null
@@ -0,0 +1,31 @@
+#include "t/prolog.h"
+
+static int destruct_counter = 0;
+
+static void test_destuctor(vmlog_hash_entry *entry) {
+       printf("# destroying entry %p\n",(void *)entry);
+       destruct_counter++;
+}
+
+int main(int argc,char **argv) 
+{
+       vmlog_hash_table ht;
+
+       vmlog_hashtable_init(&ht,10);
+
+       IS(ht.size,10);
+       IS(ht.nentries,0);
+
+       vmlog_hashtable_free(&ht,test_destuctor);
+
+       IS(destruct_counter,10);
+       IS(ht.size,0);
+       IS(ht.nentries,0);
+       IS(ht.table,0);
+
+       return 0;
+}
+
+
+/* vim: noet ts=8 sw=8
+ */
diff --git a/contrib/vmlog/t/log.c b/contrib/vmlog/t/log.c
new file mode 100644 (file)
index 0000000..423fe33
--- /dev/null
@@ -0,0 +1,64 @@
+#include "t/prolog.h"
+
+int main(int argc,char **argv) 
+{
+       vmlog_log *vml;
+       int i;
+       int r;
+       int fd;
+       struct stat st;
+       int cumlen;
+       void *t1 = (void*)123;
+       char *name;
+       vmlog_thread_log *tlog;
+       vmlog_log_entry logent;
+
+       vml = vmlog_log_new(NULL,1);
+       NOTNULL(vml);
+
+       vmlog_file_open(&(vml->idxfile),"TESTIDX",vmlogTruncateAppend);
+       vmlog_file_open(&(vml->strfile),"TESTSTR",vmlogTruncateAppend);
+
+       tlog = vmlog_get_thread_log(vml,t1);
+       vmlog_file_open(&(tlog->logfile),"TESTLOG1",vmlogTruncateAppend);
+
+       vmlog_log_enter(vml,t1,"foo(II)V",8);
+       name = "bar(Ljava/lang/Object;)Z"; vmlog_log_enter(vml,t1,name,strlen(name));
+       name = "bar(Ljava/lang/Object;)Z"; vmlog_log_leave(vml,t1,name,strlen(name));
+       vmlog_log_leave(vml,t1,"foo(II)V",8);
+
+       vmlog_log_free(vml);
+       vml = NULL;
+
+       fd = open("TESTLOG1",O_RDONLY);
+       TRUE(fd != -1);
+       r = fstat(fd,&st);
+       TRUE(r != -1);
+       IS(st.st_size,4*sizeof(vmlog_log_entry));
+
+       r = read(fd,&logent,sizeof(vmlog_log_entry));
+       TRUE(r == sizeof(vmlog_log_entry));
+       IS(logent.tag,VMLOG_TAG_ENTER);
+       
+       r = read(fd,&logent,sizeof(vmlog_log_entry));
+       TRUE(r == sizeof(vmlog_log_entry));
+       IS(logent.tag,VMLOG_TAG_ENTER);
+       
+       r = read(fd,&logent,sizeof(vmlog_log_entry));
+       TRUE(r == sizeof(vmlog_log_entry));
+       IS(logent.tag,VMLOG_TAG_LEAVE);
+       
+       r = read(fd,&logent,sizeof(vmlog_log_entry));
+       TRUE(r == sizeof(vmlog_log_entry));
+       IS(logent.tag,VMLOG_TAG_LEAVE);
+       
+       close(fd);
+
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
+
+
diff --git a/contrib/vmlog/t/memdup.c b/contrib/vmlog/t/memdup.c
new file mode 100644 (file)
index 0000000..4a9a7f3
--- /dev/null
@@ -0,0 +1,20 @@
+#include "t/prolog.h"
+
+int main(int argc,char **argv) 
+{
+       char *str = "this is a test";
+       char *p;
+
+       p = (char*) vmlog_memdup(str,strlen(str));
+       NOTNULL(p);
+       IS(memcmp(p,str,strlen(str)),0);
+
+       p = (char*) vmlog_memdup("",0);
+       NOTNULL(p);
+
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/t/opt.c b/contrib/vmlog/t/opt.c
new file mode 100644 (file)
index 0000000..3ed70bb
--- /dev/null
@@ -0,0 +1,104 @@
+#include "t/prolog.h"
+
+int main(int argc,char **argv) 
+{
+       char *p;
+       int len;
+       int r;
+       vmlog_seq_t seq,end;
+       vmlog_options *opts;
+       char **myargv;
+       int myargc;
+
+       seq = 7777;
+       r = vmlog_opt_parse_seq("123",0,&seq);
+       IS(r,0);
+       IS(seq,7777);
+       
+       seq = 7777;
+       r = vmlog_opt_parse_seq("123",1,&seq);
+       IS(r,1);
+       IS(seq,1);
+       
+       seq = 7777;
+       r = vmlog_opt_parse_seq("123",2,&seq);
+       IS(r,1);
+       IS(seq,12);
+       
+       seq = 7777;
+       r = vmlog_opt_parse_seq("123",3,&seq);
+       IS(r,1);
+       IS(seq,123);
+       
+       seq = 7777;
+       r = vmlog_opt_parse_seq("123",4,&seq);
+       IS(r,1);
+       IS(seq,123);
+       
+       seq = 7777;
+       r = vmlog_opt_parse_seq("123x",4,&seq);
+       IS(r,0);
+       IS(seq,123);
+
+       seq = 7777; end = 8888;
+       r = vmlog_opt_parse_range("345",&seq,&end);
+       IS(r,1);
+       IS(seq,345);
+       IS(end,345);
+
+       seq = 7777; end = 8888;
+       r = vmlog_opt_parse_range("345:",&seq,&end);
+       IS(r,1);
+       IS(seq,345);
+       IS(end,LLONG_MAX);
+
+       seq = 7777; end = 8888;
+       r = vmlog_opt_parse_range(":345",&seq,&end);
+       IS(r,1);
+       IS(seq,0);
+       IS(end,345);
+
+       seq = 7777; end = 8888;
+       r = vmlog_opt_parse_range("234:345",&seq,&end);
+       IS(r,1);
+       IS(seq,234);
+       IS(end,345);
+
+       seq = 7777; end = 8888;
+       r = vmlog_opt_parse_range("234x:345",&seq,&end);
+       IS(r,0);
+
+       VMLOG_XZNEW_ARRAY(myargv,char*,10);
+
+       myargv[0] = "progname";
+       myargv[1] = "xyz";
+       myargv[2] = "-vmlog:ignore";
+       myargv[3] = "testIGN";
+       myargv[4] = "bar";
+       myargv[5] = "-vmlog:prefix";
+       myargv[6] = "theprefix";
+       myargv[7] = "last";
+       myargc = 8;
+
+       opts = vmlog_opt_parse_cmd_line(&myargc,myargv);
+
+       NOTNULL(opts);
+       TRUE(strcmp(opts->progname,"progname") == 0);
+       TRUE(strcmp(opts->prefix,"theprefix") == 0);
+       TRUE(strcmp(opts->ignoreprefix,"testIGN") == 0);
+       TRUE(opts->stringprefix == NULL);
+
+       IS(myargc,4);
+       TRUE(strcmp(myargv[0],"progname") == 0);
+       TRUE(strcmp(myargv[1],"xyz") == 0);
+       TRUE(strcmp(myargv[2],"bar") == 0);
+       TRUE(strcmp(myargv[3],"last") == 0);
+
+       finished();
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
+
+
diff --git a/contrib/vmlog/t/prolog.h b/contrib/vmlog/t/prolog.h
new file mode 100644 (file)
index 0000000..9d1cf87
--- /dev/null
@@ -0,0 +1,23 @@
+#include "vmlog.h"
+#include "vmlog.c"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+
+#define IS(a,b)  do{ if ((a) == (b)) { printf("ok\n"); } else { printf("FAILED: " #a " == " #b "\n"); } }while(0)
+#define TRUE(a)  do{ if ((a)) { printf("ok\n"); } else { printf("FAILED: " #a "\n"); } }while(0)
+#define NOTNULL(a)  do{ if ((a) != NULL) { printf("ok\n"); } else { printf("FAILED: " #a " != NULL\n"); } }while(0)
+
+void finished()
+{
+       printf("finished\n");
+       exit(0);
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/t/ring.c b/contrib/vmlog/t/ring.c
new file mode 100644 (file)
index 0000000..b0647b7
--- /dev/null
@@ -0,0 +1,137 @@
+#include "t/prolog.h"
+
+const char *testfname = "TESTFILE";
+const int testdelta = 1000000;
+const int testsize = 100;
+const int testbufsize = 11;
+
+vmlog_ringbuf *ring;
+       
+static void prepare_test_file(void)
+{
+       vmlog_log_entry logent;
+       vmlog_file file;
+       int i;
+
+       vmlog_file_open(&file,testfname,vmlogTruncateAppend);
+       for (i=0; i<testsize; ++i) {
+               logent.tag = i % 5;
+               logent.index = i + testdelta;
+               vmlog_file_append(&file,&logent,sizeof(vmlog_log_entry));
+       }
+
+       vmlog_file_close(&file);
+}
+
+static void check_logent(vmlog_log_entry *logent,int seq)
+{
+       TRUE(logent->tag == seq % 5 && logent->index == seq + testdelta);
+       if (!(logent->tag == seq % 5 && logent->index == seq + testdelta)) {
+               fprintf(stdout,"THE FAILED ONE:\n");
+               vmlog_ringbuf_visualize(ring);
+       }
+}
+
+static void check_ringbuf(void)
+{
+       int i;
+       int n;
+       vmlog_log_entry *logent;
+
+       vmlog_ringbuf_check_invariants(ring);
+
+       n = ring->debug_availbefore;
+       logent = ring->cur;
+       for (i=0; i<n; ++i) {
+               if (--logent < ring->buf)
+                       logent = ring->bufend - 1;
+
+               check_logent(logent,ring->seq - i - 1);
+       }
+       
+       n = ring->debug_availafter;
+       logent = ring->cur;
+       for (i=0; i<n; ++i) {
+               check_logent(logent,ring->seq + i);
+               
+               if (++logent >= ring->bufend)
+                       logent = ring->buf;
+       }
+}
+
+static void test_forward_iteration(int base,int n,int expect)
+{
+       vmlog_log_entry *logent;
+       int count;
+
+       count = 0;
+       check_ringbuf();
+       while ((count < n) && (logent = vmlog_ringbuf_next(ring,1 + rand()%7))) {
+               check_logent(logent,base + count);
+               check_ringbuf();
+
+               count++;
+       }
+       check_ringbuf();
+
+       IS(count,expect);
+}
+
+static void test_backward_iteration(int base,int n,int expect)
+{
+       vmlog_log_entry *logent;
+       int count;
+
+       count = 0;
+       check_ringbuf();
+       while ((count < n) && (logent = vmlog_ringbuf_prev(ring,1 + rand()%7))) {
+               check_logent(logent,base - count - 1);
+               check_ringbuf();
+
+               count++;
+       }
+       check_ringbuf();
+
+       IS(count,expect);
+}
+
+#define MIN(a,b)  (((a) <= (b)) ? (a) : (b))
+
+static void test_random_walk(void)
+{
+       int i;
+       int steps;
+       int base;
+       
+       base = testsize/2;
+       vmlog_ringbuf_seek(ring,base);
+
+       for (i=0; i<1000; ++i) {
+               steps = rand()%20 - 10;
+               
+               if (steps > 0 || (steps == 0 && rand()%2)) {
+                       test_forward_iteration(base,steps,MIN(steps,testsize - base));
+                       base += MIN(steps,testsize - base);
+               }
+               else {
+                       test_backward_iteration(base,-steps,MIN(-steps,base));
+                       base -= MIN(-steps,base);
+               }
+       }
+}
+
+int main(int argc,char **argv) 
+{
+       prepare_test_file();
+
+       ring = vmlog_ringbuf_new(testfname,testbufsize);
+
+       test_forward_iteration(0,testsize+7,testsize);
+       test_backward_iteration(testsize,testsize+7,testsize);
+       test_random_walk();     
+
+       finished();
+}
+
+/* vim: noet ts=8 sw=8
+ */
diff --git a/contrib/vmlog/t/string.c b/contrib/vmlog/t/string.c
new file mode 100644 (file)
index 0000000..42fb18f
--- /dev/null
@@ -0,0 +1,83 @@
+#include "t/prolog.h"
+
+static int destruct_counter = 0;
+static int destruct_len = 0;
+
+static void test_destuctor(vmlog_hash_entry *entry) {
+       if (entry->data) {
+               destruct_counter++;
+               destruct_len += entry->len;
+       }
+       else {
+               IS(entry->len,0);
+               IS(entry->index,0);
+       }
+}
+
+int main(int argc,char **argv) 
+{
+       vmlog_log *vml;
+       int i;
+       int r;
+       int fd;
+       struct stat st;
+       int cumlen;
+
+       vml = vmlog_log_new(NULL,1);
+       NOTNULL(vml);
+
+       vmlog_file_open(&(vml->idxfile),"TESTIDX",vmlogTruncateAppend);
+       vmlog_file_open(&(vml->strfile),"TESTSTR",vmlogTruncateAppend);
+
+       cumlen = 0;
+       i = vmlog_get_string_index(vml,"foo",3);
+       IS(i,0);
+       IS(vml->stringhash.nentries,1);
+       cumlen += 3;
+
+       i = vmlog_get_string_index(vml,"foo",3);
+       IS(i,0);
+       IS(vml->stringhash.nentries,1);
+
+       i = vmlog_get_string_index(vml,"bar",3);
+       IS(i,1);
+       IS(vml->stringhash.nentries,2);
+       cumlen += 3;
+
+       i = vmlog_get_string_index(vml,"foo",3);
+       IS(i,0);
+       IS(vml->stringhash.nentries,2);
+
+       i = vmlog_get_string_index(vml,"",0);
+       IS(i,2);
+       IS(vml->stringhash.nentries,3);
+
+       i = vmlog_get_string_index(vml,"",0);
+       IS(i,2);
+       IS(vml->stringhash.nentries,3);
+
+       vmlog_hashtable_free(&(vml->stringhash),test_destuctor);
+       IS(destruct_counter,3);
+
+       vmlog_file_close(&(vml->idxfile));
+       vmlog_file_close(&(vml->strfile));
+
+       fd = open("TESTIDX",O_RDONLY);
+       TRUE(fd != -1);
+       r = fstat(fd,&st);
+       IS(st.st_size,3*sizeof(vmlog_string_entry));
+       close(fd);
+
+       fd = open("TESTSTR",O_RDONLY);
+       TRUE(fd != -1);
+       r = fstat(fd,&st);
+       IS(st.st_size,cumlen);
+       close(fd);
+
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
+
diff --git a/contrib/vmlog/t/tags.c b/contrib/vmlog/t/tags.c
new file mode 100644 (file)
index 0000000..f1da7ef
--- /dev/null
@@ -0,0 +1,44 @@
+#include "t/prolog.h"
+
+int main(int argc,char **argv) 
+{
+       int r;
+
+       r = vmlog_tag_from_name("enter",5);
+       IS(r,VMLOG_TAG_ENTER);
+    
+       r = vmlog_tag_from_name("leave",5);
+       IS(r,VMLOG_TAG_LEAVE);
+    
+       r = vmlog_tag_from_name("throw",5);
+       IS(r,VMLOG_TAG_THROW);
+    
+       r = vmlog_tag_from_name("catch",5);
+       IS(r,VMLOG_TAG_CATCH);
+    
+       r = vmlog_tag_from_name("unwnd",5);
+       IS(r,VMLOG_TAG_UNWND);
+    
+       r = vmlog_tag_from_name(NULL,0);
+       IS(r,-1);
+    
+       r = vmlog_tag_from_name(NULL,5);
+       IS(r,-1);
+    
+       r = vmlog_tag_from_name("enter",-1);
+       IS(r,-1);
+
+       r = vmlog_tag_from_name("enter",0);
+       IS(r,-1);
+    
+       r = vmlog_tag_from_name("enter",4);
+       IS(r,-1);
+       
+       r = vmlog_tag_from_name("enter",6);
+       IS(r,-1);
+
+       finished();
+}
+
+/* vim: noet ts=8 sw=8
+ */
diff --git a/contrib/vmlog/t/threadhash.c b/contrib/vmlog/t/threadhash.c
new file mode 100644 (file)
index 0000000..6f2015e
--- /dev/null
@@ -0,0 +1,68 @@
+#include "t/prolog.h"
+
+static int destruct_counter = 0;
+static int destruct_len = 0;
+
+static void test_destuctor(vmlog_hash_entry *entry) {
+       if (entry->data) {
+               destruct_counter++;
+               destruct_len += entry->len;
+       }
+       else {
+               IS(entry->len,0);
+               IS(entry->index,0);
+       }
+}
+
+int main(int argc,char **argv) 
+{
+       vmlog_log *vml;
+       vmlog_thread_log *tlog;
+       vmlog_thread_log *tlog1;
+       int i;
+       vmlog_thread_log *tlogs[100];
+
+       vml = vmlog_log_new(NULL,1);
+       NOTNULL(vml);
+
+       tlog = vmlog_get_thread_log(vml,(void*)123);
+       tlog1 = tlog;
+       NOTNULL(tlog);
+       IS(vml->threadhash.nentries,1);
+       IS(tlog->threadid,(void*)123);
+
+       tlog = vmlog_get_thread_log(vml,(void*)0);
+       NOTNULL(tlog);
+       IS(vml->threadhash.nentries,2);
+       IS(tlog->threadid,(void*)0);
+
+       tlog = vmlog_get_thread_log(vml,(void*)123);
+       NOTNULL(tlog);
+       IS(vml->threadhash.nentries,2);
+       IS(tlog,tlog1);
+       IS(tlog->threadid,(void*)123);
+
+       vmlog_hashtable_free(&(vml->threadhash),test_destuctor);
+       IS(destruct_counter,2);
+
+       vmlog_hashtable_init(&(vml->threadhash),5);
+       for (i=0; i<10; ++i) {
+               tlog = vmlog_get_thread_log(vml,(void*)(1000+i));
+               NOTNULL(tlog);
+               tlogs[i] = tlog;
+       }
+       for (i=0; i<10; ++i) {
+               tlog = vmlog_get_thread_log(vml,(void*)(1000+i));
+               IS(tlog,tlogs[i]);
+       }
+       destruct_counter = 0;
+       vmlog_hashtable_free(&(vml->threadhash),test_destuctor);
+       IS(destruct_counter,10);
+
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
+
diff --git a/contrib/vmlog/vmlog.c b/contrib/vmlog/vmlog.c
new file mode 100644 (file)
index 0000000..8cfa0bc
--- /dev/null
@@ -0,0 +1,1894 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "vmlog.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+#include <jni.h>
+
+/*** default macros **************************************************/
+
+#ifndef VMLOG_LOCK
+#define VMLOG_LOCK(vml)
+#define VMLOG_UNLOCK(vml)
+#endif
+
+/* #define VMLOG_ENDIAN_CONVERT_WRITE */
+/* #define VMLOG_HOST_LITTLE_ENDIAN */
+
+#include "config.h"
+
+#if defined(WORDS_BIGENDIAN)
+#      define VMLOG_ENDIAN_CONVERT_WRITE
+#      undef VMLOG_HOST_LITTLE_ENDIAN
+#else
+#      undef VMLOG_ENDIAN_CONVERT_WRITE
+#      define VMLOG_HOST_LITTLE_ENDIAN
+#endif
+
+
+/*** constants *******************************************************/
+
+/* currently vmlog does no rehashing, so these should be quite big */
+#define VMLOG_INITIAL_STRING_HASH_SIZE       50000 /* XXX debug */
+#define VMLOG_INITIAL_THREAD_HASH_SIZE       8 /* XXX debug */
+
+/* initial size of the frame buffer - this is doubled each time    */
+/* the frame buffer has to grow                                    */
+#define VMLOG_INITIAL_FRAMES_CAPACITY        1 /* XXX debug */
+
+/*** types ***********************************************************/
+
+/* we declare this here because defining _LARGEFILE64_SOURCE works */
+/* only if we are the first ones to include the headers, which may */
+/* not be the case if vmlog.c is used as an include file.          */
+
+#ifndef _LARGEFILE64_SOURCE
+typedef long long off64_t;
+off64_t lseek64(int fd, off64_t offset, int whence);
+#endif
+
+/*** tag definitions *************************************************/
+
+/* CAUTION: these must are indexed by the VMLOG_TAG_... constants! */
+vmlog_tag_definition vmlog_tag_definitions[] = {
+       { "enter", "enter", +1 },
+       { "leave", "leave", -1 },
+       { "throw", "throw",  0 },
+       { "catch", "catch",  0 },
+       { "unwnd", "unwnd", -1 },
+       { "signl", "signl",  0 },
+       { "unrol", "unrol", -1 },
+       { "rerol", "rerol", +1 },
+       { NULL   , NULL   ,  0 }
+};
+
+/*** global variables ************************************************/
+
+static char *vmlog_progname = "vmlog";
+
+/*** prototypes ******************************************************/
+
+static void *vmlog_memdup(const void *m,int len);
+
+/*** error reporting *************************************************/
+
+void vmlog_set_progname(const char *progname)
+{
+       if (!progname) {
+               progname = "vmlog (progname == NULL)";
+       }
+
+       vmlog_progname = vmlog_memdup(progname,strlen(progname)+1);
+}
+
+void vmlog_die(const char *fmt,...)
+{
+       va_list ap;
+
+       fputs(vmlog_progname,stderr);
+       fputs(": error: ",stderr);
+       va_start(ap,fmt);
+       vfprintf(stderr,fmt,ap);
+       va_end(ap);
+       fputc('\n',stderr);
+       exit(1);
+}
+
+void vmlog_warn(const char *fmt,...)
+{
+       va_list ap;
+
+       fputs(vmlog_progname,stderr);
+       fputs(": warning: ",stderr);
+       va_start(ap,fmt);
+       vfprintf(stderr,fmt,ap);
+       va_end(ap);
+       fputc('\n',stderr);
+}
+
+void vmlog_die_usage(const char *usage,int error)
+{
+       assert(usage);
+       
+       fputs(usage,(error) ? stderr : stdout);
+       exit((error) ? 1 : 0);
+}
+
+/*** utility functions ***********************************************/
+
+static void *vmlog_memdup(const void *data,int len)
+{
+       char *p;
+
+       p = VMLOG_NEW_ARRAY(char,len);
+       assert(p);
+       memcpy(p,data,len);
+
+       return p;
+}
+
+static void *vmlog_strdup(const void *data,int len)
+{
+       char *p;
+
+       p = VMLOG_NEW_ARRAY(char,len+1);
+       assert(p);
+       memcpy(p,data,len);
+       p[len] = 0;
+
+       return p;
+}
+
+char *vmlog_concat4len(const char *a,int alen,const char *b,int blen,
+                      const char *c,int clen,const char *d,int dlen,
+                      int *plen)
+{
+       int len;
+       char *p;
+       char *pp;
+
+       assert(a);
+       assert(b);
+       assert(c);
+       assert(d);
+
+       len = alen + blen + clen + dlen;
+       if (plen)
+               *plen = len;
+
+       p = VMLOG_NEW_ARRAY(char,len+1);
+       pp = p;
+       memcpy(pp,a,alen); pp += alen;
+       memcpy(pp,b,blen); pp += blen;
+       memcpy(pp,c,clen); pp += clen;
+       memcpy(pp,d,dlen); pp += dlen;
+       *pp = 0;
+
+       return p;
+}
+
+char *vmlog_concat3(const char *a,const char *b,const char *c,int *plen)
+{
+       int len,lena,lenb,lenc;
+       char *p;
+       char *pp;
+
+       assert(a);
+       assert(b);
+       assert(c);
+
+       lena = strlen(a);
+       lenb = strlen(b);
+       lenc = strlen(c);
+
+       len = lena + lenb + lenc;
+       if (plen)
+               *plen = len;
+
+       p = VMLOG_NEW_ARRAY(char,len+1);
+       pp = p;
+       memcpy(pp,a,lena); pp += lena;
+       memcpy(pp,b,lenb); pp += lenb;
+       memcpy(pp,c,lenc); pp += lenc;
+       *pp = 0;
+
+       return p;
+}
+
+/*** file ops ********************************************************/
+
+void vmlog_file_open(vmlog_file *file,const char *fname,vmlog_fmode fmode)
+{
+       int r;
+       struct stat st;
+       int flags = 0;
+       
+       assert(file);
+
+       switch (fmode) {
+               case vmlogRead:
+                       flags = O_RDONLY;
+                       break;
+
+               case vmlogAppend:
+                       flags = O_WRONLY | O_APPEND | O_CREAT;
+                       break;
+
+               case vmlogTruncateAppend:
+                       flags = O_WRONLY | O_APPEND | O_CREAT | O_TRUNC;
+                       break;
+
+               default:
+                       vmlog_die("unknown fmode for opening file: %s: %d",
+                               fname,fmode);
+       }
+
+       r = open(fname,flags,0644);
+       if (r == -1) {
+               vmlog_die("could not open file: %s: %s",fname,strerror(errno));
+       }
+       file->fd = r;
+       file->fnamelen = strlen(fname);
+       file->fname = vmlog_memdup(fname,file->fnamelen+1);
+
+       r = fstat(file->fd,&st);
+       if (r == -1) {
+               vmlog_die("could not stat file: %s: %s",fname,strerror(errno));
+       }
+       file->ofs = (fmode == vmlogRead) ? 0 : st.st_size;
+}
+
+void vmlog_file_close(vmlog_file *file)
+{
+       assert(file);
+
+       if (file->fd == -1)
+               return;
+
+       close(file->fd);
+       file->fd = -1;
+       VMLOG_FREE_ARRAY(char,file->fnamelen+1,file->fname);
+       file->fname = NULL;
+       file->fnamelen = 0;
+}
+
+void vmlog_file_append(vmlog_file *file,const void *data,int len)
+{
+       int r;
+
+       assert(len >= 0);
+       if (!len)
+               return;
+       assert(data);
+       
+       do {
+               r = write(file->fd,data,len);
+       } while (r == -1 && errno == EINTR);
+
+       if (r == -1) {
+               vmlog_die("could not write to file: %s: %s",file->fname,strerror(errno));
+       }
+
+       if (r != len) {
+               vmlog_die("could not write all data to file: %s",file->fname);
+       }
+
+       file->ofs += len;
+}
+
+void vmlog_file_stat(vmlog_file *file)
+{
+       int r;
+       struct stat st;
+       
+       r = fstat(file->fd,&st);
+       if (r == -1)
+               vmlog_die("could not stat file: %s: %s",file->fname,strerror(errno));
+
+       file->size = st.st_size;
+}
+
+void * vmlog_file_mmap(const char *fname,int *plen)
+{
+       int fd;
+       int r;
+       struct stat st;
+       void *m;
+
+       fd = open(fname,O_RDONLY);
+       if (fd == -1)
+               vmlog_die("could not open file: %s: %s",fname,strerror(errno));
+       
+       r = fstat(fd,&st);
+       if (r == -1)
+               vmlog_die("could not stat file: %s: %s",fname,strerror(errno));
+
+       if (plen)
+               *plen = st.st_size;
+       
+       if (st.st_size) {
+               m = mmap(NULL,st.st_size,PROT_READ,MAP_PRIVATE,fd,0);
+               if (m == MAP_FAILED) {
+                       vmlog_die("could not mmap file: %s: %s",fname,strerror(errno));
+               }
+       }
+       else {
+               /* fake a pointer */
+               m = VMLOG_NEW(char);
+       }
+
+       close(fd);
+
+       return m;
+}
+
+void vmlog_file_munmap(void *m,int len)
+{
+       int r;
+       
+       if (len) {
+               r = munmap(m,len);
+               if (r != 0)
+                       vmlog_warn("could not munmap file: %s",strerror(errno));
+       }
+       else {
+               VMLOG_FREE(char,m);
+       }
+}
+
+void vmlog_file_seek(vmlog_file *file,vmlog_fofs_t ofs)
+{
+       off64_t r;
+
+       r = lseek64(file->fd,ofs,SEEK_SET);
+       if (r == (off64_t)-1)
+               vmlog_die("could not seek position in file: %s: %s",
+                       file->fname,strerror(errno));
+       file->ofs = ofs;
+}
+
+/*** string storage **************************************************/
+
+static void vmlog_add_string(vmlog_log *vml,const char *data,int len)
+{
+       vmlog_string_entry strent;
+#if defined(VMLOG_ENDIAN_CONVERT_WRITE)
+       vmlog_fofs_t tmp;
+#endif
+       
+       assert(vml);
+
+       if (vml->strfile.fd == -1)
+               return;
+       if (vml->idxfile.fd == -1)
+               return;
+
+       strent.ofs = vml->strfile.ofs;
+       strent.len = len;
+
+#if defined(VMLOG_ENDIAN_CONVERT_WRITE)
+#if defined(VMLOG_HOST_LITTLE_ENDIAN)
+       tmp = ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[0]) << 56)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[1]) << 48)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[2]) << 40)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[3]) << 32)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[4]) << 24)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[5]) << 16)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[6]) <<  8)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[7]) <<  0);
+       strent.ofs = tmp;
+       tmp = ((vmlog_fofs_t)(((unsigned char*)&strent.len)[0]) << 24)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.len)[1]) << 16)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.len)[2]) <<  8)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.len)[3]) <<  0);
+       strent.len = tmp;
+#else
+       tmp = ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[7]) << 56)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[6]) << 48)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[5]) << 40)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[4]) << 32)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[3]) << 24)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[2]) << 16)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[1]) <<  8)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.ofs)[0]) <<  0);
+       strent.ofs = tmp;
+       tmp = ((vmlog_fofs_t)(((unsigned char*)&strent.len)[3]) << 24)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.len)[2]) << 16)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.len)[1]) <<  8)
+           | ((vmlog_fofs_t)(((unsigned char*)&strent.len)[0]) <<  0);
+       strent.len = tmp;
+#endif
+#endif /* defined(VMLOG_ENDIAN_CONVERT_WRITE) */
+       
+       vmlog_file_append(&(vml->strfile),data,len);
+       vmlog_file_append(&(vml->idxfile),&strent,sizeof(vmlog_string_entry));
+}
+
+/*** index functions *************************************************/
+
+static int vmlog_is_ignored(vmlog_log *vml,int index)
+{
+       return (index < vml->ignorelistlen);
+}
+
+/*** thread log functions ********************************************/
+
+static void vmlog_thread_log_alloc_logbuf(vmlog_thread_log *tlog,int cap)
+{
+       assert(tlog);
+       assert(cap >= 0);
+
+       if (cap) {
+               VMLOG_XZNEW_ARRAY(tlog->logbuf,vmlog_log_entry,cap);
+       }
+       else {
+               tlog->logbuf = NULL;
+       }
+       tlog->logbufptr = tlog->logbuf;
+       tlog->logbufend = tlog->logbuf + cap;
+       tlog->logbufcap = cap;
+}
+
+static void vmlog_thread_log_flush(vmlog_thread_log *tlog)
+{
+       assert(tlog);
+       assert(tlog->logbuf);
+
+       vmlog_file_append(&(tlog->logfile),tlog->logbuf,
+                       (tlog->logbufptr - tlog->logbuf) * sizeof(vmlog_log_entry));
+
+       tlog->logbufptr = tlog->logbuf;
+}
+
+static void vmlog_thread_log_realloc_frames(vmlog_thread_log *tlog,int cap)
+{
+       vmlog_frame *oldframes;
+
+       assert(tlog);
+       assert(cap >= tlog->depth);
+
+       oldframes = tlog->frames;
+
+       if (cap) {
+               VMLOG_XZNEW_ARRAY(tlog->frames,vmlog_frame,cap);
+       }
+       else {
+               tlog->frames = NULL;
+       }
+       
+       if (oldframes) {
+               if (tlog->frames) {
+                       memcpy(tlog->frames,oldframes,sizeof(vmlog_frame) * tlog->depth);
+               }
+               VMLOG_FREE_ARRAY(vmlog_frame,tlog->framescap,oldframes);
+       }
+       tlog->framescap = cap;
+}
+
+void vmlog_thread_log_append(vmlog_thread_log *tlog,vmlog_log_entry *logent)
+{
+#if defined(VMLOG_ENDIAN_CONVERT_WRITE)
+       unsigned int tmp;
+
+#if defined(VMLOG_HOST_LITTLE_ENDIAN)
+       tmp = ((unsigned int)(((unsigned char*)logent)[3]) <<  0)
+           | ((unsigned int)(((unsigned char*)logent)[2]) <<  8)
+           | ((unsigned int)(((unsigned char*)logent)[1]) << 16);
+#else
+       tmp = ((unsigned int)(((unsigned char*)logent)[1]) <<  0)
+           | ((unsigned int)(((unsigned char*)logent)[2]) <<  8)
+           | ((unsigned int)(((unsigned char*)logent)[3]) << 16);
+#endif
+       logent->index = tmp;
+#endif /* defined(VMLOG_ENDIAN_CONVERT_WRITE) */
+       if (tlog->logbufptr) {
+               if (tlog->logbufptr == tlog->logbufend) {
+                       vmlog_thread_log_flush(tlog);
+               }
+               *tlog->logbufptr++ = *logent;
+       }
+       else {
+               vmlog_file_append(&(tlog->logfile),logent,sizeof(vmlog_log_entry));
+       }
+}
+
+#define VMLOG_INT2STR_BUFFER 20
+
+vmlog_thread_log *vmlog_thread_log_new(vmlog_log *vml,void *threadid,int index)
+{
+       vmlog_thread_log *tlog;
+       char buf[VMLOG_INT2STR_BUFFER];
+       int r;
+       char *name;
+       int namelen;
+
+       VMLOG_XZNEW(tlog,vmlog_thread_log);
+
+       tlog->threadid = threadid;
+       tlog->threadidx = index;
+       tlog->logfile.fd = -1;
+
+       vmlog_thread_log_realloc_frames(tlog,VMLOG_INITIAL_FRAMES_CAPACITY);
+
+       if (vml && vml->prefix) {
+               r = snprintf(buf,VMLOG_INT2STR_BUFFER,"%d",index);
+               assert(r < VMLOG_INT2STR_BUFFER);
+               buf[VMLOG_INT2STR_BUFFER-1] = 0;
+               name = vmlog_concat4len(vml->prefix,vml->prefixlen,
+                                       ".",1,
+                                       buf,strlen(buf),
+                                       ".log",4,
+                                       &namelen);
+               vmlog_file_open(&(tlog->logfile),name,vmlogTruncateAppend);
+               VMLOG_FREE_ARRAY(char,namelen+1,name);
+       }
+
+       return tlog;
+}
+
+void vmlog_thread_log_free(vmlog_thread_log *tlog)
+{
+       if (!tlog)
+               return;
+
+       if (tlog->logbuf)
+               vmlog_thread_log_flush(tlog);
+       
+       vmlog_file_close(&(tlog->logfile));
+       
+       if (tlog->frames) {
+               VMLOG_FREE_ARRAY(vmlog_frame,tlog->framescap,tlog->frames);
+       }
+       VMLOG_FREE(vmlog_thread_log,tlog);
+}
+
+vmlog_frame * vmlog_thread_log_enter(vmlog_thread_log *tlog,int index,vmlog_seq_t seq)
+{
+       vmlog_frame *frame;
+
+       if (tlog->depth < 0) {
+               vmlog_warn("negative call frame depth %d at seq " VMLOG_SEQ_FMT,
+                               tlog->depth,seq);
+               return NULL;
+       }
+       
+       if (tlog->depth >= tlog->framescap)
+               vmlog_thread_log_realloc_frames(tlog,tlog->framescap * 2);
+
+       frame = tlog->frames + tlog->depth;
+
+       frame->index = index;
+       frame->seq = seq;
+
+       tlog->depth++;
+
+       return frame;
+}
+
+vmlog_frame * vmlog_thread_log_leave(vmlog_thread_log *tlog,int index,vmlog_seq_t seq)
+{
+       vmlog_frame *frame;
+
+       if (--tlog->depth < 0) {
+               vmlog_warn("negative call frame depth %d at seq " VMLOG_SEQ_FMT,
+                               tlog->depth,seq);
+               return NULL;
+       }
+       
+       frame = tlog->frames + tlog->depth;
+
+       if (index != frame->index)
+               vmlog_warn("mismatched leave at seq " VMLOG_SEQ_FMT 
+                               ": entered index %d, left index %d",
+                       seq,frame->index,index);
+
+       return frame;
+}
+
+/*** tag definitions *************************************************/
+
+/* RETURNS                                                           */
+/*     the tag number, or -1 if the tag name is invalid              */
+
+int vmlog_tag_from_name(const char *name,int namelen)
+{
+       vmlog_tag_definition *td;
+       int i;
+       
+       if (!name || namelen < 1)
+               return -1;
+
+       td = vmlog_tag_definitions;
+       i = 0;
+       while (td->name) {
+               if (namelen == strlen(td->name)
+                   && strncmp(td->name,name,namelen) == 0) 
+               {
+                       return i;
+               }
+               td++;
+               i++;
+       }
+
+       return -1;
+}
+
+/*** hash functions **************************************************/
+
+static unsigned int vmlog_thread_hash(void *threadid) 
+{
+       /* XXX use a better hash function? */
+       return (unsigned int)(ptrint)threadid;
+}
+
+static unsigned int vmlog_string_hash(const char *data,int len) 
+{
+       register const unsigned char *p = (const unsigned char *) data;
+       register unsigned int hash;
+       register int i;
+
+       /* The algorithm is the "One-at-a-time" algorithm as published    */
+       /* by Bob Jenkins on http://burtleburtle.net/bob/hash/doobs.html. */
+
+       hash = 0;
+       for (i=len; i--;)
+       {
+           hash += *p++;
+           hash += (hash << 10);
+           hash ^= (hash >> 6);
+       }
+       hash += (hash << 3);
+       hash ^= (hash >> 11);
+       hash += (hash << 15);
+
+       return hash;
+}
+
+/*** hash tables *****************************************************/
+
+static vmlog_thread_log *vmlog_get_thread_log(vmlog_log *vml,void *threadid)
+{
+       unsigned int h;
+       vmlog_hash_entry *preventry = NULL;
+       vmlog_hash_entry *entry;
+       vmlog_thread_log *tlog;
+       
+       assert(vml);
+
+       h = vmlog_thread_hash(threadid);
+       entry = vml->threadhash.table + (h % vml->threadhash.size);
+       do {
+               tlog = (vmlog_thread_log *)entry->data;
+               if (tlog && tlog->threadid == threadid)
+                       return tlog;
+               preventry = entry;
+               entry = entry->hashlink;
+       } while (entry);
+
+       /* this is a new threadid */
+       tlog = vmlog_thread_log_new(vml,threadid,vml->threadhash.nentries++);
+       
+       assert(preventry);
+       if (preventry->data) {
+               VMLOG_XZNEW(entry,vmlog_hash_entry);
+
+               preventry->hashlink = entry;
+       }
+       else {
+               entry = preventry;
+       }
+
+       entry->data = tlog;
+
+       /* XXX maybe rehash */
+
+       return tlog;
+}
+
+int vmlog_get_string_index(vmlog_log *vml,const char *data,int len)
+{
+       unsigned int hash;
+       vmlog_hash_entry *entry;
+       vmlog_hash_entry *preventry = NULL;
+       
+       assert(vml);
+       assert(data);
+       assert(len >= 0);
+
+       hash = vmlog_string_hash(data,len);
+       entry = vml->stringhash.table + (hash % vml->stringhash.size);
+       do {
+               if (entry->len == len && entry->data && memcmp(data,entry->data,len) == 0)
+                       return entry->index;
+               preventry = entry;
+               entry = entry->hashlink;
+       } while (entry);
+
+       /* this is a new string */
+       assert(preventry);
+       if (preventry->data) {
+               VMLOG_XZNEW(entry,vmlog_hash_entry);
+
+               preventry->hashlink = entry;
+       }
+       else {
+               entry = preventry;
+       }
+
+       entry->data = vmlog_memdup(data,len);
+       entry->len = len;
+       entry->index = vml->stringhash.nentries++;
+       vmlog_add_string(vml,data,len);
+
+       return entry->index;
+}
+
+static void vmlog_hashtable_init(vmlog_hash_table *ht,int size)
+{
+       assert(ht);
+       assert(size > 0);
+       
+       ht->size = size;
+       VMLOG_XZNEW_ARRAY(ht->table,vmlog_hash_entry,size);
+       ht->nentries = 0;
+}
+
+static void vmlog_hashtable_free(vmlog_hash_table *ht,vmlog_hash_entry_destructor destr)
+{
+       int i;
+       vmlog_hash_entry *entry,*next;
+       
+       assert(ht);
+
+       for (i=0; i<ht->size; ++i) {
+               entry = ht->table + i;
+               if (destr)
+                       destr(entry);
+
+               next = entry->hashlink;
+               while (next) {
+                       entry = next;
+                       if (destr)
+                               destr(entry);
+                       next = entry->hashlink;
+                       VMLOG_FREE(vmlog_hash_entry,entry);
+               }
+       }
+
+       VMLOG_FREE_ARRAY(vmlog_hash_entry,ht->size,ht->table);
+       memset(ht,0,sizeof(vmlog_hash_table));
+}
+
+static void vmlog_thread_log_destructor(vmlog_hash_entry *entry)
+{
+       vmlog_thread_log *tlog;
+       
+       assert(entry);
+
+       tlog = (vmlog_thread_log *)entry->data;
+       vmlog_thread_log_free(tlog);
+}
+
+static void vmlog_string_destructor(vmlog_hash_entry *entry)
+{
+       char *str;
+
+       assert(entry);
+
+       str = (char *)entry->data;
+       if (str) {
+               VMLOG_FREE_ARRAY(char,entry->len,str);
+       }
+}
+
+static void vmlog_open_string_files(vmlog_log *vml,int truncate)
+{
+       char *name;
+       int namelen;
+       int fmode;
+
+       if (!vml->prefix)
+               return;
+
+       fmode = (truncate) ? vmlogTruncateAppend : vmlogAppend;
+
+       name = vmlog_concat3(vml->prefix,"",".idx",&namelen);
+       vmlog_file_open(&(vml->idxfile),name,fmode);
+       VMLOG_FREE_ARRAY(char,namelen+1,name);
+
+       name = vmlog_concat3(vml->prefix,"",".str",&namelen);
+       vmlog_file_open(&(vml->strfile),name,fmode);
+       VMLOG_FREE_ARRAY(char,namelen+1,name);
+}
+
+void vmlog_load_stringhash(vmlog_log *vml,const char *prefix)
+{
+       int n;
+       vmlog_string_entry *idxmap;
+       vmlog_string_entry *strent;
+       char *strmap;
+       int idxlen;
+       int strlen;
+       char *idxfname;
+       char *strfname;
+       int idxnamelen;
+       int strnamelen;
+       
+       assert(vml);
+       assert(prefix);
+
+       idxfname = vmlog_concat3(prefix,".","idx",&idxnamelen);
+       strfname = vmlog_concat3(prefix,".","str",&strnamelen);
+       
+       vmlog_hashtable_free(&(vml->stringhash),vmlog_string_destructor);
+       vmlog_hashtable_init(&(vml->stringhash),VMLOG_INITIAL_STRING_HASH_SIZE);
+
+       vmlog_file_close(&(vml->idxfile));
+       vmlog_file_close(&(vml->strfile));
+       vmlog_open_string_files(vml,1);
+
+       idxmap = vmlog_file_mmap(idxfname,&idxlen);
+       strmap = vmlog_file_mmap(strfname,&strlen);
+
+       n = idxlen / sizeof(vmlog_string_entry);
+       strent = idxmap;
+       while (n--) {
+               vmlog_get_string_index(vml,strmap + strent->ofs,strent->len);
+               strent++;
+       }
+
+       vmlog_file_munmap(idxmap,idxlen);
+       vmlog_file_munmap(strmap,strlen);
+       
+       VMLOG_FREE_ARRAY(char,idxnamelen+1,idxfname);
+       VMLOG_FREE_ARRAY(char,strnamelen+1,strfname);
+}
+
+/*** public functions ************************************************/
+
+vmlog_log * vmlog_log_new(const char *prefix,int truncate)
+{
+       vmlog_log *vml;
+
+       VMLOG_XZNEW(vml,vmlog_log);
+
+       vml->idxfile.fd = -1;
+       vml->strfile.fd = -1;
+       vmlog_hashtable_init(&(vml->stringhash),VMLOG_INITIAL_STRING_HASH_SIZE);
+       vmlog_hashtable_init(&(vml->threadhash),VMLOG_INITIAL_THREAD_HASH_SIZE);
+       
+       if (prefix) {
+               vml->prefixlen = strlen(prefix);
+               vml->prefix = vmlog_memdup(prefix,vml->prefixlen+1);
+
+               vmlog_open_string_files(vml,truncate);
+       }
+
+       return vml;
+}
+
+void vmlog_log_free(vmlog_log *vml)
+{
+       if (!vml)
+               return;
+
+       VMLOG_FREE_ARRAY(char,vml->prefixlen+1,vml->prefix);
+       vml->prefix = NULL;
+       vml->prefixlen = 0;     
+
+       vmlog_hashtable_free(&(vml->threadhash),vmlog_thread_log_destructor);
+       vmlog_hashtable_free(&(vml->stringhash),vmlog_string_destructor);
+
+       vmlog_file_close(&(vml->idxfile));
+       vmlog_file_close(&(vml->strfile));
+
+       VMLOG_FREE(vmlog_log,vml);
+}
+
+static void vmlog_log_enter_tag(vmlog_log *vml,void *threadid,int tag,const char *name,int namelen)
+{
+       vmlog_thread_log *tlog;
+       int index;
+       vmlog_log_entry logent;
+       
+       assert(vml);
+       assert(name);
+       assert(namelen >= 0);
+
+       VMLOG_LOCK();
+       tlog = vmlog_get_thread_log(vml,threadid);
+       index = vmlog_get_string_index(vml,name,namelen);
+       VMLOG_UNLOCK();
+
+       if (tlog->ignoredepth) {
+               tlog->ignoredepth++;
+               return;
+       }
+
+       if (vmlog_is_ignored(vml,index)) {
+               tlog->ignoredepth++;
+               return;
+       }
+       
+       logent.tag = tag;
+       logent.index = index;
+       vmlog_thread_log_append(tlog,&logent);
+
+       tlog->seq++;
+}
+
+static void vmlog_log_leave_tag(vmlog_log *vml,void *threadid,int tag,const char *name,int namelen)
+{
+       vmlog_thread_log *tlog;
+       int index;
+       vmlog_log_entry logent;
+       
+       assert(vml);
+       assert(name);
+       assert(namelen >= 0);
+       
+       VMLOG_LOCK();
+       tlog = vmlog_get_thread_log(vml,threadid);
+       index = vmlog_get_string_index(vml,name,namelen);
+       VMLOG_UNLOCK();
+
+       if (tlog->ignoredepth) {
+               tlog->ignoredepth--;
+               return;
+       }
+       
+       logent.tag = tag;
+       logent.index = index;
+       vmlog_thread_log_append(tlog,&logent);
+
+       tlog->seq++;
+}
+
+void vmlog_log_enter(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_log_enter_tag(vml,threadid,VMLOG_TAG_ENTER,name,namelen);
+}
+
+void vmlog_log_rerol(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_log_enter_tag(vml,threadid,VMLOG_TAG_REROL,name,namelen);
+}
+
+void vmlog_log_leave(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_log_leave_tag(vml,threadid,VMLOG_TAG_LEAVE,name,namelen);
+}
+
+void vmlog_log_unrol(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_log_leave_tag(vml,threadid,VMLOG_TAG_UNROL,name,namelen);
+}
+
+void vmlog_log_throw(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_thread_log *tlog;
+       int index;
+       vmlog_log_entry logent;
+       
+       assert(vml);
+       assert(name);
+       assert(namelen >= 0);
+       
+       VMLOG_LOCK();
+       tlog = vmlog_get_thread_log(vml,threadid);
+       index = vmlog_get_string_index(vml,name,namelen);
+       VMLOG_UNLOCK();
+
+       if (tlog->ignoredepth)
+               return;
+       
+       logent.tag = VMLOG_TAG_THROW;
+       logent.index = index;
+       vmlog_thread_log_append(tlog,&logent);
+
+       tlog->seq++;
+}
+
+void vmlog_log_catch(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_thread_log *tlog;
+       int index;
+       vmlog_log_entry logent;
+       
+       assert(vml);
+       assert(name);
+       assert(namelen >= 0);
+       
+       VMLOG_LOCK();
+       tlog = vmlog_get_thread_log(vml,threadid);
+       index = vmlog_get_string_index(vml,name,namelen);
+       VMLOG_UNLOCK();
+
+       if (tlog->ignoredepth)
+               return;
+       
+       logent.tag = VMLOG_TAG_CATCH;
+       logent.index = index;
+       vmlog_thread_log_append(tlog,&logent);
+
+       tlog->seq++;
+}
+
+void vmlog_log_unwnd(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_thread_log *tlog;
+       int index;
+       vmlog_log_entry logent;
+       
+       assert(vml);
+       assert(name);
+       assert(namelen >= 0);
+       
+       VMLOG_LOCK();
+       tlog = vmlog_get_thread_log(vml,threadid);
+       index = vmlog_get_string_index(vml,name,namelen);
+       VMLOG_UNLOCK();
+
+       if (tlog->ignoredepth) {
+               tlog->ignoredepth--;
+               return;
+       }
+       
+       logent.tag = VMLOG_TAG_UNWND;
+       logent.index = index;
+       vmlog_thread_log_append(tlog,&logent);
+
+       tlog->seq++;
+}
+
+void vmlog_log_signl(vmlog_log *vml,void *threadid,const char *name,int namelen)
+{
+       vmlog_thread_log *tlog;
+       int index;
+       vmlog_log_entry logent;
+       
+       assert(vml);
+       assert(name);
+       assert(namelen >= 0);
+       
+       VMLOG_LOCK();
+       tlog = vmlog_get_thread_log(vml,threadid);
+       index = vmlog_get_string_index(vml,name,namelen);
+       VMLOG_UNLOCK();
+
+       logent.tag = VMLOG_TAG_SIGNL;
+       logent.index = index;
+       vmlog_thread_log_append(tlog,&logent);
+
+       tlog->seq++;
+}
+
+void vmlog_log_load_ignorelist(vmlog_log *vml,const char *prefix)
+{
+       assert(vml);
+       assert(prefix);
+
+       vmlog_load_stringhash(vml,prefix);
+       vml->ignorelistlen = vml->stringhash.nentries;
+}
+
+/*** ring buffer functions *******************************************/
+
+static void vmlog_ringbuf_visualize(vmlog_ringbuf *ring)
+{
+       int i;
+
+       fprintf(stdout,"vmlog_ringbuf %p: bufsize=%d availbefore=%d availafter=%d\n",
+                       (void*)ring,ring->bufsize,
+                       ring->debug_availbefore,ring->debug_availafter);
+
+       for (i=0; i<=ring->bufsize; ++i) {
+               if (i == ring->bufsize) {
+                       fprintf(stdout,"%3d: xxxxxxxxxxxxx",i);
+               }
+               else {
+                       fprintf(stdout,"%3d: %2d %10d",i,ring->buf[i].tag,ring->buf[i].index);
+               }
+               if (ring->start - ring->buf == i) fputs(" start",stdout);
+               if (ring->cur   - ring->buf == i) fputs(" cur",stdout);
+               if (ring->end   - ring->buf == i) fputs(" end",stdout);
+               if (ring->cur   - ring->buf == i) fprintf(stdout," (" VMLOG_SEQ_FMT ")",ring->seq);
+               fputc('\n',stdout);
+       }       
+}
+
+static void vmlog_ringbuf_check_invariants(vmlog_ringbuf *ring)
+{
+       /* vmlog_ringbuf_visualize(ring); */
+       
+       assert(ring);
+
+       assert(ring->bufsize > 0);
+       assert(ring->bufend == ring->buf + ring->bufsize);
+
+       assert(ring->start >= ring->buf && ring->start < ring->bufend);
+       assert((ring->end > ring->buf && ring->end <= ring->bufend)
+                       ||
+              (ring->end == ring->start));
+
+       assert(ring->debug_availbefore >= 0);
+       assert(ring->debug_availafter >= 0);
+       assert(ring->debug_availbefore + ring->debug_availafter <= ring->bufsize);
+
+       /* ring->cur can point to any present  */
+       /* element (#) or be equal to ring->end*/
+
+       if (ring->end >= ring->start) {
+               /* case A: ring->end >= ring->start    */
+               /*                                     */
+               /* -------#############-----------     */
+               /* ^      ^            ^          ^    */
+               /* buf    start        end     bufend  */
+
+               assert(ring->cur >= ring->start && ring->cur <= ring->end);
+
+               assert(ring->cur - ring->start == ring->debug_availbefore);
+               assert(ring->end - ring->cur   == ring->debug_availafter);
+       }
+       else {
+               /* case B: ring->end < ring->start     */
+               /*                                     */
+               /* #######------------############     */
+               /* ^      ^           ^           ^    */
+               /* buf    end        start     bufend  */
+
+               assert((ring->cur >= ring->start && ring->cur < ring->bufend)
+                               ||
+                      (ring->cur >= ring->buf && ring->cur <= ring->end));
+
+               if (ring->cur >= ring->start) {
+                       assert(ring->cur - ring->start == ring->debug_availbefore);
+                       assert((ring->bufend - ring->cur) + (ring->end - ring->buf) 
+                                       == ring->debug_availafter);
+               }
+               else {
+                       assert((ring->bufend - ring->start) + (ring->cur - ring->buf) 
+                                       == ring->debug_availbefore);
+                       assert(ring->end - ring->cur == ring->debug_availafter);
+               }
+       }
+}
+
+vmlog_ringbuf * vmlog_ringbuf_new(const char *fname,int bufsize)
+{
+       vmlog_ringbuf *ring;
+
+       assert(bufsize > 0);
+
+       VMLOG_XZNEW(ring,vmlog_ringbuf);
+       VMLOG_XZNEW_ARRAY(ring->buf,vmlog_log_entry,bufsize);
+
+       ring->bufsize = bufsize;
+       ring->bufend = ring->buf + bufsize;
+       ring->start = ring->buf;
+       ring->end = ring->buf;
+       ring->cur = ring->buf;
+
+       vmlog_file_open(&(ring->file),fname,vmlogRead);
+       vmlog_file_stat(&(ring->file));
+
+       vmlog_ringbuf_check_invariants(ring);
+
+       return ring;
+}
+
+void vmlog_ringbuf_free(vmlog_ringbuf *ring)
+{
+       if (!ring)
+               return;
+
+       vmlog_ringbuf_check_invariants(ring);
+
+       vmlog_file_close(&(ring->file));
+
+       VMLOG_FREE_ARRAY(vmlog_log_entry,ring->bufsize,ring->buf);
+       VMLOG_FREE(vmlog_ringbuf,ring);
+}
+
+static int vmlog_ringbuf_read(vmlog_ringbuf *ring,vmlog_log_entry *buf,
+               vmlog_seq_t seq,int n)
+{
+       int r;
+       vmlog_fofs_t ofs;
+
+       ofs = seq * sizeof(vmlog_log_entry);
+       if (ofs != ring->file.ofs)
+               vmlog_file_seek(&(ring->file),ofs);
+
+       do {
+               /* fprintf(stdout,"vmlog_ringbuf_read(%p,%d,%d)\n",
+                               (void*)ring,buf-ring->buf,n); */
+               
+               r = read(ring->file.fd,buf,n * sizeof(vmlog_log_entry));
+       } while (r == -1 && errno == EINTR);
+
+       if (r == -1)
+               vmlog_die("reading from file: %s: %s",ring->file.fname,strerror(errno));
+
+       ring->file.ofs += r;
+
+       if (r % sizeof(vmlog_log_entry) != 0) {
+               /* XXX */
+               vmlog_warn("partial log entry read from file: %s",ring->file.fname);
+       }
+
+       return r / sizeof(vmlog_log_entry);
+}
+
+static int vmlog_ringbuf_fill_forward(vmlog_ringbuf *ring,vmlog_log_entry *fillstart,
+                                     vmlog_log_entry *fillend,vmlog_seq_t seq,int len)
+{
+       int space;
+       int n;
+       int read;
+       vmlog_log_entry *oldend;
+
+#if 0
+       fprintf(stdout,"vmlog_ringbuf_fill_forward(%p,%d,%d," VMLOG_SEQ_FMT ",%d)\n",
+                       (void*)ring,fillstart-ring->buf,fillend-ring->buf,seq,len);
+#endif
+
+       vmlog_ringbuf_check_invariants(ring);
+
+       space = fillend - fillstart;
+       n = (len <= space) ? len : space;
+
+       if (n <= 0)
+               return 0;
+
+       read = vmlog_ringbuf_read(ring,fillstart,seq,n);
+       if (!read)
+               return 0;
+
+       oldend = ring->end;
+       ring->end = fillstart + read;
+       ring->debug_availafter += read;
+
+       if (ring->cur == ring->bufend)
+               ring->cur = ring->buf;
+
+       if (ring->start >= fillstart && ring->start != oldend) {
+               /* check if old entries have been overwritten */
+               if (ring->start <= ring->end) {
+                       ring->debug_availbefore -=
+                               ring->end - ring->start + 1;
+                       ring->start = ring->end + 1;
+                       if (ring->start >= ring->bufend) {
+                               ring->start = ring->buf;
+                               ring->debug_availbefore = ring->cur - ring->start;
+                       }
+               }
+       }
+
+       vmlog_ringbuf_check_invariants(ring);
+
+       return read;
+}
+       
+static int vmlog_ringbuf_fill_backward(vmlog_ringbuf *ring,vmlog_log_entry *fillstart,
+                                      vmlog_log_entry *fillend,vmlog_seq_t seq,int len)
+{
+       int space;
+       int n;
+       int read;
+       vmlog_log_entry *oldstart;
+       vmlog_log_entry *oldend;
+
+#if 0
+       fprintf(stdout,"vmlog_ringbuf_fill_backward(%p,%d,%d," VMLOG_SEQ_FMT ",%d)\n",
+                       (void*)ring,fillstart-ring->buf,fillend-ring->buf,seq,len);
+#endif
+
+       vmlog_ringbuf_check_invariants(ring);
+
+       space = fillend - fillstart;
+       n = (len <= space) ? len : space;
+
+       if (n <= 0)
+               return 0;
+
+       seq += space - n;
+       fillstart += space - n;
+
+       read = vmlog_ringbuf_read(ring,fillstart,seq,n);
+       if (read != n)
+               vmlog_die("could not read backward in file: %s: %s",
+                       ring->file.fname,strerror(errno));
+
+       oldstart = ring->start;
+       ring->start = fillstart;
+       ring->debug_availbefore += read;
+
+       oldend = ring->end;
+       if (ring->end <= fillend && ring->end != oldstart) {
+               /* check if old entries have been overwritten */
+               if (ring->start <= ring->end) {
+                       ring->debug_availafter -=
+                               ring->end - ring->start + 1;
+                       ring->end = ring->start - 1;
+
+                       if (ring->end <= ring->buf) {
+                               ring->end = ring->bufend;
+                               if (ring->cur == ring->buf && ring->end == ring->bufend)
+                                       ring->cur = ring->bufend;
+                               ring->debug_availafter = ring->end - ring->cur;
+                       }
+               }
+       }
+
+       if (ring->end == ring->buf) {
+               assert(oldstart == oldend);
+               ring->end = ring->bufend;
+       }
+
+       if (ring->cur == ring->buf && ring->end == ring->bufend)
+               ring->cur = ring->bufend;
+
+       vmlog_ringbuf_check_invariants(ring);
+
+       return read;
+}
+       
+int vmlog_ringbuf_fill(vmlog_ringbuf *ring,int len)
+{
+       int count;
+       int read;
+       vmlog_log_entry *fillend;
+       vmlog_seq_t seq;
+       
+       assert(ring);
+
+       if (!len)
+               return 0 /*XXX*/;
+
+       count = 0;
+
+       vmlog_ringbuf_check_invariants(ring);
+       
+       if (len > 0) {
+               if (ring->end >= ring->cur) {
+                       /* case A'1: ring->end >= ring->start  */
+                       /*                                     */
+                       /*                     vvvvvvvvvvv     */
+                       /* ------OOOOO#########-----------     */
+                       /* ^     ^    ^        ^          ^    */
+                       /* buf  start cur      end     bufend  */
+
+                       /* case B'1: ring->end < ring->start   */
+                       /*                                     */
+                       /*                     vvvvvvvvvvv     */
+                       /* OOOOOOOOOOO#########----OOOOOOO     */
+                       /* ^          ^        ^   ^      ^    */
+                       /* buf        cur      end st. bufend  */
+
+                       /* fill space at end of buf */
+                       seq = ring->seq + (ring->end - ring->cur);
+                       read = vmlog_ringbuf_fill_forward(ring,ring->end,ring->bufend,
+                                       seq,len);
+                       count += read;
+                       len -= read;
+
+                       if (ring->end != ring->bufend)
+                               goto no_more_entries;
+
+                       /* case A'1: ring->end >= ring->start  */
+                       /*                                     */
+                       /* vvvvvvvvvv                          */
+                       /* ------OOOOO####################     */
+                       /* ^     ^    ^                   ^    */
+                       /* buf  start cur         end==bufend  */
+
+                       /* case B'1: ring->end < ring->start   */
+                       /*                                     */
+                       /* vvvvvvvvvv                          */
+                       /* OOOOOOOOOOO####################     */
+                       /* ^          ^                   ^    */
+                       /* buf==start cur         end==bufend  */
+
+                       /* fill space at beg of buf */
+                       seq = ring->seq + (ring->end - ring->cur);
+                       fillend = (ring->cur == ring->bufend) ? ring->bufend : (ring->cur - 1);
+                       read = vmlog_ringbuf_fill_forward(ring,ring->buf,fillend,
+                                       seq,len);
+                       count += read;
+                       len -= read;
+               }
+               else {
+                       /* ring->end < ring->cur */
+
+                       /* no case A'2 */
+                       assert(ring->end < ring->start);
+
+                       /* case B'2: ring->end < ring->start   */
+                       /*                                     */
+                       /*      vvvvvvvvvvv                    */
+                       /* #####------OOOOOO##############     */
+                       /* ^    ^     ^     ^             ^    */
+                       /* buf  end   start cur        bufend  */
+
+                       /* fill space in middle of buf */
+                       seq = ring->seq + (ring->bufend - ring->cur) + (ring->end - ring->buf);
+                       read = vmlog_ringbuf_fill_forward(ring,ring->end,ring->cur - 1,
+                                       seq,len);
+                       count += read;
+                       len -= read;
+               }
+       }
+       else {
+               len = -len;
+
+               if (len > ring->seq)
+                       len = ring->seq;
+
+               if (ring->start <= ring->cur) {
+                       /* case A'1: ring->end >= ring->start  */
+                       /*                                     */
+                       /* vvvvvv                              */
+                       /* ------#####OOOOOOOOO-----------     */
+                       /* ^     ^    ^        ^          ^    */
+                       /* buf  start cur      end     bufend  */
+
+                       /* case B'2: ring->end < ring->start   */
+                       /*                                     */
+                       /* vvvvvvvvvvv                         */
+                       /* OOOOO------######OOOOOOOOOOOOOO     */
+                       /* ^    ^     ^     ^             ^    */
+                       /* buf  end   start cur        bufend  */
+
+                       /* fill space at beg of buf */
+                       seq = ring->seq - (ring->cur - ring->buf);
+                       read = vmlog_ringbuf_fill_backward(ring,ring->buf,ring->start,
+                                       seq,len);
+                       count += read;
+                       len -= read;
+
+                       if (ring->start != ring->buf)
+                               goto no_more_entries;
+
+                       /* case A'1: ring->end >= ring->start  */
+                       /*                                     */
+                       /*             vvvvvvvvvvvvvvvvvvv     */
+                       /* ###########OOOOOOOOO-----------     */
+                       /* ^          ^        ^          ^    */
+                       /* buf=start  cur      end     bufend  */
+
+                       /* case B'2: ring->end < ring->start   */
+                       /*                                     */
+                       /*                   vvvvvvvvvvvvv     */
+                       /* #################OOOOOOOOOOOOOO     */
+                       /* ^                ^             ^    */
+                       /* buf=start        cur    end=bufend  */
+
+                       /* fill space at end of buf */
+                       seq -= (ring->bufend - ring->cur - 1);
+                       read = vmlog_ringbuf_fill_backward(ring,ring->cur+1,ring->bufend,
+                                       seq,len);
+                       count += read;
+                       len -= read;
+               }
+               else {
+                       /* ring->start > ring->cur */
+
+                       /* case B'1: ring->end < ring->start   */
+                       /*                                     */
+                       /*             vvvvvvvvvvvv            */
+                       /* ###########OOOOOOOOO----#######     */
+                       /* ^          ^        ^   ^      ^    */
+                       /* buf        cur      end st. bufend  */
+
+                       /* no case A'2 */
+                       assert(ring->end < ring->start);
+
+                       /* fill space in middle of buf */
+                       seq = ring->seq - (ring->cur - ring->buf) - (ring->bufend - ring->cur - 1);
+                       read = vmlog_ringbuf_fill_backward(ring,ring->cur + 1,ring->start,
+                                       seq,len);
+                       count += read;
+                       len -= read;
+               }
+       }
+
+no_more_entries:
+       vmlog_ringbuf_check_invariants(ring);
+       
+       return count;
+}
+
+static void vmlog_ringbuf_reset(vmlog_ringbuf *ring)
+{
+       ring->start = ring->buf;
+       ring->cur = ring->buf;
+       ring->end = ring->buf;
+
+       ring->debug_availbefore = 0;
+       ring->debug_availafter = 0;
+
+       vmlog_ringbuf_check_invariants(ring);
+}
+
+static int vmlog_ringbuf_advance(vmlog_ringbuf *ring,int diff)
+{
+       int space;
+       
+       if (diff > 0) {
+               if (ring->end >= ring->start) {
+                       /* case A */
+advance_cur_to_end:
+                       space = ring->end - ring->cur;
+
+                       if (space <= 0)
+                               return 0;
+
+                       if (space < diff)
+                               diff = space;
+
+simple_advance:
+                       ring->cur += diff;
+                       ring->seq += diff;
+                       ring->debug_availbefore += diff;
+                       ring->debug_availafter -= diff;
+                       return diff;
+               }
+               else {
+                       /* case B */
+                       if (ring->end >= ring->cur)
+                               goto advance_cur_to_end;
+
+                       space = ring->bufend - ring->cur;
+                       if (space > diff)
+                               goto simple_advance;
+
+                       ring->cur = ring->buf - space;
+                       goto advance_cur_to_end;
+               }
+       }
+       else if (diff < 0) {
+               if (ring->end >= ring->start) {
+                       /* case A */
+advance_cur_to_start:
+                       space = ring->cur - ring->start;
+
+                       if (space <= 0)
+                               return 0;
+
+                       if (-space > diff)
+                               diff = -space;
+                       goto simple_advance;
+               }
+               else {
+                       /* case B */
+                       if (ring->cur >= ring->start)
+                               goto advance_cur_to_start;
+
+                       space = ring->cur - ring->buf;
+                       if (space >= -diff)
+                               goto simple_advance;
+
+                       ring->cur = ring->bufend + space;
+                       goto advance_cur_to_start;
+               }
+       }
+       else {
+               return 0;
+       }
+}
+
+void vmlog_ringbuf_seek(vmlog_ringbuf *ring,vmlog_seq_t seq)
+{
+       vmlog_seq_t diff;
+       
+       vmlog_ringbuf_check_invariants(ring);
+
+       diff = seq - ring->seq;
+       if (abs(diff) < ring->bufsize)
+               diff -= vmlog_ringbuf_advance(ring,(int)diff);
+
+       if (!diff)
+               return;
+
+       vmlog_ringbuf_reset(ring);
+       vmlog_file_seek(&(ring->file),seq * sizeof(vmlog_log_entry));
+       ring->seq = seq;
+
+       vmlog_ringbuf_check_invariants(ring);
+}
+
+vmlog_log_entry * vmlog_ringbuf_next(vmlog_ringbuf *ring,int prefetch)
+{
+       vmlog_ringbuf_check_invariants(ring);
+
+       while (1) {
+               if (ring->end >= ring->start) {
+                       /* case A */
+                       if (ring->cur < ring->end) {
+                               ring->debug_availafter--;
+                               ring->debug_availbefore++;
+                               ring->seq++;
+                               return ring->cur++;
+                       }
+               }
+               else {
+                       /* case B */
+                       if (ring->end >= ring->cur) {
+                               if (ring->cur < ring->end) {
+                                       ring->debug_availafter--;
+                                       ring->debug_availbefore++;
+                                       ring->seq++;
+                                       return ring->cur++;
+                               }
+                       }
+                       else {
+                               if (ring->cur < ring->bufend) {
+                                       vmlog_log_entry *r;
+
+                                       r = ring->cur;
+                                       ring->seq++;
+                                       if (++ring->cur == ring->bufend)
+                                               ring->cur = ring->buf;
+                                       ring->debug_availafter--;
+                                       ring->debug_availbefore++;
+                                       return r;
+                               }
+                       }
+               }       
+
+               if (!vmlog_ringbuf_fill(ring,prefetch))
+                       return NULL;
+       }
+
+       assert(0); /* NOT REACHED */
+       return NULL;
+}
+
+vmlog_log_entry * vmlog_ringbuf_prev(vmlog_ringbuf *ring,int prefetch)
+{
+       vmlog_ringbuf_check_invariants(ring);
+
+       while (1) {
+               if (ring->end >= ring->start) {
+                       /* case A */
+                       if (ring->cur > ring->start) {
+                               ring->debug_availafter++;
+                               ring->debug_availbefore--;
+                               ring->seq--;
+                               return --ring->cur;
+                       }
+               }
+               else {
+                       /* case B */
+                       if (ring->cur >= ring->start) {
+                               if (ring->cur > ring->start) {
+                                       ring->debug_availafter++;
+                                       ring->debug_availbefore--;
+                                       ring->seq--;
+                                       return --ring->cur;
+                               }
+                       }
+                       else {
+                               if (--ring->cur < ring->buf)
+                                       ring->cur = ring->bufend - 1;
+                               ring->seq--;
+                               ring->debug_availafter++;
+                               ring->debug_availbefore--;
+                               return ring->cur;
+                       }
+               }       
+
+               if (!vmlog_ringbuf_fill(ring,-prefetch))
+                       return NULL;
+       }
+
+       assert(0); /* NOT REACHED */
+       return NULL;
+}
+
+/*** option parsing **************************************************/
+
+int vmlog_opt_parse_seq(const char *arg,int len,vmlog_seq_t *seq)
+{
+       char *buf;
+       char *endptr;
+       int r;
+       
+       assert(arg);
+
+       if (len < 1)
+               return 0;
+
+       buf = vmlog_strdup(arg,len);
+       *seq = strtoll(buf,&endptr,10);
+
+       r = (endptr[0] == 0);
+
+       VMLOG_FREE_ARRAY(char,len+1,buf);
+       return r;
+}
+
+int vmlog_opt_parse_range(const char *arg,vmlog_seq_t *start,vmlog_seq_t *end)
+{
+       const char *sep;
+       int len;
+
+       sep = strchr(arg,':');
+       if (!sep) {
+               len = strlen(arg);
+               if (!vmlog_opt_parse_seq(arg,len,start))
+                       return 0;
+               *end = *start;
+               return 1;
+       }
+
+       len = sep - arg;
+       if (!len) {
+               *start = 0;
+       }
+       else {
+               if (!vmlog_opt_parse_seq(arg,len,start))
+                       return 0;
+       }
+
+       len = strlen(arg) - len - 1;
+       if (!len) {
+               *end = VMLOG_SEQ_MAX;
+       }
+       else {
+               if (!vmlog_opt_parse_seq(sep+1,len,end))
+                       return 0;
+       }
+       return 1;
+}
+
+static int vmlog_opt_parse_one_option(vmlog_options *opts, const char *arg, const char *nextarg)
+{
+       int eat;
+
+       if (strncmp(arg,"-vmlog:",7) != 0) {
+               return 0;
+       }
+
+       /* a vmlog option */
+
+       eat = 1;
+       if (strcmp(arg,"-vmlog:prefix") == 0) {
+               if (!nextarg)
+                       vmlog_die("expected a prefix after -vmlog:prefix");
+               opts->prefix = vmlog_strdup(nextarg,strlen(nextarg));
+               eat++;
+       }
+       else if (strcmp(arg,"-vmlog:strings") == 0) {
+               if (!nextarg)
+                       vmlog_die("expected a prefix after -vmlog:strings");
+               opts->stringprefix = vmlog_strdup(nextarg,strlen(nextarg));
+               eat++;
+       }
+       else if (strcmp(arg,"-vmlog:ignore") == 0) {
+               if (!nextarg)
+                       vmlog_die("expected a prefix after -vmlog:ignore");
+               opts->ignoreprefix = vmlog_strdup(nextarg,strlen(nextarg));
+               eat++;
+       }
+       else {
+               vmlog_die("unknown -vmlog:... option: %s",arg);
+       }
+
+       return eat;
+}
+
+vmlog_options *vmlog_opt_parse_cmd_line(int *pargc,char **argv)
+{
+       int i;
+       const char *arg;
+       vmlog_options *opts;
+       int eat;
+       int left;
+
+       assert(pargc);
+
+       VMLOG_XZNEW(opts,vmlog_options);
+
+       if (*pargc && argv[0])
+               opts->progname = vmlog_strdup(argv[0],strlen(argv[0]));
+
+       i = 1;
+       while (i < *pargc) {
+               arg = argv[i];
+               
+               left = *pargc - i - 1;
+
+               eat = vmlog_opt_parse_one_option(opts,arg,
+                               (left) ? argv[i+1] : NULL);
+
+               if (eat == 0) {
+                       i++;
+                       continue;
+               }
+
+               /* remove the option from the command line */
+               
+               memmove(argv + i,argv + i + eat,sizeof(char*) * (*pargc - (i+eat)));
+               *pargc -= eat;
+       }
+
+       return opts;
+}
+
+vmlog_options *vmlog_opt_parse_vmargs(JavaVMInitArgs *vmargs)
+{
+       int i;
+       const char *arg;
+       vmlog_options *opts;
+       int eat;
+
+       assert(vmargs);
+
+       VMLOG_XZNEW(opts,vmlog_options);
+
+       i = 0;
+       while (i < vmargs->nOptions) {
+               arg = vmargs->options[i].optionString;
+
+               eat = vmlog_opt_parse_one_option(opts,arg,
+                               (i+1 < vmargs->nOptions) ? vmargs->options[i+1].optionString : NULL);
+
+               if (eat == 0) {
+                       i++;
+                       continue;
+               }
+               
+               /* remove the option from the command line */
+               
+               memmove(vmargs->options + i,vmargs->options + i + eat,
+                               sizeof(JavaVMOption) * (vmargs->nOptions - (i+eat)));
+               vmargs->nOptions -= eat;
+       }
+
+       return opts;
+}
+
+void vmlog_opt_free(vmlog_options *opts)
+{
+       if (!opts)
+               return;
+
+       if (opts->prefix)
+               VMLOG_FREE_ARRAY(char,strlen(opts->prefix)+1,opts->prefix);
+       if (opts->stringprefix)
+               VMLOG_FREE_ARRAY(char,strlen(opts->stringprefix)+1,opts->stringprefix);
+       if (opts->ignoreprefix)
+               VMLOG_FREE_ARRAY(char,strlen(opts->ignoreprefix)+1,opts->ignoreprefix);
+
+       VMLOG_FREE(vmlog_options,opts);
+}
+
+/* vim: noet ts=8 sw=8
+ */
diff --git a/contrib/vmlog/vmlog.h b/contrib/vmlog/vmlog.h
new file mode 100644 (file)
index 0000000..478717e
--- /dev/null
@@ -0,0 +1,284 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _VMLOG_H_
+#define _VMLOG_H_
+
+#define VMLOG_PAD_TO_8
+
+#include <limits.h>
+
+/*** constants *******************************************************/
+
+/* CAUTION: these are indices into the vmlog_tag_definitions table! */
+#define VMLOG_TAG_ENTER  0
+#define VMLOG_TAG_LEAVE  1
+#define VMLOG_TAG_THROW  2
+#define VMLOG_TAG_CATCH  3
+#define VMLOG_TAG_UNWND  4
+#define VMLOG_TAG_SIGNL  5
+#define VMLOG_TAG_UNROL  6
+#define VMLOG_TAG_REROL  7
+
+/*** memory management macros ****************************************/
+
+#ifndef VMLOG_NEW
+#define VMLOG_NEW(type)                (type*)malloc(sizeof(type))
+#endif
+
+#ifndef VMLOG_FREE
+#define VMLOG_FREE(type,ptr)           free(ptr)
+#endif
+
+#ifndef VMLOG_NEW_ARRAY
+#define VMLOG_NEW_ARRAY(type,n)        (type*)malloc(sizeof(type)*(n))
+#endif
+
+#ifndef VMLOG_FREE_ARRAY
+#define VMLOG_FREE_ARRAY(type,n,ptr)   free(ptr)
+#endif
+
+/*** struct typedefs *************************************************/
+
+typedef struct vmlog_tag_definition vmlog_tag_definition;
+typedef struct vmlog_hash_entry vmlog_hash_entry;
+typedef struct vmlog_hash_table vmlog_hash_table;
+typedef struct vmlog_string_entry vmlog_string_entry;
+typedef struct vmlog_log_entry vmlog_log_entry;
+typedef struct vmlog_thread_log vmlog_thread_log;
+typedef struct vmlog_file vmlog_file;
+typedef struct vmlog_frame vmlog_frame;
+typedef struct vmlog_ringbuf vmlog_ringbuf;
+typedef struct vmlog_log vmlog_log;
+typedef struct vmlog_options vmlog_options;
+
+/*** integer types ***************************************************/
+
+typedef long long vmlog_fofs_t;
+typedef long long vmlog_seq_t;
+#define VMLOG_SEQ_FMT   "%lld"
+#define VMLOG_SEQ_FMT_W "%10lld"
+#ifdef LLONG_MAX
+#define VMLOG_SEQ_MAX LLONG_MAX
+#else
+#define VMLOG_SEQ_MAX 9223372036854775807LL
+#endif
+
+#ifndef VMLOG_HAVE_PTRINT
+typedef int ptrint; /* XXX */
+#endif
+
+/*** enums ***********************************************************/
+
+typedef enum {
+       vmlogRead,
+       vmlogAppend,
+       vmlogTruncateAppend
+} vmlog_fmode;
+
+/*** function types **************************************************/
+
+typedef void (*vmlog_hash_entry_destructor)(vmlog_hash_entry *entry);
+typedef void (*vmlog_log_function)(vmlog_log *vml,void *threadid,
+                                  const char *name,int namelen);
+
+/*** structs *********************************************************/
+
+struct vmlog_tag_definition {
+       char             *name;
+       char             *fixname;
+       int               depth;
+};
+
+struct vmlog_hash_entry {
+       unsigned int      hash;
+       int               len;
+       int               index;
+       void             *data;
+       vmlog_hash_entry *hashlink;
+};
+
+struct vmlog_hash_table {
+       int               size;
+       int               nentries;
+       vmlog_hash_entry *table;
+};
+
+struct vmlog_string_entry {
+       vmlog_fofs_t ofs;
+       int          len;
+#if defined(VMLOG_PAD_TO_8)
+       int          dummy;
+#endif
+};
+
+struct vmlog_log_entry {
+       int          tag:8;
+       int          index:24;
+};
+
+struct vmlog_file {
+       int          fd;
+       char        *fname;
+       int          fnamelen;
+       vmlog_fofs_t ofs;
+       vmlog_fofs_t size;
+};
+
+struct vmlog_frame {
+       int                index;
+       vmlog_seq_t        seq;
+};
+
+struct vmlog_thread_log {
+       void              *threadid;
+       int                threadidx;
+       int                depth;
+       int                ignoredepth;
+       vmlog_file         logfile;
+       vmlog_log_entry   *logbuf;
+       vmlog_log_entry   *logbufend;
+       vmlog_log_entry   *logbufptr;
+       int                logbufcap;
+       vmlog_frame       *frames;
+       int                framescap;
+       vmlog_seq_t        seq;
+};
+
+struct vmlog_log {
+       vmlog_hash_table   threadhash;
+       vmlog_hash_table   stringhash;
+       vmlog_file         idxfile;
+       vmlog_file         strfile;
+       char              *prefix;
+       int                prefixlen;
+       int                ignorelistlen;
+};
+
+struct vmlog_ringbuf {
+       vmlog_file         file;
+       vmlog_log_entry   *buf;
+       vmlog_log_entry   *bufend;
+       vmlog_log_entry   *start;
+       vmlog_log_entry   *end;
+       vmlog_log_entry   *cur;
+       int                bufsize;
+       vmlog_seq_t        seq;
+
+       int                debug_availbefore;
+       int                debug_availafter;
+};
+
+struct vmlog_options {
+       char              *progname;
+       char              *prefix;
+       char              *stringprefix;
+       char              *ignoreprefix;
+};
+
+/*** variables *******************************************************/
+
+extern vmlog_tag_definition vmlog_tag_definitions[];
+
+/*** public functions ************************************************/
+
+/* constructor / destructor */
+vmlog_log * vmlog_log_new(const char *prefix,int truncate);
+void vmlog_log_free(vmlog_log *vml);
+
+/* configuration */
+void vmlog_log_load_ignorelist(vmlog_log *vml,const char *prefix);
+
+/* logging */
+void vmlog_log_enter(vmlog_log *vml,void *threadid,const char *name,int namelen);
+void vmlog_log_leave(vmlog_log *vml,void *threadid,const char *name,int namelen);
+void vmlog_log_throw(vmlog_log *vml,void *threadid,const char *name,int namelen);
+void vmlog_log_catch(vmlog_log *vml,void *threadid,const char *name,int namelen);
+void vmlog_log_unwnd(vmlog_log *vml,void *threadid,const char *name,int namelen);
+void vmlog_log_signl(vmlog_log *vml,void *threadid,const char *name,int namelen);
+void vmlog_log_unrol(vmlog_log *vml,void *threadid,const char *name,int namelen);
+void vmlog_log_rerol(vmlog_log *vml,void *threadid,const char *name,int namelen);
+
+/* tag definitions */
+int vmlog_tag_from_name(const char *name,int namelen);
+
+/* thread logging */
+vmlog_thread_log *vmlog_thread_log_new(vmlog_log *vml,void *threadid,int index);
+void vmlog_thread_log_free(vmlog_thread_log *tlog);
+vmlog_frame * vmlog_thread_log_enter(vmlog_thread_log *tlog,int index,vmlog_seq_t seq);
+vmlog_frame * vmlog_thread_log_leave(vmlog_thread_log *tlog,int index,vmlog_seq_t seq);
+void vmlog_thread_log_append(vmlog_thread_log *tlog,vmlog_log_entry *logent);
+
+/* string/index handling */
+int vmlog_get_string_index(vmlog_log *vml,const char *data,int len);
+void vmlog_load_stringhash(vmlog_log *vml,const char *prefix);
+
+/* string helpers */
+char *vmlog_concat3(const char *a,const char *b,const char *c,int *plen);
+char *vmlog_concat4len(const char *a,int alen,const char *b,int blen,
+                      const char *c,int clen,const char *d,int dlen,int *plen);
+
+/* error reporting */
+void vmlog_set_progname(const char *progname);
+void vmlog_die(const char *fmt,...);
+void vmlog_warn(const char *fmt,...);
+void vmlog_die_usage(const char *usage,int error);
+
+/* file handling */
+void vmlog_file_open(vmlog_file *file,const char *fname,vmlog_fmode fmode);
+void vmlog_file_close(vmlog_file *file);
+void vmlog_file_append(vmlog_file *file,const void *data,int len);
+void * vmlog_file_mmap(const char *fname,int *plen);
+void vmlog_file_munmap(void *m,int len);
+void vmlog_file_stat(vmlog_file *file);
+void vmlog_file_seek(vmlog_file *file,vmlog_fofs_t ofs);
+
+/* log entry ring buffer */
+vmlog_ringbuf * vmlog_ringbuf_new(const char *fname,int bufsize);
+void vmlog_ringbuf_free(vmlog_ringbuf *ring);
+void vmlog_ringbuf_seek(vmlog_ringbuf *ring,vmlog_seq_t seq);
+int vmlog_ringbuf_fill(vmlog_ringbuf *ring,int len);
+vmlog_log_entry * vmlog_ringbuf_next(vmlog_ringbuf *ring,int prefetch);
+vmlog_log_entry * vmlog_ringbuf_prev(vmlog_ringbuf *ring,int prefetch);
+
+/* option parsing */
+int vmlog_opt_parse_seq(const char *arg,int len,vmlog_seq_t *seq);
+int vmlog_opt_parse_range(const char *arg,vmlog_seq_t *start,vmlog_seq_t *end);
+vmlog_options *vmlog_opt_parse_cmd_line(int *pargc,char **argv);
+void vmlog_opt_free(vmlog_options *opts);
+
+/*** memory allocation helpers ***************************************/
+
+/* allocate, check, and zero memory */
+#define VMLOG_XZNEW(var,type) \
+       do { var = VMLOG_NEW(type); \
+            if (!(var)) vmlog_die("out of memory"); \
+            memset((var),0,sizeof(type)); \
+       } while (0)
+
+/* allocate, check, and zero memory for array */
+#define VMLOG_XZNEW_ARRAY(var,type,n) \
+       do { var = VMLOG_NEW_ARRAY(type,n); \
+            if (!(var)) vmlog_die("out of memory"); \
+            memset((var),0,(n)*sizeof(type)); \
+       } while (0)
+
+#endif
+
+/* vim: noet ts=8 sw=8
+ */
diff --git a/contrib/vmlog/vmlog_cacao.c b/contrib/vmlog/vmlog_cacao.c
new file mode 100644 (file)
index 0000000..04b9e8f
--- /dev/null
@@ -0,0 +1,167 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+/* vmlog_cacao.c - code to be #included in cacao */
+
+#include <vmlog_cacao.h>
+#define VMLOG_HAVE_PTRINT
+#include <vmlog.h>
+#include <assert.h>
+
+/*** global variables ************************************************/
+
+static vmlog_log *vmlog_global_log = NULL;
+static java_objectheader vmlog_global_lock;
+
+/*** locking *********************************************************/
+
+#define VMLOG_LOCK(vml)    lock_monitor_enter(&vmlog_global_lock)
+#define VMLOG_UNLOCK(vml)  lock_monitor_exit(&vmlog_global_lock)
+
+/*** include the vmlog code ******************************************/
+
+#include <vmlog.c>
+
+/*** internal functions **********************************************/
+
+void vmlog_cacao_init(JavaVMInitArgs *vmargs)
+{
+       vmlog_options *opts;
+
+       opts = vmlog_opt_parse_vmargs(vmargs);
+       
+       if (!opts->prefix)
+               return;
+
+       vmlog_global_log = vmlog_log_new(opts->prefix,1);
+
+       if (opts->ignoreprefix) {
+               vmlog_log_load_ignorelist(vmlog_global_log,
+                               opts->ignoreprefix);
+       }
+
+       if (opts->stringprefix) {
+               vmlog_load_stringhash(vmlog_global_log,
+                               opts->stringprefix);
+       }
+
+       vmlog_opt_free(opts);
+}
+
+void vmlog_cacao_init_lock(void)
+{
+       lock_init_object_lock(&vmlog_global_lock);
+}
+
+static void vmlog_cacao_do_log(vmlog_log_function fun,
+                              methodinfo *m)
+{
+       char *name;
+       int namelen;
+
+       assert(m);
+
+       if (!vmlog_global_log)
+               return;
+
+       name = vmlog_concat4len(m->class->name->text,m->class->name->blength,
+                               ".",1,
+                               m->name->text,m->name->blength,
+                               m->descriptor->text,m->descriptor->blength,
+                               &namelen);
+
+       fun(vmlog_global_log,(void*) THREADOBJECT,name,namelen);
+
+       VMLOG_FREE_ARRAY(char,namelen+1,name);
+}
+
+/*** functions callable from cacao ***********************************/
+
+void vmlog_cacao_enter_method(methodinfo *m)
+{
+       vmlog_cacao_do_log(vmlog_log_enter,m);
+}
+
+void vmlog_cacao_leave_method(methodinfo *m)
+{
+       vmlog_cacao_do_log(vmlog_log_leave,m);
+}
+
+void vmlog_cacao_unrol_method(methodinfo *m)
+{
+       vmlog_cacao_do_log(vmlog_log_unrol,m);
+}
+
+void vmlog_cacao_rerol_method(methodinfo *m)
+{
+       vmlog_cacao_do_log(vmlog_log_rerol,m);
+}
+
+void vmlog_cacao_unwnd_method(methodinfo *m)
+{
+       vmlog_cacao_do_log(vmlog_log_unwnd,m);
+}
+
+void vmlog_cacao_throw(java_objectheader *xptr)
+{
+       classinfo *c;
+       
+       if (!vmlog_global_log)
+               return;
+
+       if (xptr) {
+               c = xptr->vftbl->class;
+               vmlog_log_throw(vmlog_global_log,(void*) THREADOBJECT,
+                               c->name->text,c->name->blength);
+       }
+       else {
+               vmlog_log_throw(vmlog_global_log,(void*) THREADOBJECT,
+                               "unknown Throwable",strlen("unknown Throwable"));
+       }
+}
+
+void vmlog_cacao_catch(java_objectheader *xptr)
+{
+       classinfo *c;
+       
+       if (!vmlog_global_log)
+               return;
+
+       if (xptr) {
+               c = xptr->vftbl->class;
+               vmlog_log_catch(vmlog_global_log,(void*) THREADOBJECT,
+                               c->name->text,c->name->blength);
+       }
+       else {
+               vmlog_log_catch(vmlog_global_log,(void*) THREADOBJECT,
+                               "unknown Throwable",strlen("unknown Throwable"));
+       }
+}
+
+void vmlog_cacao_signl(const char *name)
+{
+       if (!vmlog_global_log)
+               return;
+
+       vmlog_log_signl(vmlog_global_log,(void*) THREADOBJECT,
+                       name, strlen(name));
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/vmlog_cacao.h b/contrib/vmlog/vmlog_cacao.h
new file mode 100644 (file)
index 0000000..c67cca8
--- /dev/null
@@ -0,0 +1,42 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _VMLOG_CACAO_H_
+#define _VMLOG_CACAO_H_
+
+#include <threads/native/threads.h>
+
+void vmlog_cacao_init(JavaVMInitArgs *vmargs);
+
+void vmlog_cacao_init_lock(void);
+
+void vmlog_cacao_enter_method(methodinfo *m);
+void vmlog_cacao_leave_method(methodinfo *m);
+void vmlog_cacao_unwnd_method(methodinfo *m);
+void vmlog_cacao_unrol_method(methodinfo *m);
+void vmlog_cacao_rerol_method(methodinfo *m);
+
+void vmlog_cacao_throw(java_objectheader *xptr);
+void vmlog_cacao_catch(java_objectheader *xptr);
+void vmlog_cacao_signl(const char *name);
+
+#endif
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/vmlog_jamvm.c b/contrib/vmlog/vmlog_jamvm.c
new file mode 100644 (file)
index 0000000..9226888
--- /dev/null
@@ -0,0 +1,140 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+/* vmlog_jamvm.c - code to be #included in jamvm */
+
+#include <vmlog_jamvm.h>
+#include <vmlog.h>
+#include <assert.h>
+
+/*** global variables ************************************************/
+
+static vmlog_log *vmlog_global_log = NULL;
+static VMLock vmlog_global_lock;
+
+/*** locking *********************************************************/
+
+#define VMLOG_LOCK(vml)    lockVMLock(vmlog_global_lock,threadSelf())
+#define VMLOG_UNLOCK(vml)  unlockVMLock(vmlog_global_lock,threadSelf())
+
+/*** include the vmlog code ******************************************/
+
+#include "vmlog.c"
+
+/*** internal functions **********************************************/
+
+void vmlog_jamvm_init(int *pargc,char **argv)
+{
+       vmlog_options *opts;
+
+       opts = vmlog_opt_parse_cmd_line(pargc,argv);
+       
+       if (!opts->prefix)
+               return;
+
+       vmlog_global_log = vmlog_log_new(opts->prefix,1);
+
+       if (opts->ignoreprefix) {
+               vmlog_log_load_ignorelist(vmlog_global_log,
+                               opts->ignoreprefix);
+       }
+
+       if (opts->stringprefix) {
+               vmlog_load_stringhash(vmlog_global_log,
+                               opts->stringprefix);
+       }
+
+       vmlog_opt_free(opts);
+}
+
+static void vmlog_jamvm_do_log(vmlog_log_function fun,
+                              Object *thread,MethodBlock *mb)
+{
+       char *name;
+       int namelen;
+       ClassBlock *cb;
+       
+       assert(mb);
+
+       if (!vmlog_global_log)
+               return;
+
+       cb = CLASS_CB(mb->class);
+               
+       name = vmlog_concat4len(
+               cb->name,strlen(cb->name),
+               ".",1,
+               mb->name,strlen(mb->name),
+               mb->type,strlen(mb->type),
+               &namelen);
+
+       fun(vmlog_global_log,thread,name,namelen);
+
+       VMLOG_FREE_ARRAY(char,namelen+1,name);
+}
+
+/*** functions callable from jamvm ***********************************/
+
+void vmlog_jamvm_enter_method(Object *thread,MethodBlock *mb)
+{
+       vmlog_jamvm_do_log(vmlog_log_enter,thread,mb);
+}
+
+void vmlog_jamvm_leave_method(Object *thread,MethodBlock *mb)
+{
+       vmlog_jamvm_do_log(vmlog_log_leave,thread,mb);
+}
+
+void vmlog_jamvm_unwnd_method(Object *thread,MethodBlock *mb)
+{
+       vmlog_jamvm_do_log(vmlog_log_unwnd,thread,mb);
+}
+
+void vmlog_jamvm_throw(Object *thread,Object *exp)
+{
+       ClassBlock *cb;
+       
+       assert(exp);
+
+       if (!vmlog_global_log)
+               return;
+
+       cb = CLASS_CB(exp->class);
+       assert(cb);
+
+       vmlog_log_throw(vmlog_global_log,thread,cb->name,strlen(cb->name));
+}
+
+void vmlog_jamvm_catch(Object *thread,Object *exp)
+{
+       ClassBlock *cb;
+       
+       assert(exp);
+
+       if (!vmlog_global_log)
+               return;
+
+       cb = CLASS_CB(exp->class);
+       assert(cb);
+
+       vmlog_log_catch(vmlog_global_log,thread,cb->name,strlen(cb->name));
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/vmlog_jamvm.h b/contrib/vmlog/vmlog_jamvm.h
new file mode 100644 (file)
index 0000000..976f28f
--- /dev/null
@@ -0,0 +1,35 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _VMLOG_JAMVM_H_
+#define _VMLOG_JAMVM_H_
+
+void vmlog_jamvm_init(int *pargc,char **argv);
+
+void vmlog_jamvm_enter_method(Object *thread,MethodBlock *mb);
+void vmlog_jamvm_leave_method(Object *thread,MethodBlock *mb);
+void vmlog_jamvm_unwnd_method(Object *thread,MethodBlock *mb);
+
+void vmlog_jamvm_throw(Object *thread,Object *exp);
+void vmlog_jamvm_catch(Object *thread,Object *exp);
+
+#endif
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/vmlog_jamvm.patch b/contrib/vmlog/vmlog_jamvm.patch
new file mode 100644 (file)
index 0000000..25c1ba9
--- /dev/null
@@ -0,0 +1,133 @@
+diff -u -r jamvm-1.4.2/src/excep.c vmlog-jamvm-1.4.2/src/excep.c
+--- jamvm-1.4.2/src/excep.c    2005-12-31 08:12:55.000000000 +0100
++++ vmlog-jamvm-1.4.2/src/excep.c      2006-03-12 00:42:34.000000000 +0100
+@@ -23,6 +23,8 @@
+ #include "jam.h"
+ #include "lock.h"
++#include <vmlog_jamvm.h>
++
+ extern char VM_initing;
+ static Class *ste_class, *ste_array_class, *throw_class, *vmthrow_class;
+@@ -83,6 +85,7 @@
+                 }
+                 getExecEnv()->exception = exp;
++              vmlog_jamvm_throw(getExecEnv()->thread,exp);
+             }
+         }
+     }
+@@ -90,11 +93,15 @@
+ void setException(Object *exp) {
+     getExecEnv()->exception = exp;
++    vmlog_jamvm_throw(getExecEnv()->thread,exp);
+ }
+ void clearException() {
+     ExecEnv *ee = getExecEnv();
++    if (ee->exception)
++      vmlog_jamvm_catch(ee->thread,ee->exception);
++
+     if(ee->overflow) {
+         ee->overflow = FALSE;
+         ee->stack_end -= STACK_RED_ZONE_SIZE;
+@@ -157,6 +164,8 @@
+     while(((handler_pc = findCatchBlockInMethod(frame->mb, exception, frame->last_pc)) == NULL)
+                     && (frame->prev->mb != NULL)) {
++      vmlog_jamvm_unwnd_method(getExecEnv()->thread,frame->mb);
++
+         if(frame->mb->access_flags & ACC_SYNCHRONIZED) {
+             Object *sync_ob = frame->mb->access_flags & ACC_STATIC ?
+                     (Object*)frame->mb->class : (Object*)frame->lvars[0];
+diff -u -r jamvm-1.4.2/src/frame.h vmlog-jamvm-1.4.2/src/frame.h
+--- jamvm-1.4.2/src/frame.h    2005-09-05 02:02:45.000000000 +0200
++++ vmlog-jamvm-1.4.2/src/frame.h      2006-03-14 00:26:07.000000000 +0100
+@@ -53,7 +53,12 @@
+                                                                 \
+     new_frame->prev = dummy;                                    \
+     ee->last_frame = new_frame;                                 \
++    vmlog_jamvm_enter_method(ee->thread,mb);                    \
+ }
+ #define POP_TOP_FRAME(ee)                                       \
++    if (ee->exception)                                          \
++        vmlog_jamvm_unwnd_method(ee->thread,mb);                \
++    else                                                        \
++        vmlog_jamvm_leave_method(ee->thread,mb);                \
+     ee->last_frame = ee->last_frame->prev->prev;
+diff -u -r jamvm-1.4.2/src/interp.c vmlog-jamvm-1.4.2/src/interp.c
+--- jamvm-1.4.2/src/interp.c   2006-01-22 23:32:38.000000000 +0100
++++ vmlog-jamvm-1.4.2/src/interp.c     2006-03-13 04:21:48.000000000 +0100
+@@ -59,6 +59,8 @@
+     }                                                                      \
+ }
++#include "vmlog_jamvm.c"
++
+ uintptr_t *executeJava() {
+     CodePntr pc;
+     ExecEnv *ee = getExecEnv();
+@@ -2220,6 +2222,8 @@
+     ee->last_frame = new_frame;
++    vmlog_jamvm_enter_method(ee->thread,new_mb);
++
+     if(new_mb->access_flags & ACC_SYNCHRONIZED) {
+         sync_ob = new_mb->access_flags & ACC_STATIC ? (Object*)new_mb->class : (Object*)*arg1;
+         objectLock(sync_ob);
+@@ -2229,6 +2233,11 @@
+         ostack = (*(uintptr_t *(*)(Class*, MethodBlock*, uintptr_t*))
+                      new_mb->native_invoker)(new_mb->class, new_mb, arg1);
++      if (exceptionOccured0(ee))
++              vmlog_jamvm_unwnd_method(ee->thread,new_mb);
++      else
++              vmlog_jamvm_leave_method(ee->thread,new_mb);
++
+         if(sync_ob)
+             objectUnlock(sync_ob);
+@@ -2262,6 +2271,8 @@
+         return ostack;
+     }
++    vmlog_jamvm_leave_method(ee->thread,mb);
++
+     if(mb->access_flags & ACC_SYNCHRONIZED) {
+         Object *sync_ob = mb->access_flags & ACC_STATIC ? (Object*)mb->class : this;
+         objectUnlock(sync_ob);
+@@ -2294,6 +2305,8 @@
+             return NULL;
+         }
++      vmlog_jamvm_catch(ee->thread,excep);
++
+         /* If we're handling a stack overflow, reduce the stack
+            back past the red zone to enable handling of further
+            overflows */
+diff -u -r jamvm-1.4.2/src/jam.c vmlog-jamvm-1.4.2/src/jam.c
+--- jamvm-1.4.2/src/jam.c      2006-01-17 01:36:59.000000000 +0100
++++ vmlog-jamvm-1.4.2/src/jam.c        2006-03-13 04:32:16.000000000 +0100
+@@ -25,6 +25,8 @@
+ #include "jam.h"
++#include <vmlog_jamvm.h>
++
+ /* Setup default values for command line args */
+ static int noasyncgc = FALSE;
+@@ -282,6 +284,8 @@
+     int status;
+     int i;
++    vmlog_jamvm_init(&argc,argv);
++
+     int class_arg = parseCommandLine(argc, argv);
+     initVM();
diff --git a/contrib/vmlog/vmlogdiff.c b/contrib/vmlog/vmlogdiff.c
new file mode 100644 (file)
index 0000000..fb6076f
--- /dev/null
@@ -0,0 +1,744 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "vmlog.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+#define VMLOGDIFF_RINGBUF_SIZE 1024*1024
+#define VMLOGDIFF_PREFETCH 256
+
+
+#if 0
+#define LOG(args) printf args
+#else
+#define LOG(args)
+#endif
+
+typedef struct vmlogdiff_removed vmlogdiff_removed;
+
+struct vmlogdiff_removed {
+       vmlog_seq_t start;
+       vmlog_seq_t len;
+};
+
+char *opt_prefix;
+char *opt_fname[2];
+int opt_verbose = 0;
+int opt_context = 10;
+
+char *g_idxfname;
+char *g_strfname;
+char *g_cleanedfname[2] = { "vmlogdiff.A.clean", "vmlogdiff.B.clean" };
+char *g_removedfname[2] = { "vmlogdiff.A.removed", "vmlogdiff.B.removed" };
+int g_idxlen;
+int g_strlen;
+int g_nstrings;
+char *g_indentation = "    ";
+vmlog_seq_t g_context_available = 0;
+vmlog_seq_t g_context_requested = 0;
+
+vmlog_string_entry *g_idxmap;
+char *g_strmap;
+vmlogdiff_removed *g_removedmap[2];
+vmlogdiff_removed *g_removedptr[2];
+vmlogdiff_removed *g_removedend[2];
+int g_removedlen[2];
+int g_nremoved[2];
+vmlog_seq_t g_showseq[2] = { 0 };
+
+int g_level = 0;
+
+vmlog_ringbuf *g_ringbuf[2] = { NULL };
+vmlog_ringbuf *g_ringbuf_back[2] = { NULL };
+vmlog_ringbuf *g_ringbuf_show[2] = { NULL };
+vmlog_ringbuf *g_ringbuf_orig[2] = { NULL };
+
+const char *usage = 
+"Usage: vmlogdiff [options] prefix fileA fileB\n"
+"\n"
+"    Options:\n"
+"        -h      display this help message\n"
+"        -v      verbose messages to stderr\n"
+"\n";
+
+/* global variables for diff algorithm */
+
+vmlog_seq_t g_n[2];
+vmlog_seq_t *g_Vforw_buf = NULL;
+vmlog_seq_t *g_Vback_buf = NULL;
+vmlog_seq_t *g_Vforw = NULL;
+vmlog_seq_t *g_Vback = NULL;
+int g_maxD;
+int g_Vsize = 0;
+
+char *g_index_used = NULL;
+
+static void compare(vmlog_seq_t xstart,vmlog_seq_t ystart,vmlog_seq_t xend,vmlog_seq_t yend);
+       
+static void diff_alloc(int maxD)
+{
+       assert(maxD >= 0);
+
+       if (g_Vsize) {
+               VMLOG_FREE_ARRAY(vmlog_seq_t,g_Vsize,g_Vforw_buf);
+               VMLOG_FREE_ARRAY(vmlog_seq_t,g_Vsize,g_Vback_buf);
+       }
+
+       g_maxD = maxD;
+       g_Vsize = 2 * g_maxD + 1;
+
+       g_Vforw_buf = VMLOG_NEW_ARRAY(vmlog_seq_t,g_Vsize);
+       g_Vback_buf = VMLOG_NEW_ARRAY(vmlog_seq_t,g_Vsize);
+
+       g_Vforw = g_Vforw_buf + g_maxD;
+       g_Vback = g_Vback_buf + g_maxD;
+}
+
+void parse_command_line(int argc,char **argv)
+{
+       int r;
+
+       while (1) {
+               r = getopt(argc,argv,"hv");
+               if (r == -1)
+                       break;
+               switch (r) {
+                       case 'h':
+                               vmlog_die_usage(usage,0);
+
+                       case 'v':
+                               opt_verbose++;
+                               break;
+
+                       case '?':
+                               vmlog_die_usage(usage,1);
+               }
+       }
+
+       if (argc - optind < 3)
+               vmlog_die_usage(usage,1);
+       
+       opt_prefix = argv[optind++];
+       opt_fname[0] = argv[optind++];
+       opt_fname[1] = argv[optind++];
+}
+
+static void fprint_string(FILE *file,int index)
+{
+       char *str;
+       vmlog_string_entry *strent;
+       char *buf;
+
+       strent = g_idxmap + index;
+       str = g_strmap + strent->ofs;
+
+       buf = VMLOG_NEW_ARRAY(char,strent->len+1);
+
+       memcpy(buf,str,strent->len);
+       buf[strent->len] = 0;
+
+       fputs(buf,file);
+       
+       VMLOG_FREE_ARRAY(char,strent->len+1,buf);
+}
+
+static void dump_log_entry(vmlog_log_entry *logent,int depth)
+{
+#if 0
+       fprintf(stdout,"%d",depth);
+       fputc(':',stdout);
+       if (depth < 100) {
+               fputc(' ',stdout);
+               if (depth < 10)
+                       fputc(' ',stdout);
+       }
+       for (i=0; i<depth; ++i)
+               fputs(g_indentation,stdout);
+#endif
+       switch(logent->tag) {
+               case VMLOG_TAG_ENTER: fputs("enter ",stdout); break;
+               case VMLOG_TAG_LEAVE: fputs("leave ",stdout); break;
+               case VMLOG_TAG_THROW: fputs("throw ",stdout); break;
+               case VMLOG_TAG_CATCH: fputs("catch ",stdout); break;
+               case VMLOG_TAG_UNWND: fputs("unwnd ",stdout); break;
+       }
+       fprint_string(stdout,logent->index);
+       fputs("\n",stdout);
+}
+
+static void show_context(void)
+{
+       int len;
+       vmlog_log_entry *logent;
+       vmlog_seq_t skipped;
+
+       if (g_context_available > 2*opt_context) {
+               skipped = g_context_available - 2*opt_context;
+               printf("@@ " VMLOG_SEQ_FMT " common entr%s skipped @@\n",skipped,(skipped > 1) ? "ies" : "y");
+               g_context_available = opt_context;
+       }
+       
+       len = opt_context;
+       if (len > g_context_available) {
+               len = g_context_available;
+       }
+
+       if (len <= 0)
+               return;
+
+       vmlog_ringbuf_seek(g_ringbuf_show[0],g_ringbuf_show[0]->seq - len);
+       while (len-- && (logent = vmlog_ringbuf_next(g_ringbuf_show[0],VMLOGDIFF_PREFETCH))) {
+               fputc(' ',stdout);
+               dump_log_entry(logent,0);
+               g_context_available--;
+       }
+}
+
+static void handle_unmatchable(int which,vmlogdiff_removed *rm)
+{
+       int i;
+       vmlog_log_entry *logent;
+       
+       LOG(("unmatchable, only in %d: ofs=%lld len=%lld\n",which,rm->start,rm->len));
+
+       assert(rm->len);
+
+       show_context();
+
+       vmlog_ringbuf_seek(g_ringbuf_orig[which],rm->start);
+       for (i=0; i<rm->len; ++i) {
+               logent = vmlog_ringbuf_next(g_ringbuf_orig[which],1 /* XXX */);
+               fputc((which) ? '+' : '-',stdout);
+               dump_log_entry(logent,0);
+       }
+
+       g_context_requested = opt_context;
+       g_context_available = 0;
+}
+
+static void handle_common(vmlog_seq_t xstart,vmlog_seq_t ystart,vmlog_seq_t len)
+{
+       int i;
+       int j;
+       vmlog_log_entry *logent;
+       
+       LOG(("common: x=%lld y=%lld len=%lld\n",xstart,ystart,len));
+
+       vmlog_ringbuf_seek(g_ringbuf_show[0],xstart);
+       for (i=0; i<len; ++i) {
+               for (j=0; j<2; ++j) {
+                       if (g_removedptr[j] < g_removedend[j] && g_showseq[j] == g_removedptr[j]->start) {
+                               handle_unmatchable(j,g_removedptr[j]);
+                               g_showseq[j] += g_removedptr[j]->len;
+                               g_removedptr[j]++;
+                       }
+               }
+               
+               logent = vmlog_ringbuf_next(g_ringbuf_show[0],VMLOGDIFF_PREFETCH);
+               if (g_context_requested) {
+                       fputc(' ',stdout);
+                       dump_log_entry(logent,0);
+                       g_context_requested--;
+                       assert(!g_context_available);
+               }
+               else {
+                       g_context_available++;
+               }
+
+               g_showseq[0]++;
+               g_showseq[1]++;
+       }
+}
+
+static void handle_only_in(int which,vmlog_seq_t start,vmlog_seq_t len)
+{
+       int i;
+       vmlog_log_entry *logent;
+       
+       LOG(("only in %d: ofs=%lld len=%lld\n",which,start,len));
+
+       assert(len);
+
+       show_context();
+
+       vmlog_ringbuf_seek(g_ringbuf_show[which],start);
+       for (i=0; i<len; ++i) {
+               if (g_removedptr[which] < g_removedend[which] && g_showseq[which] == g_removedptr[which]->start) {
+                       handle_unmatchable(which,g_removedptr[which]);
+                       g_showseq[which] += g_removedptr[which]->len;
+                       g_removedptr[which]++;
+               }
+               logent = vmlog_ringbuf_next(g_ringbuf_show[which],1 /* XXX */);
+               fputc((which) ? '+' : '-',stdout);
+               dump_log_entry(logent,0);
+
+               g_showseq[which]++;
+       }
+
+       g_context_requested = opt_context;
+       g_context_available = 0;
+}
+
+static vmlog_seq_t match_forward(vmlog_seq_t x,vmlog_seq_t y,vmlog_seq_t xend,vmlog_seq_t yend)
+{
+       vmlog_log_entry *enta;
+       vmlog_log_entry *entb;
+       vmlog_seq_t xorigin;
+
+       if (x >= xend || y >= yend)
+               return 0;
+
+       xorigin = x;
+       vmlog_ringbuf_seek(g_ringbuf[0],x);
+       vmlog_ringbuf_seek(g_ringbuf[1],y);
+
+       do {
+               enta = vmlog_ringbuf_next(g_ringbuf[0],VMLOGDIFF_PREFETCH);
+               entb = vmlog_ringbuf_next(g_ringbuf[1],VMLOGDIFF_PREFETCH);
+               assert(enta && entb);
+
+               if (enta->index != entb->index || enta->tag != entb->tag)
+                       break;
+
+               /* a diagonal edge in the edit graph */
+               x++;
+               y++;
+       } while (x < xend && y < yend);
+
+       return x - xorigin;
+}
+
+static vmlog_seq_t match_backward(vmlog_seq_t xstart,vmlog_seq_t ystart,vmlog_seq_t x,vmlog_seq_t y)
+{
+       vmlog_log_entry *enta;
+       vmlog_log_entry *entb;
+       vmlog_seq_t xorigin;
+
+       if (x <= xstart || y <= ystart)
+               return 0;
+
+       xorigin = x;
+       vmlog_ringbuf_seek(g_ringbuf_back[0],x);
+       vmlog_ringbuf_seek(g_ringbuf_back[1],y);
+
+       do {
+               enta = vmlog_ringbuf_prev(g_ringbuf_back[0],VMLOGDIFF_PREFETCH);
+               entb = vmlog_ringbuf_prev(g_ringbuf_back[1],VMLOGDIFF_PREFETCH);
+               assert(enta && entb);
+
+               if (enta->index != entb->index || enta->tag != entb->tag)
+                       break;
+
+               /* a diagonal edge in the edit graph */
+               x--;
+               y--;
+       } while (x > xstart && y > ystart);
+
+       return xorigin - x;
+}
+
+/* pre-condition: X and Y differ at both ends */
+
+static void find_middle_snake(vmlog_seq_t xstart,vmlog_seq_t ystart,vmlog_seq_t xend,vmlog_seq_t yend)
+{
+       int D;
+       int k;
+       int resultD;
+       vmlog_seq_t diagofs;
+       vmlog_seq_t rdiagofs;
+       vmlog_seq_t Delta;
+       vmlog_seq_t x,y;
+       vmlog_seq_t snakex,snakey;
+       vmlog_seq_t snakestartx = 0;
+       vmlog_seq_t snakestarty = 0;
+       vmlog_seq_t snakelen = 0;
+       vmlog_seq_t match;
+       vmlog_seq_t best_forward;
+       vmlog_seq_t best_backward;
+
+       LOG(("find_middle_snake(%lld,%lld,%lld,%lld)\n",
+                       xstart,ystart,xend,yend));
+
+       diagofs = ystart - xstart;
+       rdiagofs = yend - xend;
+
+       Delta = diagofs - rdiagofs;
+       
+       /* fake vertical edge (0,-1) -> (0,0) ending on 0-diagonal */
+       g_Vforw[1] = xstart;
+
+       /* fake vertical edge (N,M+1) -> (N,M) ending on 0-reverse-diagonal */
+       g_Vback[-1] = xend;
+
+       best_forward = 0;
+       best_backward = xend;
+       
+       for (D=0; D <= g_maxD; ++D) {
+               LOG(("D = %d\n",D));
+
+               if (opt_verbose && D && (D % 1000 == 0))
+                       fprintf(stderr,"%d. (" VMLOG_SEQ_FMT_W ":" VMLOG_SEQ_FMT_W " entries, " VMLOG_SEQ_FMT_W " left) D = %d\n",
+                                       g_level,xend-xstart,yend-ystart,best_backward - best_forward,D);
+
+               for (k = -D; k <= D; k += 2) {
+                       LOG(("    k = %d, forward\n",k));
+
+                       /* we take a (D-1)-path that ends on a          */
+                       /* neighbouring diagonal and extend it with a   */
+                       /* vertical or horizontal edge (whichever takes */
+                       /* us further)                                  */
+
+                       if (k == -D || (k != +D && g_Vforw[k-1] < g_Vforw[k+1])) {
+                               /* vertical edge from diagonal k+1 down to k */
+                               x = g_Vforw[k+1];
+                       }
+                       else {
+                               /* horizontal edge from diagonal k-1 right to k */
+                               x = g_Vforw[k-1] + 1;
+                       }
+
+                       /* calculate y using the k-diagonal equation */
+                       
+                       y = x - k + diagofs;
+
+                       /* append the trailing snake to the D-path */
+
+                       snakex = x;
+                       snakey = y;
+
+                       match = match_forward(x,y,xend,yend);
+                       x += match;
+                       y += match;
+
+                       if (match) {
+                               LOG(("match from (%lld,%lld) to (%lld,%lld)\n",
+                                               snakex,snakey,x-1,y-1));
+                       }
+
+                       if (D > 4000) {
+                               resultD = 2*D - 1;
+                               snakestartx = (xstart + xend) / 2;;
+                               snakestarty = snakestartx;
+                               if (snakestarty < ystart)
+                                       snakestarty = ystart;
+                               else if (snakestarty > yend)
+                                       snakestarty = yend;
+                               snakelen = 0;
+                               goto found_middle_snake;
+                       }
+
+                       /* this is the furthest reaching D-path on the k-diagonal */
+
+                       g_Vforw[k] = x;
+                       if (x > best_forward)
+                               best_forward = x;
+
+                       LOG(("\tlongest %d-path on %d-diagonal ends at x=%lld\n",
+                                       D,k,x));
+
+                       /* check overlap with furthest reaching reverse D-1 path */
+
+                       if ((Delta & 1) && k - Delta >= -(D-1) && k - Delta <= +(D-1)) {
+                               if (x >= g_Vback[k - Delta]) {
+                                       LOG(("length of SES is %d\n",2*D - 1));
+
+                                       resultD = 2*D - 1;
+                                       snakestartx = snakex;
+                                       snakestarty = snakey;
+                                       snakelen = x - snakex;
+                                       goto found_middle_snake;
+                               }
+                       }
+               }
+
+               for (k = -D; k <= +D; k += 2) {
+
+                       LOG(("    k = %d, backward\n",k));
+
+                       /* we take a reverse (D-1)-path that ends on a  */
+                       /* neighbouring diagonal and extend it with a   */
+                       /* vertical or horizontal edge (whichever takes */
+                       /* us further)                                  */
+
+                       if (k == +D || (k != -D && g_Vback[k-1] < g_Vback[k+1])) {
+                               /* vertical edge from reverse diagonal k-1 up to k */
+                               x = g_Vback[k-1];
+                       }
+                       else {
+                               /* horizontal edge from reverse diagonal k+1 left to k */
+                               x = g_Vback[k+1] - 1;
+                       }
+
+                       /* calculate y using the k-reverse-diagonal equation */
+                       
+                       y = x - k + rdiagofs;
+
+                       /* append the trailing snake to the D-path */
+
+                       snakex = x;
+                       snakey = y;
+                       match = match_backward(xstart,ystart,x,y);
+                       x -= match;
+                       y -= match;
+
+                       if (match)
+                               LOG(("match from (%lld,%lld) to (%lld,%lld)\n",
+                                               x,y,snakex-1,snakey-1));
+
+                       /* this is the furthest reaching reverse D-path on the k-diagonal */
+
+                       g_Vback[k] = x;
+                       if (x < best_backward)
+                               best_backward = x;
+
+                       LOG(("\tlongest reverse %d-path on %d-diagonal ends at x=%lld\n",
+                                       D,k,x));
+
+                       /* check overlap with forward reaching D path */
+
+                       if (!(Delta & 1) && k + Delta >= -D && k + Delta <= +D) {
+                               if (x <= g_Vforw[k + Delta]) {
+                                       LOG(("length of SES is %d\n",2*D));
+
+                                       resultD = 2*D;
+                                       snakestartx = x;
+                                       snakestarty = y;
+                                       snakelen = snakex - x;
+                                       goto found_middle_snake;
+                               }
+                       }
+               }
+       }
+
+       vmlog_die("length of shortest editing script is > %d\n",g_maxD);
+
+found_middle_snake:
+       if (opt_verbose && g_level == 0) {
+               fprintf(stderr,"shortest editing script D = %d\n",resultD);
+       }
+       
+       if (resultD > 1) {
+               g_level++;
+               compare(xstart,ystart,snakestartx,snakestarty);
+       
+               LOG(("middle snake: x=%lld y=%lld len=%lld\n",
+                               snakestartx,snakestarty,snakelen));
+
+               if (snakelen) {
+                       handle_common(snakestartx,snakestarty,snakelen);
+               }
+
+               compare(snakestartx + snakelen,snakestarty + snakelen,xend,yend);
+               g_level--;
+       }
+       else {
+               vmlog_seq_t lendiff = (yend - ystart) - (xend - xstart);
+               
+               LOG(("snakestartx=%lld snakestarty=%lld snakelen=%lld\n",
+                               snakestartx,snakestarty,snakelen));
+               assert(snakelen == 0);
+               assert(lendiff);
+
+               if (lendiff > 0) {
+                       handle_only_in(1,ystart,lendiff);
+               }
+               else {
+                       handle_only_in(0,xstart,-lendiff);
+               }
+       }
+}
+
+static void compare(vmlog_seq_t xstart,vmlog_seq_t ystart,vmlog_seq_t xend,vmlog_seq_t yend)
+{
+       vmlog_seq_t prefix;
+       vmlog_seq_t suffix;
+       vmlog_seq_t xdiffend;
+       vmlog_seq_t ydiffend;
+
+       LOG(("compare(%lld,%lld,%lld,%lld)\n",
+                       xstart,ystart,xend,yend));
+
+       /* process and strip common prefix */
+
+       prefix = match_forward(xstart,ystart,xend,yend);
+       if (opt_verbose && g_level == 0) {
+               fprintf(stderr,"common prefix = " VMLOG_SEQ_FMT "\n",prefix);
+       }
+       if (prefix) {
+               handle_common(xstart,ystart,prefix);
+               xstart += prefix;
+               ystart += prefix;
+       }
+
+       /* strip common suffix */
+
+       suffix = match_backward(xstart,ystart,xend,yend);
+       if (opt_verbose && g_level == 0) {
+               fprintf(stderr,"common suffix = " VMLOG_SEQ_FMT "\n",suffix);
+       }
+       xdiffend = xend - suffix;
+       ydiffend = yend - suffix;
+       
+
+       /* handle differences */
+
+       if (xstart < xdiffend || ystart < ydiffend) {
+               if (xstart == xdiffend) {
+                       handle_only_in(1,ystart,ydiffend - ystart);
+               }
+               else if (ystart == ydiffend) {
+                       handle_only_in(0,xstart,xdiffend - xstart);
+               }
+               else {
+                       find_middle_snake(xstart,ystart,xdiffend,ydiffend);
+               }
+       }
+
+       /* process common suffix */
+
+       if (suffix) {
+               handle_common(xdiffend,ydiffend,suffix);
+       }
+}
+
+static void unmatchable_entries(void)
+{
+       vmlog_log_entry *logent;
+       int i;
+       int mark;
+       vmlog_file cleaned;
+       vmlog_file seqs;
+       vmlog_seq_t count;
+       vmlog_seq_t seq;
+       vmlogdiff_removed removed;
+       
+       VMLOG_XZNEW_ARRAY(g_index_used,char,g_nstrings);
+
+       for (i=0; i<2; ++i) {
+               mark = 1<<i;
+               
+               vmlog_ringbuf_seek(g_ringbuf[i],0);
+               while ((logent = vmlog_ringbuf_next(g_ringbuf[i],VMLOGDIFF_PREFETCH))) {
+                       g_index_used[logent->index] |= mark;
+               }
+       }
+
+       for (i=0; i<2; ++i) {
+               vmlog_file_open(&cleaned,g_cleanedfname[i],vmlogTruncateAppend);
+               vmlog_file_open(&seqs,g_removedfname[i],vmlogTruncateAppend);
+               
+               vmlog_ringbuf_seek(g_ringbuf[i],0);
+               count = 0;
+               seq = 0;
+               removed.start = 0;
+               removed.len = 0;
+               while ((logent = vmlog_ringbuf_next(g_ringbuf[i],VMLOGDIFF_PREFETCH))) {
+                       if (g_index_used[logent->index] == 3) {
+                               vmlog_file_append(&cleaned,logent,sizeof(vmlog_log_entry));
+                               if (removed.len)
+                                       vmlog_file_append(&seqs,&removed,sizeof(vmlogdiff_removed));
+                               removed.len = 0;
+                               removed.start = seq + 1;
+                       }
+                       else {
+                               count++;
+                               removed.len++;
+                       }
+                       seq++;
+               }
+               if (removed.len)
+                       vmlog_file_append(&seqs,&removed,sizeof(vmlogdiff_removed));
+
+               vmlog_file_close(&seqs);
+               vmlog_file_close(&cleaned);
+
+               if (opt_verbose)
+                       fprintf(stderr,"removed " VMLOG_SEQ_FMT " unmatchable entries from %s\n",
+                                       count,g_ringbuf[i]->file.fname);
+
+               g_removedmap[i] = vmlog_file_mmap(g_removedfname[i],&(g_removedlen[i]));
+               g_nremoved[i] = g_removedlen[i] / sizeof(vmlogdiff_removed);
+               g_removedptr[i] = g_removedmap[i];
+               g_removedend[i] = g_removedmap[i] + g_nremoved[i];
+       }
+}
+
+static void diff_logs(void)
+{
+       int i;
+
+       for (i=0; i<2; ++i) {
+               g_ringbuf[i] = vmlog_ringbuf_new(opt_fname[i],VMLOGDIFF_RINGBUF_SIZE);
+       }
+
+       unmatchable_entries();
+       diff_alloc(200000);
+
+       for (i=0; i<2; ++i) {
+               g_ringbuf_orig[i] = g_ringbuf[i];
+               g_ringbuf[i] = vmlog_ringbuf_new(g_cleanedfname[i],VMLOGDIFF_RINGBUF_SIZE);
+               g_ringbuf_back[i] = vmlog_ringbuf_new(g_cleanedfname[i],VMLOGDIFF_RINGBUF_SIZE);
+               g_ringbuf_show[i] = vmlog_ringbuf_new(g_cleanedfname[i],VMLOGDIFF_RINGBUF_SIZE);
+       }
+
+       g_n[0] = g_ringbuf[0]->file.size / sizeof(vmlog_log_entry);
+       g_n[1] = g_ringbuf[1]->file.size / sizeof(vmlog_log_entry);
+
+       compare(0,0,g_n[0],g_n[1]);
+}
+
+int main(int argc,char **argv)
+{
+       if (argc)
+               vmlog_set_progname(argv[0]);
+       parse_command_line(argc,argv);
+
+       g_idxfname = vmlog_concat3(opt_prefix,"",".idx",NULL);
+       g_strfname = vmlog_concat3(opt_prefix,"",".str",NULL);
+
+       g_idxmap = (vmlog_string_entry *) vmlog_file_mmap(g_idxfname,&g_idxlen);
+       g_nstrings = g_idxlen / sizeof(vmlog_string_entry);
+       g_strmap = (char *) vmlog_file_mmap(g_strfname,&g_strlen);
+
+       diff_logs();
+       
+       vmlog_ringbuf_free(g_ringbuf[0]);
+       vmlog_ringbuf_free(g_ringbuf[1]);
+       g_ringbuf[0] = NULL;
+       g_ringbuf[1] = NULL;
+       vmlog_file_munmap(g_strmap,g_strlen);
+       vmlog_file_munmap(g_idxmap,g_idxlen);
+       vmlog_file_munmap(g_removedmap[0],g_removedlen[0]);
+       vmlog_file_munmap(g_removedmap[1],g_removedlen[1]);
+
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/vmlogdump.c b/contrib/vmlog/vmlogdump.c
new file mode 100644 (file)
index 0000000..6f18917
--- /dev/null
@@ -0,0 +1,512 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "vmlog.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+#define VMLOGDUMP_RINGBUF_SIZE 1024*16
+#define VMLOGDUMP_PREFETCH 1024
+
+/*** options *********************************************************/
+
+char *opt_prefix;
+int opt_threadidx = 0;
+int opt_dumpstrings = 0;
+int opt_countcalls = 0;
+int opt_show_zero_counts = 0;
+int opt_open_frames = 0;
+int opt_prefix_open_frames = 0;
+int opt_show_depth = 1;
+int opt_show_seqns = 0;
+int opt_indent = 4;
+int opt_reldepth = 0;
+int opt_strip_desc = 0;
+int opt_maxdepth = INT_MAX;
+
+char *opt_tag = NULL;
+char *opt_string = NULL;
+vmlog_log_entry opt_needle;
+
+vmlog_seq_t opt_range_start = 0;
+vmlog_seq_t opt_range_end = VMLOG_SEQ_MAX;
+
+/*** global variables ************************************************/
+
+char *g_idxfname;
+char *g_strfname;
+char *g_logfname;
+int g_logfd;
+int g_idxlen;
+int g_strlen;
+int g_nstrings;
+char *g_indentation;
+
+vmlog_string_entry *g_idxmap;
+char *g_strmap;
+
+vmlog_ringbuf *g_ringbuf = NULL;
+
+int *g_counters = NULL;
+
+/*** usage ***********************************************************/
+
+const char *usage =
+"Usage: vmlogdump [options] prefix\n"
+"\n"
+"    Options:\n"
+"        -c      count call frequency of methods\n"
+"        -D      don't show depth numbers\n"
+"           -z   show methods with zero call count\n"
+"        -gT:S   select entries with given Tag and String\n"
+"        -h      display this help message\n"
+"        -iNUM   indentation width\n"
+"        -lNUM   limit max depth to NUM\n"
+"        -n      show sequence numbers / string indices\n"
+"        -o      show open frames\n"
+"        -O      show open frames before dump\n"
+"        -P      strip method parameter and return types\n"
+"        -rN:M   limit output to a range of sequence numbers\n"
+"        -R      show depth relative to minimum depth in range\n"
+"        -s      dump strings\n"
+"        -tNUM   use log of thread NUM (default=0)\n"
+"\n";
+
+/*********************************************************************/
+
+static void parse_tag_and_string(const char *arg)
+{
+       const char *sep;
+       int len;
+
+       sep = strchr(arg,':');
+       if (!sep)
+               vmlog_die_usage(usage,1);
+
+       len = sep - arg;
+       VMLOG_XZNEW_ARRAY(opt_tag,char,len+1);
+       memcpy(opt_tag,arg,len);
+
+       opt_needle.tag = vmlog_tag_from_name(opt_tag,len);
+       if (opt_needle.tag == -1) {
+               vmlog_die("unknown tag identifier: %s",opt_tag);
+       }
+       
+       len = strlen(arg) - len - 1;
+       VMLOG_XZNEW_ARRAY(opt_string,char,len+1);
+       memcpy(opt_string,sep+1,len);
+}
+
+void parse_command_line(int argc,char **argv)
+{
+       int r;
+
+       while (1) {
+               r = getopt(argc,argv,"cDg:hi:l:noOPr:Rst:z");
+               if (r == -1)
+                       break;
+               switch (r) {
+                       case 'c':
+                               opt_countcalls = 1;
+                               break;
+
+                       case 'D':
+                               opt_show_depth = 0;
+                               break;
+
+                       case 'g':
+                               parse_tag_and_string(optarg);
+                               break;
+
+                       case 'h':
+                               vmlog_die_usage(usage,0);
+
+                       case 'i':
+                               opt_indent = atoi(optarg);
+                               if (opt_indent < 0)
+                                       vmlog_die_usage(usage,1);
+                               break;
+
+                       case 'l':
+                               opt_maxdepth = atoi(optarg);
+                               if (opt_maxdepth < 0)
+                                       vmlog_die_usage(usage,1);
+                               break;
+
+                       case 'n':
+                               opt_show_seqns = 1;
+                               break;
+
+                       case 'o':
+                               opt_open_frames = 1;
+                               break;
+
+                       case 'O':
+                               opt_prefix_open_frames = 1;
+                               break;
+
+                       case 'P':
+                               opt_strip_desc = 1;
+                               break;
+
+                       case 'r':
+                               if (!vmlog_opt_parse_range(optarg,&opt_range_start,&opt_range_end))
+                                       vmlog_die("invalid range: %s",optarg);
+                               break;
+
+                       case 'R':
+                               opt_reldepth = 1;
+                               break;
+                               
+                       case 's':
+                               opt_dumpstrings = 1;
+                               break;
+                               
+                       case 't':
+                               opt_threadidx = atoi(optarg);
+                               break;
+
+                       case 'z':
+                               opt_show_zero_counts = 1;
+                               break;
+                               
+                       case '?': vmlog_die_usage(usage,1);
+               }
+       }
+
+       if (argc - optind < 1)
+               vmlog_die_usage(usage,1);
+       
+       opt_prefix = argv[optind++];
+
+       g_indentation = VMLOG_NEW_ARRAY(char,opt_indent+1);
+       memset(g_indentation,' ',opt_indent);
+       g_indentation[opt_indent] = 0;
+}
+
+static void fprint_string(FILE *file,int index)
+{
+       char *str;
+       vmlog_string_entry *strent;
+       char *buf;
+       int len;
+
+       strent = g_idxmap + index;
+       str = g_strmap + strent->ofs;
+       len = strent->len;
+
+       if (opt_strip_desc) {
+               char *desc;
+
+               desc = (char*) memchr(str,'(',len);
+               if (desc)
+                       len = desc - str;
+       }
+
+       buf = VMLOG_NEW_ARRAY(char,len+1);
+
+       memcpy(buf,str,len);
+       buf[len] = 0;
+
+       fputs(buf,file);
+       
+       VMLOG_FREE_ARRAY(char,len+1,buf);
+}
+
+static void dump_log_entry(vmlog_log_entry *logent,int depth,vmlog_seq_t seq)
+{
+       int i;
+
+       if (opt_show_depth) {
+               if (opt_reldepth)
+                       fputc('R',stdout);
+               fprintf(stdout,"%d",depth);
+               fputc(':',stdout);
+               if (depth < 100) {
+                       fputc(' ',stdout);
+                       if (depth < 10)
+                               fputc(' ',stdout);
+               }
+       }
+       if (opt_show_seqns) {
+               fprintf(stdout,"(" VMLOG_SEQ_FMT_W ")",seq);
+       }
+       for (i=0; i<depth; ++i)
+               fputs(g_indentation,stdout);
+       switch(logent->tag) {
+               case VMLOG_TAG_ENTER: fputs("enter ",stdout); break;
+               case VMLOG_TAG_LEAVE: fputs("leave ",stdout); break;
+               case VMLOG_TAG_THROW: fputs("throw ",stdout); break;
+               case VMLOG_TAG_CATCH: fputs("catch ",stdout); break;
+               case VMLOG_TAG_UNWND: fputs("unwnd ",stdout); break;
+               case VMLOG_TAG_SIGNL: fputs("signl ",stdout); break;
+               case VMLOG_TAG_UNROL: fputs("unrol ",stdout); break;
+               case VMLOG_TAG_REROL: fputs("rerol ",stdout); break;
+               default: fputs("<UNKNOWN TAG> ",stdout);
+       }
+       fprint_string(stdout,logent->index);
+       fputs("\n",stdout);
+}
+
+static void dump_log_entries(void)
+{
+       vmlog_log_entry *logent;
+       int depth = 0;
+       int mindepth = INT_MAX;
+       vmlog_seq_t seq;
+
+       if (opt_reldepth) {
+               vmlog_ringbuf_seek(g_ringbuf,opt_range_start);
+               while ((g_ringbuf->seq <= opt_range_end)
+                       && (logent = vmlog_ringbuf_next(g_ringbuf,VMLOGDUMP_PREFETCH)))
+               {
+                       int depthchange = vmlog_tag_definitions[logent->tag].depth;
+
+                       depth += depthchange;
+                       if (depthchange < 0) {
+                               if (depth < mindepth)
+                                       mindepth = depth;
+                       }
+               }
+
+               vmlog_ringbuf_seek(g_ringbuf,opt_range_start);
+               if (mindepth != INT_MAX)
+                       depth = -mindepth;
+               else
+                       depth = 0;
+       }
+
+       while ((g_ringbuf->seq <= opt_range_end)
+               && (logent = vmlog_ringbuf_next(g_ringbuf,VMLOGDUMP_PREFETCH)))
+       {
+               int depthchange = vmlog_tag_definitions[logent->tag].depth;
+
+               if (depthchange < 0) {
+                       depth += depthchange;
+                       if (depth < mindepth)
+                               mindepth = depth;
+               }
+
+               seq = g_ringbuf->seq - 1;
+
+               if ((!opt_string || (logent->tag == opt_needle.tag && logent->index == opt_needle.index))
+                       && (seq >= opt_range_start)
+                       && (depth <= opt_maxdepth))
+               {
+                       dump_log_entry(logent,depth,seq);
+               }
+
+               if (depthchange > 0)
+                       depth += depthchange;
+       }
+}
+
+static void dump_strings(void)
+{
+       int i;
+
+       for (i=0; i<g_nstrings; ++i) {
+               if (opt_show_seqns) {
+                       fprintf(stdout,"%8d: ",i);
+               }
+               fprint_string(stdout,i);
+               fputc('\n',stdout);
+       }
+}
+
+static int compare_by_counter(const void *a,const void *b)
+{
+       return g_counters[*(int*)b] - g_counters[*(int*)a];
+}
+
+static void count_calls(void)
+{
+       int *indices;
+       int i;
+       int index;
+       vmlog_log_entry *logent;
+
+       g_counters = VMLOG_NEW_ARRAY(int,g_nstrings);
+       assert(g_counters);
+       memset(g_counters,0,sizeof(int)*g_nstrings);
+
+       while (1) {
+               logent = vmlog_ringbuf_next(g_ringbuf,VMLOGDUMP_PREFETCH);
+               if (!logent)
+                       break;
+
+               if (logent->tag == VMLOG_TAG_ENTER) {
+                       g_counters[logent->index]++;
+               }
+       }
+
+       indices = VMLOG_NEW_ARRAY(int,g_nstrings);
+       assert(indices);
+       for (i=0; i<g_nstrings; ++i)
+               indices[i] = i;
+
+       qsort(indices,g_nstrings,sizeof(int),compare_by_counter);
+
+       for (i=0; i<g_nstrings; ++i) {
+               index = indices[i];
+               if (!g_counters[index] && !opt_show_zero_counts)
+                       break;
+               fprintf(stdout,"%12d ",g_counters[index]);
+               fprint_string(stdout,index);
+               fputc('\n',stdout);
+       }
+       
+       VMLOG_FREE_ARRAY(int,g_nstrings,indices);
+       VMLOG_FREE_ARRAY(int,g_nstrings,g_counters);
+}
+
+static void dump_open_frames(void)
+{
+       vmlog_thread_log *tlog;
+       vmlog_log_entry *logent;
+       vmlog_frame *frame;
+       vmlog_seq_t start;
+       vmlog_seq_t end;
+       int i;
+       int maxdepth = 0;
+
+       tlog = vmlog_thread_log_new(NULL,NULL,0);
+
+       if (opt_prefix_open_frames) {
+               start = 0;
+               end = opt_range_start - 1;
+       }
+       else {
+               start = opt_range_start;
+               end = opt_range_end;
+       }
+
+       if (start > 0)
+               vmlog_ringbuf_seek(g_ringbuf,start);
+
+       while (g_ringbuf->seq <= end 
+               && (logent = vmlog_ringbuf_next(g_ringbuf,VMLOGDUMP_PREFETCH)))
+       {
+               int depthchange = vmlog_tag_definitions[logent->tag].depth;
+               if (depthchange < 0) {
+                       if (!vmlog_thread_log_leave(tlog,logent->index,g_ringbuf->seq - 1))
+                               vmlog_warn("unmatched leave");
+               }
+               else if (depthchange > 0) {
+                       vmlog_thread_log_enter(tlog,logent->index,g_ringbuf->seq - 1);
+                       if (tlog->depth > maxdepth)
+                               maxdepth = tlog->depth;
+               }
+       }
+
+       if (tlog->depth < 0) {
+               vmlog_warn("thread ends with negative call frame depth: %i",tlog->depth);
+               vmlog_warn("frame buffer will be dumped, expect bogus results:");
+               tlog->depth = tlog->framescap;
+               if (tlog->depth > maxdepth)
+                       tlog->depth = maxdepth;
+       }
+
+       for (i=0; i<tlog->depth; ++i) {
+               frame = tlog->frames + i;
+               fprintf(stdout,"%3d: (" VMLOG_SEQ_FMT_W ") ",i,frame->seq);
+               fprint_string(stdout,frame->index);
+               fputc('\n',stdout);
+       }
+
+       vmlog_thread_log_free(tlog);
+}
+
+int main(int argc,char **argv)
+{
+       char buf[20];
+       int need_logfile = 1;
+       int need_vml = 0;
+       vmlog_log *vml;
+       
+       if (argc)
+               vmlog_set_progname(argv[0]);
+       parse_command_line(argc,argv);
+
+       sprintf(buf,"%d",opt_threadidx);
+       g_idxfname = vmlog_concat3(opt_prefix,"",".idx",NULL);
+       g_strfname = vmlog_concat3(opt_prefix,"",".str",NULL);
+       g_logfname = vmlog_concat4len(opt_prefix,strlen(opt_prefix),
+                       ".",1,buf,strlen(buf),".log",4,NULL);
+
+       if (opt_dumpstrings)
+               need_logfile = 0;
+
+       if (opt_string)
+               need_vml = 1;
+
+       if (need_logfile) {
+               g_ringbuf = vmlog_ringbuf_new(g_logfname,VMLOGDUMP_RINGBUF_SIZE);
+       }
+
+       g_idxmap = (vmlog_string_entry *) vmlog_file_mmap(g_idxfname,&g_idxlen);
+       g_nstrings = g_idxlen / sizeof(vmlog_string_entry);
+       g_strmap = (char *) vmlog_file_mmap(g_strfname,&g_strlen);
+
+       if (need_vml) {
+               vml = vmlog_log_new(NULL,0);
+               vmlog_load_stringhash(vml,opt_prefix);
+               if (opt_string) {
+                       opt_needle.index = vmlog_get_string_index(vml,opt_string,strlen(opt_string));
+                       fprintf(stdout,"needle '%s:%s' tag=%d index=%d\n",
+                                       opt_tag,opt_string,opt_needle.tag,opt_needle.index);
+               }
+       }
+       
+       if (opt_countcalls) {
+               count_calls();
+       }
+       else if (opt_dumpstrings) {
+               dump_strings();
+       }
+       else if (opt_open_frames) {
+               dump_open_frames();
+       }
+       else {
+               if (opt_prefix_open_frames) {
+                       dump_open_frames();
+                       fputs("---\n",stdout);
+               }
+               dump_log_entries();
+       }
+
+       vmlog_ringbuf_free(g_ringbuf);
+       g_ringbuf = NULL;
+       munmap(g_strmap,g_strlen);
+       munmap(g_idxmap,g_idxlen);
+
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
diff --git a/contrib/vmlog/vmlogfilter.c b/contrib/vmlog/vmlogfilter.c
new file mode 100644 (file)
index 0000000..c6944c9
--- /dev/null
@@ -0,0 +1,321 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+/*               2007 Peter Molnar <peter.molnar@wm.sk>     */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "vmlog.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <regex.h>
+#include <getopt.h>
+
+char *g_idxfname;
+char *g_strfname;
+char *g_logfname;
+int g_idxlen;
+int g_strlen;
+int g_nstrings;
+vmlog_string_entry *g_idxmap;
+char *g_strmap;
+unsigned char *g_matches;
+vmlog_ringbuf *g_ringbuf = NULL;
+vmlog_log *g_log = NULL;
+vmlog_thread_log *g_thread_log = NULL;
+
+char *g_cmd = "vmlogfilter";
+
+char *opt_src_prefix = NULL;
+char *opt_dest_prefix = NULL;
+char *opt_filter_include = NULL;
+char *opt_filter_exclude = NULL;
+char *opt_src_threadidx = "0";
+char *opt_dest_threadidx = "100";
+
+#define VMLOGDUMP_RINGBUF_SIZE (16 * 1024)
+#define VMLOGDUMP_PREFETCH 1024
+#if 0
+#      define LOG(...) fprintf(stderr, "LOG: " __VA_ARGS__)
+#else
+#      define LOG(...)
+#endif
+
+#define USAGE \
+       "Usage: %s <options>\n" \
+       "\n" \
+       "Mandatory options include:\n" \
+       "\n" \
+       "\t-p <prefix>      Source prefix.\n" \
+       "\n" \
+       "Optional options include:\n" \
+       "\n" \
+       "\t-t <threadidx>   Source thread index. Defaults to 0.\n" \
+       "\t-P <prefix>      Destination prefix, defaults to source prefix.\n" \
+       "\t-T <threadidx>   Destination thread index. Defaults to 100.\n" \
+       "\t-i <regex>       Filter include.\n" \
+       "\t-x <regex>       Filter exclude.\n" \
+       "\n" 
+
+static void *xmalloc(int size) {
+       void *ret = malloc(size);
+       if (ret == NULL) {
+               vmlog_die("Malloc of size %d failed.", size);
+       }
+       return ret;
+}
+
+static void usage(int exit_status) {
+       fprintf(stderr, USAGE, g_cmd);
+       exit(exit_status);
+}
+
+static void parse_options(int argc, char **argv) {
+       int ret;
+
+       while ((ret = getopt(argc, argv, "i:x:p:t:P:T:h")) != -1) {
+               switch (ret) {
+                       case 'i':
+                               opt_filter_include = optarg;
+                               break;
+                       case 'x':
+                               opt_filter_exclude = optarg;
+                               break;
+                       case 't':
+                               opt_src_threadidx = optarg;
+                               break;
+                       case 'p':
+                               opt_src_prefix = optarg;
+                               if (opt_dest_prefix == NULL) {
+                                       opt_dest_prefix = optarg;
+                               }
+                       case 'T':
+                               opt_dest_threadidx = optarg;
+                               break;
+                       case 'P':
+                               opt_dest_prefix = optarg;
+                               break;
+                       case 'h':
+                               usage(EXIT_SUCCESS);
+                               break;
+                       default:
+                               usage(EXIT_FAILURE);
+                               break;
+               }
+       }
+
+       if ((opt_src_prefix == NULL) || (opt_dest_prefix == NULL)) {
+               usage(EXIT_FAILURE);
+       }
+}
+
+static void match_strings() {
+       regex_t regex[2];
+       char *filter[2];
+       int default_match[2] = { 1, 0 };
+       int i, err, res;
+       char err_buf[128];
+       char *str = NULL;
+       int str_size = 0;
+       vmlog_string_entry *strent;
+       unsigned char *match;
+
+       /* Initialize */
+
+       filter[0] = opt_filter_include;
+       filter[1] = opt_filter_exclude;
+
+       /* Compile regexes */
+
+       for (i = 0; i < 2; ++i) {
+               if (filter[i] != NULL) {
+                       err = regcomp(&regex[i], filter[i], REG_EXTENDED | REG_NOSUB);
+                       if (err != 0) {
+                               regerror(err, &regex[i], err_buf, sizeof(err_buf));
+                               vmlog_die(
+                                       "Invalid regex %s: %s",
+                                       filter[i], err_buf
+                               );
+                       }
+               }
+       }
+
+       /* Allocate array. For each string one byte with flags. */
+
+       g_matches = (unsigned char *)xmalloc(g_nstrings * sizeof(unsigned char));
+
+       /* Traverse strings and match */
+
+       for (strent = g_idxmap, match = g_matches; strent != g_idxmap + g_nstrings; ++strent, ++match) {
+               *match = 0;
+
+               if ((strent->len + 1) > str_size) {
+                       str_size = strent->len + 1;
+                       free(str);
+                       str = (char *)xmalloc(str_size);
+               }
+               memcpy(str, g_strmap + strent->ofs, strent->len);
+               str[strent->len] = '\0';
+
+               for (i = 0; i < 2; ++i) {
+                       if (filter[i] != NULL) {
+                               res = regexec(&regex[i], str, 0, NULL, 0);
+                               if (res == 0) {
+                                       *match |= (1 << i);
+                                       LOG("String `%s' matches regex `%d (%s)'\n", str, i, filter[i]);
+                               }
+                       } else {
+                               *match |= (default_match[i] << i);
+                       }
+               }
+       }
+}
+
+/* see src/vm/jit/show.c in the cacao source tree for documentation on the below. */
+
+#define MATCHFLAGS match_flags
+#define FILTERVERBOSECALLCTR g_ctr
+#define STATE_IS_INITIAL() ((FILTERVERBOSECALLCTR[0] == 0) && (FILTERVERBOSECALLCTR[1] == 0))
+#define STATE_IS_INCLUDE() ((FILTERVERBOSECALLCTR[0] > 0) && (FILTERVERBOSECALLCTR[1] == 0))
+#define STATE_IS_EXCLUDE() (FILTERVERBOSECALLCTR[1] > 0)
+#define EVENT_INCLUDE() (MATCHFLAGS & (1 << 0))
+#define EVENT_EXCLUDE() (MATCHFLAGS & (1 << 1))
+#define TRANSITION_NEXT_INCLUDE() ++FILTERVERBOSECALLCTR[0]
+#define TRANSITION_PREV_INCLUDE() --FILTERVERBOSECALLCTR[0]
+#define TRANSITION_NEXT_EXCLUDE() ++FILTERVERBOSECALLCTR[1]
+#define TRANSITION_PREV_EXCLUDE() --FILTERVERBOSECALLCTR[1]
+
+int g_ctr[2] = { 0, 0 };
+
+static int test_enter(unsigned char match_flags) {
+
+       int force_show = 0;
+
+       if (STATE_IS_INITIAL()) {
+               if (EVENT_INCLUDE()) {
+                       TRANSITION_NEXT_INCLUDE();
+               }
+       } else if (STATE_IS_INCLUDE()) {
+               if (EVENT_EXCLUDE()) {
+                       TRANSITION_NEXT_EXCLUDE();
+                       /* just entered exclude, show this method */
+                       force_show = 1;
+               } else if (EVENT_INCLUDE()) {
+                       TRANSITION_NEXT_INCLUDE();
+               }
+       } else if (STATE_IS_EXCLUDE()) {
+               if (EVENT_EXCLUDE()) {
+                       TRANSITION_NEXT_EXCLUDE();
+               }
+       }
+
+       return STATE_IS_INCLUDE() || force_show;
+}
+
+static int test_exit(unsigned char match_flags) {
+
+       int force_show = 0;
+
+       if (STATE_IS_INCLUDE()) {
+               if (EVENT_INCLUDE()) {
+                       TRANSITION_PREV_INCLUDE();
+                       /* just entered initial, show this method */
+                       if (STATE_IS_INITIAL()) force_show = 1;
+               }
+       } else if (STATE_IS_EXCLUDE()) {
+               if (EVENT_EXCLUDE()) {
+                       TRANSITION_PREV_EXCLUDE();
+               }
+       }
+
+       return STATE_IS_INCLUDE() || force_show;
+}
+
+static int test_other() {
+       return STATE_IS_INCLUDE();
+}
+
+static void do_filter() {
+       vmlog_log_entry *logent;
+       while ((logent = vmlog_ringbuf_next(g_ringbuf, VMLOGDUMP_PREFETCH)) != NULL) {
+               switch (logent->tag) {
+                       case VMLOG_TAG_ENTER:
+                               if (test_enter(g_matches[logent->index])) {
+                                       vmlog_thread_log_append(g_thread_log, logent);
+                                       g_thread_log->seq++;
+                               }
+                               break;
+                       case VMLOG_TAG_LEAVE:
+                               if (test_exit(g_matches[logent->index])) {
+                                       vmlog_thread_log_append(g_thread_log, logent);
+                                       g_thread_log->seq++;
+                               }
+                               break;
+                       default:
+                               if (test_other()) {
+                                       vmlog_thread_log_append(g_thread_log, logent);
+                                       g_thread_log->seq++;
+                               }
+                               break;
+               }
+       }
+}
+
+int main(int argc,char **argv) {
+
+       if (argc) {
+               vmlog_set_progname(argv[0]);
+               g_cmd = argv[0];
+       }
+
+       parse_options(argc, argv);
+
+       g_idxfname = vmlog_concat3(opt_src_prefix,"",".idx",NULL);
+       g_strfname = vmlog_concat3(opt_src_prefix,"",".str",NULL);
+       g_logfname = vmlog_concat4len(
+               opt_src_prefix, strlen(opt_src_prefix),
+               ".", 1, 
+               opt_src_threadidx, strlen(opt_src_threadidx),
+               ".log", 4,
+               NULL
+       );
+
+       g_ringbuf = vmlog_ringbuf_new(g_logfname, VMLOGDUMP_RINGBUF_SIZE);
+       g_idxmap = (vmlog_string_entry *) vmlog_file_mmap(g_idxfname,&g_idxlen);
+       g_nstrings = g_idxlen / sizeof(vmlog_string_entry);
+       g_strmap = (char *) vmlog_file_mmap(g_strfname,&g_strlen);
+
+       g_log = vmlog_log_new(opt_dest_prefix, 0);
+       g_thread_log = vmlog_thread_log_new(
+               g_log, 
+               (void *)atoi(opt_dest_threadidx), 
+               atoi(opt_dest_threadidx) 
+       );
+
+       match_strings();        
+       do_filter();
+
+       vmlog_thread_log_free(g_thread_log);
+       vmlog_log_free(g_log);
+       
+       vmlog_ringbuf_free(g_ringbuf);
+       g_ringbuf = NULL;
+       vmlog_file_munmap(g_strmap,g_strlen);
+       vmlog_file_munmap(g_idxmap,g_idxlen);
+
+       return 0;
+}
+
diff --git a/contrib/vmlog/vmlogindex.c b/contrib/vmlog/vmlogindex.c
new file mode 100644 (file)
index 0000000..b48daa1
--- /dev/null
@@ -0,0 +1,121 @@
+/* vmlog - high-speed logging for free VMs                  */
+/* Copyright (C) 2006 Edwin Steiner <edwin.steiner@gmx.net> */
+
+/* This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#include "vmlog.h"
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <getopt.h>
+#include <ctype.h>
+#include <sys/stat.h>
+#include <sys/mman.h>
+
+char *opt_listfname;
+char *opt_prefix;
+
+char *g_idxfname;
+char *g_strfname;
+
+const char *usage =
+"Usage: vmlogindex prefix listfile\n";
+
+#define VMLOG_MAXLINELENGTH  1024*16
+
+void parse_command_line(int argc,char **argv)
+{
+       int r;
+
+       while (1) {
+               r = getopt(argc,argv,"");
+               if (r == -1)
+                       break;
+               switch (r) {
+                       case '?': vmlog_die("invalid option");
+               }
+       }
+
+       if (argc - optind < 2)
+               vmlog_die_usage(usage,1);
+
+       opt_prefix = argv[optind++];
+       opt_listfname = argv[optind++];
+}
+
+int main(int argc,char **argv)
+{
+       int i;
+       int len;
+       vmlog_log *vml;
+       char *buf;
+       FILE *listfile;
+       char *p;
+       int warnws;
+       
+       if (argc)
+               vmlog_set_progname(argv[0]);
+       parse_command_line(argc,argv);
+
+       listfile = fopen(opt_listfname,"r");
+       if (!listfile)
+               vmlog_die("could not open file: %s: %s",opt_listfname,strerror(errno));
+       
+       vml = vmlog_log_new(opt_prefix,1);
+
+       buf = VMLOG_NEW_ARRAY(char,VMLOG_MAXLINELENGTH+1);
+       while (!feof(listfile)) {
+               p = fgets(buf,VMLOG_MAXLINELENGTH,listfile);
+               if (!p) {
+                       if (ferror(listfile))
+                               vmlog_die("reading from file: %s: %s",opt_listfname,strerror(errno));
+                       assert(feof(listfile));
+                       break;
+               }
+
+               len = strlen(p);
+               if (p[len-1] != '\n') {
+                       vmlog_warn("line without newline or overlong line read");
+               }
+               else {
+                       /* chop of newline */
+                       p[--len] = 0;
+               }
+               warnws = 0;
+               while (isspace(p[len-1])) {
+                       p[--len] = 0;
+                       warnws = 1;
+               }
+               if (warnws) {
+                       vmlog_warn("removed trailing whitespace from line");
+               }
+               i = vmlog_get_string_index(vml,buf,len);
+       }
+
+       vmlog_log_free(vml);
+       fclose(listfile);
+
+       return 0;
+}
+
+/* vim: noet ts=8 sw=8
+ */
+
index 69cec0553cb718fe4a5d383a8ca10127eb3961a0..a506ebcc3f079906c770f466a8f92965d2fbe0f8 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4464 2006-02-06 08:22:14Z edwin $
 
 ## Process this file with automake to produce Makefile.in
 
index d7354b5b656b703d09916723d60579ee0a534f89..fc5e3c5aa13486adcc945e4fc60b3a981fd929e0 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 5016 2006-06-06 14:32:01Z michi $
 
 ## Process this file with automake to produce Makefile.in
 
diff --git a/m4/annotations.m4 b/m4/annotations.m4
new file mode 100644 (file)
index 0000000..7560c30
--- /dev/null
@@ -0,0 +1,47 @@
+dnl m4/annotations.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check if annotations support should be built
+
+AC_DEFUN([AC_CHECK_ENABLE_ANNOTATIONS],[
+AC_MSG_CHECKING(wether to build annotations support)
+AC_ARG_ENABLE([annotations],
+              [AS_HELP_STRING(--enable-annotations,build annotations support [[default=no]])],
+              [case "${enableval}" in
+                   yes)
+                       ENABLE_ANNOTATIONS=yes
+                       ;;
+                   *)
+                       ENABLE_ANNOTATIONS=no
+                       ;;
+               esac],
+              [ENABLE_ANNOTATIONS=no])
+AC_MSG_RESULT(${ENABLE_ANNOTATIONS})
+AM_CONDITIONAL([ENABLE_ANNOTATIONS], test x"${ENABLE_ANNOTATIONS}" = "xyes")
+   
+if test x"${ENABLE_ANNOTATIONS}" = "xyes"; then
+    AC_DEFINE([ENABLE_ANNOTATIONS], 1, [enable annotations])
+fi
+])
diff --git a/m4/cacaoh.m4 b/m4/cacaoh.m4
new file mode 100644 (file)
index 0000000..5abf127
--- /dev/null
@@ -0,0 +1,41 @@
+dnl m4/cacaoh.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check which cacaoh to use
+
+AC_DEFUN([AC_CHECK_WITH_CACAOH],[
+AC_MSG_CHECKING(which cacaoh to use (for crosscompilation))
+AC_ARG_WITH([cacaoh],
+            [AS_HELP_STRING(--with-cacaoh,which cacaoh to use [[default=$(top_builddir)/src/cacaoh/cacaoh]])],
+            [CACAOH="${withval}"
+             ENABLE_CACAOH=no
+            ],
+            [CACAOH=["\$(top_builddir)/src/cacaoh/cacaoh"
+             ENABLE_CACAOH=yes
+            ]])
+AC_MSG_RESULT(${CACAOH})
+AC_SUBST(CACAOH)
+AM_CONDITIONAL([ENABLE_CACAOH], test x"${ENABLE_CACAOH}" = "xyes")
+])
index 42345e8deda9281aaba2dcdc5a50dca0597188be..3e873ed1db0f6e830a20cf724cf354c3c7c825bb 100644 (file)
@@ -22,7 +22,7 @@ dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
 dnl 
-dnl $Id: classpath.m4 8299 2007-08-13 08:41:18Z michi $
+dnl $Id: classpath.m4 8398 2007-08-22 16:56:45Z twisti $
 
 
 dnl which Java core library should we use
@@ -104,9 +104,19 @@ dnl where are Java core library native libraries installed
 AC_DEFUN([AC_CHECK_WITH_CLASSPATH_LIBDIR],[
 AC_MSG_CHECKING(where Java core library native libraries are installed)
 AC_ARG_WITH([classpath-libdir],
-            [AS_HELP_STRING(--with-classpath-libdir=<dir>,installation directory of Java core library native libraries [[default=CLASSPATH_PREFIX/lib]])],
+            [AS_HELP_STRING(--with-classpath-libdir=<dir>,installation directory of Java core library native libraries [[default=CLASSPATH_PREFIX/{lib,lib/${JAVA_ARCH}]])],
             [CLASSPATH_LIBDIR=${withval}],
-            [CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib])
+            [case "${WITH_CLASSPATH}" in
+                 gnu)
+                     CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib
+                     ;;
+                 sun)
+                     CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}/lib/${JAVA_ARCH}
+                     ;;
+                 *)
+                     CLASSPATH_LIBDIR=${CLASSPATH_PREFIX}
+                     ;;
+             esac])
 AC_MSG_RESULT(${CLASSPATH_LIBDIR})
 
 dnl expand CLASSPATH_LIBDIR to something that is usable in C code
index 5efed5e22e660a2297dd8735a68aa653dab212a7..f8186c5ec80ce9ee724ab11a8b8963b3570f2049 100644 (file)
@@ -21,8 +21,6 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
-dnl 
-dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
 
 
 dnl check which Java configuration to use
index fa1281e2971e7ad2866c074d35620f0c833d05d5..5f42f34cbd1ec52e32407761a8aec95198f13d46 100644 (file)
--- a/m4/jit.m4
+++ b/m4/jit.m4
@@ -21,8 +21,6 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
-dnl 
-dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
 
 
 dnl check for JIT compiler
index 7548ec0752e168b436f6e7fb0a361ad8b54810cb..6dd13439e1bdd4599ace147a512bc9cf8b2c17e9 100644 (file)
--- a/m4/jni.m4
+++ b/m4/jni.m4
@@ -21,8 +21,6 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
-dnl 
-dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
 
 
 dnl check if JNI should be enabled
diff --git a/m4/jre-layout.m4 b/m4/jre-layout.m4
new file mode 100644 (file)
index 0000000..1f563e8
--- /dev/null
@@ -0,0 +1,43 @@
+dnl m4/jre-layout.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl if we compile for a JRE-style directory layout
+
+AC_DEFUN([AC_CHECK_WITH_JRE_LAYOUT],[
+AC_MSG_CHECKING(if we compile for a JRE-style directory layout)
+AC_ARG_WITH([jre-layout],
+            [AS_HELP_STRING(--with-jre-layout,compile for JRE-style directory layout [[default=no]])],
+            [case "${enableval}" in
+                yes)
+                    WITH_JRE_LAYOUT=yes
+                    AC_DEFINE([WITH_JRE_LAYOUT], 1, [with JRE layout])
+                    ;;
+                *)
+                    WITH_JRE_LAYOUT=no
+                    ;;
+             esac],
+            [WITH_JRE_LAYOUT=no])
+AC_MSG_RESULT(${WITH_JRE_LAYOUT})
+])
diff --git a/m4/libjvm.m4 b/m4/libjvm.m4
new file mode 100644 (file)
index 0000000..e40144f
--- /dev/null
@@ -0,0 +1,55 @@
+dnl m4/libjvm.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check if a libjvm.so should be built
+
+AC_DEFUN([AC_CHECK_ENABLE_LIBJVM],[
+AC_MSG_CHECKING(whether to build a libjvm.so)
+AC_ARG_ENABLE([libjvm],
+              [AS_HELP_STRING(--disable-libjvm,build a libjvm.so [[default=yes]])],
+              [case "${enableval}" in
+                  no)
+                      ENABLE_LIBJVM=no
+                      ;;
+                  *)
+                      ENABLE_LIBJVM=yes
+                      ;;
+               esac],
+              [ENABLE_LIBJVM=yes])
+AC_MSG_RESULT(${ENABLE_LIBJVM})
+AM_CONDITIONAL([ENABLE_LIBJVM], test x"${ENABLE_LIBJVM}" = "xyes")
+AC_SUBST(ENABLE_LIBJVM)
+
+if test x"${ENABLE_LIBJVM}" = "xyes"; then
+    AC_DEFINE([ENABLE_LIBJVM], 1, [enable libjvm.so])
+
+    dnl set AC_ENABLE_SHARED and AC_DISABLE_STATIC properly
+    enable_shared=yes
+    enable_static=no
+else
+    enable_shared=no
+    enable_static=yes
+fi
+])
diff --git a/m4/ltdl.m4 b/m4/ltdl.m4
new file mode 100644 (file)
index 0000000..6e68960
--- /dev/null
@@ -0,0 +1,55 @@
+dnl m4/ltdl.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check if ltdl should be used
+
+AC_DEFUN([AC_CHECK_ENABLE_LTDL],[
+AC_MSG_CHECKING(whether ltdl should be used)
+AC_ARG_ENABLE([ltdl],
+              [AS_HELP_STRING(--disable-ltdl,disable ltdl support [[default=yes]])],
+              [case "${enableval}" in
+                  no)
+                      ENABLE_LTDL=no
+                      ;;
+                  *)
+                      ENABLE_LTDL=yes
+                      ;;
+               esac],
+              [ENABLE_LTDL=yes])
+AC_MSG_RESULT(${ENABLE_LTDL})
+
+if test x"${ENABLE_LTDL}" = "xyes"; then
+    dnl we need this check for --enable-staticvm, otherwise ltdl can't find dlopen
+    if test x"${ENABLE_STATICVM}" = "xyes"; then
+        AC_CHECK_LIB(dl, dlopen,, [AC_MSG_ERROR(cannot find libdl)])
+    fi
+
+    AC_CHECK_HEADERS([ltdl.h],, [AC_MSG_ERROR(cannot find ltdl.h)])
+    AC_CHECK_LIB(ltdl, lt_dlopen,, [AC_MSG_ERROR(cannot find libltdl)])
+    AC_DEFINE([ENABLE_LTDL], 1, [use ltdl])
+fi
+
+AM_CONDITIONAL([ENABLE_LTDL], test x"${ENABLE_LTDL}" = "xyes")
+])
index 940370ce765b8aece97fbed001f00f4eb72c80b1..f43c484938220a53e5be37495ea7e96a0f7b71e9 100644 (file)
@@ -21,8 +21,6 @@ dnl You should have received a copy of the GNU General Public License
 dnl along with this program; if not, write to the Free Software
 dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 dnl 02110-1301, USA.
-dnl 
-dnl $Id: configure.ac 7228 2007-01-19 01:13:48Z edwin $
 
 
 dnl check if softfloat should be used
diff --git a/m4/staticvm.m4 b/m4/staticvm.m4
new file mode 100644 (file)
index 0000000..8f51734
--- /dev/null
@@ -0,0 +1,45 @@
+dnl m4/staticvm.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check if CACAO should be linked statically
+
+AC_DEFUN([AC_CHECK_ENABLE_STATICVM],[
+AC_MSG_CHECKING(whether to link CACAO statically)
+AC_ARG_ENABLE([staticvm],
+              [AS_HELP_STRING(--enable-staticvm,link CACAO statically [[default=no]])],
+              [case "${enableval}" in
+                  yes)
+                      ENABLE_STATICVM=yes
+                      AC_DEFINE([ENABLE_STATICVM], 1, [link CACAO statically])
+                      ;;
+                  *)
+                      ENABLE_STATICVM=no
+                      ;;
+               esac],
+              [ENABLE_STATICVM=no])
+AC_MSG_RESULT(${ENABLE_STATICVM})
+AM_CONDITIONAL([ENABLE_STATICVM], test x"${ENABLE_STATICVM}" = "xyes")
+AC_SUBST(ENABLE_STATICVM)
+])
diff --git a/m4/threads.m4 b/m4/threads.m4
new file mode 100644 (file)
index 0000000..08cc6f8
--- /dev/null
@@ -0,0 +1,93 @@
+dnl m4/threads.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check which thread implementation should be used
+
+AC_DEFUN([AC_CHECK_ENABLE_THREADS],[
+AC_MSG_CHECKING(whether to include threads support)
+AC_ARG_ENABLE([threads],
+              [AS_HELP_STRING(--enable-threads,enable threads support (none,native) [[default=native]])],
+              [case "${enableval}" in
+                   no | none | single )
+                       ENABLE_THREADS=no
+                       ;;
+
+                   posix | pthreads )
+                       ENABLE_THREADS=posix
+                       ;;
+
+                   *)
+                       AC_MSG_ERROR($enableval is an unknown thread package)
+                       ;;
+               esac],
+               [ENABLE_THREADS=posix])
+
+AC_MSG_RESULT(${ENABLE_THREADS})
+AM_CONDITIONAL([ENABLE_THREADS], test x"${ENABLE_THREADS}" != "xno")
+
+case "${ENABLE_THREADS}" in
+    no )
+        dnl no threads for boehm
+        ac_configure_args="$ac_configure_args --disable-boehm-threads"
+        ;;
+
+    posix )
+        AC_DEFINE([ENABLE_THREADS], 1, [enable threads])
+        AC_CHECK_LIB(pthread, main)
+
+        ARCH_CFLAGS="$ARCH_CFLAGS -D_REENTRANT"
+
+        dnl we changed ARCH_CFLAGS, set CFLAGS again
+        CFLAGS="$ARCH_CFLAGS $OPT_CFLAGS"
+
+        dnl tell boehm to support threads as well
+        ac_configure_args="$ac_configure_args --enable-boehm-threads=posix"
+        ;;
+esac
+])
+
+
+dnl currently NOT USED
+
+dnl AC_ARG_ENABLE([__thread], [AS_HELP_STRING(--enable-__thread,use TLS features)], [use__thread=$enableval], [use__thread=no])
+dnl 
+dnl dnl Check whether the compiler supports the __thread keyword.
+dnl if test "x$use__thread" != xno; then
+dnl   AC_CACHE_CHECK([for __thread], ac_cv_gcc___thread,
+dnl   [cat > conftest.c <<\EOF
+dnl __thread int a = 42;
+dnl EOF
+dnl   if AC_TRY_COMMAND([${CC-cc} $ARCH_CFLAGS $OPT_CFLAGS -c conftest.c >&AS_MESSAGE_LOG_FD]); then
+dnl     ac_cv_gcc___thread=yes 
+dnl   else
+dnl     ac_cv_gcc___thread=no
+dnl   fi
+dnl   rm -f conftest*])
+dnl   if test "$ac_cv_gcc___thread" = yes; then
+dnl     AC_DEFINE([HAVE___THREAD], 1, [have __thread])
+dnl   fi
+dnl else
+dnl   ac_cv_gcc___thread=no
+dnl fi
diff --git a/m4/zlib.m4 b/m4/zlib.m4
new file mode 100644 (file)
index 0000000..42a83ac
--- /dev/null
@@ -0,0 +1,46 @@
+dnl m4/zlib.m4
+dnl
+dnl Copyright (C) 2007 R. Grafl, A. Krall, C. Kruegel,
+dnl C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring,
+dnl E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich,
+dnl J. Wenninger, Institut f. Computersprachen - TU Wien
+dnl 
+dnl This file is part of CACAO.
+dnl 
+dnl This program is free software; you can redistribute it and/or
+dnl modify it under the terms of the GNU General Public License as
+dnl published by the Free Software Foundation; either version 2, or (at
+dnl your option) any later version.
+dnl 
+dnl This program is distributed in the hope that it will be useful, but
+dnl WITHOUT ANY WARRANTY; without even the implied warranty of
+dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+dnl General Public License for more details.
+dnl 
+dnl You should have received a copy of the GNU General Public License
+dnl along with this program; if not, write to the Free Software
+dnl Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+dnl 02110-1301, USA.
+
+
+dnl check if zlib should be used
+
+AC_DEFUN([AC_CHECK_ENABLE_ZLIB],[
+AC_MSG_CHECKING(whether ZIP/JAR archives should be supported)
+AC_ARG_ENABLE([zlib],
+              [AS_HELP_STRING(--disable-zlib,disable ZIP/JAR archive support (needs zlib) [[default=yes]])],
+              [case "${enableval}" in
+                  no) ENABLE_ZLIB=no;;
+                  *) ENABLE_ZLIB=yes;;
+               esac],
+              [ENABLE_ZLIB=yes])
+AC_MSG_RESULT(${ENABLE_ZLIB})
+
+if test x"${ENABLE_ZLIB}" = "xyes"; then
+    AC_CHECK_HEADERS([zconf.h],, [AC_MSG_ERROR(cannot find zconf.h)])
+    AC_CHECK_HEADERS([zlib.h],, [AC_MSG_ERROR(cannot find zlib.h)])
+    AC_CHECK_LIB(z, inflate,, [AC_MSG_ERROR(cannot find libz)])
+    AC_DEFINE([ENABLE_ZLIB], 1, [use zlib])
+fi
+AM_CONDITIONAL([ENABLE_ZLIB], test x"${ENABLE_ZLIB}" = "xyes")
+])
index d630b977ad5d4c72582f3905daea893d2cdfc786..8e93d07171a91791cd4eb94556c316b2af8918f5 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4357 2006-01-22 23:33:38Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
index b608e8b0a828fa2e66e64ba38e6d02b63e80f7e6..b1c82505acbbe59212e51ea6cb518c6afcf7b754 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7601 2007-03-28 23:02:50Z michi $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        cacao \
@@ -39,11 +36,6 @@ DIST_SUBDIRS = \
        vm \
        vmcore
 
-if WITH_CLASSPATH_GNU
-VM_DIR = \
-       lib
-endif
-
 if ENABLE_THREADS
 THREADS_DIR = \
        threads
@@ -60,7 +52,7 @@ SUBDIRS = \
        toolbox \
        vmcore \
        $(CACAOH_DIR) \
-       $(VM_DIR) \
+       lib \
        native \
        fdlibm \
        mm \
index 85b8cc724d3a5c7b196e673ffb9570b1b43bcc12..780ee621317aad9c0d1cb2592a35be60b55ba3a6 100644 (file)
@@ -23,8 +23,6 @@
 ## 02110-1301, USA.
 ##
 ## Contact: cacao@cacaojvm.org
-##
-## $Id: Makefile.am 8132 2007-06-22 11:15:47Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
index 223c083d872e7ec9f39248deee961bfb0bacc926..ac005387bfbc27aad3c8abd55b6ee0ed5f59559f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: cacao.c 7698 2007-04-13 10:12:04Z twisti $
-
 */
 
 
index dda104ecfa3c12aadfb6d7792ed6185d948993f5..07e80cdf2ecbe9b13c0fa4023aef22edc19afcfe 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7360 2007-02-14 17:50:48Z tbfg $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR)
 
index 0ac8546e50376cb0615f5c0012ea3c4aa7d2bf0f..8590feb5ee2f7357739adb3869911fd8c224d5d4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: cacaoh.c 8123 2007-06-20 23:50:55Z michi $
-
 */
 
 
@@ -289,11 +287,10 @@ int main(int argc, char **argv)
 
        suck_add(classpath);
 
-       /* initialize the loader subsystems (must be done _after_
-       classcache_init) */
+       /* AFTER: classcache_init */
 
-       if (!loader_init())
-               vm_abort("loader_init failed\n");
+       loader_preinit();
+       loader_init();
 
 
        /* load Java classes ******************************************************/
index aa9365b6ebed7959d1040431a30333f9333251b7..01340c09940dfbdfa21e612b2b6a78e1e854f3e8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: dummy.c 8374 2007-08-21 10:20:33Z michi $
-
 */
 
 
 #include <stdio.h>
 #include <stdlib.h>
 
+#include "mm/memory.h"
+
+#include "native/llni.h"
+
 #include "toolbox/logging.h"
 
 #include "vm/global.h"
@@ -77,6 +79,60 @@ bool access_is_accessible_member(classinfo *referer, classinfo *declarer,
 }
 
 
+/* array **********************************************************************/
+
+java_handle_t *array_objectarray_element_get(java_handle_objectarray_t *a, int32_t index)
+{
+       java_handle_t *value;
+       int32_t        size;
+
+       if (a == NULL) {
+               log_println("array_objectarray_element_get(a=%p, index=%d): NullPointerException", a, index);
+               return NULL;
+       }
+
+       size = LLNI_array_size(a);
+
+       if ((index < 0) || (index > size)) {
+               log_println("array_objectarray_element_get(a=%p, index=%d): ArrayIndexOutOfBoundsException", a, index);
+               return NULL;
+       }
+
+       value = LLNI_array_direct(a, index);
+
+       return value;
+}
+
+void array_objectarray_element_set(java_handle_objectarray_t *a, int32_t index, java_handle_t *value)
+{
+       int32_t size;
+
+       if (a == NULL) {
+               log_println("array_objectarray_element_set(a=%p, index=%d): NullPointerException", a, index);
+               return;
+       }
+
+       size = LLNI_array_size(a);
+
+       if ((index < 0) || (index > size)) {
+               log_println("array_objectarray_element_set(a=%p, index=%d): ArrayIndexOutOfBoundsException", a, index);
+               return;
+       }
+
+       LLNI_array_direct(a, index) = value;
+}
+
+int32_t array_length_get(java_handle_t *a)
+{
+       if (a == NULL) {
+               log_println("array_length_get(a=%p): NullPointerException", a);
+               return 0;
+       }
+
+       return LLNI_array_size(a);
+}
+
+
 /* asm ************************************************************************/
 
 void asm_abstractmethoderror(void)
@@ -125,16 +181,26 @@ java_handle_t *builtin_new(classinfo *c)
 
 java_handle_objectarray_t *builtin_anewarray(int32_t size, classinfo *componentclass)
 {
-       abort();
+       java_handle_objectarray_t *oa = (java_handle_objectarray_t*)mem_alloc(
+               sizeof(java_array_t) + size * sizeof(java_object_t*));
 
-       return NULL;
+       if (oa != NULL) {
+               LLNI_array_size(oa) = size;
+       }
+
+       return oa;
 }
 
 java_handle_bytearray_t *builtin_newarray_byte(int32_t size)
 {
-       abort();
+       java_handle_bytearray_t *ba = (java_handle_bytearray_t*)mem_alloc(
+               sizeof(java_array_t) + size * sizeof(int8_t));
 
-       return NULL;
+       if (ba != NULL) {
+               LLNI_array_size(ba) = size;
+       }
+       
+       return ba;
 }
 
 
@@ -489,6 +555,11 @@ int32_t dump_size(void)
 
 /* primitive ******************************************************************/
 
+classinfo *primitive_arrayclass_get_by_type(int type)
+{
+       return NULL;
+}
+
 classinfo *primitive_class_get_by_type(int type)
 {
        abort();
@@ -628,11 +699,11 @@ intptr_t threads_get_current_tid(void)
        return 0;
 }
 
-void threads_stopworld(void)
+void threads_cast_stopworld(void)
 {
 }
 
-void threads_startworld(void)
+void threads_cast_startworld(void)
 {
 }
 
index 11548b1229a52b12230dd514409634cd111fc554..0971ba6d2a3a64a244bdd9f8c9e13be846f74f27 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: headers.c 8377 2007-08-21 11:16:03Z michi $
-
 */
 
 
index 16ef7adb6ac28b1da310046d3e0cd9ee6c9b4653..4493d5834c89b3678947ddffe4d70923c77ee25d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: headers.h 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 #ifndef _HEADERS_H
index feb27f04ae6f481d95a1faf867b973024d924724..54497eae0c36b88ed4b45fbf053891e6010a03f5 100644 (file)
 ##
 ## Authors: Christian Thalinger
 ##
-## $Id: Makefile.am 6230 2006-12-26 23:05:02Z twisti $
-
-## Process this file with automake to produce Makefile.in
-
+##
 AM_CPPFLAGS = -I$(top_builddir)
 
 LIBS =
index cb62428c52d70d0dd51a50ff8872ced5129c4f46..70bc86e12c514b84a659ecd7d2d7473d2f828217 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8299 2007-08-13 08:41:18Z michi $
 
-## Process this file with automake to produce Makefile.in
 
 EXTRA_DIST = \
        $(VM_JAVA_FILES)
 
 CLEANFILES = vm.zip
 
+if WITH_CLASSPATH_GNU
 VM_JAVA_FILES = \
        $(top_srcdir)/src/lib/gnu/gnu/classpath/VMStackWalker.java \
        $(top_srcdir)/src/lib/gnu/gnu/classpath/VMSystemProperties.java \
@@ -82,7 +80,12 @@ endif
 
 if ENABLE_ZLIB
 pkgdata_DATA = vm.zip
+else
+pkgdata_DATA = nozip
+endif
+endif
 
+if ENABLE_ZLIB
 VM_ZIP = ../vm.zip
 
 vm.zip: $(VM_JAVA_FILES)
@@ -94,11 +97,9 @@ vm.zip: $(VM_JAVA_FILES)
            cd classes && $(JAR) cvf $(VM_ZIP) .; \
        fi
 else
-pkgdata_DATA = nozip
-
 nozip: $(VM_JAVA_FILES)
        $(mkdir_p) classes
-       $(JAVAC) -d classes $(VM_JAVA_FILES)
+       $(JAVAC) -source 1.5 -target 1.5 -d classes $(VM_JAVA_FILES)
 endif
 
 clean-local:
diff --git a/src/lib/cldc1.1/com/sun/cldchi/jvm/FileDescriptor.java b/src/lib/cldc1.1/com/sun/cldchi/jvm/FileDescriptor.java
new file mode 100644 (file)
index 0000000..42aeb40
--- /dev/null
@@ -0,0 +1,33 @@
+/* src/lib/com/sun/cldchi/jvm/FileDescriptor.java
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+package com.sun.cldchi.jvm;
+
+class FileDescriptor {
+    long pointer;
+    int position;
+    int length;
+}
diff --git a/src/lib/gnu/gnu/classpath/VMStackWalker.java b/src/lib/gnu/gnu/classpath/VMStackWalker.java
new file mode 100644 (file)
index 0000000..434edd2
--- /dev/null
@@ -0,0 +1,135 @@
+/* VMStackWalker.java -- Reference implementation of VM hooks for stack access
+   Copyright (C) 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath;
+
+/**
+ * This class provides access to the classes on the Java stack
+ * for reflection and security purposes.
+ *
+ * <p>
+ * This class is only available to privileged code (i.e., code loaded
+ * by the bootstrap loader).
+ *
+ * @author John Keiser
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @author Archie Cobbs
+ */
+public final class VMStackWalker
+{
+  /**
+   * Get a list of all the classes currently executing methods on the
+   * Java stack. <code>getClassContext()[0]</code> is the class associated
+   * with the currently executing method, i.e., the method that called
+   * <code>VMStackWalker.getClassContext()</code> (possibly through
+   * reflection). So you may need to pop off these stack frames from
+   * the top of the stack:
+   * <ul>
+   * <li><code>VMStackWalker.getClassContext()</code>
+   * <li><code>Method.invoke()</code>
+   * </ul>
+   *
+   * @return an array of the declaring classes of each stack frame
+   */
+  public static native Class[] getClassContext();
+
+  /**
+   * Get the class associated with the method invoking the method
+   * invoking this method, or <code>null</code> if the stack is not
+   * that deep (e.g., invoked via JNI invocation API). This method
+   * is an optimization for the expression <code>getClassContext()[1]</code>
+   * and should return the same result.
+   *
+   * <p>
+   * VM implementers are encouraged to provide a more efficient
+   * version of this method.
+   */
+//    public static Class getCallingClass()
+//    {
+//      Class[] ctx = getClassContext();
+//      if (ctx.length < 3)
+//        return null;
+//      return ctx[2];
+//    }
+  public static native Class getCallingClass();
+
+  /**
+   * Get the class loader associated with the Class returned by
+   * <code>getCallingClass()</code>, or <code>null</code> if no such class
+   * exists or it is the boot loader. This method is an optimization for the
+   * expression <code>VMStackWalker.getClassLoader(getClassContext()[1])</code>
+   * and should return the same result.
+   *
+   * <p>
+   * VM implementers are encouraged to provide a more efficient
+   * version of this method.
+   */
+//    public static ClassLoader getCallingClassLoader()
+//    {
+//      Class[] ctx = getClassContext();
+//      if (ctx.length < 3)
+//        return null;
+//      return getClassLoader(ctx[2]);
+//    }
+  public static native ClassLoader getCallingClassLoader();
+
+
+  /**
+   * Retrieve the class's ClassLoader, or <code>null</code> if loaded
+   * by the bootstrap loader. I.e., this should return the same thing
+   * as {@link java.lang.VMClass#getClassLoader}. This duplicate version
+   * is here to work around access permissions.
+   */
+//    public static native ClassLoader getClassLoader(Class cl);
+
+  /**
+   * Walk up the stack and return the first non-null class loader.
+   * If there aren't any non-null class loaders on the stack, return null.
+   */
+//   public static ClassLoader firstNonNullClassLoader()
+//   {
+//     Class[] stack = getClassContext();
+//     for (int i = 0; i < stack.length; i++)
+//       {
+//         ClassLoader loader = getClassLoader(stack[i]);
+//         if (loader != null)
+//           return loader;
+//       }
+//     return null;
+//   }
+    public static native ClassLoader firstNonNullClassLoader();
+}
diff --git a/src/lib/gnu/gnu/classpath/VMSystemProperties.java b/src/lib/gnu/gnu/classpath/VMSystemProperties.java
new file mode 100644 (file)
index 0000000..287a933
--- /dev/null
@@ -0,0 +1,98 @@
+/* VMSystemProperties.java -- Allow the VM to set System properties.
+   Copyright (C) 2004 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.classpath;
+
+import java.util.Properties;
+
+class VMSystemProperties
+{
+    /**
+     * Get the system properties. This is done here, instead of in System,
+     * because of the bootstrap sequence. Note that the native code should
+     * not try to use the Java I/O classes yet, as they rely on the properties
+     * already existing. The only safe method to use to insert these default
+     * system properties is {@link Properties#setProperty(String, String)}.
+     *
+     * <p>These properties MUST include:
+     * <dl>
+     * <dt>java.version         <dd>Java version number
+     * <dt>java.vendor          <dd>Java vendor specific string
+     * <dt>java.vendor.url      <dd>Java vendor URL
+     * <dt>java.home            <dd>Java installation directory
+     * <dt>java.vm.specification.version <dd>VM Spec version
+     * <dt>java.vm.specification.vendor  <dd>VM Spec vendor
+     * <dt>java.vm.specification.name    <dd>VM Spec name
+     * <dt>java.vm.version      <dd>VM implementation version
+     * <dt>java.vm.vendor       <dd>VM implementation vendor
+     * <dt>java.vm.name         <dd>VM implementation name
+     * <dt>java.specification.version    <dd>Java Runtime Environment version
+     * <dt>java.specification.vendor     <dd>Java Runtime Environment vendor
+     * <dt>java.specification.name       <dd>Java Runtime Environment name
+     * <dt>java.class.version   <dd>Java class version number
+     * <dt>java.class.path      <dd>Java classpath
+     * <dt>java.library.path    <dd>Path for finding Java libraries
+     * <dt>java.io.tmpdir       <dd>Default temp file path
+     * <dt>java.compiler        <dd>Name of JIT to use
+     * <dt>java.ext.dirs        <dd>Java extension path
+     * <dt>os.name              <dd>Operating System Name
+     * <dt>os.arch              <dd>Operating System Architecture
+     * <dt>os.version           <dd>Operating System Version
+     * <dt>file.separator       <dd>File separator ("/" on Unix)
+     * <dt>path.separator       <dd>Path separator (":" on Unix)
+     * <dt>line.separator       <dd>Line separator ("\n" on Unix)
+     * <dt>user.name            <dd>User account name
+     * <dt>user.home            <dd>User home directory
+     * <dt>user.dir             <dd>User's current working directory
+     * <dt>gnu.cpu.endian       <dd>"big" or "little"
+     * </dl>
+     *
+     * @param properties the Properties object to insert the system properties into
+     */
+    static native void preInit(Properties properties);
+
+    /**
+     * Here you get a chance to overwrite some of the properties set by
+     * the common SystemProperties code. For example, it might be
+     * a good idea to process the properties specified on the command
+     * line here.
+     */
+//     static void postInit(Properties properties)
+//     {
+//     }
+    static native void postInit(Properties properties);
+}
diff --git a/src/lib/gnu/gnu/java/lang/management/VMMemoryMXBeanImpl.java b/src/lib/gnu/gnu/java/lang/management/VMMemoryMXBeanImpl.java
new file mode 100644 (file)
index 0000000..d71a06d
--- /dev/null
@@ -0,0 +1,110 @@
+/* VMMemoryMXBeanImpl.java - VM impl. of a memory bean
+   Copyright (C) 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.java.lang.management;
+
+import java.lang.management.MemoryUsage;
+
+/**
+ * Provides access to information about the memory
+ * management of the current invocation of the virtual
+ * machine.  Instances of this bean are obtained by calling
+ * {@link ManagementFactory#getMemoryMXBean()}.
+ *
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+final class VMMemoryMXBeanImpl
+{
+
+  /**
+   * Returns an instance of {@link java.lang.management.MemoryUsage}
+   * with appropriate initial, used, committed and maximum values
+   * for the heap.  By default, this uses the methods of
+   * {@link java.lang.Runtime} to provide some of the values.
+   *
+   * @return an {@link java.lang.management.MemoryUsage} instance
+   *         for the heap.
+   */
+//   static MemoryUsage getHeapMemoryUsage()
+//   {
+//     Runtime runtime = Runtime.getRuntime();
+//     long totalMem = runtime.totalMemory();
+//     return new MemoryUsage(-1, totalMem - runtime.freeMemory(),
+//                        totalMem, runtime.maxMemory());
+//   }
+  static native MemoryUsage getHeapMemoryUsage();
+
+  /**
+   * Returns an instance of {@link java.lang.management.MemoryUsage}
+   * with appropriate initial, used, committed and maximum values
+   * for non-heap memory.
+   *
+   * @return an {@link java.lang.management.MemoryUsage} instance
+   *         for non-heap memory.
+   */
+  static native MemoryUsage getNonHeapMemoryUsage();
+
+  /**
+   * Returns the number of objects ready to be garbage collected.
+   *
+   * @return the number of finalizable objects.
+   */
+  static native int getObjectPendingFinalizationCount();
+
+  /**
+   * Returns true if the virtual machine will emit additional
+   * information when memory is allocated and deallocated.  The
+   * format of the output is left up to the virtual machine.
+   *
+   * @return true if verbose class loading output is on.
+   */
+  static native boolean isVerbose();
+
+  /**
+   * Turns on or off the emission of additional information
+   * when memory is allocated and deallocated.  The format of the
+   * output is left up to the virtual machine.  This method
+   * may be called by multiple threads concurrently, but there
+   * is only one global setting of verbosity that is affected.
+   *
+   * @param verbose the new setting for verbose class loading
+   *                output.
+   */
+  static native void setVerbose(boolean verbose);
+
+}
diff --git a/src/lib/gnu/gnu/java/lang/management/VMRuntimeMXBeanImpl.java b/src/lib/gnu/gnu/java/lang/management/VMRuntimeMXBeanImpl.java
new file mode 100644 (file)
index 0000000..32a8660
--- /dev/null
@@ -0,0 +1,89 @@
+/* VMRuntimeMXBeanImpl.java - VM implementation of an runtime bean
+   Copyright (C) 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package gnu.java.lang.management;
+
+import gnu.classpath.SystemProperties;
+
+/**
+ * Provides access to information about the virtual machine.
+ *
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+final class VMRuntimeMXBeanImpl
+{
+
+  /**
+   * Returns the command-line arguments supplied
+   * to the virtual machine, excluding those supplied
+   * to <code>main()</code>.
+   *
+   * @return the command-line arguments.
+   */
+  static native String[] getInputArguments();
+
+  /**
+   * Returns a developer-chosen name for the virtual
+   * machine, which may differ over different running
+   * instances of the same virtual machine binary.
+   * For example, this may include the particular
+   * process identifier used by this instance or
+   * the host name of the machine on which it is
+   * running.  The intention is that this name refers
+   * to the precise entity that the other data supplied
+   * by the bean refers to, rather than the VM in general.
+   *
+   * @return the custom name of the VM.
+   */
+  static String getName()
+  {
+    return SystemProperties.getProperty("java.vm.name") + " " +
+      SystemProperties.getProperty("java.vm.version");
+  }
+
+  /**
+   * The time in milliseconds at which the virtual
+   * machine was started.  This method is only executed
+   * once (for efficency), as the value is not expected
+   * to change.
+   *
+   * @return the VM start time.
+   */
+  static native long getStartTime();
+
+}
diff --git a/src/lib/gnu/java/lang/VMClassLoader.java b/src/lib/gnu/java/lang/VMClassLoader.java
new file mode 100644 (file)
index 0000000..46e741e
--- /dev/null
@@ -0,0 +1,454 @@
+/* VMClassLoader.java -- Reference implementation of native interface
+   required by ClassLoader
+   Copyright (C) 1998, 2001, 2002, 2004, 2005, 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang;
+
+import gnu.classpath.Configuration;
+import gnu.classpath.SystemProperties;
+import gnu.java.lang.InstrumentationImpl;
+
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStreamReader;
+import java.lang.instrument.Instrumentation;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.security.ProtectionDomain;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.Vector;
+import java.util.zip.ZipFile;
+
+/**
+ * java.lang.VMClassLoader is a package-private helper for VMs to implement
+ * on behalf of java.lang.ClassLoader.
+ *
+ * @author John Keiser
+ * @author Mark Wielaard (mark@klomp.org)
+ * @author Eric Blake (ebb9@email.byu.edu)
+ */
+final class VMClassLoader
+{
+
+
+  /** packages loaded by the bootstrap class loader */
+  static final HashMap definedPackages = new HashMap();
+
+  /** jars from property java.boot.class.path */
+  static final HashMap bootjars = new HashMap();
+  
+
+  /**
+   * Converts the array string of native package names to
+   * Packages. The packages are then put into the
+   * definedPackages hashMap
+   */
+  static
+  {
+    String[] packages = getBootPackages();
+    
+    if( packages != null)
+      {
+        String specName = 
+              SystemProperties.getProperty("java.specification.name");
+        String vendor =
+              SystemProperties.getProperty("java.specification.vendor");
+        String version =
+              SystemProperties.getProperty("java.specification.version");
+        
+        Package p;
+              
+        for(int i = 0; i < packages.length; i++)
+          {
+            p = new Package(packages[i],
+                  specName,
+                  vendor,
+                  version,
+                  "GNU Classpath",
+                  "GNU",
+                  Configuration.CLASSPATH_VERSION,
+                  null,
+                  null);
+
+            definedPackages.put(packages[i], p);
+          }
+      }
+  }
+
+  
+  /**
+   * Helper to define a class using a string of bytes. This assumes that
+   * the security checks have already been performed, if necessary.
+   *
+   * Implementations of this method are advised to consider the
+   * situation where user code modifies the byte array after it has
+   * been passed to defineClass.  This can be handled by making a
+   * private copy of the array, or arranging to only read any given
+   * byte a single time.
+   *
+   * @param name the name to give the class, or null if unknown
+   * @param data the data representing the classfile, in classfile format
+   * @param offset the offset into the data where the classfile starts
+   * @param len the length of the classfile data in the array
+   * @param pd the protection domain
+   * @return the class that was defined
+   * @throws ClassFormatError if data is not in proper classfile format
+   */
+  static final native Class defineClass(ClassLoader cl, String name,
+                                 byte[] data, int offset, int len,
+                                 ProtectionDomain pd)
+    throws ClassFormatError;
+
+  /**
+   * Helper to resolve all references to other classes from this class.
+   *
+   * @param c the class to resolve
+   */
+  static final native void resolveClass(Class c);
+
+  /**
+   * Helper to load a class from the bootstrap class loader.
+   *
+   * @param name the class name to load
+   * @param resolve whether to resolve it
+   * @return the class, loaded by the bootstrap classloader or null
+   * if the class wasn't found. Returning null is equivalent to throwing
+   * a ClassNotFoundException (but a possible performance optimization).
+   */
+  static final native Class loadClass(String name, boolean resolve)
+    throws ClassNotFoundException;
+
+  /**
+   * Helper to load a resource from the bootstrap class loader.
+   *
+   * @param name the resource to find
+   * @return the URL to the resource
+   */
+  static URL getResource(String name)
+  {
+    Enumeration e = getResources(name);
+    if (e.hasMoreElements())
+      return (URL)e.nextElement();
+    return null;
+  }
+  /**
+   * Helper to get a list of resources from the bootstrap class loader.
+   *
+   * @param name the resource to find
+   * @return an enumeration of resources
+   */
+  static Enumeration getResources(String name)
+  {
+//     StringTokenizer st = new StringTokenizer(
+//       SystemProperties.getProperty("java.boot.class.path", "."),
+//       File.pathSeparator);
+//     Vector v = new Vector();
+//     while (st.hasMoreTokens())
+//       {
+//     File file = new File(st.nextToken());
+//     if (file.isDirectory())
+//       {
+//         try
+//           {
+//                 File f = new File(file, name);
+//                 if (!f.exists()) continue;
+//                 v.add(new URL("file://" + f.getAbsolutePath()));
+//           }
+//         catch (MalformedURLException e)
+//           {
+//             throw new Error(e);
+//           }
+//       }
+//     else if (file.isFile())
+//       {
+//         ZipFile zip;
+//             synchronized(bootjars)
+//               {
+//                 zip = (ZipFile) bootjars.get(file.getName());
+//               }
+//             if(zip == null)
+//               {
+//                 try
+//               {
+//                     zip = new ZipFile(file);
+//                     synchronized(bootjars)
+//                       {
+//                         bootjars.put(file.getName(), zip);
+//                       }
+//               }
+//             catch (IOException e)
+//               {
+//                 continue;
+//               }
+//               }
+//         String zname = name.startsWith("/") ? name.substring(1) : name;
+//         if (zip.getEntry(zname) == null)
+//           continue;
+//         try
+//           {
+//             v.add(new URL("jar:file://"
+//               + file.getAbsolutePath() + "!/" + zname));
+//           }
+//         catch (MalformedURLException e)
+//           {
+//             throw new Error(e);
+//           }
+//       }
+//       }
+//     return v.elements();
+//   }
+    Vector urls = nativeGetResources(name);
+    Vector v = new Vector();
+    for (Enumeration en = urls.elements(); en.hasMoreElements();)
+      {
+       try
+         {
+           v.add(new URL((String) en.nextElement()));
+         }
+       catch (MalformedURLException e)
+         {
+           throw new Error(e);
+         }
+      }
+    return v.elements();
+  }
+
+  private native static final Vector nativeGetResources(String name);
+
+
+  /**
+   * Returns a String[] of native package names. The default
+   * implementation tries to load a list of package from
+   * the META-INF/INDEX.LIST file in the boot jar file.
+   * If not found or if any exception is raised, it returns
+   * an empty array. You may decide this needs native help.
+   */
+  private static String[] getBootPackages()
+  {
+    try
+      {
+        Enumeration indexListEnumeration = getResources("META-INF/INDEX.LIST");
+        Set packageSet = new HashSet();
+
+        while (indexListEnumeration.hasMoreElements())
+          {
+            try
+              {
+                String line;
+                int lineToSkip = 3;
+                BufferedReader reader = new BufferedReader(
+                                                           new InputStreamReader(
+                                                                                 ((URL) indexListEnumeration.nextElement()).openStream()));
+                while ((line = reader.readLine()) != null)
+                  {
+                    if (lineToSkip == 0)
+                      {
+                        if (line.length() == 0)
+                          lineToSkip = 1;
+                        else
+                          packageSet.add(line.replace('/', '.'));
+                      }
+                    else
+                      lineToSkip--;
+                  }
+                reader.close();
+              }
+            catch (IOException e)
+              {
+                // Empty catch block on purpose
+              }
+          }
+        return (String[]) packageSet.toArray(new String[packageSet.size()]);
+      }
+    catch (Exception e)
+      {
+        return new String[0];
+      }
+  }
+
+
+  /**
+   * Helper to get a package from the bootstrap class loader.
+   *
+   * @param name the name to find
+   * @return the named package, if it exists
+   */
+  static Package getPackage(String name)
+  {
+    return (Package)definedPackages.get(name);
+  }
+
+
+  
+  /**
+   * Helper to get all packages from the bootstrap class loader.  
+   *
+   * @return all named packages, if any exist
+   */
+  static Package[] getPackages()
+  {
+    Package[] packages = new Package[definedPackages.size()];
+    definedPackages.values().toArray(packages);
+    return packages;
+  }
+
+  /**
+   * Helper for java.lang.Integer, Byte, etc to get the TYPE class
+   * at initialization time. The type code is one of the chars that
+   * represents the primitive type as in JNI.
+   *
+   * <ul>
+   * <li>'Z' - boolean</li>
+   * <li>'B' - byte</li>
+   * <li>'C' - char</li>
+   * <li>'D' - double</li>
+   * <li>'F' - float</li>
+   * <li>'I' - int</li>
+   * <li>'J' - long</li>
+   * <li>'S' - short</li>
+   * <li>'V' - void</li>
+   * </ul>
+   *
+   * @param type the primitive type
+   * @return a "bogus" class representing the primitive type
+   */
+  static final native Class getPrimitiveClass(char type);
+
+  /**
+   * The system default for assertion status. This is used for all system
+   * classes (those with a null ClassLoader), as well as the initial value for
+   * every ClassLoader's default assertion status.
+   *
+   * XXX - Not implemented yet; this requires native help.
+   *
+   * @return the system-wide default assertion status
+   */
+//   static final boolean defaultAssertionStatus()
+//   {
+//     return true;
+//   }
+  static native final boolean defaultAssertionStatus();
+
+  /**
+   * The system default for package assertion status. This is used for all
+   * ClassLoader's packageAssertionStatus defaults. It must be a map of
+   * package names to Boolean.TRUE or Boolean.FALSE, with the unnamed package
+   * represented as a null key.
+   *
+   * XXX - Not implemented yet; this requires native help.
+   *
+   * @return a (read-only) map for the default packageAssertionStatus
+   */
+  static final Map packageAssertionStatus()
+  {
+    return new HashMap();
+  }
+
+  /**
+   * The system default for class assertion status. This is used for all
+   * ClassLoader's classAssertionStatus defaults. It must be a map of
+   * class names to Boolean.TRUE or Boolean.FALSE
+   *
+   * XXX - Not implemented yet; this requires native help.
+   *
+   * @return a (read-only) map for the default classAssertionStatus
+   */
+  static final Map classAssertionStatus()
+  {
+    return new HashMap();
+  }
+
+  static ClassLoader getSystemClassLoader()
+  {
+    return ClassLoader.defaultGetSystemClassLoader();
+  }
+
+  /**
+   * Find the class if this class loader previously defined this class
+   * or if this class loader has been recorded as the initiating class loader
+   * for this class.
+   */
+  static native Class findLoadedClass(ClassLoader cl, String name);
+
+  /**
+   * The Instrumentation object created by the vm when agents are defined.
+   */
+  static final Instrumentation instrumenter = null;
+
+  /**
+   * Call the transformers of the possible Instrumentation object. This
+   * implementation assumes the instrumenter is a
+   * <code>InstrumentationImpl</code> object. VM implementors would
+   * have to redefine this method if they provide their own implementation
+   * of the <code>Instrumentation</code> interface.
+   *
+   * @param loader the initiating loader
+   * @param name the name of the class
+   * @param data the data representing the classfile, in classfile format
+   * @param offset the offset into the data where the classfile starts
+   * @param len the length of the classfile data in the array
+   * @param pd the protection domain
+   * @return the new data representing the classfile
+   */
+  static final Class defineClassWithTransformers(ClassLoader loader,
+      String name, byte[] data, int offset, int len, ProtectionDomain pd)
+  {
+    
+    if (instrumenter != null)
+      {
+        byte[] modifiedData = new byte[len];
+        System.arraycopy(data, offset, modifiedData, 0, len);
+        modifiedData =
+          ((InstrumentationImpl)instrumenter).callTransformers(loader, name,
+            null, pd, modifiedData);
+        
+        return defineClass(loader, name, modifiedData, 0, modifiedData.length,
+            pd);
+      }
+    else
+      {
+        return defineClass(loader, name, data, offset, len, pd);
+      }
+  }
+}
diff --git a/src/lib/gnu/java/lang/VMString.java b/src/lib/gnu/java/lang/VMString.java
new file mode 100644 (file)
index 0000000..57e4423
--- /dev/null
@@ -0,0 +1,96 @@
+/* VMString.java -- VM Specific String methods
+   Copyright (C) 2003 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang;
+
+import java.lang.ref.WeakReference;
+import java.util.WeakHashMap;
+
+/*
+ * This class is a reference version, mainly for compiling a class library
+ * jar.  It is likely that VM implementers replace this with their own
+ * version that can communicate effectively with the VM.
+ */
+
+/**
+ * Code relocated from java.lang.String by 
+ * @author Dave Grove <groved@us.ibm.com>
+ */
+final class VMString
+{
+
+  /**
+   * Holds the references for each intern()'d String. If all references to
+   * the string disappear, and the VM properly supports weak references,
+   * the String will be GC'd.
+   */
+//    private static final WeakHashMap internTable = new WeakHashMap();
+
+  /**
+   * Fetches this String from the intern hashtable. If two Strings are
+   * considered equal, by the equals() method, then intern() will return the
+   * same String instance. ie. if (s1.equals(s2)) then
+   * (s1.intern() == s2.intern()). All string literals and string-valued
+   * constant expressions are already interned.
+   *
+   * @param str the String to intern
+   * @return the interned String
+   */
+//    static String intern(String str)
+//    {
+//      synchronized (internTable)
+//        {
+//          WeakReference ref = (WeakReference) internTable.get(str);
+//          if (ref != null)
+//            {
+//              String s = (String) ref.get();
+//              // If s is null, then no strong references exist to the String;
+//              // the weak hash map will soon delete the key.
+//              if (s != null)
+//                return s;
+//            }
+//          internTable.put(str, new WeakReference(str));
+//        }
+//      return str;
+//    }
+
+  /**
+   * this one is native in CACAO
+   */
+  static native String intern(String str);
+
+} // class VMString
diff --git a/src/lib/gnu/java/lang/VMThread.java b/src/lib/gnu/java/lang/VMThread.java
new file mode 100644 (file)
index 0000000..a511f3c
--- /dev/null
@@ -0,0 +1,462 @@
+/* VMThread -- VM interface for Thread of executable code
+   Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang;
+
+/**
+ * VM interface for Thread of executable code. Holds VM dependent state.
+ * It is deliberately package local and final and should only be accessed
+ * by the Thread class.
+ * <p>
+ * This is the GNU Classpath reference implementation, it should be adapted
+ * for a specific VM.
+ * <p>
+ * The following methods must be implemented:
+ * <ul>
+ * <li>native void start(long stacksize);
+ * <li>native void interrupt();
+ * <li>native boolean isInterrupted();
+ * <li>native void suspend();
+ * <li>native void resume();
+ * <li>native void nativeSetPriority(int priority);
+ * <li>native void nativeStop(Throwable t);
+ * <li>native static Thread currentThread();
+ * <li>static native void yield();
+ * <li>static native boolean interrupted();
+ * </ul>
+ * All other methods may be implemented to make Thread handling more efficient
+ * or to implement some optional (and sometimes deprecated) behaviour. Default
+ * implementations are provided but it is highly recommended to optimize them
+ * for a specific VM.
+ * 
+ * @author Jeroen Frijters (jeroen@frijters.net)
+ * @author Dalibor Topic (robilad@kaffe.org)
+ */
+final class VMThread
+{
+    /**
+     * The Thread object that this VM state belongs to.
+     * Used in currentThread() and start().
+     * Note: when this thread dies, this reference is *not* cleared
+     */
+    volatile Thread thread;
+
+    /**
+     * Flag that is set when the thread runs, used by stop() to protect against
+     * stop's getting lost.
+     */
+    private volatile boolean running;
+
+    /**
+     * VM private data.
+     */
+    private transient Object vmdata;
+
+    /**
+     * Private constructor, create VMThreads with the static create method.
+     *
+     * @param thread The Thread object that was just created.
+     */
+    private VMThread(Thread thread)
+    {
+       this.thread = thread;
+    }
+
+    /**
+     * This method is the initial Java code that gets executed when a native
+     * thread starts. It's job is to coordinate with the rest of the VMThread
+     * logic and to start executing user code and afterwards handle clean up.
+     */
+    private void run()
+    {
+       try
+       {
+           try
+           {
+               running = true;
+               synchronized(thread)
+               {
+                   Throwable t = thread.stillborn;
+                   if(t != null)
+                   {
+                       thread.stillborn = null;
+                       throw t;
+                   }
+               }
+               thread.run();
+           }
+           catch(Throwable t)
+           {
+               try
+               {
+                 Thread.UncaughtExceptionHandler handler;
+                 handler = thread.getUncaughtExceptionHandler();
+                 handler.uncaughtException(thread, t);
+               }
+               catch(Throwable ignore)
+               {
+               }
+           }
+       }
+       finally
+       {
+           // Setting runnable to false is partial protection against stop
+           // being called while we're cleaning up. To be safe all code in
+           // VMThread be unstoppable.
+           running = false;
+           thread.die();
+           synchronized(this)
+           {
+               // release the threads waiting to join us
+               notifyAll();
+           }
+       }
+    }
+
+    /**
+     * Creates a native Thread. This is called from the start method of Thread.
+     * The Thread is started.
+     *
+     * @param thread The newly created Thread object
+     * @param stacksize Indicates the requested stacksize. Normally zero,
+     * non-zero values indicate requested stack size in bytes but it is up
+     * to the specific VM implementation to interpret them and may be ignored.
+     */
+    static void create(Thread thread, long stacksize)
+    {
+       VMThread vmThread = new VMThread(thread);
+       thread.vmThread = vmThread;
+       vmThread.start(stacksize);
+    }
+
+    /**
+     * Gets the name of the thread. Usually this is the name field of the
+     * associated Thread object, but some implementation might choose to
+     * return the name of the underlying platform thread.
+     */
+    String getName()
+    {
+       return thread.name;
+    }
+
+    /**
+     * Set the name of the thread. Usually this sets the name field of the
+     * associated Thread object, but some implementations might choose to
+     * set the name of the underlying platform thread.
+     * @param name The new name
+     */
+    void setName(String name)
+    {
+       thread.name = name;
+    }
+
+    /**
+     * Set the thread priority field in the associated Thread object and
+     * calls the native method to set the priority of the underlying
+     * platform thread.
+     * @param priority The new priority
+     */
+    void setPriority(int priority)
+    {
+       thread.priority = priority;
+       nativeSetPriority(priority);
+    }
+
+    /**
+     * Returns the priority. Usually this is the priority field from the
+     * associated Thread object, but some implementation might choose to
+     * return the priority of the underlying platform thread.
+     * @return this Thread's priority
+     */
+    int getPriority()
+    {
+        return thread.priority;
+    }
+
+    /**
+     * Returns true if the thread is a daemon thread. Usually this is the
+     * daemon field from the associated Thread object, but some
+     * implementation might choose to return the daemon state of the underlying
+     * platform thread.
+     * @return whether this is a daemon Thread or not
+     */
+    boolean isDaemon()
+    {
+        return thread.daemon;
+    }
+
+    /**
+     * Returns the number of stack frames in this Thread.
+     * Will only be called when when a previous call to suspend() returned true.
+     *
+     * @deprecated unsafe operation
+     */
+    native int countStackFrames();
+
+    /**
+     * Wait the specified amount of time for the Thread in question to die.
+     *
+     * <p>Note that 1,000,000 nanoseconds == 1 millisecond, but most VMs do
+     * not offer that fine a grain of timing resolution. Besides, there is
+     * no guarantee that this thread can start up immediately when time expires,
+     * because some other thread may be active.  So don't expect real-time
+     * performance.
+     *
+     * @param ms the number of milliseconds to wait, or 0 for forever
+     * @param ns the number of extra nanoseconds to sleep (0-999999)
+     * @throws InterruptedException if the Thread is interrupted; it's
+     *         <i>interrupted status</i> will be cleared
+     */
+    synchronized void join(long ms, int ns) throws InterruptedException
+    {
+       // Round up
+       ms += (ns != 0) ? 1 : 0;
+
+       // Compute end time, but don't overflow
+       long now = System.currentTimeMillis();
+       long end = now + ms;
+       if (end < now)
+           end = Long.MAX_VALUE;
+
+       // A VM is allowed to return from wait() without notify() having been
+       // called, so we loop to handle possible spurious wakeups.
+       while(thread.vmThread != null)
+       {
+           // We use the VMThread object to wait on, because this is a private
+           // object, so client code cannot call notify on us.
+           wait(ms);
+           if(ms != 0)
+           {
+               now = System.currentTimeMillis();
+               ms = end - now;
+               if(ms <= 0)
+               {
+                   break;
+               }
+           }
+       }
+    }
+
+    /**
+     * Cause this Thread to stop abnormally and throw the specified exception.
+     * If you stop a Thread that has not yet started, the stop is ignored
+     * (contrary to what the JDK documentation says).
+     * <b>WARNING</b>This bypasses Java security, and can throw a checked
+     * exception which the call stack is unprepared to handle. Do not abuse 
+     * this power.
+     *
+     * <p>This is inherently unsafe, as it can interrupt synchronized blocks and
+     * leave data in bad states.
+     *
+     * <p><b>NOTE</b> stop() should take care not to stop a thread if it is
+     * executing code in this class.
+     *
+     * @param t the Throwable to throw when the Thread dies
+     * @deprecated unsafe operation, try not to use
+     */
+    void stop(Throwable t)
+    {
+       // Note: we assume that we own the lock on thread
+       // (i.e. that Thread.stop() is synchronized)
+       if(running)
+           nativeStop(t);
+       else
+           thread.stillborn = t;
+    }
+
+    /**
+     * Create a native thread on the underlying platform and start it executing
+     * on the run method of this object.
+     * @param stacksize the requested size of the native thread stack
+     */
+    native void start(long stacksize);
+
+    /**
+     * Interrupt this thread.
+     */
+    native void interrupt();
+
+    /**
+     * Determine whether this Thread has been interrupted, but leave
+     * the <i>interrupted status</i> alone in the process.
+     *
+     * @return whether the Thread has been interrupted
+     */
+    native boolean isInterrupted();
+
+    /**
+     * Suspend this Thread.  It will not come back, ever, unless it is resumed.
+     */
+    native void suspend();
+
+    /**
+     * Resume this Thread.  If the thread is not suspended, this method does
+     * nothing.
+     */
+    native void resume();
+
+    /**
+     * Set the priority of the underlying platform thread.
+     *
+     * @param priority the new priority
+     */
+    native void nativeSetPriority(int priority);
+
+    /**
+     * Asynchronously throw the specified throwable in this Thread.
+     *
+     * @param t the exception to throw
+     */
+    native void nativeStop(Throwable t);
+
+    /**
+     * Return the Thread object associated with the currently executing
+     * thread.
+     *
+     * @return the currently executing Thread
+     */
+    static native Thread currentThread();
+
+    /**
+     * Yield to another thread. The Thread will not lose any locks it holds
+     * during this time. There are no guarantees which thread will be
+     * next to run, and it could even be this one, but most VMs will choose
+     * the highest priority thread that has been waiting longest.
+     */
+    static native void yield();
+
+    /**
+     * Suspend the current Thread's execution for the specified amount of
+     * time. The Thread will not lose any locks it has during this time. There
+     * are no guarantees which thread will be next to run, but most VMs will
+     * choose the highest priority thread that has been waiting longest.
+     *
+     * <p>Note that 1,000,000 nanoseconds == 1 millisecond, but most VMs do
+     * not offer that fine a grain of timing resolution. Besides, there is
+     * no guarantee that this thread can start up immediately when time expires,
+     * because some other thread may be active.  So don't expect real-time
+     * performance.
+     *
+     * @param ms the number of milliseconds to sleep.
+     * @param ns the number of extra nanoseconds to sleep (0-999999)
+     * @throws InterruptedException if the Thread is (or was) interrupted;
+     *         it's <i>interrupted status</i> will be cleared
+     */
+    static void sleep(long ms, int ns) throws InterruptedException
+    {
+      // Note: JDK treats a zero length sleep is like Thread.yield(),
+      // without checking the interrupted status of the thread.
+      // It's unclear if this is a bug in the implementation or the spec.
+      // See http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6213203
+      if (ms == 0 && ns == 0)
+       {
+         if (Thread.interrupted())
+           throw new InterruptedException();
+         return;
+       }
+
+      // Compute end time, but don't overflow
+      long now = System.currentTimeMillis();
+      long end = now + ms;
+      if (end < now)
+         end = Long.MAX_VALUE;
+
+      // A VM is allowed to return from wait() without notify() having been
+      // called, so we loop to handle possible spurious wakeups.
+      VMThread vt = Thread.currentThread().vmThread;
+      synchronized (vt)
+       {
+         while (true)
+           {
+             vt.wait(ms, ns);
+             now = System.currentTimeMillis();
+             if (now >= end)
+               break;
+             ms = end - now;
+             ns = 0;
+           }
+       }
+    }
+
+    /**
+     * Determine whether the current Thread has been interrupted, and clear
+     * the <i>interrupted status</i> in the process.
+     *
+     * @return whether the current Thread has been interrupted
+     */
+    static native boolean interrupted();
+
+    /**
+     * Checks whether the current thread holds the monitor on a given object.
+     * This allows you to do <code>assert Thread.holdsLock(obj)</code>.
+     *
+     * @param obj the object to check
+     * @return true if the current thread is currently synchronized on obj
+     * @throws NullPointerException if obj is null
+     */
+//     static boolean holdsLock(Object obj) 
+//     {
+//       /* Use obj.notify to check if the current thread holds
+//        * the monitor of the object.
+//        * If it doesn't, notify will throw an exception.
+//        */
+//       try 
+//     {
+//       obj.notify();
+//       // okay, current thread holds lock
+//       return true;
+//     }
+//       catch (IllegalMonitorStateException e)
+//     {
+//       // it doesn't hold the lock
+//       return false;
+//     }
+//     }
+    static native boolean holdsLock(Object obj);
+
+  /**
+   * Returns the current state of the thread.
+   * The value must be one of "BLOCKED", "NEW",
+   * "RUNNABLE", "TERMINATED", "TIMED_WAITING" or
+   * "WAITING".
+   *
+   * @return a string corresponding to one of the 
+   *         thread enumeration states specified above.
+   */
+  native String getState();
+
+}
diff --git a/src/lib/gnu/java/lang/VMThrowable.java b/src/lib/gnu/java/lang/VMThrowable.java
new file mode 100644 (file)
index 0000000..d44c192
--- /dev/null
@@ -0,0 +1,91 @@
+/* java.lang.VMThrowable -- VM support methods for Throwable.
+   Copyright (C) 1998, 1999, 2002 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang;
+
+import gnu.classpath.Pointer;
+
+/**
+ * VM dependant state and support methods for Throwable.
+ * It is deliberately package local and final and should only be accessed
+ * by the Throwable class.
+ * <p>
+ * This is the GNU Classpath reference implementation, it should be adapted
+ * for a specific VM. The reference implementation does nothing.
+ *
+ * @author Mark Wielaard (mark@klomp.org)
+ */
+final class VMThrowable
+{
+  /* IMPORTANT: the rawdata field is not a java object */
+  private final Pointer vmData;
+
+  /**
+   * VM private data.
+   */
+  private transient Object vmdata;
+
+  /**
+   * Private contructor, create VMThrowables with fillInStackTrace();
+   */
+//    private VMThrowable() { }
+  private VMThrowable()
+  {
+    vmData = null;
+  }
+
+  /**
+   * Fill in the stack trace with the current execution stack.
+   * Called by <code>Throwable.fillInStackTrace()</code> to get the state of
+   * the VM. Can return null when the VM does not support caputing the VM
+   * execution state.
+   *
+   * @return a new VMThrowable containing the current execution stack trace.
+   * @see Throwable#fillInStackTrace()
+   */
+  static native VMThrowable fillInStackTrace(Throwable t);
+
+  /**
+   * Returns an <code>StackTraceElement</code> array based on the execution
+   * state of the VM as captured by <code>fillInStackTrace</code>.
+   * Called by <code>Throwable.getStackTrace()</code>.
+   *
+   * @return a non-null but possible zero length array of StackTraceElement.
+   * @see Throwable#getStackTrace()
+   */
+  native StackTraceElement[] getStackTrace(Throwable t);
+}
diff --git a/src/lib/gnu/java/lang/reflect/Constructor.java b/src/lib/gnu/java/lang/reflect/Constructor.java
new file mode 100644 (file)
index 0000000..c990fbc
--- /dev/null
@@ -0,0 +1,442 @@
+/* java.lang.reflect.Constructor - reflection of Java constructors
+   Copyright (C) 1998, 2001, 2004, 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang.reflect;
+
+import gnu.java.lang.ClassHelper;
+
+import gnu.java.lang.reflect.MethodSignatureParser;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+import java.util.Arrays;
+
+/**
+ * The Constructor class represents a constructor of a class. It also allows
+ * dynamic creation of an object, via reflection. Invocation on Constructor
+ * objects knows how to do widening conversions, but throws
+ * {@link IllegalArgumentException} if a narrowing conversion would be
+ * necessary. You can query for information on this Constructor regardless
+ * of location, but construction access may be limited by Java language
+ * access controls. If you can't do it in the compiler, you can't normally
+ * do it here either.<p>
+ *
+ * <B>Note:</B> This class returns and accepts types as Classes, even
+ * primitive types; there are Class types defined that represent each
+ * different primitive type.  They are <code>java.lang.Boolean.TYPE,
+ * java.lang.Byte.TYPE,</code>, also available as <code>boolean.class,
+ * byte.class</code>, etc.  These are not to be confused with the
+ * classes <code>java.lang.Boolean, java.lang.Byte</code>, etc., which are
+ * real classes.<p>
+ *
+ * Also note that this is not a serializable class.  It is entirely feasible
+ * to make it serializable using the Externalizable interface, but this is
+ * on Sun, not me.
+ *
+ * @author John Keiser
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @see Member
+ * @see Class
+ * @see java.lang.Class#getConstructor(Class[])
+ * @see java.lang.Class#getDeclaredConstructor(Class[])
+ * @see java.lang.Class#getConstructors()
+ * @see java.lang.Class#getDeclaredConstructors()
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public final class Constructor<T>
+  extends AccessibleObject
+  implements GenericDeclaration, Member
+{
+  private Class<T> clazz;
+  private int slot;
+  private byte[] annotations = null;
+  private byte[] parameterAnnotations = null;
+  private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations = null;
+  
+  private static final int CONSTRUCTOR_MODIFIERS
+    = Modifier.PRIVATE | Modifier.PROTECTED | Modifier.PUBLIC;
+    
+  private static final Annotation[] EMPTY_ANNOTATIONS_ARRAY =
+    new Annotation[0];
+
+  /**
+   * This class is uninstantiable except from native code.
+   */
+  private Constructor(Class declaringClass,int slot)
+  {
+    this.clazz = declaringClass;
+    this.slot = slot;
+  }
+
+  private Constructor()
+  {
+  }
+
+  /**
+   * Gets the class that declared this constructor.
+   * @return the class that declared this member
+   */
+  public Class<T> getDeclaringClass()
+  {
+    return clazz;
+  }
+
+  /**
+   * Gets the name of this constructor (the non-qualified name of the class
+   * it was declared in).
+   * @return the name of this constructor
+   */
+  public String getName()
+  {
+    return getDeclaringClass().getName();
+  }
+
+  /**
+   * Return the raw modifiers for this constructor.  In particular
+   * this will include the synthetic and varargs bits.
+   * @return the constructor's modifiers
+   */
+  private native int getModifiersInternal();
+
+  /**
+   * Gets the modifiers this constructor uses.  Use the <code>Modifier</code>
+   * class to interpret the values. A constructor can only have a subset of the
+   * following modifiers: public, private, protected.
+   *
+   * @return an integer representing the modifiers to this Member
+   * @see Modifier
+   */
+  public int getModifiers()
+  {
+    return getModifiersInternal() & CONSTRUCTOR_MODIFIERS;
+  }
+
+  /**
+   * Return true if this constructor is synthetic, false otherwise.
+   * A synthetic member is one which is created by the compiler,
+   * and which does not appear in the user's source code.
+   * @since 1.5
+   */
+  public boolean isSynthetic()
+  {
+    return (getModifiersInternal() & Modifier.SYNTHETIC) != 0;
+  }
+
+  /**
+   * Return true if this is a varargs constructor, that is if
+   * the constructor takes a variable number of arguments.
+   * @since 1.5
+   */
+  public boolean isVarArgs()
+  {
+    return (getModifiersInternal() & Modifier.VARARGS) != 0;
+  }
+
+  /**
+   * Get the parameter list for this constructor, in declaration order. If the
+   * constructor takes no parameters, returns a 0-length array (not null).
+   *
+   * @return a list of the types of the constructor's parameters
+   */
+  public native Class<?>[] getParameterTypes();
+
+  /**
+   * Get the exception types this constructor says it throws, in no particular
+   * order. If the constructor has no throws clause, returns a 0-length array
+   * (not null).
+   *
+   * @return a list of the types in the constructor's throws clause
+   */
+  public native Class<?>[] getExceptionTypes();
+
+  /**
+   * Compare two objects to see if they are semantically equivalent.
+   * Two Constructors are semantically equivalent if they have the same
+   * declaring class and the same parameter list.  This ignores different
+   * exception clauses, but since you can't create a Method except through the
+   * VM, this is just the == relation.
+   *
+   * @param o the object to compare to
+   * @return <code>true</code> if they are equal; <code>false</code> if not.
+   */
+  public boolean equals(Object o)
+  {
+    if (!(o instanceof Constructor))
+      return false;
+    Constructor that = (Constructor)o; 
+    if (this.getDeclaringClass() != that.getDeclaringClass())
+      return false;
+    if (!Arrays.equals(this.getParameterTypes(), that.getParameterTypes()))
+      return false;
+    return true;
+  }
+
+  /**
+   * Get the hash code for the Constructor. The Constructor hash code is the
+   * hash code of the declaring class's name.
+   *
+   * @return the hash code for the object
+   */
+  public int hashCode()
+  {
+    return getDeclaringClass().getName().hashCode();
+  }
+
+  /**
+   * Get a String representation of the Constructor. A Constructor's String
+   * representation is "&lt;modifier&gt; &lt;classname&gt;(&lt;paramtypes&gt;)
+   * throws &lt;exceptions&gt;", where everything after ')' is omitted if
+   * there are no exceptions.<br> Example:
+   * <code>public java.io.FileInputStream(java.lang.Runnable)
+   * throws java.io.FileNotFoundException</code>
+   *
+   * @return the String representation of the Constructor
+   */
+  public String toString()
+  {
+    // 128 is a reasonable buffer initial size for constructor
+    StringBuilder sb = new StringBuilder(128);
+    Modifier.toString(getModifiers(), sb).append(' ');
+    sb.append(getDeclaringClass().getName()).append('(');
+    Class[] c = getParameterTypes();
+    if (c.length > 0)
+      {
+        sb.append(ClassHelper.getUserName(c[0]));
+        for (int i = 1; i < c.length; i++)
+          sb.append(',').append(ClassHelper.getUserName(c[i]));
+      }
+    sb.append(')');
+    c = getExceptionTypes();
+    if (c.length > 0)
+      {
+        sb.append(" throws ").append(c[0].getName());
+        for (int i = 1; i < c.length; i++)
+          sb.append(',').append(c[i].getName());
+      }
+    return sb.toString();
+  }
+
+  static <X extends GenericDeclaration>
+  void addTypeParameters(StringBuilder sb, TypeVariable<X>[] typeArgs)
+  {
+    if (typeArgs.length == 0)
+      return;
+    sb.append('<');
+    for (int i = 0; i < typeArgs.length; ++i)
+      {
+        if (i > 0)
+          sb.append(',');
+        sb.append(typeArgs[i]);
+      }
+    sb.append("> ");
+  }
+
+  public String toGenericString()
+  {
+    StringBuilder sb = new StringBuilder(128);
+    Modifier.toString(getModifiers(), sb).append(' ');
+    addTypeParameters(sb, getTypeParameters());
+    sb.append(getDeclaringClass().getName()).append('(');
+    Type[] types = getGenericParameterTypes();
+    if (types.length > 0)
+      {
+        sb.append(types[0]);
+        for (int i = 1; i < types.length; ++i)
+          sb.append(',').append(types[i]);
+      }
+    sb.append(')');
+    types = getGenericExceptionTypes();
+    if (types.length > 0)
+      {
+        sb.append(" throws ").append(types[0]);
+        for (int i = 1; i < types.length; i++)
+          sb.append(',').append(types[i]);
+      }
+    return sb.toString();
+  }
+
+  /**
+   * Create a new instance by invoking the constructor. Arguments are
+   * automatically unwrapped and widened, if needed.<p>
+   *
+   * If this class is abstract, you will get an
+   * <code>InstantiationException</code>. If the constructor takes 0
+   * arguments, you may use null or a 0-length array for <code>args</code>.<p>
+   *
+   * If this Constructor enforces access control, your runtime context is
+   * evaluated, and you may have an <code>IllegalAccessException</code> if
+   * you could not create this object in similar compiled code. If the class
+   * is uninitialized, you trigger class initialization, which may end in a
+   * <code>ExceptionInInitializerError</code>.<p>
+   *
+   * Then, the constructor is invoked. If it completes normally, the return
+   * value will be the new object. If it completes abruptly, the exception is
+   * wrapped in an <code>InvocationTargetException</code>.
+   *
+   * @param args the arguments to the constructor
+   * @return the newly created object
+   * @throws IllegalAccessException if the constructor could not normally be
+   *         called by the Java code (i.e. it is not public)
+   * @throws IllegalArgumentException if the number of arguments is incorrect;
+   *         or if the arguments types are wrong even with a widening
+   *         conversion
+   * @throws InstantiationException if the class is abstract
+   * @throws InvocationTargetException if the constructor throws an exception
+   * @throws ExceptionInInitializerError if construction triggered class
+   *         initialization, which then failed
+   */
+  public T newInstance(Object... args)
+    throws InstantiationException, IllegalAccessException,
+           InvocationTargetException
+  {
+    return constructNative(args, clazz, slot);
+  }
+
+  private native T constructNative(Object[] args, Class declaringClass,
+                                  int slot)
+    throws InstantiationException, IllegalAccessException,
+           InvocationTargetException;
+
+  /**
+   * Returns an array of <code>TypeVariable</code> objects that represents
+   * the type variables declared by this constructor, in declaration order.
+   * An array of size zero is returned if this constructor has no type
+   * variables.
+   *
+   * @return the type variables associated with this constructor.
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public TypeVariable<Constructor<T>>[] getTypeParameters()
+  {
+    String sig = getSignature();
+    if (sig == null)
+      return new TypeVariable[0];
+    MethodSignatureParser p = new MethodSignatureParser(this, sig);
+    return p.getTypeParameters();
+  }
+
+  /**
+   * Return the String in the Signature attribute for this constructor. If there
+   * is no Signature attribute, return null.
+   */
+  private native String getSignature();
+
+  /**
+   * Returns an array of <code>Type</code> objects that represents
+   * the exception types declared by this constructor, in declaration order.
+   * An array of size zero is returned if this constructor declares no
+   * exceptions.
+   *
+   * @return the exception types declared by this constructor. 
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public Type[] getGenericExceptionTypes()
+  {
+    String sig = getSignature();
+    if (sig == null)
+      return getExceptionTypes();
+    MethodSignatureParser p = new MethodSignatureParser(this, sig);
+    return p.getGenericExceptionTypes();
+  }
+
+  /**
+   * Returns an array of <code>Type</code> objects that represents
+   * the parameter list for this constructor, in declaration order.
+   * An array of size zero is returned if this constructor takes no
+   * parameters.
+   *
+   * @return a list of the types of the constructor's parameters
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public Type[] getGenericParameterTypes()
+  {
+    String sig = getSignature();
+    if (sig == null)
+      return getParameterTypes();
+    MethodSignatureParser p = new MethodSignatureParser(this, sig);
+    return p.getGenericParameterTypes();
+  }
+    
+  /**
+   * @throws NullPointerException {@inheritDoc}
+   * @since 1.5
+   */
+  public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
+    if (annotationClass == null)
+      throw new NullPointerException();
+
+    return (T)declaredAnnotations().get(annotationClass);
+  }
+
+  /**
+   * @since 1.5
+   */
+  public Annotation[] getDeclaredAnnotations() {
+    return declaredAnnotations().values().toArray(EMPTY_ANNOTATIONS_ARRAY);
+  }
+
+  private synchronized native Map<Class<? extends Annotation>, Annotation> declaredAnnotations();
+  
+  /**
+   * Returns an array of arrays that represent the annotations on the formal
+   * parameters, in declaration order, of the method represented by
+   * this <tt>Method</tt> object. (Returns an array of length zero if the
+   * underlying method is parameterless.  If the method has one or more
+   * parameters, a nested array of length zero is returned for each parameter
+   * with no annotations.) The annotation objects contained in the returned
+   * arrays are serializable.  The caller of this method is free to modify
+   * the returned arrays; it will have no effect on the arrays returned to
+   * other callers.
+   *
+   * @return an array of arrays that represent the annotations on the formal
+   *    parameters, in declaration order, of the method represented by this
+   *    Method object
+   * @since 1.5
+   */
+  public native Annotation[][] getParameterAnnotations();
+}
diff --git a/src/lib/gnu/java/lang/reflect/Field.java b/src/lib/gnu/java/lang/reflect/Field.java
new file mode 100644 (file)
index 0000000..e8889a8
--- /dev/null
@@ -0,0 +1,690 @@
+/* java.lang.reflect.Field - reflection of Java fields
+   Copyright (C) 1998, 2001, 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang.reflect;
+
+import gnu.java.lang.ClassHelper;
+
+import gnu.java.lang.reflect.FieldSignatureParser;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+
+
+/**
+ * The Field class represents a member variable of a class. It also allows
+ * dynamic access to a member, via reflection. This works for both
+ * static and instance fields. Operations on Field objects know how to
+ * do widening conversions, but throw {@link IllegalArgumentException} if
+ * a narrowing conversion would be necessary. You can query for information
+ * on this Field regardless of location, but get and set access may be limited
+ * by Java language access controls. If you can't do it in the compiler, you
+ * can't normally do it here either.<p>
+ *
+ * <B>Note:</B> This class returns and accepts types as Classes, even
+ * primitive types; there are Class types defined that represent each
+ * different primitive type.  They are <code>java.lang.Boolean.TYPE,
+ * java.lang.Byte.TYPE,</code>, also available as <code>boolean.class,
+ * byte.class</code>, etc.  These are not to be confused with the
+ * classes <code>java.lang.Boolean, java.lang.Byte</code>, etc., which are
+ * real classes.<p>
+ *
+ * Also note that this is not a serializable class.  It is entirely feasible
+ * to make it serializable using the Externalizable interface, but this is
+ * on Sun, not me.
+ *
+ * @author John Keiser
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @see Member
+ * @see Class
+ * @see Class#getField(String)
+ * @see Class#getDeclaredField(String)
+ * @see Class#getFields()
+ * @see Class#getDeclaredFields()
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public final class Field
+extends AccessibleObject implements Member
+{
+  private Class clazz;
+  private String name;
+  private int slot;
+  private byte[] annotations = null;
+  private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations = null;
+
+  private static final int FIELD_MODIFIERS
+    = Modifier.FINAL | Modifier.PRIVATE | Modifier.PROTECTED
+      | Modifier.PUBLIC | Modifier.STATIC | Modifier.TRANSIENT
+      | Modifier.VOLATILE;
+
+  private static final Annotation[] EMPTY_ANNOTATIONS_ARRAY =
+    new Annotation[0];
+
+  /**
+   * This class is uninstantiable except natively.
+   */
+  private Field(Class declaringClass, String name, int slot)
+  {
+    this.clazz = declaringClass;
+    this.name = name;
+    this.slot = slot;
+  }
+
+  /**
+   * Gets the class that declared this field, or the class where this field
+   * is a non-inherited member.
+   * @return the class that declared this member
+   */
+  public Class<?> getDeclaringClass()
+  {
+    return clazz;
+  }
+
+  /**
+   * Gets the name of this field.
+   * @return the name of this field
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * Return the raw modifiers for this field.
+   * @return the field's modifiers
+   */
+  private native int getModifiersInternal();
+
+  /**
+   * Gets the modifiers this field uses.  Use the <code>Modifier</code>
+   * class to interpret the values.  A field can only have a subset of the
+   * following modifiers: public, private, protected, static, final,
+   * transient, and volatile.
+   *
+   * @return an integer representing the modifiers to this Member
+   * @see Modifier
+   */
+  public int getModifiers()
+  {
+    return getModifiersInternal() & FIELD_MODIFIERS;
+  }
+
+  /**
+   * Return true if this field is synthetic, false otherwise.
+   * @since 1.5
+   */
+  public boolean isSynthetic()
+  {
+    return (getModifiersInternal() & Modifier.SYNTHETIC) != 0;
+  }
+
+  /**
+   * Return true if this field represents an enum constant,
+   * false otherwise.
+   * @since 1.5
+   */
+  public boolean isEnumConstant()
+  {
+    return (getModifiersInternal() & Modifier.ENUM) != 0;
+  }
+
+  /**
+   * Gets the type of this field.
+   * @return the type of this field
+   */
+  public native Class<?> getType();
+
+  /**
+   * Compare two objects to see if they are semantically equivalent.
+   * Two Fields are semantically equivalent if they have the same declaring
+   * class, name, and type. Since you can't creat a Field except through
+   * the VM, this is just the == relation.
+   *
+   * @param o the object to compare to
+   * @return <code>true</code> if they are equal; <code>false</code> if not
+   */
+  public boolean equals(Object o)
+  {
+    if (!(o instanceof Field))
+      return false;
+    Field that = (Field)o; 
+    if (this.getDeclaringClass() != that.getDeclaringClass())
+      return false;
+    if (!this.getName().equals(that.getName()))
+      return false;
+    if (this.getType() != that.getType())
+      return false;
+    return true;
+  }
+
+  /**
+   * Get the hash code for the Field. The Field hash code is the hash code
+   * of its name XOR'd with the hash code of its class name.
+   *
+   * @return the hash code for the object.
+   */
+  public int hashCode()
+  {
+    return getDeclaringClass().getName().hashCode() ^ getName().hashCode();
+  }
+
+  /**
+   * Get a String representation of the Field. A Field's String
+   * representation is "&lt;modifiers&gt; &lt;type&gt;
+   * &lt;class&gt;.&lt;fieldname&gt;".<br> Example:
+   * <code>public transient boolean gnu.parse.Parser.parseComplete</code>
+   *
+   * @return the String representation of the Field
+   */
+  public String toString()
+  {
+    // 64 is a reasonable buffer initial size for field
+    StringBuilder sb = new StringBuilder(64);
+    Modifier.toString(getModifiers(), sb).append(' ');
+    sb.append(ClassHelper.getUserName(getType())).append(' ');
+    sb.append(getDeclaringClass().getName()).append('.');
+    sb.append(getName());
+    return sb.toString();
+  }
+
+  public String toGenericString()
+  {
+    StringBuilder sb = new StringBuilder(64);
+    Modifier.toString(getModifiers(), sb).append(' ');
+    sb.append(getGenericType()).append(' ');
+    sb.append(getDeclaringClass().getName()).append('.');
+    sb.append(getName());
+    return sb.toString();
+  }
+
+  /**
+   * Get the value of this Field.  If it is primitive, it will be wrapped
+   * in the appropriate wrapper type (boolean = java.lang.Boolean).<p>
+   *
+   * If the field is static, <code>o</code> will be ignored. Otherwise, if
+   * <code>o</code> is null, you get a <code>NullPointerException</code>,
+   * and if it is incompatible with the declaring class of the field, you
+   * get an <code>IllegalArgumentException</code>.<p>
+   *
+   * Next, if this Field enforces access control, your runtime context is
+   * evaluated, and you may have an <code>IllegalAccessException</code> if
+   * you could not access this field in similar compiled code. If the field
+   * is static, and its class is uninitialized, you trigger class
+   * initialization, which may end in a
+   * <code>ExceptionInInitializerError</code>.<p>
+   *
+   * Finally, the field is accessed, and primitives are wrapped (but not
+   * necessarily in new objects). This method accesses the field of the
+   * declaring class, even if the instance passed in belongs to a subclass
+   * which declares another field to hide this one.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if <code>o</code> is not an instance of
+   *         the class or interface declaring this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #getBoolean(Object)
+   * @see #getByte(Object)
+   * @see #getChar(Object)
+   * @see #getShort(Object)
+   * @see #getInt(Object)
+   * @see #getLong(Object)
+   * @see #getFloat(Object)
+   * @see #getDouble(Object)
+   */
+  public native Object get(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this boolean Field. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a boolean field of
+   *         <code>o</code>, or if <code>o</code> is not an instance of the
+   *         declaring class of this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native boolean getBoolean(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this byte Field. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a byte field of
+   *         <code>o</code>, or if <code>o</code> is not an instance of the
+   *         declaring class of this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native byte getByte(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this Field as a char. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a char field of
+   *         <code>o</code>, or if <code>o</code> is not an instance
+   *         of the declaring class of this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native char getChar(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this Field as a short. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a byte or short
+   *         field of <code>o</code>, or if <code>o</code> is not an instance
+   *         of the declaring class of this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native short getShort(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this Field as an int. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a byte, short, char, or
+   *         int field of <code>o</code>, or if <code>o</code> is not an
+   *         instance of the declaring class of this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native int getInt(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this Field as a long. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a byte, short, char, int,
+   *         or long field of <code>o</code>, or if <code>o</code> is not an
+   *         instance of the declaring class of this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native long getLong(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this Field as a float. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a byte, short, char, int,
+   *         long, or float field of <code>o</code>, or if <code>o</code> is
+   *         not an instance of the declaring class of this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native float getFloat(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Get the value of this Field as a double. If the field is static,
+   * <code>o</code> will be ignored.
+   *
+   * @param o the object to get the value of this Field from
+   * @return the value of the Field
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a byte, short, char, int,
+   *         long, float, or double field of <code>o</code>, or if
+   *         <code>o</code> is not an instance of the declaring class of this
+   *         field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #get(Object)
+   */
+  public native double getDouble(Object o)
+    throws IllegalAccessException;
+
+  /**
+   * Set the value of this Field.  If it is a primitive field, the value
+   * will be unwrapped from the passed object (boolean = java.lang.Boolean).<p>
+   *
+   * If the field is static, <code>o</code> will be ignored. Otherwise, if
+   * <code>o</code> is null, you get a <code>NullPointerException</code>,
+   * and if it is incompatible with the declaring class of the field, you
+   * get an <code>IllegalArgumentException</code>.<p>
+   *
+   * Next, if this Field enforces access control, your runtime context is
+   * evaluated, and you may have an <code>IllegalAccessException</code> if
+   * you could not access this field in similar compiled code. This also
+   * occurs whether or not there is access control if the field is final.
+   * If the field is primitive, and unwrapping your argument fails, you will
+   * get an <code>IllegalArgumentException</code>; likewise, this error
+   * happens if <code>value</code> cannot be cast to the correct object type.
+   * If the field is static, and its class is uninitialized, you trigger class
+   * initialization, which may end in a
+   * <code>ExceptionInInitializerError</code>.<p>
+   *
+   * Finally, the field is set with the widened value. This method accesses
+   * the field of the declaring class, even if the instance passed in belongs
+   * to a subclass which declares another field to hide this one.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if <code>value</code> cannot be
+   *         converted by a widening conversion to the underlying type of
+   *         the Field, or if <code>o</code> is not an instance of the class
+   *         declaring this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #setBoolean(Object, boolean)
+   * @see #setByte(Object, byte)
+   * @see #setChar(Object, char)
+   * @see #setShort(Object, short)
+   * @see #setInt(Object, int)
+   * @see #setLong(Object, long)
+   * @see #setFloat(Object, float)
+   * @see #setDouble(Object, double)
+   */
+  public native void set(Object o, Object value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this boolean Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a boolean field, or if
+   *         <code>o</code> is not an instance of the class declaring this
+   *         field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setBoolean(Object o, boolean value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this byte Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a byte, short, int, long,
+   *         float, or double field, or if <code>o</code> is not an instance
+   *         of the class declaring this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setByte(Object o, byte value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this char Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a char, int, long,
+   *         float, or double field, or if <code>o</code> is not an instance
+   *         of the class declaring this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setChar(Object o, char value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this short Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a short, int, long,
+   *         float, or double field, or if <code>o</code> is not an instance
+   *         of the class declaring this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setShort(Object o, short value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this int Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not an int, long, float, or
+   *         double field, or if <code>o</code> is not an instance of the
+   *         class declaring this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setInt(Object o, int value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this long Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a long, float, or double
+   *         field, or if <code>o</code> is not an instance of the class
+   *         declaring this field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setLong(Object o, long value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this float Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a float or long field, or
+   *         if <code>o</code> is not an instance of the class declaring this
+   *         field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setFloat(Object o, float value)
+    throws IllegalAccessException;
+
+  /**
+   * Set this double Field. If the field is static, <code>o</code> will be
+   * ignored.
+   *
+   * @param o the object to set this Field on
+   * @param value the value to set this Field to
+   * @throws IllegalAccessException if you could not normally access this field
+   *         (i.e. it is not public)
+   * @throws IllegalArgumentException if this is not a double field, or if
+   *         <code>o</code> is not an instance of the class declaring this
+   *         field
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static field triggered
+   *         class initialization, which then failed
+   * @see #set(Object, Object)
+   */
+  public native void setDouble(Object o, double value)
+    throws IllegalAccessException;
+
+  /**
+   * Return the generic type of the field. If the field type is not a generic
+   * type, the method returns the same as <code>getType()</code>.
+   *
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public Type getGenericType()
+  {
+    String signature = getSignature();
+    if (signature == null)
+      return getType();
+    FieldSignatureParser p = new FieldSignatureParser(getDeclaringClass(),
+                                                      signature);
+    return p.getFieldType();
+  }
+
+  /**
+   * Return the String in the Signature attribute for this field. If there
+   * is no Signature attribute, return null.
+   */
+  private native String getSignature();
+
+  /**
+   * @throws NullPointerException {@inheritDoc}
+   * @since 1.5
+   */
+  public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
+    if (annotationClass == null)
+      throw new NullPointerException();
+
+    return (T)declaredAnnotations().get(annotationClass);
+  }
+
+  /**
+   * @since 1.5
+   */
+  public Annotation[] getDeclaredAnnotations() {
+    return declaredAnnotations().values().toArray(EMPTY_ANNOTATIONS_ARRAY);
+  }
+
+  private synchronized native Map<Class<? extends Annotation>, Annotation> declaredAnnotations();
+}
diff --git a/src/lib/gnu/java/lang/reflect/Method.java b/src/lib/gnu/java/lang/reflect/Method.java
new file mode 100644 (file)
index 0000000..a6b9c32
--- /dev/null
@@ -0,0 +1,512 @@
+/* java.lang.reflect.Method - reflection of Java methods
+   Copyright (C) 1998, 2001, 2002, 2005, 2007 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.lang.reflect;
+
+import gnu.java.lang.ClassHelper;
+
+import gnu.java.lang.reflect.MethodSignatureParser;
+
+import java.lang.annotation.Annotation;
+import java.util.Map;
+import java.util.Arrays;
+
+/**
+ * The Method class represents a member method of a class. It also allows
+ * dynamic invocation, via reflection. This works for both static and
+ * instance methods. Invocation on Method objects knows how to do
+ * widening conversions, but throws {@link IllegalArgumentException} if
+ * a narrowing conversion would be necessary. You can query for information
+ * on this Method regardless of location, but invocation access may be limited
+ * by Java language access controls. If you can't do it in the compiler, you
+ * can't normally do it here either.<p>
+ *
+ * <B>Note:</B> This class returns and accepts types as Classes, even
+ * primitive types; there are Class types defined that represent each
+ * different primitive type.  They are <code>java.lang.Boolean.TYPE,
+ * java.lang.Byte.TYPE,</code>, also available as <code>boolean.class,
+ * byte.class</code>, etc.  These are not to be confused with the
+ * classes <code>java.lang.Boolean, java.lang.Byte</code>, etc., which are
+ * real classes.<p>
+ *
+ * Also note that this is not a serializable class.  It is entirely feasible
+ * to make it serializable using the Externalizable interface, but this is
+ * on Sun, not me.
+ *
+ * @author John Keiser
+ * @author Eric Blake <ebb9@email.byu.edu>
+ * @see Member
+ * @see Class
+ * @see java.lang.Class#getMethod(String,Class[])
+ * @see java.lang.Class#getDeclaredMethod(String,Class[])
+ * @see java.lang.Class#getMethods()
+ * @see java.lang.Class#getDeclaredMethods()
+ * @since 1.1
+ * @status updated to 1.4
+ */
+public final class Method
+extends AccessibleObject implements Member, GenericDeclaration
+{
+  Class clazz;
+  String name;
+  int slot;
+  private byte[] annotations          = null;
+  private byte[] parameterAnnotations = null;
+  private byte[] annotationDefault    = null;
+  private transient Map<Class<? extends Annotation>, Annotation> declaredAnnotations = null;
+
+  private static final int METHOD_MODIFIERS
+    = Modifier.ABSTRACT | Modifier.FINAL | Modifier.NATIVE
+      | Modifier.PRIVATE | Modifier.PROTECTED | Modifier.PUBLIC
+      | Modifier.STATIC | Modifier.STRICT | Modifier.SYNCHRONIZED;
+
+  private static final Annotation[] EMPTY_ANNOTATIONS_ARRAY =
+    new Annotation[0];
+
+  /**
+   * This class is uninstantiable.
+   */
+  private Method(Class declaringClass, String name, int slot)
+  {
+    this.clazz = declaringClass;
+    this.name = name;
+    this.slot = slot;
+  }
+
+  /**
+   * Gets the class that declared this method, or the class where this method
+   * is a non-inherited member.
+   * @return the class that declared this member
+   */
+  public Class<?> getDeclaringClass()
+  {
+    return clazz;
+  }
+
+  /**
+   * Gets the name of this method.
+   * @return the name of this method
+   */
+  public String getName()
+  {
+    return name;
+  }
+
+  /**
+   * Return the raw modifiers for this method.
+   * @return the method's modifiers
+   */
+  private native int getModifiersInternal();
+
+  /**
+   * Gets the modifiers this method uses.  Use the <code>Modifier</code>
+   * class to interpret the values.  A method can only have a subset of the
+   * following modifiers: public, private, protected, abstract, static,
+   * final, synchronized, native, and strictfp.
+   *
+   * @return an integer representing the modifiers to this Member
+   * @see Modifier
+   */
+  public int getModifiers()
+  {
+    return getModifiersInternal() & METHOD_MODIFIERS;
+  }
+
+  /**
+   * Return true if this method is a bridge method.  A bridge method
+   * is generated by the compiler in some situations involving
+   * generics and inheritance.
+   * @since 1.5
+   */
+  public boolean isBridge()
+  {
+    return (getModifiersInternal() & Modifier.BRIDGE) != 0;
+  }
+
+  /**
+   * Return true if this method is synthetic, false otherwise.
+   * @since 1.5
+   */
+  public boolean isSynthetic()
+  {
+    return (getModifiersInternal() & Modifier.SYNTHETIC) != 0;
+  }
+
+  /**
+   * Return true if this is a varargs method, that is if
+   * the method takes a variable number of arguments.
+   * @since 1.5
+   */
+  public boolean isVarArgs()
+  {
+    return (getModifiersInternal() & Modifier.VARARGS) != 0;
+  }
+
+  /**
+   * Gets the return type of this method.
+   * @return the type of this method
+   */
+  public native Class<?> getReturnType();
+
+  /**
+   * Get the parameter list for this method, in declaration order. If the
+   * method takes no parameters, returns a 0-length array (not null).
+   *
+   * @return a list of the types of the method's parameters
+   */
+  public native Class<?>[] getParameterTypes();
+
+  /**
+   * Get the exception types this method says it throws, in no particular
+   * order. If the method has no throws clause, returns a 0-length array
+   * (not null).
+   *
+   * @return a list of the types in the method's throws clause
+   */
+  public native Class<?>[] getExceptionTypes();
+
+  /**
+   * Compare two objects to see if they are semantically equivalent.
+   * Two Methods are semantically equivalent if they have the same declaring
+   * class, name, parameter list, and return type.
+   *
+   * @param o the object to compare to
+   * @return <code>true</code> if they are equal; <code>false</code> if not
+   */
+  public boolean equals(Object o)
+  {
+      // Implementation note:
+      // The following is a correct but possibly slow implementation.
+      //
+      // This class has a private field 'slot' that could be used by
+      // the VM implementation to "link" a particular method to a Class.
+      // In that case equals could be simply implemented as:
+      //
+      // if (o instanceof Method)
+      // {
+      //    Method m = (Method)o;
+      //    return m.clazz == this.clazz
+      //           && m.slot == this.slot;
+      // }
+      // return false;
+      //
+      // If a VM uses the Method class as their native/internal representation
+      // then just using the following would be optimal:
+      //
+      // return this == o;
+      //
+    if (!(o instanceof Method))
+      return false;
+    Method that = (Method)o;
+    if (this.getDeclaringClass() != that.getDeclaringClass())
+      return false;
+    if (!this.getName().equals(that.getName()))
+      return false;
+    if (this.getReturnType() != that.getReturnType())
+      return false;
+    if (!Arrays.equals(this.getParameterTypes(), that.getParameterTypes()))
+      return false;
+    return true;
+  }
+
+  /**
+   * Get the hash code for the Method. The Method hash code is the hash code
+   * of its name XOR'd with the hash code of its class name.
+   *
+   * @return the hash code for the object
+   */
+  public int hashCode()
+  {
+    return getDeclaringClass().getName().hashCode() ^ getName().hashCode();
+  }
+
+  /**
+   * Get a String representation of the Method. A Method's String
+   * representation is "&lt;modifiers&gt; &lt;returntype&gt;
+   * &lt;methodname&gt;(&lt;paramtypes&gt;) throws &lt;exceptions&gt;", where
+   * everything after ')' is omitted if there are no exceptions.<br> Example:
+   * <code>public static int run(java.lang.Runnable,int)</code>
+   *
+   * @return the String representation of the Method
+   */
+  public String toString()
+  {
+    // 128 is a reasonable buffer initial size for constructor
+    StringBuilder sb = new StringBuilder(128);
+    Modifier.toString(getModifiers(), sb).append(' ');
+    sb.append(ClassHelper.getUserName(getReturnType())).append(' ');
+    sb.append(getDeclaringClass().getName()).append('.');
+    sb.append(getName()).append('(');
+    Class[] c = getParameterTypes();
+    if (c.length > 0)
+      {
+        sb.append(ClassHelper.getUserName(c[0]));
+        for (int i = 1; i < c.length; i++)
+          sb.append(',').append(ClassHelper.getUserName(c[i]));
+      }
+    sb.append(')');
+    c = getExceptionTypes();
+    if (c.length > 0)
+      {
+        sb.append(" throws ").append(c[0].getName());
+        for (int i = 1; i < c.length; i++)
+          sb.append(',').append(c[i].getName());
+      }
+    return sb.toString();
+  }
+
+  public String toGenericString()
+  {
+    // 128 is a reasonable buffer initial size for constructor
+    StringBuilder sb = new StringBuilder(128);
+    Modifier.toString(getModifiers(), sb).append(' ');
+    Constructor.addTypeParameters(sb, getTypeParameters());
+    sb.append(getGenericReturnType()).append(' ');
+    sb.append(getDeclaringClass().getName()).append('.');
+    sb.append(getName()).append('(');
+    Type[] types = getGenericParameterTypes();
+    if (types.length > 0)
+      {
+        sb.append(types[0]);
+        for (int i = 1; i < types.length; i++)
+          sb.append(',').append(types[i]);
+      }
+    sb.append(')');
+    types = getGenericExceptionTypes();
+    if (types.length > 0)
+      {
+        sb.append(" throws ").append(types[0]);
+        for (int i = 1; i < types.length; i++)
+          sb.append(',').append(types[i]);
+      }
+    return sb.toString();
+  }
+
+  /**
+   * Invoke the method. Arguments are automatically unwrapped and widened,
+   * and the result is automatically wrapped, if needed.<p>
+   *
+   * If the method is static, <code>o</code> will be ignored. Otherwise,
+   * the method uses dynamic lookup as described in JLS 15.12.4.4. You cannot
+   * mimic the behavior of nonvirtual lookup (as in super.foo()). This means
+   * you will get a <code>NullPointerException</code> if <code>o</code> is
+   * null, and an <code>IllegalArgumentException</code> if it is incompatible
+   * with the declaring class of the method. If the method takes 0 arguments,
+   * you may use null or a 0-length array for <code>args</code>.<p>
+   *
+   * Next, if this Method enforces access control, your runtime context is
+   * evaluated, and you may have an <code>IllegalAccessException</code> if
+   * you could not acces this method in similar compiled code. If the method
+   * is static, and its class is uninitialized, you trigger class
+   * initialization, which may end in a
+   * <code>ExceptionInInitializerError</code>.<p>
+   *
+   * Finally, the method is invoked. If it completes normally, the return value
+   * will be null for a void method, a wrapped object for a primitive return
+   * method, or the actual return of an Object method. If it completes
+   * abruptly, the exception is wrapped in an
+   * <code>InvocationTargetException</code>.
+   *
+   * @param o the object to invoke the method on
+   * @param args the arguments to the method
+   * @return the return value of the method, wrapped in the appropriate
+   *         wrapper if it is primitive
+   * @throws IllegalAccessException if the method could not normally be called
+   *         by the Java code (i.e. it is not public)
+   * @throws IllegalArgumentException if the number of arguments is incorrect;
+   *         if the arguments types are wrong even with a widening conversion;
+   *         or if <code>o</code> is not an instance of the class or interface
+   *         declaring this method
+   * @throws InvocationTargetException if the method throws an exception
+   * @throws NullPointerException if <code>o</code> is null and this field
+   *         requires an instance
+   * @throws ExceptionInInitializerError if accessing a static method triggered
+   *         class initialization, which then failed
+   */
+  public Object invoke(Object o, Object... args)
+    throws IllegalAccessException, InvocationTargetException
+  {
+    return invokeNative(o, args, clazz, slot);
+  }
+
+  /*
+   * NATIVE HELPERS
+   */
+
+  private native Object invokeNative(Object o, Object[] args,
+                                     Class declaringClass, int slot)
+    throws IllegalAccessException, InvocationTargetException;
+
+  /**
+   * Returns an array of <code>TypeVariable</code> objects that represents
+   * the type variables declared by this constructor, in declaration order.
+   * An array of size zero is returned if this class has no type
+   * variables.
+   *
+   * @return the type variables associated with this class. 
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public TypeVariable<Method>[] getTypeParameters()
+  {
+    String sig = getSignature();
+    if (sig == null)
+      return new TypeVariable[0];
+    MethodSignatureParser p = new MethodSignatureParser(this, sig);
+    return p.getTypeParameters();
+  }
+
+  /**
+   * Return the String in the Signature attribute for this method. If there
+   * is no Signature attribute, return null.
+   */
+  private native String getSignature();
+
+  /**
+   * Returns an array of <code>Type</code> objects that represents
+   * the exception types declared by this method, in declaration order.
+   * An array of size zero is returned if this method declares no
+   * exceptions.
+   *
+   * @return the exception types declared by this method. 
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public Type[] getGenericExceptionTypes()
+  {
+    String sig = getSignature();
+    if (sig == null)
+      return getExceptionTypes();
+    MethodSignatureParser p = new MethodSignatureParser(this, sig);
+    return p.getGenericExceptionTypes();
+  }
+
+  /**
+   * Returns an array of <code>Type</code> objects that represents
+   * the parameter list for this method, in declaration order.
+   * An array of size zero is returned if this method takes no
+   * parameters.
+   *
+   * @return a list of the types of the method's parameters
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public Type[] getGenericParameterTypes()
+  {
+    String sig = getSignature();
+    if (sig == null)
+      return getParameterTypes();
+    MethodSignatureParser p = new MethodSignatureParser(this, sig);
+    return p.getGenericParameterTypes();
+  }
+
+  /**
+   * Returns the return type of this method.
+   *
+   * @return the return type of this method
+   * @throws GenericSignatureFormatError if the generic signature does
+   *         not conform to the format specified in the Virtual Machine
+   *         specification, version 3.
+   * @since 1.5
+   */
+  public Type getGenericReturnType()
+  {
+    String sig = getSignature();
+    if (sig == null)
+      return getReturnType();
+    MethodSignatureParser p = new MethodSignatureParser(this, sig);
+    return p.getGenericReturnType();
+  }
+
+  /**
+   * If this method is an annotation method, returns the default
+   * value for the method.  If there is no default value, or if the
+   * method is not a member of an annotation type, returns null.
+   * Primitive types are wrapped.
+   *
+   * @throws TypeNotPresentException if the method returns a Class,
+   * and the class cannot be found
+   *
+   * @since 1.5
+   */
+  public native Object getDefaultValue();
+  
+  /**
+   * @throws NullPointerException {@inheritDoc}
+   * @since 1.5
+   */
+  public <T extends Annotation> T getAnnotation(Class<T> annotationClass) {
+    if (annotationClass == null)
+      throw new NullPointerException();
+
+    return (T)declaredAnnotations().get(annotationClass);
+  }
+
+  /**
+   * @since 1.5
+   */
+  public Annotation[] getDeclaredAnnotations() {
+    return declaredAnnotations().values().toArray(EMPTY_ANNOTATIONS_ARRAY);
+  }
+
+  private synchronized native Map<Class<? extends Annotation>, Annotation> declaredAnnotations();
+  
+  /**
+   * Returns an array of arrays that represent the annotations on the formal
+   * parameters, in declaration order, of the method represented by
+   * this <tt>Method</tt> object. (Returns an array of length zero if the
+   * underlying method is parameterless.  If the method has one or more
+   * parameters, a nested array of length zero is returned for each parameter
+   * with no annotations.) The annotation objects contained in the returned
+   * arrays are serializable.  The caller of this method is free to modify
+   * the returned arrays; it will have no effect on the arrays returned to
+   * other callers.
+   *
+   * @return an array of arrays that represent the annotations on the formal
+   *    parameters, in declaration order, of the method represented by this
+   *    Method object
+   * @since 1.5
+   */
+  public native Annotation[][] getParameterAnnotations();
+}
diff --git a/src/lib/gnu/java/security/VMAccessController.java b/src/lib/gnu/java/security/VMAccessController.java
new file mode 100644 (file)
index 0000000..160df10
--- /dev/null
@@ -0,0 +1,281 @@
+/* VMAccessController.java -- VM-specific access controller methods.
+   Copyright (C) 2004, 2005  Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+package java.security;
+
+import java.util.HashSet;
+import java.util.LinkedList;
+
+final class VMAccessController
+{
+
+  // Fields.
+  // -------------------------------------------------------------------------
+
+  /**
+   * This is a per-thread stack of AccessControlContext objects (which can
+   * be null) for each call to AccessController.doPrivileged in each thread's
+   * call stack. We use this to remember which context object corresponds to
+   * which call.
+   */
+  private static final ThreadLocal contexts = new ThreadLocal();
+
+  /**
+   * This is a Boolean that, if set, tells getContext that it has already
+   * been called once, allowing us to handle recursive permission checks
+   * caused by methods getContext calls.
+   */
+  private static final ThreadLocal inGetContext = new ThreadLocal();
+
+  /**
+   * And we return this all-permissive context to ensure that privileged
+   * methods called from getContext succeed.
+   */
+  private static final AccessControlContext DEFAULT_CONTEXT;
+  static
+  {
+    CodeSource source = new CodeSource(null, null);
+    Permissions permissions = new Permissions();
+    permissions.add(new AllPermission());
+    ProtectionDomain[] domain = new ProtectionDomain[] {
+      new ProtectionDomain(source, permissions)
+    };
+    DEFAULT_CONTEXT = new AccessControlContext(domain);
+  }
+
+  private static final boolean DEBUG = gnu.classpath.Configuration.DEBUG;
+  private static void debug(String msg)
+  {
+    System.err.print(">>> VMAccessController: ");
+    System.err.println(msg);
+  }
+
+  // Constructors.
+  // -------------------------------------------------------------------------
+
+  private VMAccessController() { }
+
+  // Class methods.
+  // -------------------------------------------------------------------------
+
+  /**
+   * Relate a class (which should be an instance of {@link PrivilegedAction}
+   * with an access control context. This method is used by {@link
+   * AccessController#doPrivileged(java.security.PrivilegedAction,java.security.AccessControlContext)}
+   * to set up the context that will be returned by {@link #getContext()}.
+   * This method relates the class to the current thread, so contexts
+   * pushed from one thread will not be available to another.
+   *
+   * @param acc The access control context.
+   */
+  static void pushContext (AccessControlContext acc)
+  {
+    if (DEBUG)
+      debug("pushing " + acc);
+    LinkedList stack = (LinkedList) contexts.get();
+    if (stack == null)
+      {
+         if (DEBUG)
+           debug("no stack... creating ");
+        stack = new LinkedList();
+        contexts.set(stack);
+      }
+    stack.addFirst(acc);
+  }
+
+  /**
+   * Removes the relation of a class to an {@link AccessControlContext}.
+   * This method is used by {@link AccessController} when exiting from a
+   * call to {@link
+   * AccessController#doPrivileged(java.security.PrivilegedAction,java.security.AccessControlContext)}.
+   */
+  static void popContext()
+  {
+    if (DEBUG)
+      debug("popping context");
+
+    // Stack should never be null, nor should it be empty, if this method
+    // and its counterpart has been called properly.
+    LinkedList stack = (LinkedList) contexts.get();
+    if (stack != null)
+      {
+        stack.removeFirst();
+        if (stack.isEmpty())
+          contexts.set(null);
+      }
+    else if (DEBUG)
+      {
+        debug("no stack during pop?????");
+      }
+  }
+
+  /**
+   * Examine the method stack of the currently running thread, and create
+   * an {@link AccessControlContext} filled in with the appropriate {@link
+   * ProtectionDomain} objects given this stack.
+   *
+   * @return The context.
+   */
+  static AccessControlContext getContext()
+  {
+    // If we are already in getContext, but called a method that needs
+    // a permission check, return the all-permissive context so methods
+    // called from here succeed.
+    //
+    // XXX is this necessary? We should verify if there are any calls in
+    // the stack below this method that require permission checks.
+    Boolean inCall = (Boolean) inGetContext.get();
+    if (inCall != null && inCall.booleanValue())
+      {
+        if (DEBUG)
+          debug("already in getContext");
+        return DEFAULT_CONTEXT;
+      }
+
+    inGetContext.set(Boolean.TRUE);
+
+    Object[][] stack = getStack();
+    Class[] classes = (Class[]) stack[0];
+    String[] methods = (String[]) stack[1];
+
+    if (DEBUG)
+      debug("got trace of length " + classes.length);
+
+    HashSet domains = new HashSet();
+    HashSet seenDomains = new HashSet();
+    AccessControlContext context = null;
+    int privileged = 0;
+
+    // We walk down the stack, adding each ProtectionDomain for each
+    // class in the call stack. If we reach a call to doPrivileged,
+    // we don't add any more stack frames. We skip the first three stack
+    // frames, since they comprise the calls to getStack, getContext,
+    // and AccessController.getContext.
+    for (int i = 3; i < classes.length && privileged < 2; i++)
+      {
+        Class clazz = classes[i];
+        String method = methods[i];
+
+        if (DEBUG)
+          {
+            debug("checking " + clazz + "." + method);
+            // subject to getClassLoader RuntimePermission
+            debug("loader = " + clazz.getClassLoader());
+          }
+
+        // If the previous frame was a call to doPrivileged, then this is
+        // the last frame we look at.
+        if (privileged == 1)
+          privileged = 2;
+
+        if (clazz.equals (AccessController.class)
+            && method.equals ("doPrivileged"))
+          {
+            // If there was a call to doPrivileged with a supplied context,
+            // return that context. If using JAAS doAs*, it should be 
+           // a context with a SubjectDomainCombiner
+            LinkedList l = (LinkedList) contexts.get();
+            if (l != null)
+              context = (AccessControlContext) l.getFirst();
+            privileged = 1;
+          }
+
+        // subject to getProtectionDomain RuntimePermission
+       ProtectionDomain domain = clazz.getProtectionDomain();
+
+        if (domain == null)
+          continue;
+        if (seenDomains.contains(domain))
+          continue;
+        seenDomains.add(domain);
+
+        // Create a static snapshot of this domain, which may change over time
+        // if the current policy changes.
+        domains.add(new ProtectionDomain(domain.getCodeSource(),
+                                         domain.getPermissions()));
+      }
+
+    if (DEBUG)
+      debug("created domains: " + domains);
+
+    ProtectionDomain[] result = (ProtectionDomain[])
+      domains.toArray(new ProtectionDomain[domains.size()]);
+
+    if (context != null)
+      {
+        DomainCombiner dc = context.getDomainCombiner ();
+        // If the supplied context had no explicit DomainCombiner, use
+        // our private version, which computes the intersection of the
+        // context's domains with the derived set.
+        if (dc == null)
+          context = new AccessControlContext
+            (IntersectingDomainCombiner.SINGLETON.combine
+             (result, context.getProtectionDomains ()));
+        // Use the supplied DomainCombiner. This should be secure,
+        // because only trusted code may create an
+        // AccessControlContext with a custom DomainCombiner.
+        else
+          context = new AccessControlContext (result, context, dc);
+      }
+    // No context was supplied. Return the derived one.
+    else
+      context = new AccessControlContext (result);
+
+    inGetContext.set(Boolean.FALSE);
+    return context;
+  }
+
+  /**
+   * Returns a snapshot of the current call stack as a pair of arrays:
+   * the first an array of classes in the call stack, the second an array
+   * of strings containing the method names in the call stack. The two
+   * arrays match up, meaning that method <i>i</i> is declared in class
+   * <i>i</i>. The arrays are clean; it will only contain Java methods,
+   * and no element of the list should be null.
+   *
+   * <p>The default implementation returns an empty stack, which will be
+   * interpreted as having no permissions whatsoever.
+   *
+   * @return A pair of arrays describing the current call stack. The first
+   *    element is an array of Class objects, and the second is an array
+   *    of Strings comprising the method names.
+   */
+//    private static Object[][] getStack()
+//    {
+//      return new Object[][] { new Class[0], new String[0] };
+//    }
+  private native static Object[][] getStack();
+}
diff --git a/src/lib/gnu/sun/misc/Unsafe.java b/src/lib/gnu/sun/misc/Unsafe.java
new file mode 100644 (file)
index 0000000..2ab3d7d
--- /dev/null
@@ -0,0 +1,985 @@
+/*
+ * Copyright 2000-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.misc;
+
+import java.security.*;
+import java.lang.reflect.*;
+
+
+/**
+ * A collection of methods for performing low-level, unsafe operations.
+ * Although the class and all methods are public, use of this class is
+ * limited because only trusted code can obtain instances of it.
+ *
+ * @author John R. Rose
+ * @version  1.28, 07/06/04
+ * @see #getUnsafe
+ */
+
+public final class Unsafe {
+
+    private static native void registerNatives();
+    static {
+        registerNatives();
+//     sun.reflect.Reflection.registerMethodsToFilter(Unsafe.class, "getUnsafe");
+    }
+
+    private Unsafe() {}
+
+    private static final Unsafe theUnsafe = new Unsafe();
+
+    /**
+     * Provides the caller with the capability of performing unsafe
+     * operations.
+     * 
+     * <p> The returned <code>Unsafe</code> object should be carefully guarded
+     * by the caller, since it can be used to read and write data at arbitrary
+     * memory addresses.  It must never be passed to untrusted code.
+     * 
+     * <p> Most methods in this class are very low-level, and correspond to a
+     * small number of hardware instructions (on typical machines).  Compilers
+     * are encouraged to optimize these methods accordingly.
+     * 
+     * <p> Here is a suggested idiom for using unsafe operations:
+     * 
+     * <blockquote><pre>
+     * class MyTrustedClass {
+     *   private static final Unsafe unsafe = Unsafe.getUnsafe();
+     *   ...
+     *   private long myCountAddress = ...;
+     *   public int getCount() { return unsafe.getByte(myCountAddress); }
+     * }
+     * </pre></blockquote>
+     *
+     * (It may assist compilers to make the local variable be
+     * <code>final</code>.)
+     *
+     * @exception  SecurityException  if a security manager exists and its  
+     *             <code>checkPropertiesAccess</code> method doesn't allow
+     *             access to the system properties.
+     */
+    public static Unsafe getUnsafe() {
+       Class cc = sun.reflect.Reflection.getCallerClass(2);
+       if (cc.getClassLoader() != null)
+           throw new SecurityException("Unsafe");
+       return theUnsafe;
+    }
+
+    /// peek and poke operations
+    /// (compilers should optimize these to memory ops)
+
+    // These work on object fields in the Java heap.
+    // They will not work on elements of packed arrays.
+
+    /**
+     * Fetches a value from a given Java variable.
+     * More specifically, fetches a field or array element within the given
+     * object <code>o</code> at the given offset, or (if <code>o</code> is
+     * null) from the memory address whose numerical value is the given
+     * offset.
+     * <p>
+     * The results are undefined unless one of the following cases is true:
+     * <ul>
+     * <li>The offset was obtained from {@link #objectFieldOffset} on
+     * the {@link java.lang.reflect.Field} of some Java field and the object
+     * referred to by <code>o</code> is of a class compatible with that
+     * field's class.
+     *
+     * <li>The offset and object reference <code>o</code> (either null or
+     * non-null) were both obtained via {@link #staticFieldOffset}
+     * and {@link #staticFieldBase} (respectively) from the
+     * reflective {@link Field} representation of some Java field.
+     *
+     * <li>The object referred to by <code>o</code> is an array, and the offset
+     * is an integer of the form <code>B+N*S</code>, where <code>N</code> is
+     * a valid index into the array, and <code>B</code> and <code>S</code> are
+     * the values obtained by {@link #arrayBaseOffset} and {@link
+     * #arrayIndexScale} (respectively) from the array's class.  The value
+     * referred to is the <code>N</code><em>th</em> element of the array.
+     *
+     * </ul>
+     * <p>
+     * If one of the above cases is true, the call references a specific Java
+     * variable (field or array element).  However, the results are undefined
+     * if that variable is not in fact of the type returned by this method.
+     * <p>
+     * This method refers to a variable by means of two parameters, and so
+     * it provides (in effect) a <em>double-register</em> addressing mode
+     * for Java variables.  When the object reference is null, this method
+     * uses its offset as an absolute address.  This is similar in operation
+     * to methods such as {@link #getInt(long)}, which provide (in effect) a
+     * <em>single-register</em> addressing mode for non-Java variables.
+     * However, because Java variables may have a different layout in memory
+     * from non-Java variables, programmers should not assume that these
+     * two addressing modes are ever equivalent.  Also, programmers should
+     * remember that offsets from the double-register addressing mode cannot
+     * be portably confused with longs used in the single-register addressing
+     * mode.
+     *
+     * @param o Java heap object in which the variable resides, if any, else
+     *        null
+     * @param offset indication of where the variable resides in a Java heap
+     *        object, if any, else a memory address locating the variable
+     *        statically
+     * @return the value fetched from the indicated Java variable
+     * @throws RuntimeException No defined exceptions are thrown, not even
+     *         {@link NullPointerException}
+     */
+    public native int getInt(Object o, long offset);
+
+    /**
+     * Stores a value into a given Java variable.
+     * <p>
+     * The first two parameters are interpreted exactly as with
+     * {@link #getInt(Object, long)} to refer to a specific
+     * Java variable (field or array element).  The given value
+     * is stored into that variable.
+     * <p>
+     * The variable must be of the same type as the method
+     * parameter <code>x</code>.
+     *
+     * @param o Java heap object in which the variable resides, if any, else
+     *        null
+     * @param offset indication of where the variable resides in a Java heap
+     *        object, if any, else a memory address locating the variable
+     *        statically
+     * @param x the value to store into the indicated Java variable
+     * @throws RuntimeException No defined exceptions are thrown, not even
+     *         {@link NullPointerException}
+     */
+    public native void putInt(Object o, long offset, int x);
+
+    /**
+     * Fetches a reference value from a given Java variable.
+     * @see #getInt(Object, long)
+     */
+    public native Object getObject(Object o, long offset);
+
+    /**
+     * Stores a reference value into a given Java variable.
+     * <p>
+     * Unless the reference <code>x</code> being stored is either null
+     * or matches the field type, the results are undefined.
+     * If the reference <code>o</code> is non-null, car marks or
+     * other store barriers for that object (if the VM requires them)
+     * are updated.
+     * @see #putInt(Object, int, int)
+     */
+    public native void putObject(Object o, long offset, Object x);
+
+    /** @see #getInt(Object, long) */
+    public native boolean getBoolean(Object o, long offset);
+    /** @see #putInt(Object, int, int) */
+    public native void    putBoolean(Object o, long offset, boolean x);
+    /** @see #getInt(Object, long) */
+    public native byte    getByte(Object o, long offset);
+    /** @see #putInt(Object, int, int) */
+    public native void    putByte(Object o, long offset, byte x);
+    /** @see #getInt(Object, long) */
+    public native short   getShort(Object o, long offset);
+    /** @see #putInt(Object, int, int) */
+    public native void    putShort(Object o, long offset, short x);
+    /** @see #getInt(Object, long) */
+    public native char    getChar(Object o, long offset);
+    /** @see #putInt(Object, int, int) */
+    public native void    putChar(Object o, long offset, char x);
+    /** @see #getInt(Object, long) */
+    public native long    getLong(Object o, long offset);
+    /** @see #putInt(Object, int, int) */
+    public native void    putLong(Object o, long offset, long x);
+    /** @see #getInt(Object, long) */
+    public native float   getFloat(Object o, long offset);
+    /** @see #putInt(Object, int, int) */
+    public native void    putFloat(Object o, long offset, float x);
+    /** @see #getInt(Object, long) */
+    public native double  getDouble(Object o, long offset);
+    /** @see #putInt(Object, int, int) */
+    public native void    putDouble(Object o, long offset, double x);
+
+    /**
+     * This method, like all others with 32-bit offsets, was native
+     * in a previous release but is now a wrapper which simply casts
+     * the offset to a long value.  It provides backward compatibility
+     * with bytecodes compiled against 1.4.
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public int getInt(Object o, int offset) {
+       return getInt(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putInt(Object o, int offset, int x) {
+       putInt(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public Object getObject(Object o, int offset) {
+       return getObject(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putObject(Object o, int offset, Object x) {
+       putObject(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public boolean getBoolean(Object o, int offset) {
+       return getBoolean(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putBoolean(Object o, int offset, boolean x) {
+       putBoolean(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public byte getByte(Object o, int offset) {
+       return getByte(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putByte(Object o, int offset, byte x) {
+       putByte(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public short getShort(Object o, int offset) {
+       return getShort(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putShort(Object o, int offset, short x) {
+       putShort(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public char getChar(Object o, int offset) {
+       return getChar(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putChar(Object o, int offset, char x) {
+       putChar(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public long getLong(Object o, int offset) {
+       return getLong(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putLong(Object o, int offset, long x) {
+       putLong(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public float getFloat(Object o, int offset) {
+       return getFloat(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putFloat(Object o, int offset, float x) {
+       putFloat(o, (long)offset, x);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public double getDouble(Object o, int offset) {
+       return getDouble(o, (long)offset);
+    }
+
+    /**
+     * @deprecated As of 1.4.1, cast the 32-bit offset argument to a long.
+     * See {@link #staticFieldOffset}.
+     */
+    @Deprecated
+    public void putDouble(Object o, int offset, double x) {
+       putDouble(o, (long)offset, x);
+    }
+
+    // These work on values in the C heap.
+
+    /**
+     * Fetches a value from a given memory address.  If the address is zero, or
+     * does not point into a block obtained from {@link #allocateMemory}, the
+     * results are undefined.
+     * 
+     * @see #allocateMemory
+     */
+    public native byte    getByte(long address);
+
+    /**
+     * Stores a value into a given memory address.  If the address is zero, or
+     * does not point into a block obtained from {@link #allocateMemory}, the
+     * results are undefined.
+     * 
+     * @see #getByte(long)
+     */
+    public native void    putByte(long address, byte x);
+
+    /** @see #getByte(long) */
+    public native short   getShort(long address);
+    /** @see #putByte(long, byte) */
+    public native void    putShort(long address, short x);
+    /** @see #getByte(long) */
+    public native char    getChar(long address);
+    /** @see #putByte(long, byte) */
+    public native void    putChar(long address, char x);
+    /** @see #getByte(long) */
+    public native int     getInt(long address);
+    /** @see #putByte(long, byte) */
+    public native void    putInt(long address, int x);
+    /** @see #getByte(long) */
+    public native long    getLong(long address);
+    /** @see #putByte(long, byte) */
+    public native void    putLong(long address, long x);
+    /** @see #getByte(long) */
+    public native float   getFloat(long address);
+    /** @see #putByte(long, byte) */
+    public native void    putFloat(long address, float x);
+    /** @see #getByte(long) */
+    public native double  getDouble(long address);
+    /** @see #putByte(long, byte) */
+    public native void    putDouble(long address, double x);
+
+    /**
+     * Fetches a native pointer from a given memory address.  If the address is
+     * zero, or does not point into a block obtained from {@link
+     * #allocateMemory}, the results are undefined.
+     *
+     * <p> If the native pointer is less than 64 bits wide, it is extended as
+     * an unsigned number to a Java long.  The pointer may be indexed by any
+     * given byte offset, simply by adding that offset (as a simple integer) to
+     * the long representing the pointer.  The number of bytes actually read
+     * from the target address maybe determined by consulting {@link
+     * #addressSize}.
+     *
+     * @see #allocateMemory
+     */
+    public native long getAddress(long address);
+
+    /**
+     * Stores a native pointer into a given memory address.  If the address is
+     * zero, or does not point into a block obtained from {@link
+     * #allocateMemory}, the results are undefined.
+     *
+     * <p> The number of bytes actually written at the target address maybe
+     * determined by consulting {@link #addressSize}.
+     * 
+     * @see #getAddress(long)
+     */
+    public native void putAddress(long address, long x);
+
+    /// wrappers for malloc, realloc, free:
+
+    /**
+     * Allocates a new block of native memory, of the given size in bytes.  The
+     * contents of the memory are uninitialized; they will generally be
+     * garbage.  The resulting native pointer will never be zero, and will be
+     * aligned for all value types.  Dispose of this memory by calling {@link
+     * #freeMemory}, or resize it with {@link #reallocateMemory}.
+     * 
+     * @throws IllegalArgumentException if the size is negative or too large
+     *         for the native size_t type
+     * 
+     * @throws OutOfMemoryError if the allocation is refused by the system
+     * 
+     * @see #getByte(long)
+     * @see #putByte(long, byte)
+     */
+    public native long allocateMemory(long bytes);
+
+    /**
+     * Resizes a new block of native memory, to the given size in bytes.  The
+     * contents of the new block past the size of the old block are
+     * uninitialized; they will generally be garbage.  The resulting native
+     * pointer will be zero if and only if the requested size is zero.  The
+     * resulting native pointer will be aligned for all value types.  Dispose
+     * of this memory by calling {@link #freeMemory}, or resize it with {@link
+     * #reallocateMemory}.  The address passed to this method may be null, in
+     * which case an allocation will be performed.
+     *
+     * @throws IllegalArgumentException if the size is negative or too large
+     *         for the native size_t type
+     * 
+     * @throws OutOfMemoryError if the allocation is refused by the system
+     * 
+     * @see #allocateMemory
+     */
+    public native long reallocateMemory(long address, long bytes);
+
+    /**
+     * Sets all bytes in a given block of memory to a fixed value
+     * (usually zero).
+     *
+     * <p>This method determines a block's base address by means of two parameters,
+     * and so it provides (in effect) a <em>double-register</em> addressing mode,
+     * as discussed in {@link #getInt(Object,long)}.  When the object reference is null,
+     * the offset supplies an absolute base address.
+     *
+     * <p>The stores are in coherent (atomic) units of a size determined
+     * by the address and length parameters.  If the effective address and
+     * length are all even modulo 8, the stores take place in 'long' units.
+     * If the effective address and length are (resp.) even modulo 4 or 2,
+     * the stores take place in units of 'int' or 'short'.
+     * 
+     * @since 1.7
+     */
+    public native void setMemory(Object o, long offset, long bytes, byte value);
+
+    /**
+     * Sets all bytes in a given block of memory to a fixed value
+     * (usually zero).  This provides a <em>single-register</em> addressing mode,
+     * as discussed in {@link #getInt(Object,long)}.
+     *
+     * <p>Equivalent to <code>setMemory(null, address, bytes, value)</code>.
+     */
+    public void setMemory(long address, long bytes, byte value) {
+        setMemory(null, address, bytes, value);
+    }
+
+    /**
+     * Sets all bytes in a given block of memory to a copy of another
+     * block.
+     *
+     * <p>This method determines each block's base address by means of two parameters,
+     * and so it provides (in effect) a <em>double-register</em> addressing mode,
+     * as discussed in {@link #getInt(Object,long)}.  When the object reference is null,
+     * the offset supplies an absolute base address.
+     *
+     * <p>The transfers are in coherent (atomic) units of a size determined
+     * by the address and length parameters.  If the effective addresses and
+     * length are all even modulo 8, the transfer takes place in 'long' units.
+     * If the effective addresses and length are (resp.) even modulo 4 or 2,
+     * the transfer takes place in units of 'int' or 'short'.
+     * 
+     * @since 1.7
+     */
+    public native void copyMemory(Object srcBase, long srcOffset,
+                                  Object destBase, long destOffset,
+                                 long bytes);
+    /**
+     * Sets all bytes in a given block of memory to a copy of another
+     * block.  This provides a <em>single-register</em> addressing mode,
+     * as discussed in {@link #getInt(Object,long)}.
+     *
+     * Equivalent to <code>copyMemory(null, srcAddress, null, destAddress, bytes)</code>.
+     */
+    public void copyMemory(long srcAddress, long destAddress, long bytes) {
+        copyMemory(null, srcAddress, null, destAddress, bytes);
+    }
+
+    /**
+     * Disposes of a block of native memory, as obtained from {@link
+     * #allocateMemory} or {@link #reallocateMemory}.  The address passed to
+     * this method may be null, in which case no action is taken.
+     *
+     * @see #allocateMemory
+     */
+    public native void freeMemory(long address);
+
+    /// random queries
+
+    /**
+     * This constant differs from all results that will ever be returned from
+     * {@link #staticFieldOffset}, {@link #objectFieldOffset},
+     * or {@link #arrayBaseOffset}.
+     */
+    public static final int INVALID_FIELD_OFFSET   = -1;
+
+    /**
+     * Returns the offset of a field, truncated to 32 bits.
+     * This method is implemented as follows:
+     * <blockquote><pre>
+     * public int fieldOffset(Field f) {
+     *     if (Modifier.isStatic(f.getModifiers()))
+     *         return (int) staticFieldOffset(f);
+     *     else
+     *         return (int) objectFieldOffset(f);
+     * }
+     * </pre></blockquote>
+     * @deprecated As of 1.4.1, use {@link #staticFieldOffset} for static
+     * fields and {@link #objectFieldOffset} for non-static fields.
+     */
+    @Deprecated
+    public int fieldOffset(Field f) {
+        if (Modifier.isStatic(f.getModifiers()))
+           return (int) staticFieldOffset(f);
+       else
+           return (int) objectFieldOffset(f);
+    }
+
+    /**
+     * Returns the base address for accessing some static field
+     * in the given class.  This method is implemented as follows:
+     * <blockquote><pre>
+     * public Object staticFieldBase(Class c) {
+     *     Field[] fields = c.getDeclaredFields();
+     *     for (int i = 0; i < fields.length; i++) {
+     *         if (Modifier.isStatic(fields[i].getModifiers())) {
+     *             return staticFieldBase(fields[i]);
+     *         }
+     *     }
+     *     return null;
+     * }
+     * </pre></blockquote>
+     * @deprecated As of 1.4.1, use {@link #staticFieldBase(Field)}
+     * to obtain the base pertaining to a specific {@link Field}.
+     * This method works only for JVMs which store all statics
+     * for a given class in one place.
+     */
+    @Deprecated
+    public Object staticFieldBase(Class c) {
+       Field[] fields = c.getDeclaredFields();
+       for (int i = 0; i < fields.length; i++) {
+           if (Modifier.isStatic(fields[i].getModifiers())) {
+               return staticFieldBase(fields[i]);
+           }
+       }
+       return null;
+    }
+
+    /**
+     * Report the location of a given field in the storage allocation of its
+     * class.  Do not expect to perform any sort of arithmetic on this offset;
+     * it is just a cookie which is passed to the unsafe heap memory accessors.
+     *
+     * <p>Any given field will always have the same offset and base, and no
+     * two distinct fields of the same class will ever have the same offset
+     * and base.
+     *
+     * <p>As of 1.4.1, offsets for fields are represented as long values,
+     * although the Sun JVM does not use the most significant 32 bits.
+     * However, JVM implementations which store static fields at absolute
+     * addresses can use long offsets and null base pointers to express
+     * the field locations in a form usable by {@link #getInt(Object,long)}.
+     * Therefore, code which will be ported to such JVMs on 64-bit platforms
+     * must preserve all bits of static field offsets.
+     * @see #getInt(Object, long)
+     */
+    public native long staticFieldOffset(Field f);
+
+    /**
+     * Report the location of a given static field, in conjunction with {@link
+     * #staticFieldBase}.
+     * <p>Do not expect to perform any sort of arithmetic on this offset;
+     * it is just a cookie which is passed to the unsafe heap memory accessors.
+     *
+     * <p>Any given field will always have the same offset, and no two distinct
+     * fields of the same class will ever have the same offset.
+     *
+     * <p>As of 1.4.1, offsets for fields are represented as long values,
+     * although the Sun JVM does not use the most significant 32 bits.
+     * It is hard to imagine a JVM technology which needs more than
+     * a few bits to encode an offset within a non-array object,
+     * However, for consistency with other methods in this class,
+     * this method reports its result as a long value.
+     * @see #getInt(Object, long)
+     */
+    public native long objectFieldOffset(Field f);
+
+    /**
+     * Report the location of a given static field, in conjunction with {@link
+     * #staticFieldOffset}.
+     * <p>Fetch the base "Object", if any, with which static fields of the
+     * given class can be accessed via methods like {@link #getInt(Object,
+     * long)}.  This value may be null.  This value may refer to an object
+     * which is a "cookie", not guaranteed to be a real Object, and it should
+     * not be used in any way except as argument to the get and put routines in
+     * this class.
+     */
+    public native Object staticFieldBase(Field f);
+
+    /**
+     * Ensure the given class has been initialized. This is often
+     * needed in conjunction with obtaining the static field base of a
+     * class.
+     */
+    public native void ensureClassInitialized(Class c);
+
+    /**
+     * Report the offset of the first element in the storage allocation of a
+     * given array class.  If {@link #arrayIndexScale} returns a non-zero value
+     * for the same class, you may use that scale factor, together with this
+     * base offset, to form new offsets to access elements of arrays of the
+     * given class.
+     *
+     * @see #getInt(Object, long)
+     * @see #putInt(Object, long, int)
+     */
+    public native int arrayBaseOffset(Class arrayClass);
+
+    /** The value of {@code arrayBaseOffset(boolean[].class)} */
+    public static final int ARRAY_BOOLEAN_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(boolean[].class);
+
+    /** The value of {@code arrayBaseOffset(byte[].class)} */
+    public static final int ARRAY_BYTE_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(byte[].class);
+
+    /** The value of {@code arrayBaseOffset(short[].class)} */
+    public static final int ARRAY_SHORT_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(short[].class);
+
+    /** The value of {@code arrayBaseOffset(char[].class)} */
+    public static final int ARRAY_CHAR_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(char[].class);
+
+    /** The value of {@code arrayBaseOffset(int[].class)} */
+    public static final int ARRAY_INT_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(int[].class);
+
+    /** The value of {@code arrayBaseOffset(long[].class)} */
+    public static final int ARRAY_LONG_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(long[].class);
+
+    /** The value of {@code arrayBaseOffset(float[].class)} */
+    public static final int ARRAY_FLOAT_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(float[].class);
+
+    /** The value of {@code arrayBaseOffset(double[].class)} */
+    public static final int ARRAY_DOUBLE_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(double[].class);
+
+    /** The value of {@code arrayBaseOffset(Object[].class)} */
+    public static final int ARRAY_OBJECT_BASE_OFFSET
+           = theUnsafe.arrayBaseOffset(Object[].class);
+
+    /**
+     * Report the scale factor for addressing elements in the storage
+     * allocation of a given array class.  However, arrays of "narrow" types
+     * will generally not work properly with accessors like {@link
+     * #getByte(Object, int)}, so the scale factor for such classes is reported
+     * as zero.
+     * 
+     * @see #arrayBaseOffset
+     * @see #getInt(Object, long)
+     * @see #putInt(Object, long, int)
+     */
+    public native int arrayIndexScale(Class arrayClass);
+
+    /** The value of {@code arrayIndexScale(boolean[].class)} */
+    public static final int ARRAY_BOOLEAN_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(boolean[].class);
+
+    /** The value of {@code arrayIndexScale(byte[].class)} */
+    public static final int ARRAY_BYTE_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(byte[].class);
+
+    /** The value of {@code arrayIndexScale(short[].class)} */
+    public static final int ARRAY_SHORT_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(short[].class);
+
+    /** The value of {@code arrayIndexScale(char[].class)} */
+    public static final int ARRAY_CHAR_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(char[].class);
+
+    /** The value of {@code arrayIndexScale(int[].class)} */
+    public static final int ARRAY_INT_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(int[].class);
+
+    /** The value of {@code arrayIndexScale(long[].class)} */
+    public static final int ARRAY_LONG_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(long[].class);
+
+    /** The value of {@code arrayIndexScale(float[].class)} */
+    public static final int ARRAY_FLOAT_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(float[].class);
+
+    /** The value of {@code arrayIndexScale(double[].class)} */
+    public static final int ARRAY_DOUBLE_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(double[].class);
+
+    /** The value of {@code arrayIndexScale(Object[].class)} */
+    public static final int ARRAY_OBJECT_INDEX_SCALE
+           = theUnsafe.arrayIndexScale(Object[].class);
+
+    /**
+     * Report the size in bytes of a native pointer, as stored via {@link
+     * #putAddress}.  This value will be either 4 or 8.  Note that the sizes of
+     * other primitive types (as stored in native memory blocks) is determined
+     * fully by their information content.
+     */
+    public native int addressSize();
+
+    /** The value of {@code addressSize()} */
+    public static final int ADDRESS_SIZE = theUnsafe.addressSize();
+
+    /**
+     * Report the size in bytes of a native memory page (whatever that is).
+     * This value will always be a power of two.
+     */
+    public native int pageSize();
+
+
+    /// random trusted operations from JNI:
+
+    /**
+     * Tell the VM to define a class, without security checks.  By default, the
+     * class loader and protection domain come from the caller's class.
+     */
+    public native Class defineClass(String name, byte[] b, int off, int len,
+                                   ClassLoader loader,
+                                   ProtectionDomain protectionDomain);
+
+    public native Class defineClass(String name, byte[] b, int off, int len);
+
+    /** Allocate an instance but do not run any constructor.
+        Initializes the class if it has not yet been. */
+    public native Object allocateInstance(Class cls)
+       throws InstantiationException;
+
+    /** Lock the object.  It must get unlocked via {@link #monitorExit}. */
+    public native void monitorEnter(Object o);
+
+    /**
+     * Unlock the object.  It must have been locked via {@link
+     * #monitorEnter}.
+     */
+    public native void monitorExit(Object o);
+
+    /**
+     * Tries to lock the object.  Returns true or false to indicate
+     * whether the lock succeeded.  If it did, the object must be
+     * unlocked via {@link #monitorExit}.
+     */
+    public native boolean tryMonitorEnter(Object o);
+
+    /** Throw the exception without telling the verifier. */
+    public native void throwException(Throwable ee);
+
+
+    /**
+     * Atomically update Java variable to <tt>x</tt> if it is currently
+     * holding <tt>expected</tt>.
+     * @return <tt>true</tt> if successful
+     */
+    public final native boolean compareAndSwapObject(Object o, long offset,
+                                                     Object expected,
+                                                     Object x);
+  
+    /**
+     * Atomically update Java variable to <tt>x</tt> if it is currently
+     * holding <tt>expected</tt>.
+     * @return <tt>true</tt> if successful
+     */
+    public final native boolean compareAndSwapInt(Object o, long offset,
+                                                  int expected,
+                                                  int x);
+
+    /**
+     * Atomically update Java variable to <tt>x</tt> if it is currently
+     * holding <tt>expected</tt>.
+     * @return <tt>true</tt> if successful
+     */
+    public final native boolean compareAndSwapLong(Object o, long offset,
+                                                   long expected,
+                                                   long x);
+
+    /**
+     * Fetches a reference value from a given Java variable, with volatile 
+     * load semantics. Otherwise identical to {@link #getObject(Object, long)}
+     */
+    public native Object getObjectVolatile(Object o, long offset);
+
+    /**
+     * Stores a reference value into a given Java variable, with 
+     * volatile store semantics. Otherwise identical to {@link #putObject(Object, long, Object)}
+     */
+    public native void    putObjectVolatile(Object o, long offset, Object x);
+
+    /** Volatile version of {@link #getInt(Object, long)}  */
+    public native int     getIntVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putInt(Object, long, int)}  */
+    public native void    putIntVolatile(Object o, long offset, int x);
+
+    /** Volatile version of {@link #getBoolean(Object, long)}  */
+    public native boolean getBooleanVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putBoolean(Object, long, boolean)}  */
+    public native void    putBooleanVolatile(Object o, long offset, boolean x);
+
+    /** Volatile version of {@link #getByte(Object, long)}  */
+    public native byte    getByteVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putByte(Object, long, byte)}  */
+    public native void    putByteVolatile(Object o, long offset, byte x);
+
+    /** Volatile version of {@link #getShort(Object, long)}  */
+    public native short   getShortVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putShort(Object, long, short)}  */
+    public native void    putShortVolatile(Object o, long offset, short x);
+
+    /** Volatile version of {@link #getChar(Object, long)}  */
+    public native char    getCharVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putChar(Object, long, char)}  */
+    public native void    putCharVolatile(Object o, long offset, char x);
+
+    /** Volatile version of {@link #getLong(Object, long)}  */
+    public native long    getLongVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putLong(Object, long, long)}  */
+    public native void    putLongVolatile(Object o, long offset, long x);
+
+    /** Volatile version of {@link #getFloat(Object, long)}  */
+    public native float   getFloatVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putFloat(Object, long, float)}  */
+    public native void    putFloatVolatile(Object o, long offset, float x);
+
+    /** Volatile version of {@link #getDouble(Object, long)}  */
+    public native double  getDoubleVolatile(Object o, long offset);
+
+    /** Volatile version of {@link #putDouble(Object, long, double)}  */
+    public native void    putDoubleVolatile(Object o, long offset, double x);
+
+    /** 
+     * Version of {@link #putObjectVolatile(Object, long, Object)}
+     * that does not guarantee immediate visibility of the store to
+     * other threads. This method is generally only useful if the
+     * underlying field is a Java volatile (or if an array cell, one
+     * that is otherwise only accessed using volatile accesses).
+     */
+    public native void    putOrderedObject(Object o, long offset, Object x);
+
+    /** Ordered/Lazy version of {@link #putIntVolatile(Object, long, int)}  */
+    public native void    putOrderedInt(Object o, long offset, int x);
+
+    /** Ordered/Lazy version of {@link #putLongVolatile(Object, long, long)} */
+    public native void    putOrderedLong(Object o, long offset, long x);
+
+    /**
+     * Unblock the given thread blocked on <tt>park</tt>, or, if it is
+     * not blocked, cause the subsequent call to <tt>park</tt> not to
+     * block.  Note: this operation is "unsafe" solely because the
+     * caller must somehow ensure that the thread has not been
+     * destroyed. Nothing special is usually required to ensure this
+     * when called from Java (in which there will ordinarily be a live
+     * reference to the thread) but this is not nearly-automatically
+     * so when calling from native code.
+     * @param thread the thread to unpark.
+     * 
+     */
+    public native void unpark(Object thread);
+
+    /**
+     * Block current thread, returning when a balancing
+     * <tt>unpark</tt> occurs, or a balancing <tt>unpark</tt> has
+     * already occurred, or the thread is interrupted, or, if not
+     * absolute and time is not zero, the given time nanoseconds have
+     * elapsed, or if absolute, the given deadline in milliseconds
+     * since Epoch has passed, or spuriously (i.e., returning for no
+     * "reason"). Note: This operation is in the Unsafe class only
+     * because <tt>unpark</tt> is, so it would be strange to place it
+     * elsewhere.
+     */
+    public native void park(boolean isAbsolute, long time);
+
+    /**
+     * Gets the load average in the system run queue assigned
+     * to the available processors averaged over various periods of time.
+     * This method retrieves the given <tt>nelem</tt> samples and
+     * assigns to the elements of the given <tt>loadavg</tt> array.
+     * The system imposes a maximum of 3 samples, representing 
+     * averages over the last 1,  5,  and  15 minutes, respectively.
+     * 
+     * @params loadavg an array of double of size nelems
+     * @params nelems the number of samples to be retrieved and
+     *         must be 1 to 3.
+     *
+     * @return the number of samples actually retrieved; or -1
+     *         if the load average is unobtainable.
+     */
+    public native int getLoadAverage(double[] loadavg, int nelems);
+}
diff --git a/src/lib/gnu/sun/reflect/ConstantPool.java b/src/lib/gnu/sun/reflect/ConstantPool.java
new file mode 100644 (file)
index 0000000..b24d28e
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+ * Copyright 2003-2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.reflect;
+
+import java.lang.reflect.*;
+
+/** Provides reflective access to the constant pools of classes.
+    Currently this is needed to provide reflective access to annotations
+    but may be used by other internal subsystems in the future. */
+
+public class ConstantPool {
+  // Number of entries in this constant pool (= maximum valid constant pool index)
+  public int      getSize()                      { return getSize0            (constantPoolOop);        }
+  public Class    getClassAt         (int index) { return getClassAt0         (constantPoolOop, index); }
+  public Class    getClassAtIfLoaded (int index) { return getClassAtIfLoaded0 (constantPoolOop, index); }
+  // Returns either a Method or Constructor.
+  // Static initializers are returned as Method objects.
+  public Member   getMethodAt        (int index) { return getMethodAt0        (constantPoolOop, index); }
+  public Member   getMethodAtIfLoaded(int index) { return getMethodAtIfLoaded0(constantPoolOop, index); }
+  public Field    getFieldAt         (int index) { return getFieldAt0         (constantPoolOop, index); }
+  public Field    getFieldAtIfLoaded (int index) { return getFieldAtIfLoaded0 (constantPoolOop, index); }
+  // Fetches the class name, member (field, method or interface
+  // method) name, and type descriptor as an array of three Strings
+  public String[] getMemberRefInfoAt (int index) { return getMemberRefInfoAt0 (constantPoolOop, index); }
+  public int      getIntAt           (int index) { return getIntAt0           (constantPoolOop, index); }
+  public long     getLongAt          (int index) { return getLongAt0          (constantPoolOop, index); }
+  public float    getFloatAt         (int index) { return getFloatAt0         (constantPoolOop, index); }
+  public double   getDoubleAt        (int index) { return getDoubleAt0        (constantPoolOop, index); }
+  public String   getStringAt        (int index) { return getStringAt0        (constantPoolOop, index); }
+  public String   getUTF8At          (int index) { return getUTF8At0          (constantPoolOop, index); }
+
+  //---------------------------------------------------------------------------
+  // Internals only below this point
+  //
+/* This hides this member from being visible through the reflection API in OpenJDK
+ * TODO: find out how to do this with GNU Classpath (if it's realy neccesary).
+
+  static {
+      Reflection.registerFieldsToFilter(ConstantPool.class, new String[] { "constantPoolOop" });
+  }
+*/
+  // HotSpot-internal constant pool object (set by the VM, name known to the VM)
+  private Object constantPoolOop;
+
+  private native int      getSize0            (Object constantPoolOop);
+  private native Class    getClassAt0         (Object constantPoolOop, int index);
+  private native Class    getClassAtIfLoaded0 (Object constantPoolOop, int index);
+  private native Member   getMethodAt0        (Object constantPoolOop, int index);
+  private native Member   getMethodAtIfLoaded0(Object constantPoolOop, int index);
+  private native Field    getFieldAt0         (Object constantPoolOop, int index);
+  private native Field    getFieldAtIfLoaded0 (Object constantPoolOop, int index);
+  private native String[] getMemberRefInfoAt0 (Object constantPoolOop, int index);
+  private native int      getIntAt0           (Object constantPoolOop, int index);
+  private native long     getLongAt0          (Object constantPoolOop, int index);
+  private native float    getFloatAt0         (Object constantPoolOop, int index);
+  private native double   getDoubleAt0        (Object constantPoolOop, int index);
+  private native String   getStringAt0        (Object constantPoolOop, int index);
+  private native String   getUTF8At0          (Object constantPoolOop, int index);
+}
diff --git a/src/lib/gnu/sun/reflect/annotation/AnnotationParser.java b/src/lib/gnu/sun/reflect/annotation/AnnotationParser.java
new file mode 100644 (file)
index 0000000..fe361fb
--- /dev/null
@@ -0,0 +1,861 @@
+/*
+ * Copyright 2003-2005 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.reflect.annotation;
+
+import java.lang.annotation.*;
+import java.util.*;
+import java.nio.ByteBuffer;
+import java.nio.BufferUnderflowException;
+import java.lang.reflect.*;
+import sun.reflect.ConstantPool;
+
+import gnu.java.lang.reflect.FieldSignatureParser;
+
+
+/**
+ * Parser for Java programming language annotations.  Translates
+ * annotation byte streams emitted by compiler into annotation objects.
+ *
+ * @author  Josh Bloch
+ * @since   1.5
+ */
+public class AnnotationParser {
+    /**
+     * Parses the annotations described by the passed byte array.
+     * But return Annotation[] so I don't have to do this in C.
+     *
+     * @author Mathias Panzenböck
+     * 
+     * @throws AnnotationFormatError if an annotation is found to be
+     *         malformed.
+     */
+    public static Annotation[] parseAnnotationsIntoArray(
+                byte[] rawAnnotations,
+                ConstantPool constPool,
+                Class container) {
+        Map<Class, Annotation> annotations = parseAnnotations(rawAnnotations, constPool, container);
+        return annotations.values().toArray(EMPTY_ANNOTATIONS_ARRAY);
+    }
+
+    /**
+     * Parses parameter annotations.
+     * 
+     * @author Mathias Panzenböck
+     * 
+     * @throws AnnotationFormatError if an annotation is found to be
+     *         malformed.
+     */
+    public static Annotation[][] parseParameterAnnotations(
+                    byte[] parameterAnnotations,
+                    ConstantPool constPool,
+                    Class container,
+                    int numParameters) {
+        if (parameterAnnotations == null)
+            return new Annotation[numParameters][0];
+
+        Annotation[][] result = parseParameterAnnotations(
+            parameterAnnotations, constPool, container); 
+
+        if (result.length != numParameters)
+            throw new AnnotationFormatError(
+                "Parameter annotations don't match number of parameters (count was " +
+               result.length + " but should be " + numParameters + ").");
+        return result;
+    }
+
+    /**
+     * Parses the annotation default value of the supplied method.
+     * This method is basically copied from OpenJDKs
+     * java.lang.reflect.Method.getAnnotationDefault()
+     * 
+     * @author Mathias Panzenböck
+     *
+     * @throws AnnotationFormatError if an annotation is found to be
+     *         malformed.
+     */
+    public static Object parseAnnotationDefault(Method method,
+                                                byte[] annotationDefault,
+                                                ConstantPool constPool) {
+        if  (annotationDefault == null)
+            return null;
+        
+       Class memberType = AnnotationType.invocationHandlerReturnType(
+            method.getReturnType());
+        
+       Object result = AnnotationParser.parseMemberValue(
+            memberType, ByteBuffer.wrap(annotationDefault),
+            constPool, method.getDeclaringClass());
+
+        if (result instanceof sun.reflect.annotation.ExceptionProxy)
+            throw new AnnotationFormatError("Invalid default: " + method);
+        
+       return result;
+    }
+
+    /**
+     * Parses the annotations described by the specified byte array.
+     * resolving constant references in the specified constant pool.
+     * The array must contain an array of annotations as described
+     * in the RuntimeVisibleAnnotations_attribute:
+     *
+     *   u2 num_annotations;
+     *   annotation annotations[num_annotations];
+     *
+     * @throws AnnotationFormatError if an annotation is found to be
+     *         malformed.
+     */
+    public static Map<Class, Annotation> parseAnnotations(
+                byte[] rawAnnotations,
+                ConstantPool constPool,
+                Class container) {
+        if (rawAnnotations == null)
+            return Collections.emptyMap();
+
+        try {
+            return parseAnnotations2(rawAnnotations, constPool, container);
+        } catch(BufferUnderflowException e) {
+            throw new AnnotationFormatError("Unexpected end of annotations.");
+        } catch(IllegalArgumentException e) {
+            // Type mismatch in constant pool
+            throw new AnnotationFormatError(e);
+        }
+    }
+
+    private static Map<Class, Annotation> parseAnnotations2(
+                byte[] rawAnnotations,
+                ConstantPool constPool,
+                Class container) {
+        Map<Class, Annotation> result = new LinkedHashMap<Class, Annotation>();
+        ByteBuffer buf = ByteBuffer.wrap(rawAnnotations);
+        int numAnnotations = buf.getShort() & 0xFFFF;
+        for (int i = 0; i < numAnnotations; i++) {
+           Annotation a = parseAnnotation(buf, constPool, container, false);
+            if (a != null) {
+                Class klass = a.annotationType();
+                AnnotationType type = AnnotationType.getInstance(klass);
+                if (type.retention() == RetentionPolicy.RUNTIME)
+                    if (result.put(klass, a) != null)
+                        throw new AnnotationFormatError(
+                            "Duplicate annotation for class: "+klass+": " + a);
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Parses the parameter annotations described by the specified byte array.
+     * resolving constant references in the specified constant pool.
+     * The array must contain an array of annotations as described
+     * in the RuntimeVisibleParameterAnnotations_attribute:
+     *
+     *    u1 num_parameters;
+     *    {
+     *        u2 num_annotations;
+     *        annotation annotations[num_annotations];
+     *    } parameter_annotations[num_parameters];
+     *
+     * Unlike parseAnnotations, rawAnnotations must not be null!
+     * A null value must be handled by the caller.  This is so because
+     * we cannot determine the number of parameters if rawAnnotations
+     * is null.  Also, the caller should check that the number
+     * of parameters indicated by the return value of this method
+     * matches the actual number of method parameters.  A mismatch
+     * indicates that an AnnotationFormatError should be thrown.
+     *
+     * @throws AnnotationFormatError if an annotation is found to be
+     *         malformed.
+     */
+    public static Annotation[][] parseParameterAnnotations(
+                    byte[] rawAnnotations,
+                    ConstantPool constPool,
+                    Class container) {
+        try {
+            return parseParameterAnnotations2(rawAnnotations, constPool, container);
+        } catch(BufferUnderflowException e) {
+            throw new AnnotationFormatError(
+                "Unexpected end of parameter annotations.");
+        } catch(IllegalArgumentException e) {
+            // Type mismatch in constant pool
+            throw new AnnotationFormatError(e);
+        }
+    }
+
+    private static Annotation[][] parseParameterAnnotations2(
+                    byte[] rawAnnotations,
+                    ConstantPool constPool,
+                    Class container) {
+        ByteBuffer buf = ByteBuffer.wrap(rawAnnotations);
+        int numParameters = buf.get() & 0xFF;
+        Annotation[][] result = new Annotation[numParameters][];
+
+        for (int i = 0; i < numParameters; i++) {
+            int numAnnotations = buf.getShort() & 0xFFFF;
+            List<Annotation> annotations =
+                new ArrayList<Annotation>(numAnnotations);
+            for (int j = 0; j < numAnnotations; j++) {
+                Annotation a = parseAnnotation(buf, constPool, container, false);
+                if (a != null) {
+                    AnnotationType type = AnnotationType.getInstance(
+                                              a.annotationType());
+                    if (type.retention() == RetentionPolicy.RUNTIME)
+                        annotations.add(a);
+                }
+            }
+            result[i] = annotations.toArray(EMPTY_ANNOTATIONS_ARRAY);
+        }
+        return result;
+    }
+
+    private static final Annotation[] EMPTY_ANNOTATIONS_ARRAY =
+                    new Annotation[0];
+
+    /**
+     * Parses the annotation at the current position in the specified
+     * byte buffer, resolving constant references in the specified constant
+     * pool.  The cursor of the byte buffer must point to an "annotation
+     * structure" as described in the RuntimeVisibleAnnotations_attribute:
+     *
+     * annotation {
+     *    u2    type_index;
+     *       u2    num_member_value_pairs;
+     *       {    u2    member_name_index;
+     *             member_value value;
+     *       }    member_value_pairs[num_member_value_pairs];
+     *    }
+     * }
+     *
+     * Returns the annotation, or null if the annotation's type cannot
+     * be found by the VM, or is not a valid annotation type.
+     *
+     * @param exceptionOnMissingAnnotationClass if true, throw
+     * TypeNotPresentException if a referenced annotation type is not
+     * available at runtime
+     */
+    private static Annotation parseAnnotation(ByteBuffer buf,
+                                              ConstantPool constPool,
+                                              Class container,
+                                             boolean exceptionOnMissingAnnotationClass) {
+        int typeIndex = buf.getShort() & 0xFFFF;
+        Class annotationClass = null;
+       String sig = "[unknown]";
+        try {
+            try {
+                sig = constPool.getUTF8At(typeIndex);
+                annotationClass = parseSig(sig, container);
+            } catch (IllegalArgumentException ex) {
+                // support obsolete early jsr175 format class files
+                annotationClass = constPool.getClassAt(typeIndex);
+            }
+        } catch (NoClassDefFoundError e) {
+           if (exceptionOnMissingAnnotationClass)
+               // note: at this point sig is "[unknown]" or VM-style
+               // name instead of a binary name
+               throw new TypeNotPresentException(sig, e);
+            skipAnnotation(buf, false);
+            return null;
+        }
+       catch (TypeNotPresentException e) {
+           if (exceptionOnMissingAnnotationClass)
+               throw e;
+            skipAnnotation(buf, false);
+            return null;
+        }
+        AnnotationType type = null;
+        try {
+            type = AnnotationType.getInstance(annotationClass);
+        } catch (IllegalArgumentException e) {
+            skipAnnotation(buf, false);
+            return null;
+        }
+
+        Map<String, Class> memberTypes = type.memberTypes();
+        Map<String, Object> memberValues =
+            new LinkedHashMap<String, Object>(type.memberDefaults());
+
+        int numMembers = buf.getShort() & 0xFFFF;
+        for (int i = 0; i < numMembers; i++) {
+            int memberNameIndex = buf.getShort() & 0xFFFF;
+            String memberName = constPool.getUTF8At(memberNameIndex);
+            Class memberType = memberTypes.get(memberName);
+
+            if (memberType == null) {
+                // Member is no longer present in annotation type; ignore it
+                skipMemberValue(buf);
+            } else {
+                Object value = parseMemberValue(memberType, buf, constPool, container);
+                if (value instanceof AnnotationTypeMismatchExceptionProxy)
+                    ((AnnotationTypeMismatchExceptionProxy) value).
+                        setMember(type.members().get(memberName));
+                memberValues.put(memberName, value);
+            }
+        }
+        return annotationForMap(annotationClass, memberValues);
+    }
+
+    /**
+     * Returns an annotation of the given type backed by the given
+     * member -> value map.
+     */
+    public static Annotation annotationForMap(
+        Class type, Map<String, Object> memberValues)
+    {
+        return (Annotation) Proxy.newProxyInstance(
+            type.getClassLoader(), new Class[] { type },
+            new AnnotationInvocationHandler(type, memberValues));
+    }
+
+    /**
+     * Parses the annotation member value at the current position in the
+     * specified byte buffer, resolving constant references in the specified
+     * constant pool.  The cursor of the byte buffer must point to a
+     * "member_value structure" as described in the
+     * RuntimeVisibleAnnotations_attribute:
+     *
+     *  member_value {
+     *    u1 tag;
+     *    union {
+     *       u2   const_value_index;
+     *       {
+     *           u2   type_name_index;
+     *           u2   const_name_index;
+     *       } enum_const_value;
+     *       u2   class_info_index;
+     *       annotation annotation_value; 
+     *       {
+     *           u2    num_values;
+     *           member_value values[num_values];
+     *       } array_value;
+     *    } value;
+     * }
+     *
+     * The member must be of the indicated type. If it is not, this
+     * method returns an AnnotationTypeMismatchExceptionProxy.
+     */
+    public static Object parseMemberValue(Class memberType, ByteBuffer buf,
+                                          ConstantPool constPool,
+                                          Class container) {
+        Object result = null;
+        int tag = buf.get();
+        switch(tag) {
+          case 'e':
+              return parseEnumValue(memberType, buf, constPool, container);
+          case 'c':
+              result = parseClassValue(buf, constPool, container);
+              break;
+          case '@':
+              result = parseAnnotation(buf, constPool, container, true);
+              break;
+          case '[':
+              return parseArray(memberType, buf, constPool, container);
+          default:
+              result = parseConst(tag, buf, constPool);
+        }
+
+        if (!(result instanceof ExceptionProxy) &&
+            !memberType.isInstance(result))
+            result = new AnnotationTypeMismatchExceptionProxy(
+                result.getClass() + "[" + result + "]");
+        return result;
+    }
+
+    /**
+     * Parses the primitive or String annotation member value indicated by 
+     * the specified tag byte at the current position in the specified byte
+     * buffer, resolving constant reference in the specified constant pool.
+     * The cursor of the byte buffer must point to an annotation member value
+     * of the type indicated by the specified tag, as described in the
+     * RuntimeVisibleAnnotations_attribute:
+     *
+     *       u2   const_value_index;
+     */
+    private static Object parseConst(int tag,
+                                     ByteBuffer buf, ConstantPool constPool) {
+        int constIndex = buf.getShort() & 0xFFFF;
+        switch(tag) {
+          case 'B':
+            return Byte.valueOf((byte) constPool.getIntAt(constIndex));
+          case 'C':
+            return Character.valueOf((char) constPool.getIntAt(constIndex));
+          case 'D':
+            return Double.valueOf(constPool.getDoubleAt(constIndex));
+          case 'F':
+            return Float.valueOf(constPool.getFloatAt(constIndex));
+          case 'I':
+            return Integer.valueOf(constPool.getIntAt(constIndex));
+          case 'J':
+            return Long.valueOf(constPool.getLongAt(constIndex));
+          case 'S':
+            return Short.valueOf((short) constPool.getIntAt(constIndex));
+          case 'Z':
+            return Boolean.valueOf(constPool.getIntAt(constIndex) != 0);
+          case 's':
+            return constPool.getUTF8At(constIndex);
+          default:
+            throw new AnnotationFormatError(
+                "Invalid member-value tag in annotation: " + tag);
+        }
+    }
+
+    /**
+     * Parses the Class member value at the current position in the
+     * specified byte buffer, resolving constant references in the specified
+     * constant pool.  The cursor of the byte buffer must point to a "class
+     * info index" as described in the RuntimeVisibleAnnotations_attribute:
+     *
+     *       u2   class_info_index;
+     */
+    private static Object parseClassValue(ByteBuffer buf,
+                                          ConstantPool constPool,
+                                          Class container) {
+        int classIndex = buf.getShort() & 0xFFFF;
+        try {
+            try {
+                String sig = constPool.getUTF8At(classIndex);
+                return parseSig(sig, container);
+            } catch (IllegalArgumentException ex) {
+                // support obsolete early jsr175 format class files
+                return constPool.getClassAt(classIndex);
+            }
+        } catch (NoClassDefFoundError e) {
+            return new TypeNotPresentExceptionProxy("[unknown]", e);
+        }
+        catch (TypeNotPresentException e) {
+            return new TypeNotPresentExceptionProxy(e.typeName(), e.getCause());
+        }
+    }
+
+    /**
+     * Parses a return type signature and returns the according Class object.
+     */
+    private static Class<?> parseSig(String sig, Class container) {
+        if (sig.equals("V")) {
+            return void.class;
+        }
+        else {
+            return toClass(new FieldSignatureParser(container, sig).getFieldType());
+        }
+    }
+
+    static Class<?> toClass(Type o) {
+        if (o instanceof GenericArrayType)
+            return Array.newInstance(toClass(((GenericArrayType)o).getGenericComponentType()),
+                                     0)
+                .getClass();
+        return (Class<?>)o;
+    }
+
+    /**
+     * Parses the enum constant member value at the current position in the
+     * specified byte buffer, resolving constant references in the specified
+     * constant pool.  The cursor of the byte buffer must point to a
+     * "enum_const_value structure" as described in the
+     * RuntimeVisibleAnnotations_attribute:
+     *
+     *       {
+     *           u2   type_name_index;
+     *           u2   const_name_index;
+     *       } enum_const_value;
+     */
+    private static Object parseEnumValue(Class enumType, ByteBuffer buf,
+                                         ConstantPool constPool,
+                                         Class container) {
+        int typeNameIndex = buf.getShort() & 0xFFFF;
+        String typeName  = constPool.getUTF8At(typeNameIndex);
+        int constNameIndex = buf.getShort() & 0xFFFF;
+        String constName = constPool.getUTF8At(constNameIndex);
+
+        if (!typeName.endsWith(";")) {
+            // support now-obsolete early jsr175-format class files.
+            if (!enumType.getName().equals(typeName))
+            return new AnnotationTypeMismatchExceptionProxy(
+                typeName + "." + constName);
+        } else if (enumType != parseSig(typeName, container)) {
+            return new AnnotationTypeMismatchExceptionProxy(
+                typeName + "." + constName);
+        }
+
+        try {
+            return  Enum.valueOf(enumType, constName);
+        } catch(IllegalArgumentException e) {
+            return new EnumConstantNotPresentExceptionProxy(
+                (Class<? extends Enum>)enumType, constName);
+        }
+    }
+
+    /**
+     * Parses the array value at the current position in the specified byte
+     * buffer, resolving constant references in the specified constant pool.
+     * The cursor of the byte buffer must point to an array value struct
+     * as specified in the RuntimeVisibleAnnotations_attribute:
+     *
+     *       {
+     *           u2    num_values;
+     *           member_value values[num_values];
+     *       } array_value;
+     *
+     * If the array values do not match arrayType, an
+     * AnnotationTypeMismatchExceptionProxy will be returned.
+     */
+    private static Object parseArray(Class arrayType,
+                                     ByteBuffer buf,
+                                     ConstantPool constPool,
+                                     Class container) {
+        int length = buf.getShort() & 0xFFFF;  // Number of array components
+        Class componentType = arrayType.getComponentType();
+
+        if (componentType == byte.class) {
+            return parseByteArray(length, buf, constPool); 
+        } else if (componentType == char.class) {
+            return parseCharArray(length, buf, constPool);
+        } else if (componentType == double.class) {
+            return parseDoubleArray(length, buf, constPool);
+        } else if (componentType == float.class) {
+            return parseFloatArray(length, buf, constPool);
+        } else if (componentType == int.class) {
+            return parseIntArray(length, buf, constPool);
+        } else if (componentType == long.class) {
+            return parseLongArray(length, buf, constPool);
+        } else if (componentType == short.class) {
+            return parseShortArray(length, buf, constPool);
+        } else if (componentType == boolean.class) {
+            return parseBooleanArray(length, buf, constPool);
+        } else if (componentType == String.class) {
+            return parseStringArray(length, buf, constPool);
+        } else if (componentType == Class.class) {
+            return parseClassArray(length, buf, constPool, container);
+        } else if (componentType.isEnum()) {
+            return parseEnumArray(length, componentType, buf,
+                                  constPool, container);
+        } else {
+            assert componentType.isAnnotation();
+            return parseAnnotationArray(length, componentType, buf,
+                                        constPool, container);
+        }
+    }
+
+    private static Object parseByteArray(int length,
+                                  ByteBuffer buf, ConstantPool constPool) {
+        byte[] result = new byte[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'B') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = (byte) constPool.getIntAt(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseCharArray(int length,
+                                  ByteBuffer buf, ConstantPool constPool) {
+        char[] result = new char[length];
+        boolean typeMismatch = false;
+        byte tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'C') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = (char) constPool.getIntAt(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseDoubleArray(int length,
+                                    ByteBuffer buf, ConstantPool constPool) {
+        double[] result = new  double[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'D') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = constPool.getDoubleAt(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseFloatArray(int length,
+                                   ByteBuffer buf, ConstantPool constPool) {
+        float[] result = new float[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'F') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = constPool.getFloatAt(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseIntArray(int length,
+                                 ByteBuffer buf, ConstantPool constPool) {
+        int[] result = new  int[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'I') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = constPool.getIntAt(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+    
+    private static Object parseLongArray(int length,
+                                  ByteBuffer buf, ConstantPool constPool) {
+        long[] result = new long[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'J') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = constPool.getLongAt(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseShortArray(int length,
+                                   ByteBuffer buf, ConstantPool constPool) {
+        short[] result = new short[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'S') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = (short) constPool.getIntAt(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseBooleanArray(int length,
+                                     ByteBuffer buf, ConstantPool constPool) {
+        boolean[] result = new boolean[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'Z') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = (constPool.getIntAt(index) != 0);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseStringArray(int length,
+                                    ByteBuffer buf,  ConstantPool constPool) {
+        String[] result = new String[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 's') {
+                int index = buf.getShort() & 0xFFFF;
+                result[i] = constPool.getUTF8At(index);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseClassArray(int length,
+                                          ByteBuffer buf,
+                                          ConstantPool constPool,
+                                          Class container) {
+        Object[] result = new Class[length];
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'c') {
+                result[i] = parseClassValue(buf, constPool, container);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseEnumArray(int length, Class enumType,
+                                         ByteBuffer buf,
+                                         ConstantPool constPool,
+                                         Class container) {
+        Object[] result = (Object[]) Array.newInstance(enumType, length);
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == 'e') {
+                result[i] = parseEnumValue(enumType, buf, constPool, container);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    private static Object parseAnnotationArray(int length,
+                                               Class annotationType,
+                                               ByteBuffer buf,
+                                               ConstantPool constPool,
+                                               Class container) {
+        Object[] result = (Object[]) Array.newInstance(annotationType, length);
+        boolean typeMismatch = false;
+        int tag = 0;
+
+        for (int i = 0; i < length; i++) {
+            tag = buf.get();
+            if (tag == '@') {
+                result[i] = parseAnnotation(buf, constPool, container, true);
+            } else {
+                skipMemberValue(tag, buf);
+                typeMismatch = true;
+            }
+        }
+        return typeMismatch ? exceptionProxy(tag) : result;
+    }
+
+    /**
+     * Return an appropriate exception proxy for a mismatching array
+     * annotation where the erroneous array has the specified tag.
+     */
+    private static ExceptionProxy exceptionProxy(int tag) {
+        return new AnnotationTypeMismatchExceptionProxy(
+            "Array with component tag: " + tag);
+    }
+
+    /**
+     * Skips the annotation at the current position in the specified
+     * byte buffer.  The cursor of the byte buffer must point to 
+     * an "annotation structure" OR two bytes into an annotation
+     * structure (i.e., after the type index).
+     * 
+     * @parameter complete true if the byte buffer points to the beginning
+     *     of an annotation structure (rather than two bytes in).
+     */
+    private static void skipAnnotation(ByteBuffer buf, boolean complete) {
+        if (complete)
+            buf.getShort();   // Skip type index
+        int numMembers = buf.getShort() & 0xFFFF;
+        for (int i = 0; i < numMembers; i++) {
+            buf.getShort();   // Skip memberNameIndex
+            skipMemberValue(buf);
+        }
+    }
+
+    /**
+     * Skips the annotation member value at the current position in the
+     * specified byte buffer.  The cursor of the byte buffer must point to a
+     * "member_value structure."
+     */
+    private static void skipMemberValue(ByteBuffer buf) {
+        int tag = buf.get();
+        skipMemberValue(tag, buf);
+    }
+
+    /**
+     * Skips the annotation member value at the current position in the
+     * specified byte buffer.  The cursor of the byte buffer must point
+     * immediately after the tag in a "member_value structure."
+     */
+    private static void skipMemberValue(int tag, ByteBuffer buf) {
+        switch(tag) {
+          case 'e': // Enum value
+            buf.getInt();  // (Two shorts, actually.)
+            break;
+          case '@':
+            skipAnnotation(buf, true);
+            break;
+          case '[':
+            skipArray(buf);
+            break;
+          default:
+            // Class, primitive, or String
+            buf.getShort();
+        }
+    }
+
+    /**
+     * Skips the array value at the current position in the specified byte
+     * buffer.  The cursor of the byte buffer must point to an array value
+     * struct.
+     */
+    private static void skipArray(ByteBuffer buf) {
+        int length = buf.getShort() & 0xFFFF;
+        for (int i = 0; i < length; i++)
+            skipMemberValue(buf);
+    }
+}
diff --git a/src/lib/gnu/sun/reflect/annotation/AnnotationType.java b/src/lib/gnu/sun/reflect/annotation/AnnotationType.java
new file mode 100644 (file)
index 0000000..2ef7149
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * Copyright 2003-2006 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.reflect.annotation;
+
+import java.lang.annotation.*;
+import java.lang.reflect.*;
+import java.util.*;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+
+/**
+ * Represents an annotation type at run time.  Used to type-check annotations
+ * and apply member defaults.
+ *
+ * @author  Josh Bloch
+ * @since   1.5
+ */
+public class AnnotationType {
+    /**
+     * Annotation class -> AnnotationType mapping. This emulates
+     * sun.misc.SharedSecrets.getJavaLangAccess().getAnnotationType() and
+     * sun.misc.SharedSecrets.getJavaLangAccess().setAnnotationType() so
+     * this class can be used with gnu classpath.
+     *
+     * @author Mathias Panzenböck
+     */
+    private static Map<Class, AnnotationType> annotationTypes =
+        new HashMap<Class, AnnotationType>();
+
+    /**
+     * Member name -> type mapping. Note that primitive types
+     * are represented by the class objects for the corresponding wrapper
+     * types.  This matches the return value that must be used for a
+     * dynamic proxy, allowing for a simple isInstance test.
+     */
+    private final Map<String, Class> memberTypes = new HashMap<String,Class>();
+
+    /**
+     * Member name -> default value mapping.
+     */
+    private final Map<String, Object> memberDefaults =
+        new HashMap<String, Object>();
+
+    /**
+     * Member name -> Method object mapping. This (and its assoicated
+     * accessor) are used only to generate AnnotationTypeMismatchExceptions.
+     */
+    private final Map<String, Method> members = new HashMap<String, Method>();
+
+    /**
+     * The retention policy for this annotation type.
+     */
+    private RetentionPolicy retention = RetentionPolicy.RUNTIME;;
+
+    /**
+     * Whether this annotation type is inherited.
+     */
+    private boolean inherited = false;
+
+    /**
+     * Returns an AnnotationType instance for the specified annotation type.
+     *
+     * @throw IllegalArgumentException if the specified class object for
+     *     does not represent a valid annotation type
+     */
+    public static synchronized AnnotationType getInstance(
+        Class annotationClass)
+    {
+        /*
+       AnnotationType result = sun.misc.SharedSecrets.getJavaLangAccess(). 
+            getAnnotationType(annotationClass); 
+        */
+       AnnotationType result = annotationTypes.get(annotationClass); 
+       if (result == null)
+            result = new AnnotationType((Class<?>) annotationClass);
+
+        return result;
+    }
+
+    /**
+     * Sole constructor.
+     *
+     * @param annotationClass the class object for the annotation type
+     * @throw IllegalArgumentException if the specified class object for
+     *     does not represent a valid annotation type
+     */
+    private AnnotationType(final Class<?> annotationClass) {
+        if (!annotationClass.isAnnotation())
+            throw new IllegalArgumentException("Not an annotation type");
+
+       Method[] methods =      
+           AccessController.doPrivileged(new PrivilegedAction<Method[]>() {
+               public Method[] run() {
+                   // Initialize memberTypes and defaultValues
+                   return annotationClass.getDeclaredMethods();
+               }
+           });
+
+
+       for (Method method :  methods) {
+           if (method.getParameterTypes().length != 0)
+               throw new IllegalArgumentException(method + " has params");
+           String name = method.getName();
+           Class type = method.getReturnType();
+           memberTypes.put(name, invocationHandlerReturnType(type));
+           members.put(name, method);
+                   
+           Object defaultValue = method.getDefaultValue();
+           if (defaultValue != null)
+               memberDefaults.put(name, defaultValue);
+
+           members.put(name, method);
+       }
+
+       /*
+        sun.misc.SharedSecrets.getJavaLangAccess(). 
+            setAnnotationType(annotationClass, this); 
+        */
+        
+       annotationTypes.put(annotationClass, this);
+
+        // Initialize retention, & inherited fields.  Special treatment
+        // of the corresponding annotation types breaks infinite recursion.
+        if (annotationClass != Retention.class &&
+            annotationClass != Inherited.class) {
+            Retention ret = annotationClass.getAnnotation(Retention.class);
+            retention = (ret == null ? RetentionPolicy.CLASS : ret.value());
+            inherited = annotationClass.isAnnotationPresent(Inherited.class);
+        }
+    }
+
+    /**
+     * Returns the type that must be returned by the invocation handler
+     * of a dynamic proxy in order to have the dynamic proxy return
+     * the specified type (which is assumed to be a legal member type
+     * for an annotation).
+     */
+    public static Class invocationHandlerReturnType(Class type) {
+        // Translate primitives to wrappers
+        if (type == byte.class)
+            return Byte.class;
+        if (type == char.class)
+            return Character.class;
+        if (type == double.class)
+            return Double.class;
+        if (type == float.class)
+            return Float.class;
+        if (type == int.class)
+            return Integer.class;
+        if (type == long.class)
+            return Long.class;
+        if (type == short.class)
+            return Short.class;
+        if (type == boolean.class)
+            return Boolean.class;
+
+        // Otherwise, just return declared type
+        return type;
+    }
+
+    /**
+     * Returns member types for this annotation type
+     * (member name -> type mapping).
+     */
+    public Map<String, Class> memberTypes() {
+        return memberTypes;
+    }
+
+    /**
+     * Returns members of this annotation type
+     * (member name -> associated Method object mapping).
+     */
+    public Map<String, Method> members() {
+        return members;
+    }
+
+    /**
+     * Returns the default values for this annotation type
+     * (Member name -> default value mapping).
+     */
+    public Map<String, Object> memberDefaults() {
+        return memberDefaults;
+    }
+
+    /**
+     * Returns the retention policy for this annotation type.
+     */
+    public RetentionPolicy retention() {
+        return retention;
+    }
+
+    /**
+     * Returns true if this this annotation type is inherited.
+     */
+    public boolean isInherited() {
+        return inherited;
+    }
+
+    /**
+     * For debugging.
+     */
+    public String toString() {
+        StringBuffer s = new StringBuffer("Annotation Type:" + "\n");
+        s.append("   Member types: " + memberTypes + "\n");
+        s.append("   Member defaults: " + memberDefaults + "\n");
+        s.append("   Retention policy: " + retention + "\n");
+        s.append("   Inherited: " + inherited);
+        return s.toString();
+    }
+}
diff --git a/src/lib/gnu/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java b/src/lib/gnu/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java
new file mode 100644 (file)
index 0000000..a7f434f
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.reflect.annotation;
+import java.lang.annotation.*;
+import java.lang.reflect.Method;
+
+/**
+ * ExceptionProxy for AnnotationTypeMismatchException.
+ *
+ * @author  Josh Bloch
+ * @since   1.5
+ */
+class AnnotationTypeMismatchExceptionProxy extends ExceptionProxy {
+    private Method member;
+    private String foundType;
+
+    /**
+     * It turns out to be convenient to construct these proxies in
+     * two stages.  Since this is a private implementation class, we
+     * permit ourselves this liberty even though it's normally a very
+     * bad idea.
+     */
+    AnnotationTypeMismatchExceptionProxy(String foundType) {
+        this.foundType = foundType;
+    }
+
+    AnnotationTypeMismatchExceptionProxy setMember(Method member) {
+        this.member = member;
+        return this;
+    }
+
+    protected RuntimeException generateException() {
+        return new AnnotationTypeMismatchException(member, foundType);
+    }
+}
diff --git a/src/lib/gnu/sun/reflect/annotation/TypeNotPresentExceptionProxy.java b/src/lib/gnu/sun/reflect/annotation/TypeNotPresentExceptionProxy.java
new file mode 100644 (file)
index 0000000..22cab5d
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2004 Sun Microsystems, Inc.  All Rights Reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Sun designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Sun in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
+ * CA 95054 USA or visit www.sun.com if you need additional information or
+ * have any questions.
+ */
+
+package sun.reflect.annotation;
+import java.lang.annotation.*;
+
+/**
+ * ExceptionProxy for TypeNotPresentException.
+ *
+ * @author  Josh Bloch
+ * @since   1.5
+ */
+public class TypeNotPresentExceptionProxy extends ExceptionProxy {
+    String typeName;
+    Throwable cause;
+
+    public TypeNotPresentExceptionProxy(String typeName, Throwable cause) {
+        this.typeName = typeName;
+        this.cause = cause;
+    }
+
+    protected RuntimeException generateException() {
+        return new TypeNotPresentException(typeName, cause);
+    }
+}
index 119f8038c47ba275885ce26d3cb6006a7c613713..6ddf673df6507c3bc7bb1a7d9ee0650e05ae93e0 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7289 2007-02-06 08:47:05Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index c2bf56307c1d8fea31fcee50e8958dbb663be940..c4f6a18b8ce2e56ac4973f538a52061845d16073 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: boehm.c 8371 2007-08-20 22:05:08Z michi $
-
 */
 
 
index 3ddc71f135c8b8e99af84ecc5d55a32d33b403dc..391e701ecf18027ead89094d9bce45f820149bac 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id$
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index 47dfe2968cde716a03d7e16b255dcba099f2e145..2bfb42a41e802a4de39f7c7366f194143c63d80c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index 1704f2103c3c05fa37935882bbbb83b89d5a57c4..600b688d517fa788d3b5c370a46697b10efcf36e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index c7bd708035bb3960921650d0d40c54b78f2c2d76..d262bcf778164021861647eaa6631c68ca38dc45 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index 752c627ee2691885426eae4d2f01ba366a6e7cf8..ff2fa45e56c61abbf636ff3611d01de982c13157 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index 6798b6ff9fb076d6910cc40c738944f4388dc77d..500391b93dc1f8b9fc820493a35bcb5729813c95 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index 8869f5019f3c95393a5b0da955cb001351a299f2..6082a83d9b33f98ee4440e8d0bba0a5ce98966ef 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: gc-common.h 8374 2007-08-21 10:20:33Z michi $
-
 */
 
 
index d4ad804a20e41f1d2bf8fbc422c1a9ce6d9d278e..7b2d97812931feec1ef7c0941e57988f1b72b1df 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: memory.c 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
index 102b288453f553e07f4bc5242ee54a919ea5c4c8..1a8815cb458ce0823c4617d981cce984cce14d8c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: memory.h 7918 2007-05-20 20:42:18Z michi $
-
 */
 
 
index 3203e9c05a07f0db3ba25fa1960f4c28706158f7..665b7f845af319527ca97d851218eb0dcf3fcd4f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: nogc.c 8179 2007-07-05 11:21:08Z michi $
-
 */
 
 
index c06c14a34d3ddabd4f3c46a71dd80a80908e8f96..1c19fa66fc76acd7a29b8a92426b909d7ce83cac 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8368 2007-08-20 21:36:53Z michi $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index d0918e937ec31b110a9af3c07db014f0d08bb971..eb4e7f9228b59e447e1b6e6dc2587cb3b68032ce 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8299 2007-08-13 08:41:18Z michi $
 
-## Process this file with automake to produce Makefile.in
 
 COMMON_HEADER_FILES = \
        java_lang_Class.h \
@@ -91,6 +88,7 @@ JAVAME_CLDC1_1_HEADER_FILES = \
        com_sun_cldc_io_ResourceInputStream.h \
        com_sun_cldc_io_j2me_socket_Protocol.h \
        com_sun_cldchi_io_ConsoleOutputStream.h \
+       com_sun_cldchi_jvm_FileDescriptor.h \
        com_sun_cldchi_jvm_JVM.h \
        java_lang_Math.h \
        java_lang_Runtime.h \
@@ -168,10 +166,17 @@ endif
 if WITH_CLASSPATH_GNU
 CLASSPATH = $(top_builddir)/src/lib/classes/:$(CLASSPATH_CLASSES)
 VM_ZIP = $(top_builddir)/src/lib/vm.zip
-else
+endif
+
+if WITH_CLASSPATH_SUN
 CLASSPATH = $(CLASSPATH_CLASSES)
 endif
 
+if WITH_CLASSPATH_CLDC1_1
+CLASSPATH = $(top_builddir)/src/lib/classes/:$(CLASSPATH_CLASSES)
+VM_ZIP = $(top_builddir)/src/lib/vm.zip
+endif
+
 noinst_DATA = $(DO_HEADER_FILES)
 
 $(DO_HEADER_FILES): $(CACAOH) $(VM_ZIP) $(CLASSPATH_CLASSES)
index 2a938e88bab339dac619289217e42596c945426d..b2af15cb919a91500ad4fd39c3d2c1437c0e0207 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jni.c 8391 2007-08-21 20:34:27Z michi $
-
 */
 
 
 #endif
 
 #include "native/include/java_lang_Object.h"
-#include "native/include/java_lang_Byte.h"
-#include "native/include/java_lang_Character.h"
-#include "native/include/java_lang_Short.h"
-#include "native/include/java_lang_Integer.h"
-#include "native/include/java_lang_Boolean.h"
-#include "native/include/java_lang_Long.h"
-#include "native/include/java_lang_Float.h"
-#include "native/include/java_lang_Double.h"
 #include "native/include/java_lang_String.h"
 #include "native/include/java_lang_Throwable.h"
 
@@ -148,18 +138,28 @@ static hashtable *hashtable_global_ref; /* hashtable for globalrefs           */
 
 #if defined(ENABLE_JAVASE)
 static classinfo *class_java_nio_Buffer;
+
+# if defined(WITH_CLASSPATH_GNU)
+
 static classinfo *class_java_nio_DirectByteBufferImpl;
 static classinfo *class_java_nio_DirectByteBufferImpl_ReadWrite;
 
-# if defined(WITH_CLASSPATH_GNU)
 #  if SIZEOF_VOID_P == 8
 static classinfo *class_gnu_classpath_Pointer64;
 #  else
 static classinfo *class_gnu_classpath_Pointer32;
 #  endif
-# endif
 
 static methodinfo *dbbirw_init;
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+static classinfo *class_sun_nio_ch_DirectBuffer;
+static classinfo *class_java_nio_DirectByteBuffer;
+
+static methodinfo *dbb_init;
+
+# endif
 #endif
 
 
@@ -193,7 +193,7 @@ bool jni_init(void)
 
 
 #if defined(ENABLE_JAVASE)
-       /* direct buffer stuff */
+       /* Direct buffer stuff. */
 
        if (!(class_java_nio_Buffer =
                  load_class_bootstrap(utf_new_char("java/nio/Buffer"))) ||
@@ -201,6 +201,7 @@ bool jni_init(void)
                return false;
 
 # if defined(WITH_CLASSPATH_GNU)
+
        if (!(class_java_nio_DirectByteBufferImpl =
                  load_class_bootstrap(utf_new_char("java/nio/DirectByteBufferImpl"))) ||
                !link_class(class_java_nio_DirectByteBufferImpl))
@@ -228,7 +229,31 @@ bool jni_init(void)
                !link_class(class_gnu_classpath_Pointer32))
                return false;
 #  endif
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+       if (!(class_sun_nio_ch_DirectBuffer =
+                 load_class_bootstrap(utf_new_char("sun/nio/ch/DirectBuffer"))))
+               vm_abort("jni_init: loading sun/nio/ch/DirectBuffer failed");
+
+       if (!link_class(class_sun_nio_ch_DirectBuffer))
+               vm_abort("jni_init: linking sun/nio/ch/DirectBuffer failed");
+
+       if (!(class_java_nio_DirectByteBuffer =
+                 load_class_bootstrap(utf_new_char("java/nio/DirectByteBuffer"))))
+               vm_abort("jni_init: loading java/nio/DirectByteBuffer failed");
+
+       if (!link_class(class_java_nio_DirectByteBuffer))
+               vm_abort("jni_init: linking java/nio/DirectByteBuffer failed");
+
+       if (!(dbb_init =
+                 class_resolvemethod(class_java_nio_DirectByteBuffer,
+                                                         utf_init,
+                                                         utf_new_char("(JI)V"))))
+               vm_abort("jni_init: resolving java/nio/DirectByteBuffer.init(JI)V failed");
+
 # endif
+
 #endif /* defined(ENABLE_JAVASE) */
 
        return true;
@@ -911,11 +936,11 @@ java_handle_t *_Jv_jni_invokeNative(methodinfo *m, java_handle_t *o,
 
 jint _Jv_JNI_GetVersion(JNIEnv *env)
 {
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_GetVersion(env=%p)", env);
 
-       /* we support JNI 1.4 */
+       /* We support JNI 1.6. */
 
-       return JNI_VERSION_1_4;
+       return JNI_VERSION_1_6;
 }
 
 
@@ -938,7 +963,7 @@ jclass _Jv_JNI_DefineClass(JNIEnv *env, const char *name, jobject loader,
        classinfo       *c;
        java_lang_Class *co;
 
-       TRACEJNICALLS("_Jv_JNI_DefineClass(env=%p, name=%s, loader=%p, buf=%p, bufLen=%d", env, name, loader, buf, bufLen);
+       TRACEJNICALLS("_Jv_JNI_DefineClass(env=%p, name=%s, loader=%p, buf=%p, bufLen=%d)", env, name, loader, buf, bufLen);
 
        u  = utf_new_char(name);
        cl = loader_hashtable_classloader_add((java_handle_t *) loader);
@@ -1133,7 +1158,7 @@ jthrowable _Jv_JNI_ExceptionOccurred(JNIEnv *env)
 {
        java_handle_t *o;
 
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_ExceptionOccurred(env=%p)", env);
 
        o = exceptions_get_exception();
 
@@ -1155,15 +1180,14 @@ void _Jv_JNI_ExceptionDescribe(JNIEnv *env)
        classinfo     *c;
        methodinfo    *m;
 
-       STATISTICS(jniinvokation());
-
-       o = exceptions_get_exception();
+       TRACEJNICALLS("_Jv_JNI_ExceptionDescribe(env=%p)", env);
 
-       if (o == NULL) {
-               /* clear exception, because we are calling jit code again */
+       /* Clear exception, because we are probably calling Java code
+          again. */
 
-               exceptions_clear_exception();
+       o = exceptions_get_and_clear_exception();
 
+       if (o != NULL) {
                /* get printStackTrace method from exception class */
 
                LLNI_class_get(o, c);
@@ -1175,10 +1199,9 @@ void _Jv_JNI_ExceptionDescribe(JNIEnv *env)
                                                                         true);
 
                if (m == NULL)
-                       /* XXX what should we do? */
-                       return;
+                       vm_abort("_Jv_JNI_ExceptionDescribe: could not find printStackTrace");
 
-               /* print the stacktrace */
+               /* Print the stacktrace. */
 
                (void) vm_call_method(m, o);
        }
@@ -1650,13 +1673,12 @@ jfieldID _Jv_JNI_FromReflectedField(JNIEnv* env, jobject field)
 
 jobject _Jv_JNI_ToReflectedMethod(JNIEnv* env, jclass cls, jmethodID methodID,
                                                                  jboolean isStatic)
-{
 #if defined(ENABLE_JAVASE)
        methodinfo                    *m;
        java_lang_reflect_Constructor *rc;
        java_lang_reflect_Method      *rm;
 
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_ToReflectedMethod(env=%p, cls=%p, methodID=%p, isStatic=%d)", env, cls, methodID, isStatic);
 
        m = (methodinfo *) methodID;
 
@@ -2245,11 +2267,11 @@ jmethodID _Jv_JNI_GetStaticMethodID(JNIEnv *env, jclass clazz, const char *name,
        utf        *udesc;
        methodinfo *m;
 
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_GetStaticMethodID(env=%p, clazz=%p, name=%s, sig=%s)", env, clazz, name, sig);
 
        c = LLNI_classinfo_unwrap(clazz);
 
-       if (!c)
+       if (c == NULL)
                return NULL;
 
        if (!(c->state & CLASS_INITIALIZED))
@@ -3566,7 +3588,8 @@ jboolean _Jv_JNI_ExceptionCheck(JNIEnv *env)
 
 jobject _Jv_JNI_NewDirectByteBuffer(JNIEnv *env, void *address, jlong capacity)
 {
-#if defined(ENABLE_JAVASE) && defined(WITH_CLASSPATH_GNU)
+#if defined(ENABLE_JAVASE)
+# if defined(WITH_CLASSPATH_GNU)
        java_handle_t           *nbuf;
 
 # if SIZEOF_VOID_P == 8
@@ -3575,7 +3598,7 @@ jobject _Jv_JNI_NewDirectByteBuffer(JNIEnv *env, void *address, jlong capacity)
        gnu_classpath_Pointer32 *paddress;
 # endif
 
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_NewDirectByteBuffer(env=%p, address=%p, capacity=%ld", env, address, capacity);
 
        /* alocate a gnu.classpath.Pointer{32,64} object */
 
@@ -3601,6 +3624,31 @@ jobject _Jv_JNI_NewDirectByteBuffer(JNIEnv *env, void *address, jlong capacity)
        /* add local reference and return the value */
 
        return _Jv_JNI_NewLocalRef(env, nbuf);
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+       jobject o;
+       int64_t addr;
+       int32_t cap;
+
+       TRACEJNICALLS("_Jv_JNI_NewDirectByteBuffer(env=%p, address=%p, capacity=%ld", env, address, capacity);
+
+       /* Be paranoid about address sign-extension. */
+
+       addr = (int64_t) ((uintptr_t) address);
+       cap  = (int32_t) capacity;
+
+       o = (*env)->NewObject(env, (jclass) class_java_nio_DirectByteBuffer,
+                                                 (jmethodID) dbb_init, addr, cap);
+
+       /* Add local reference and return the value. */
+
+       return _Jv_JNI_NewLocalRef(env, o);
+
+# else
+#  error unknown classpath configuration
+# endif
+
 #else
        vm_abort("_Jv_JNI_NewDirectByteBuffer: not implemented in this configuration");
 
@@ -3620,29 +3668,31 @@ jobject _Jv_JNI_NewDirectByteBuffer(JNIEnv *env, void *address, jlong capacity)
 
 void *_Jv_JNI_GetDirectBufferAddress(JNIEnv *env, jobject buf)
 {
-#if defined(ENABLE_JAVASE) && defined(WITH_CLASSPATH_GNU)
+#if defined(ENABLE_JAVASE)
+# if defined(WITH_CLASSPATH_GNU)
+
        java_nio_DirectByteBufferImpl *nbuf;
-# if SIZEOF_VOID_P == 8
+#  if SIZEOF_VOID_P == 8
        gnu_classpath_Pointer64       *paddress;
-# else
+#  else
        gnu_classpath_Pointer32       *paddress;
-# endif
+#  endif
        void                          *address;
 
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_GetDirectBufferAddress(env=%p, buf=%p)", env, buf);
 
-       if (!builtin_instanceof(buf, class_java_nio_Buffer))
+       if ((buf != NULL) && !builtin_instanceof(buf, class_java_nio_Buffer))
                return NULL;
 
        nbuf = (java_nio_DirectByteBufferImpl *) buf;
 
-# if SIZEOF_VOID_P == 8
+#  if SIZEOF_VOID_P == 8
        LLNI_field_get_ref(nbuf, address, paddress);
        /* this was the cast to avaoid warning: (gnu_classpath_Pointer64 *) nbuf->address; */
-# else
+#  else
        LLNI_field_get_ref(nbuf, address, paddress); 
        /* this was the cast to avaoid warning: (gnu_classpath_Pointer32 *) nbuf->address; */
-# endif
+#  endif
 
        if (paddress == NULL)
                return NULL;
@@ -3651,12 +3701,38 @@ void *_Jv_JNI_GetDirectBufferAddress(JNIEnv *env, jobject buf)
        /* this was the cast to avaoid warning: (void *) paddress->data */
 
        return address;
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+       java_nio_Buffer *o;
+       int64_t          address;
+       void            *p;
+
+       TRACEJNICALLS("_Jv_JNI_GetDirectBufferAddress(env=%p, buf=%p)", env, buf);
+
+       if ((buf != NULL) && !builtin_instanceof(buf, class_sun_nio_ch_DirectBuffer))
+               return NULL;
+
+       o = (java_nio_Buffer *) buf;
+
+       LLNI_field_get_val(o, address, address);
+
+       p = (void *) (intptr_t) address;
+
+       return p;
+
+# else
+#  error unknown classpath configuration
+# endif
+
 #else
+
        vm_abort("_Jv_JNI_GetDirectBufferAddress: not implemented in this configuration");
 
        /* keep compiler happy */
 
        return NULL;
+
 #endif
 }
 
@@ -3697,6 +3773,22 @@ jlong _Jv_JNI_GetDirectBufferCapacity(JNIEnv* env, jobject buf)
 }
 
 
+/* GetObjectRefType ************************************************************
+
+   Returns the type of the object referred to by the obj argument. The
+   argument obj can either be a local, global or weak global
+   reference.
+
+*******************************************************************************/
+
+jobjectRefType jni_GetObjectRefType(JNIEnv *env, jobject obj)
+{
+       log_println("jni_GetObjectRefType: IMPLEMENT ME!");
+
+       return -1;
+}
+
+
 /* DestroyJavaVM ***************************************************************
 
    Unloads a Java VM and reclaims its resources. Only the main thread
@@ -3707,9 +3799,9 @@ jlong _Jv_JNI_GetDirectBufferCapacity(JNIEnv* env, jobject buf)
 
 jint _Jv_JNI_DestroyJavaVM(JavaVM *vm)
 {
-       s4 status;
+       int32_t status;
 
-       STATISTICS(jniinvokation());
+       TRACEJNICALLS("_Jv_JNI_DestroyJavaVM(vm=%p)", vm);
 
     status = vm_destroy(vm);
 
@@ -4143,7 +4235,7 @@ struct JNINativeInterface_ _Jv_JNINativeInterface = {
 
        _Jv_JNI_GetJavaVM,
 
-       /* new JNI 1.2 functions */
+       /* New JNI 1.2 functions. */
 
        _Jv_JNI_GetStringRegion,
        _Jv_JNI_GetStringUTFRegion,
@@ -4159,11 +4251,15 @@ struct JNINativeInterface_ _Jv_JNINativeInterface = {
 
        _Jv_JNI_ExceptionCheck,
 
-       /* new JNI 1.4 functions */
+       /* New JNI 1.4 functions. */
 
        _Jv_JNI_NewDirectByteBuffer,
        _Jv_JNI_GetDirectBufferAddress,
-       _Jv_JNI_GetDirectBufferCapacity
+       _Jv_JNI_GetDirectBufferCapacity,
+
+       /* New JNI 1.6 functions. */
+
+       jni_GetObjectRefType
 };
 
 
index 9dacaf72c82919940b9ecceb684ac9bbbc552664..a7cc2751eae999f2e3998a243e93ce450a08cdcb 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jni.h 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index cb64de75101b0e86e6b538c4663f4d4dc7609ce2..9a55e29033735769e979168ae6ee1aed614841d5 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 5157 2006-07-18 11:09:47Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
index 3dd998bad87cedfefd6f5b34c7906dabbd13777f..f5753dfe6430f3732325bcf4dbe8d7c38b25fb67 100644 (file)
@@ -30,7 +30,6 @@
    Changes: Edwin Steiner
             Samuel Vinson
 
-   $Id: cacao.c,v 3.165 2006/01/03 23:44:38 twisti Exp $
 
 */
 
index fd5d7b8ed17a6a7cedba970bf3090b2c8e24377e..75ea36767ce0a301e3e7e249f4cb104dd5999c2f 100644 (file)
 
    Authors: Martin Platter
 
-   Changes: 
-
-
-   $Id: cacao.c,v 3.165 2006/01/03 23:44:38 twisti Exp $
+   Changes:
 
 */
 
index cd6cc4ff40cf3ff05c1c55dd7df428b1ca775eb0..1f2f5c9c47c28da11b1e84c096fa7aaaf86f036f 100644 (file)
@@ -31,8 +31,6 @@
    Changes: Edwin Steiner
             Samuel Vinson
 
-   $Id: cacaodbgserver.c $
-
 */
 
 #include "native/jvmti/cacaodbgserver.h"
index b496bd44ee383d8d5ed75e8278b94833db2cbc5e..c67a11e65e9185ee28824dffb307b26ae55585d1 100644 (file)
@@ -30,7 +30,6 @@
    Changes: 
 
 
-   $Id: cacao.c,v 3.165 2006/01/03 23:44:38 twisti Exp $
 
 */
 
index 05c0762a45deea16e51bd603993df3d73fad296a..5c9bc127a03a5fb29adf016249f13570d13d4aed 100644 (file)
 
    Author: Martin Platter
 
-   Changes:             
-
-   
-   $Id: dbg.h 4944 2006-05-23 15:31:19Z motse $
+   Changes:
 
 */
 
index 2b50b58db4d302bec8b142109e4abeedaf83cbea..f4d613d389d500551cba4b2537f64341c5cf231a 100644 (file)
@@ -31,8 +31,6 @@
             Samuel Vinson
             Christan Thalinger
    
-   $Id: jvmti.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index ea24ac0346400afb933f345f70bdd177b5df81b6..b0774abb289b260ef83c63b1c13dc91b49e2664b 100644 (file)
@@ -30,7 +30,6 @@
    Changes:             
 
    
-   $Id: jvmti.h 5019 2006-06-06 21:13:41Z motse $
 
 */
 #ifndef _JVMTI_H
index 0d8e1f3f721a454a91ca1836a9ed0aeb74c7886d..af6a2b16f42c9e54908a1aa0cb4b4808826ce024 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: llni.h 8368 2007-08-20 21:36:53Z michi $
-
 */
 
 
index 9b3198726b878576c595a86acbf76e6bc3314074..8d3ce8093b941746973e6ddb44635cc8d4939a58 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: localref.c 8391 2007-08-21 20:34:27Z michi $
-
 */
 
 
index 0c038ebdbe2e52c00df13ef5409e948a2f345cfe..a0aba799b74aac65ab1dd1d5d331023364a687e0 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: localref.h 8391 2007-08-21 20:34:27Z michi $
-
 */
 
 
index 7075c44279c3b7e6f352042b9293078a929faa4e..072ef81fe8730758cc423a19d2c6ce21a5d415e4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: native.c 8337 2007-08-17 18:41:19Z michi $
-
 */
 
 
@@ -568,7 +566,7 @@ void native_library_add(utf *filename, classloader *loader, lt_dlhandle handle)
 
        /* normally addresses are aligned to 4, 8 or 16 bytes */
 
-       key  = ((u4) (ptrint) loader) >> 4;     /* align to 16-byte boundaries    */
+       key  = ((u4) (ptrint) loader) >> 4;        /* align to 16-byte boundaries */
        slot = key & (hashtable_library->size - 1);
        le   = hashtable_library->ptr[slot];
 
@@ -649,7 +647,7 @@ hashtable_library_name_entry *native_library_find(utf *filename,
 
        /* normally addresses are aligned to 4, 8 or 16 bytes */
 
-       key  = ((u4) (ptrint) loader) >> 4;     /* align to 16-byte boundaries    */
+       key  = ((u4) (ptrint) loader) >> 4;        /* align to 16-byte boundaries */
        slot = key & (hashtable_library->size - 1);
        le   = hashtable_library->ptr[slot];
 
index 6b4dcf0f6a99eb6403f723afbe46f03f0f513382..1f721b1773dbdd40d842e3b072eda0c56995adbc 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: native.h 8337 2007-08-17 18:41:19Z michi $
-
 */
 
 
index 877ea94219143a0bcc5ed7ab8de3888ba3c8b842..c789dbc77f14891e0bf4e443c2b18e74bd144c20 100644 (file)
 ## Contact: cacao@cacaojvm.org
 ##
 ## Authors: Christian Thalinger
-##
-## $Id: Makefile.am 6076 2006-11-28 21:50:26Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index 33e3bab9e8c2203e0eb95e18fe3b79d7c2b80d23..7a9fe1206be7948473a731787689b67f534ad1e8 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: gennativetable.c 6104 2006-12-02 14:54:27Z tbfg $
-
 */
 
 
index bcb5b5faadb2ab1eba6423f1fe6e6baa7b29f824..72c077a36218de16fe0acc3e4484bc457d66cb6a 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 5558 2006-09-28 19:33:24Z edwin $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index 960b748bbfd11b58bc8959dbbd30fd05de08dd45..625d9acec0b804dd5b89bef2910eee810385bdcc 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 6213 2006-12-18 17:36:06Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index 1bd4ae55d3f90473095ac3ec253104fb9efba08b..8395adac0178ea17207ebd856370600d5a280985 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
+#include <sys/stat.h>
+#include <sys/mman.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <zlib.h>
 
 #include "config.h"
-#include "vm/types.h"
+
+#include "mm/memory.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 #include "native/native.h"
 
 #include "native/include/java_lang_Object.h"
 #include "native/include/java_lang_String.h"
-
 #include "native/include/com_sun_cldc_io_ResourceInputStream.h"
+#include "native/include/com_sun_cldchi_jvm_FileDescriptor.h"
 
+#include "vm/types.h"
+#include "vm/builtin.h"
 #include "vm/vm.h" /* REMOVE ME: temporarily */
+#include "vm/exceptions.h"
+#include "vm/stringlocal.h"
 
+#include "vmcore/zip.h"
+
+#include "threads/lock-common.h"
 
 /* native methods implemented by this file ************************************/
  
 static JNINativeMethod methods[] = {
        { "open", "(Ljava/lang/String;)Ljava/lang/Object;", (void *) (ptrint) &Java_com_sun_cldc_io_ResourceInputStream_open },
+       { "bytesRemain", "(Ljava/lang/Object;)I", (void *) (ptrint) &Java_com_sun_cldc_io_ResourceInputStream_bytesRemain },
+       { "readByte", "(Ljava/lang/Object;)I", (void *) (ptrint) &Java_com_sun_cldc_io_ResourceInputStream_readByte },
+       { "readBytes", "(Ljava/lang/Object;[BII)I", (void *) (ptrint) &Java_com_sun_cldc_io_ResourceInputStream_readBytes },
+       { "clone", "(Ljava/lang/Object;)Ljava/lang/Object;", (void *) (ptrint) &Java_com_sun_cldc_io_ResourceInputStream_clone },
 };
  
 /* _Jv_com_sun_cldc_io_ResourceInputStream_init ********************************
@@ -62,17 +78,322 @@ void _Jv_com_sun_cldc_io_ResourceInputStream_init(void)
        native_method_register(u, methods, NATIVE_METHODS_COUNT);
 }
 
+static struct com_sun_cldchi_jvm_FileDescriptor* zip_read_resource(list_classpath_entry *lce, utf *name)
+{
+       hashtable_zipfile_entry *htzfe;
+       lfh                      lfh;
+       u1                      *indata;
+       u1                      *outdata;
+       z_stream                 zs;
+       int                      err;
+       
+       classinfo *ci;
+       com_sun_cldchi_jvm_FileDescriptor *fileDescriptor = NULL;
+
+       /* try to find the class in the current archive */
+
+       htzfe = zip_find(lce, name);
+
+       if (htzfe == NULL)
+               return NULL;
+
+       /* read stuff from local file header */
+
+       lfh.filenamelength   = SUCK_LE_U2(htzfe->data + LFH_FILE_NAME_LENGTH);
+       lfh.extrafieldlength = SUCK_LE_U2(htzfe->data + LFH_EXTRA_FIELD_LENGTH);
+
+       indata = htzfe->data +
+               LFH_HEADER_SIZE +
+               lfh.filenamelength +
+               lfh.extrafieldlength;
+
+       /* allocate buffer for uncompressed data */
+
+       outdata = MNEW(u1, htzfe->uncompressedsize);
+
+       /* how is the file stored? */
+
+       switch (htzfe->compressionmethod) {
+       case Z_DEFLATED:
+               /* fill z_stream structure */
+
+               zs.next_in   = indata;
+               zs.avail_in  = htzfe->compressedsize;
+               zs.next_out  = outdata;
+               zs.avail_out = htzfe->uncompressedsize;
+
+               zs.zalloc = Z_NULL;
+               zs.zfree  = Z_NULL;
+               zs.opaque = Z_NULL;
+
+               /* initialize this inflate run */
+
+               if (inflateInit2(&zs, -MAX_WBITS) != Z_OK)
+                       vm_abort("zip_get: inflateInit2 failed: %s", strerror(errno));
+
+               /* decompress the file into buffer */
+
+               err = inflate(&zs, Z_SYNC_FLUSH);
+
+               if ((err != Z_STREAM_END) && (err != Z_OK))
+                       vm_abort("zip_get: inflate failed: %s", strerror(errno));
+
+               /* finish this inflate run */
+
+               if (inflateEnd(&zs) != Z_OK)
+                       vm_abort("zip_get: inflateEnd failed: %s", strerror(errno));
+               break;
+
+       case 0:
+               /* uncompressed file, just copy the data */
+               MCOPY(outdata, indata, u1, htzfe->compressedsize);
+               break;
+
+       default:
+               vm_abort("zip_get: unknown compression method %d",
+                                htzfe->compressionmethod);
+       }
+               
+       /* Create a file descriptor object */
+       ci = load_class_bootstrap(utf_new_char("com/sun/cldchi/jvm/FileDescriptor"));
+       fileDescriptor = (com_sun_cldchi_jvm_FileDescriptor *) native_new_and_init(ci);
+       LLNI_field_set_val(fileDescriptor, pointer, (int)outdata);
+       LLNI_field_set_val(fileDescriptor, length, htzfe->uncompressedsize);
+       LLNI_field_set_val(fileDescriptor, position, 0);
+       return fileDescriptor;
+       
+}
+
+static struct com_sun_cldchi_jvm_FileDescriptor* file_read_resource(char *path) 
+{
+       int len;
+       struct stat statBuffer;
+       u1 *filep;
+       com_sun_cldchi_jvm_FileDescriptor *fileDescriptor = NULL; 
+       classinfo *ci;
+       int fd;
+       
+       fd = open(path, O_RDONLY);
+       
+       if (fd > 0) {
+               
+               if (fstat(fd, &statBuffer) != -1) {
+                       len = statBuffer.st_size;
+               } else {  
+                       return NULL;
+               }
+               
+               /* Map file into the memory */
+               filep = mmap(0, len, PROT_READ, MAP_PRIVATE, fd, 0);
+               
+               /* Create a file descriptor object */
+               ci = load_class_bootstrap(utf_new_char("com/sun/cldchi/jvm/FileDescriptor"));
+               fileDescriptor = (com_sun_cldchi_jvm_FileDescriptor *) native_new_and_init(ci);
+               LLNI_field_set_val(fileDescriptor, pointer, (int)filep);
+               LLNI_field_set_val(fileDescriptor, length, len);
+               LLNI_field_set_val(fileDescriptor, position, 0);
+               
+               return fileDescriptor;  
+               
+       } else {
+               return NULL;
+       }
+       
+}
+
 
 /*
  * Class:     com/sun/cldc/io/ResourceInputStream
  * Method:    open
  * Signature: (Ljava/lang/String;)Ljava/lang/Object;
  */
-JNIEXPORT java_lang_Object* JNICALL Java_com_sun_cldc_io_ResourceInputStream_open(JNIEnv *env, jclass clazz, java_lang_String *name)
+JNIEXPORT struct java_lang_Object* JNICALL Java_com_sun_cldc_io_ResourceInputStream_open(JNIEnv *env, jclass clazz, java_lang_String *name)
 {
-       vm_abort("Java_com_sun_cldc_io_ResourceInputStream_open: IMPLEMENT ME!");
+       
+       list_classpath_entry *lce;
+       char *filename;
+       s4 filenamelen;
+       char *path;
+       utf *uname;
+       com_sun_cldchi_jvm_FileDescriptor* descriptor;
+       
+       /* get the classname as char string (do it here for the warning at
+       the end of the function) */
+
+       uname = javastring_toutf((java_handle_t *)name, false);
+       filenamelen = utf_bytes(uname) + strlen("0");
+       filename = MNEW(char, filenamelen);
+       utf_copy(filename, uname);
+       
+       /* walk through all classpath entries */
+
+       for (lce = list_first(list_classpath_entries); lce != NULL;
+                lce = list_next(list_classpath_entries, lce)) {
+                       
+#if defined(ENABLE_ZLIB)
+               if (lce->type == CLASSPATH_ARCHIVE) {
+
+                       /* enter a monitor on zip/jar archives */
+                       LOCK_MONITOR_ENTER(lce);
+
+                       /* try to get the file in current archive */
+                       descriptor = zip_read_resource(lce, uname);
+
+                       /* leave the monitor */
+                       LOCK_MONITOR_EXIT(lce);
+                       
+                       if (descriptor != NULL) { /* file exists */
+                               break;
+                       }
+
+               } else {
+#endif
+                       
+                       path = MNEW(char, lce->pathlen + filenamelen);
+                       strcpy(path, lce->path);
+                       strcat(path, filename);
+
+                       descriptor = file_read_resource(path);
+                       
+                       MFREE(path, char, lce->pathlen + filenamelen);
+
+                       if (descriptor != NULL) { /* file exists */
+                               break;
+                       }
+                       
+#if defined(ENABLE_ZLIB)
+               }
+#endif 
+                       
+       }
+
+       MFREE(filename, char, filenamelen);
+
+       return (java_lang_Object*) descriptor;
+       
+}
+
+
+/*
+ * Class:     com_sun_cldc_io_ResourceInputStream
+ * Method:    bytesRemain
+ * Signature: (Ljava/lang/Object;)I
+ */
+JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_ResourceInputStream_bytesRemain(JNIEnv *env, jclass clazz, struct java_lang_Object* jobj) {
+       
+       com_sun_cldchi_jvm_FileDescriptor *fileDescriptor;
+       int32_t length;
+       int32_t position;
+
+       fileDescriptor = (com_sun_cldchi_jvm_FileDescriptor *) jobj;
+       LLNI_field_get_val(fileDescriptor, position, position);
+       LLNI_field_get_val(fileDescriptor, length, length);
+       
+       return length - position;
+
+}
+
+/*
+ * Class:     com_sun_cldc_io_ResourceInputStream
+ * Method:    readByte
+ * Signature: (Ljava/lang/Object;)I
+ */
+JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_ResourceInputStream_readByte(JNIEnv *env, jclass clazz, struct java_lang_Object* jobj) {
+       
+       com_sun_cldchi_jvm_FileDescriptor *fileDescriptor;
+       u1 byte;
+       int32_t length;
+       int32_t position;
+       int64_t filep;
+       
+       fileDescriptor = (com_sun_cldchi_jvm_FileDescriptor *) jobj;
+       LLNI_field_get_val(fileDescriptor, position, position);
+       LLNI_field_get_val(fileDescriptor, length, length);
+       LLNI_field_get_val(fileDescriptor, pointer, filep);
+       
+       if (position < length) {
+               byte = ((u1*)(int)filep)[position];
+               position++;
+       } else {
+               return -1; /* EOF */
+       }
+
+       /* Update access position */
+       LLNI_field_set_val(fileDescriptor, position, position);
+       
+       return (byte & 0xFF);
+
+}
+
+/*
+ * Class:     com_sun_cldc_io_ResourceInputStream
+ * Method:    readBytes
+ * Signature: (Ljava/lang/Object;[BII)I
+ */
+JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_ResourceInputStream_readBytes(JNIEnv *env, jclass clazz, struct java_lang_Object* jobj, java_handle_bytearray_t* byteArray, s4 off, s4 len) {
+       
+       com_sun_cldchi_jvm_FileDescriptor *fileDescriptor;
+       s4 readBytes = -1;
+       int32_t fileLength;
+       int32_t position;
+       s4 available;
+       int64_t filep;
+       void *buf;
+
+       /* get pointer to the buffer */
+       buf = &(LLNI_array_direct(byteArray, off));
+       
+       fileDescriptor = (com_sun_cldchi_jvm_FileDescriptor *) jobj;
+       LLNI_field_get_val(fileDescriptor, position, position);
+       LLNI_field_get_val(fileDescriptor, length, fileLength);
+       LLNI_field_get_val(fileDescriptor, pointer, filep);
+       
+       if (position < fileLength) {
+               available = fileLength - position;
+               if (available < len) {
+                       readBytes = available;
+               } else {
+                       readBytes = len;
+               }
+               memcpy(buf, ((u1*)(int)filep) + position, readBytes * sizeof(u1));
+               position += readBytes;
+       } else {
+               return -1; /* EOF */
+       }
+
+       /* Update access position */
+       LLNI_field_set_val(fileDescriptor, position, position);
+       
+       return readBytes;
+}
+
+/*
+ * Class:     com_sun_cldc_io_ResourceInputStream
+ * Method:    clone
+ * Signature: (Ljava/lang/Object;)Ljava/lang/Object;
+ */
+JNIEXPORT struct java_lang_Object* JNICALL Java_com_sun_cldc_io_ResourceInputStream_clone(JNIEnv *env, jclass clazz, struct java_lang_Object* jobj) {
+       
+       classinfo *ci;
+       com_sun_cldchi_jvm_FileDescriptor *srcFileDescriptor;
+       com_sun_cldchi_jvm_FileDescriptor *dstFileDescriptor;
+       int32_t srcLength;
+       int32_t srcPosition;
+       int64_t srcFilePointer;
+       
+       srcFileDescriptor = (com_sun_cldchi_jvm_FileDescriptor *) jobj;
+       LLNI_field_get_val(srcFileDescriptor, position, srcPosition);
+       LLNI_field_get_val(srcFileDescriptor, length, srcLength);
+       LLNI_field_get_val(srcFileDescriptor, pointer, srcFilePointer);
+       
+       ci = load_class_bootstrap(utf_new_char("com/sun/cldchi/jvm/FileDescriptor"));
+       dstFileDescriptor = (com_sun_cldchi_jvm_FileDescriptor *) native_new_and_init(ci);
+       LLNI_field_set_val(dstFileDescriptor, position, srcPosition);
+       LLNI_field_set_val(dstFileDescriptor, length, srcLength);
+       LLNI_field_set_val(dstFileDescriptor, pointer, srcFilePointer);
+       
+       return (java_lang_Object*) dstFileDescriptor;
 
-       return NULL;
 }
 
 
index 14fe27f2dd068b81d5634bfdb5e06f9ab0829117..ee32030c2097a38055a235718257719b1c461503 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
@@ -40,6 +38,7 @@
 #include "mm/memory.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 #include "native/native.h"
 
 #include "native/include/com_sun_cldc_io_j2me_socket_Protocol.h"
@@ -82,7 +81,7 @@ void _Jv_com_sun_cldc_io_j2me_socket_Protocol_init(void)
  * Method:    open0
  * Signature: ([BII)I
  */
-JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_open0(JNIEnv *env, jclass clazz, java_bytearray *hostname, s4 port, s4 mode)
+JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_open0(JNIEnv *env, jclass clazz, java_handle_bytearray_t *hostname, s4 port, s4 mode)
 {
        struct hostent *phostent;
     struct sockaddr_in serv_addr;
@@ -92,7 +91,7 @@ JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_open0(JNIEnv *env
 
        /* The hostname byte-array is a NULL terminated C-string. */
 
-       name = (char *) &(hostname->data);
+       name = (char *) &(LLNI_array_data(hostname));
 
        /* get the host */
 
@@ -131,14 +130,14 @@ JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_open0(JNIEnv *env
  * Method:    readBuf
  * Signature: (I[BII)I
  */
-JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_readBuf(JNIEnv *env, jclass clazz, s4 handle, java_bytearray *b, s4 off, s4 len)
+JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_readBuf(JNIEnv *env, jclass clazz, s4 handle, java_handle_bytearray_t *b, s4 off, s4 len)
 {
        void    *buf;
        ssize_t  result;
 
        /* get pointer to the buffer */
 
-       buf = &(b->data[off]);
+       buf = &(LLNI_array_direct(b, off));
 
        /* receive from the socket */
 
@@ -191,14 +190,14 @@ JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_readByte(JNIEnv *
  * Method:    writeBuf
  * Signature: (I[BII)I
  */
-JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_writeBuf(JNIEnv *env, jclass clazz, s4 handle, java_bytearray* b, s4 off, s4 len) {
+JNIEXPORT s4 JNICALL Java_com_sun_cldc_io_j2me_socket_Protocol_writeBuf(JNIEnv *env, jclass clazz, s4 handle, java_handle_bytearray_t * b, s4 off, s4 len) {
 
        void    *buf;
        ssize_t  result;
 
        /* get pointer to the buffer */
 
-       buf = &(b->data[off]);
+       buf = &(LLNI_array_direct(b, off));
        
        /* send the given byte to the socket */
 
index 875ed46ddf62e96291ea6d0651aa4d61b2c70773..fc642a1b29999ef003b44a42865721717649d950 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index 3db610c643bf410a48c0042df02f3ba566ba5ae1..8814d2f9f35d22222d3db3c5e2716003f3bd7fb1 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index 84aa99b4b96c4e53999cba3f8771b81247e0c42a..686109ac0a8146d8ab07e941bba3a6107de17771 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
@@ -31,6 +29,7 @@
 #include "vm/types.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 #include "native/native.h"
 
 #include "native/include/java_lang_String.h"             /* required by j.l.C */
index d860d86ef50a4a7058b764d6019b3f2f41f86ae8..99f319503e9a317664415c01cffe7d474505123b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index 5e89bf3f2b63ed33f36a1b0d999a930b075c687f..67cb0046e8ccb9639e4777388ba54b9559191bd6 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index 772a3eefa5dc76608304897db00b28e7eb2a5d4a..9d542b7f16cf96bbbddd42a107d0e0379fe8e1c3 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index e6d7847d2545756799475446239743267463f369..5998298a4f2cd80128159983862eeb24d38c593a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
@@ -34,6 +32,7 @@
 #include "vm/types.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 #include "native/native.h"
 
 #include "native/include/java_lang_String.h"             /* required by j.l.C */
index b576359f9da79ecfb3f90328f074c6cad2c15c22..59190b9d566b475c97016573b29457e2490fa919 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index 7d2dc5353746c3a03e8c5542528d8f4d2496406b..c0ba6ad5726408f6a50617f706edc55c6e667c1b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
@@ -35,6 +33,7 @@
 #include "vm/types.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 #include "native/native.h"
 
 #include "native/include/java_lang_Object.h"
@@ -82,22 +81,22 @@ void _Jv_java_lang_String_init(void)
  */
 JNIEXPORT s4 JNICALL Java_java_lang_String_hashCode(JNIEnv *env, java_lang_String *this)
 {
-       java_chararray *value;
-       s4              offset;
-       s4              count;
-       s4              hash;
-       s4              i;
+       java_handle_chararray_t *value;
+       int32_t                 offset;
+       int32_t                 count;
+       s4                              hash;
+       s4                              i;
 
        /* get values from Java object */
-
-       offset = this->offset;
-       count  = this->count;
-       value  = this->value;
+       
+       LLNI_field_get_val(this, offset, offset);
+       LLNI_field_get_val(this, count, count);
+       LLNI_field_get_ref(this, value, value);
 
        hash = 0;
 
        for (i = 0; i < count; i++) {
-               hash = (31 * hash) + value->data[offset + i];
+               hash = (31 * hash) + LLNI_array_direct(value, offset + i);
        }
 
        return hash;
@@ -111,19 +110,19 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_hashCode(JNIEnv *env, java_lang_Strin
  */
 JNIEXPORT s4 JNICALL Java_java_lang_String_indexOf__I(JNIEnv *env, java_lang_String *this, s4 ch)
 {
-       java_chararray *value;
-       s4              offset;
-       s4              count;
-       s4              i;
+       java_handle_chararray_t *value;
+       int32_t                 offset;
+       int32_t                 count;
+       s4                              i;
 
        /* get values from Java object */
 
-       offset = this->offset;
-       count  = this->count;
-       value  = this->value;
+       LLNI_field_get_val(this, offset, offset);
+       LLNI_field_get_val(this, count, count);
+       LLNI_field_get_ref(this, value, value);
 
        for (i = 0; i < count; i++) {
-               if (value->data[offset + i] == ch) {
+               if (LLNI_array_direct(value, offset + i) == ch) {
                        return i;
                }
        }
@@ -139,16 +138,16 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_indexOf__I(JNIEnv *env, java_lang_Str
  */
 JNIEXPORT s4 JNICALL Java_java_lang_String_indexOf__II(JNIEnv *env, java_lang_String *this, s4 ch, s4 fromIndex)
 {
-       java_chararray *value;
-       s4              offset;
-       s4              count;
-       s4              i;
+       java_handle_chararray_t *value;
+       int32_t                 offset;
+       int32_t                 count;
+       s4                              i;
 
        /* get values from Java object */
 
-       offset = this->offset;
-       count  = this->count;
-       value  = this->value;
+       LLNI_field_get_val(this, offset, offset);
+       LLNI_field_get_val(this, count, count);
+       LLNI_field_get_ref(this, value, value);
 
        if (fromIndex < 0) {
                fromIndex = 0;
@@ -159,7 +158,7 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_indexOf__II(JNIEnv *env, java_lang_St
        }
 
        for (i = fromIndex ; i < count ; i++) {
-               if (value->data[offset + i] == ch) {
+               if (LLNI_array_direct(value, offset + i) == ch) {
                        return i;
                }
        }
@@ -175,7 +174,11 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_indexOf__II(JNIEnv *env, java_lang_St
  */
 JNIEXPORT s4 JNICALL Java_java_lang_String_lastIndexOf__I(JNIEnv *env, java_lang_String *this, s4 ch)
 {
-       return Java_java_lang_String_lastIndexOf__II(env, this, ch, this->count - 1);
+       int32_t count;
+       
+       LLNI_field_get_val(this, count, count);
+       
+       return Java_java_lang_String_lastIndexOf__II(env, this, ch, count - 1);
 }
 
 
@@ -186,22 +189,22 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_lastIndexOf__I(JNIEnv *env, java_lang
  */
 JNIEXPORT s4 JNICALL Java_java_lang_String_lastIndexOf__II(JNIEnv *env, java_lang_String *this, s4 ch, s4 fromIndex)
 {
-       java_chararray *value;
-       s4              offset;
-       s4              count;
-       s4              start;
-       s4              i;
+       java_handle_chararray_t *value;
+       int32_t                 offset;
+       int32_t                 count;
+       s4                              start;
+       s4                              i;
 
        /* get values from Java object */
 
-       offset = this->offset;
-       count  = this->count;
-       value  = this->value;
+       LLNI_field_get_val(this, offset, offset);
+       LLNI_field_get_val(this, count, count);
+       LLNI_field_get_ref(this, value, value);
 
        start = ((fromIndex >= count) ? count - 1 : fromIndex);
 
        for (i = start; i >= 0; i--) {
-               if (value->data[offset + i] == ch) {
+               if (LLNI_array_direct(value, offset + i) == ch) {
                        return i;
                }
        }
@@ -218,23 +221,39 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_lastIndexOf__II(JNIEnv *env, java_lan
  */
 JNIEXPORT s4 JNICALL Java_java_lang_String_equals(JNIEnv *env, java_lang_String* this, java_lang_Object *o)
 {
-       java_lang_String* s;
+       java_lang_String*               s;
+       java_handle_chararray_t *value;
+       int32_t                 offset;
+       int32_t                 count;
+       java_handle_chararray_t *dvalue;
+       int32_t                 doffset;
+       int32_t                 dcount;
+       classinfo                       *c;
+       
+       LLNI_field_get_val(this, offset, offset);
+       LLNI_field_get_val(this, count, count);
+       LLNI_field_get_ref(this, value, value);
+       LLNI_class_get(o, c);
 
        /* TODO: is this the correct implementation for short-circuiting on object identity? */
        if ((java_lang_Object*)this == o)
                return 1;
-
-       if (o->header.vftbl->class != class_java_lang_String) 
+       
+       if (c != class_java_lang_String) 
                return 0;
 
        s = (java_lang_String *) o;
+       LLNI_field_get_val(this, offset, doffset);
+       LLNI_field_get_val(this, count, dcount);
+       LLNI_field_get_ref(this, value, dvalue);
 
-       if (this->count != s->count)
+       if (count != dcount)
                return 0;
 
-       return ( 0 == memcmp((void*)(this->value->data + this->offset),
-                                                (void*)(s->value->data + s->offset),
-                                                this->count) );
+       return ( 0 == memcmp((void*)(LLNI_array_direct(value, offset)),
+                                                (void*)(LLNI_array_direct(dvalue, doffset),
+                                                count) );
+
 }
 #endif
 
@@ -246,16 +265,10 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_equals(JNIEnv *env, java_lang_String*
  */
 JNIEXPORT java_lang_String* JNICALL Java_java_lang_String_intern(JNIEnv *env, java_lang_String *this)
 {
-       java_handle_t *o;
-
        if (this == NULL)
                return NULL;
 
-       /* search table so identical strings will get identical pointers */
-
-       o = literalstring_u2(this->value, this->count, this->offset, true);
-
-       return (java_lang_String *) o;
+       return (java_lang_String *) javastring_intern((java_handle_t *) this);
 }
 
 
index 25097feecdd495c49fb26339992f329a5c302c55..60f076ac80d11df28ccca421fecba5819839a4f9 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
@@ -79,8 +77,8 @@ void _Jv_java_lang_System_init(void)
  */
 JNIEXPORT void JNICALL Java_java_lang_System_arraycopy(JNIEnv *env, jclass clazz, java_lang_Object *src, s4 srcStart, java_lang_Object *dest, s4 destStart, s4 len)
 {
-       (void) builtin_arraycopy((java_arrayheader *) src, srcStart,
-                                                        (java_arrayheader *) dest, destStart, len);
+       (void) builtin_arraycopy((java_handle_t *) src, srcStart,
+                                                        (java_handle_t *) dest, destStart, len);
 }
 
 
index 433d6e6b0870c25b7ee4f8006ef0000d3a9773dc..ea69d0e310d32a5b6fe0af79be09641fb04f3c13 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 5900 2006-11-04 17:30:44Z michi $
-
 */
 
 
index e13bdef6dc8bb403b5fe225734ed442a2b284e87..5fa3f77cfaca79c671369b99e9107a15ea0d5915 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMThrowable.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 
index 915bc2c822d44e953b87bbc2975cbea050e29537..e2b53c77f9bf470f65401ed44da00937e9bf9bbf 100644 (file)
 ## Contact: cacao@cacaojvm.org
 ##
 ## Authors: Christian Thalinger
-##
-## $Id: Makefile.am 8249 2007-07-31 12:59:03Z panzi $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index 5e4d746b7c90cf119b08f027fb1fad1b1412eefc..cc8aefd78ed98d909451266936261e2d796614fa 100644 (file)
 
    Author: Martin Platter
 
-   Changes:             
-
-
-   $Id: VMjdwp.c 6213 2006-12-18 17:36:06Z twisti $
+   Changes:
 
 */
 
index 5cb12e93ee6d6d4006fc7c86fce935c084e20745..42016ae97e8fa800bb62124577a0df8a038b1c4e 100644 (file)
 
    Author: Martin Platter
 
-   Changes:             
-
-
-   $Id: VMjdwp.c 4661 2006-03-21 00:04:59Z motse $
+   Changes:
 
 */
 
index d8525ea4940b7be6744bbac83eeb009791b0e8a1..b44c6470a624fd6d94739506bae9277488a8c990 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: gnu_classpath_VMStackWalker.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
index d1b1abc25d3d3c212e6b0d480a4e8204e8c1c3aa..91481a73c94038613d60f56fc5adcca2dc485471 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: gnu_classpath_VMSystemProperties.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 69e5b91ba38041b217c262741eb42860808ee70d..7d428de8e69238938a9d739cc9c50bf567b131f5 100644 (file)
@@ -26,10 +26,7 @@ Contact: cacao@cacaojvm.org
 
 Authors: Martin Platter
 
-Changes: 
-
-
-$Id: gnu_classpath_jdwp_VMFrame.c 6213 2006-12-18 17:36:06Z twisti $
+Changes:
 
 */
 
index 8dbbfac7afe8a8525e3b282e4303bda4a8839c5c..cce58eb8dbfedadf4646f648f9ef8774060b3003 100644 (file)
@@ -31,9 +31,6 @@ Authors: Samuel Vinson
 Changes: 
 
 
-$Id: VMMethod.c $
-
-*/
 
 #include "native/jni.h"
 #include "native/include/gnu_classpath_jdwp_VMMethod.h"
index 03323f26f9fe6b19dacbd92012719379c45e742e..eb5a4287bacb2e281e5a74fa83c2e98bd81f807b 100644 (file)
@@ -28,9 +28,6 @@ Authors: Martin Platter
 
 Changes: Samuel Vinson
 
-
-$Id: gnu_classpath_jdwp_VMVirtualMachine.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 #include "toolbox/logging.h"
index 0deb76facdb55006eb752eb6c80b9f1767a65000..ce3b6b4ef79c7bcc8e0e37b41fa4f665b157b6d2 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: VMFrame.c 4996 2006-05-31 13:53:16Z motse $
-
 */
 
 
index 8c0a5514af1b3640428cee15c8db76f27bea72ec..b203a73a5728fdd58cc90e68790e29dd97a3fdc0 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: VMFrame.c 4996 2006-05-31 13:53:16Z motse $
-
 */
 
 
index 6bf92015dd4238613890bbfaf1ea3d6a5a7db43a..cbd1e965da8c9e5a8961402d226302b570d0ebab 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: VMFrame.c 4996 2006-05-31 13:53:16Z motse $
-
 */
 
 
index fc7c2a2d7de6adefa66736154b3b94c912673ed6..862ed07abfd62db29678a77ea232a9befaad5f48 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: VMFrame.c 4996 2006-05-31 13:53:16Z motse $
-
 */
 
 
index e1ab6e5147bf99851acccc4e0dd7e0f492ce5863..145d2aeacbe6a760813e162fabaa75da765b6be0 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMClass.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
index 3c9b5ac16e978694869349cd35fb88d0aa600546..784e8b57a9560cf7320284329afc88ccdff91f86 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMClassLoader.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
index 0b43d38c1f285e1c095c6e144431f08268b00828..5fc65d362152c426492f712eaac65d7e87e614c9 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMObject.c 8123 2007-06-20 23:50:55Z michi $
-
 */
 
 
index d4abbc9c670c934adbab11d6d44cc60f8d4522e5..b17cb4a2359476efe2d3f55372f934e48f09dd90 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 8335 2007-08-17 11:04:35Z michi $
-
 */
 
 
index 2832202fdb7ba44e73bed5095704198af5cfc2e2..993b6616c68588aa96bba4d476b28e92ae3aa45e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMString.c 8027 2007-06-07 10:30:33Z michi $
-
 */
 
 
@@ -37,8 +35,6 @@
 #include "native/include/java_lang_String.h"
 #include "native/include/java_lang_VMString.h"
 
-#include "native/vm/java_lang_String.h"
-
 #include "vm/stringlocal.h"
 
 
@@ -72,7 +68,10 @@ void _Jv_java_lang_VMString_init(void)
  */
 JNIEXPORT java_lang_String* JNICALL Java_java_lang_VMString_intern(JNIEnv *env, jclass clazz, java_lang_String *str)
 {
-       return _Jv_java_lang_String_intern(str);
+       if (str == NULL)
+               return NULL;
+
+       return (java_lang_String *) javastring_intern((java_handle_t *) str);
 }
 
 
index 0ae162c341ede2cf2af65766d914608f6ea18ca2..2200d444940f375c909dde8cb31c9f31f57a7211 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMSystem.c 8363 2007-08-20 19:10:46Z michi $
-
 */
 
 
index 4ce14308d2f3bc5ace479b48c51cc28e7c9dc6b1..d3d84482d6b25e36ce4f5bcafd6a4c8fbff3c734 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMThread.c 8284 2007-08-10 08:58:39Z michi $
-
 */
 
 
index bba9eab4d5250a96a89aeca75634343a10510de3..ead575fb2e2e6ec2279b99062f712ad7d84bc9b8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMThrowable.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
index 1e0f4ecebf3074efb2754c9471deec003da05472..62e1a8ff815ffb95afb5d0ff95a5842c807bd395 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: VMFrame.c 4996 2006-05-31 13:53:16Z motse $
-
 */
 
 
index 94eb25d662dfdb6dbf71d17f0d46a9c7faf66f35..dda0424b546a2f4cbf30d96c68dea21139f6302b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_reflect_Constructor.c 8380 2007-08-21 12:43:00Z michi $
-
 */
 
 
@@ -114,18 +112,19 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_Constructor_construct
  */
 JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Constructor_declaredAnnotations(JNIEnv *env, java_lang_reflect_Constructor *this)
 {
-       java_handle_t           *o                   = (java_handle_t*)this;
        struct java_util_Map    *declaredAnnotations = NULL;
        java_handle_bytearray_t *annotations         = NULL;
        java_lang_Class         *declaringClass      = NULL;
+       classinfo               *referer             = NULL;
 
        LLNI_field_get_ref(this, declaredAnnotations, declaredAnnotations);
 
        if (declaredAnnotations == NULL) {
                LLNI_field_get_val(this, annotations, annotations);
                LLNI_field_get_ref(this, clazz, declaringClass);
+               LLNI_class_get(this, referer);
 
-               declaredAnnotations = reflect_get_declaredannotatios(annotations, declaringClass, o->vftbl->class);
+               declaredAnnotations = reflect_get_declaredannotatios(annotations, declaringClass, referer);
 
                LLNI_field_set_ref(this, declaredAnnotations, declaredAnnotations);
        }
@@ -141,16 +140,17 @@ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Constructor_decla
  */
 JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_Constructor_getParameterAnnotations(JNIEnv *env, java_lang_reflect_Constructor *this)
 {
-       java_handle_t           *o                    = (java_handle_t*)this;
        java_handle_bytearray_t *parameterAnnotations = NULL;
        int32_t                  slot                 = -1;
        java_lang_Class         *declaringClass       = NULL;
+       classinfo               *referer              = NULL;
 
        LLNI_field_get_ref(this, parameterAnnotations, parameterAnnotations);
        LLNI_field_get_val(this, slot, slot);
        LLNI_field_get_ref(this, clazz, declaringClass);
+       LLNI_class_get(this, referer);
 
-       return reflect_get_parameterannotations((java_handle_t*)parameterAnnotations, slot, declaringClass, o->vftbl->class);
+       return reflect_get_parameterannotations((java_handle_t*)parameterAnnotations, slot, declaringClass, referer);
 }
 #endif
 
index 17f78367973352e45b020f0e7176be2e0ee2dfe0..8da63369147cc02efa5ad231e5d6a7d2edd8b5bc 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_reflect_Field.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -1253,18 +1251,19 @@ JNIEXPORT java_lang_String* JNICALL Java_java_lang_reflect_Field_getSignature(JN
  */
 JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Field_declaredAnnotations(JNIEnv *env, java_lang_reflect_Field *this)
 {
-       java_handle_t           *o                   = (java_handle_t*)this;
        struct java_util_Map    *declaredAnnotations = NULL;
        java_handle_bytearray_t *annotations         = NULL;
        java_lang_Class         *declaringClass      = NULL;
+       classinfo               *referer             = NULL;
 
        LLNI_field_get_ref(this, declaredAnnotations, declaredAnnotations);
 
        if (declaredAnnotations == NULL) {
                LLNI_field_get_val(this, annotations, annotations);
                LLNI_field_get_ref(this, clazz, declaringClass);
+               LLNI_class_get(this, referer);
 
-               declaredAnnotations = reflect_get_declaredannotatios(annotations, declaringClass, o->vftbl->class);
+               declaredAnnotations = reflect_get_declaredannotatios(annotations, declaringClass, referer);
 
                LLNI_field_set_ref(this, declaredAnnotations, declaredAnnotations);
        }
index e8849592467bbee1101da8c5c91ae7806f72eda9..32d84d545d775e6bdeac5d5fef3061d4c939cc3a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_reflect_Method.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -231,8 +229,8 @@ JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_Method_getDefa
        utf                      *utf_parseAnnotationDefault = NULL;
        utf                      *utf_desc        = NULL;
        sun_reflect_ConstantPool *constantPool    = NULL;
-       java_handle_t            *o               = (java_handle_t*)this;
        java_lang_Class          *constantPoolOop = NULL;
+       classinfo                *referer         = NULL;
 
        if (this == NULL) {
                exceptions_throw_nullpointerexception();
@@ -263,15 +261,16 @@ JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_Method_getDefa
                        return NULL;
                }
 
+               LLNI_class_get(this, referer);
+
                m_parseAnnotationDefault = class_resolveclassmethod(
                        class_sun_reflect_annotation_AnnotationParser,
                        utf_parseAnnotationDefault,
                        utf_desc,
-                       o->vftbl->class,
+                       referer,
                        true);
 
-               if (m_parseAnnotationDefault == NULL)
-               {
+               if (m_parseAnnotationDefault == NULL) {
                        /* method not found */
                        return NULL;
                }
@@ -290,18 +289,19 @@ JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_Method_getDefa
  */
 JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Method_declaredAnnotations(JNIEnv *env, java_lang_reflect_Method *this)
 {
-       java_handle_t           *o                   = (java_handle_t*)this;
        struct java_util_Map    *declaredAnnotations = NULL;
        java_handle_bytearray_t *annotations         = NULL;
        java_lang_Class         *declaringClass      = NULL;
+       classinfo               *referer             = NULL;
 
        LLNI_field_get_ref(this, declaredAnnotations, declaredAnnotations);
 
        if (declaredAnnotations == NULL) {
                LLNI_field_get_val(this, annotations, annotations);
                LLNI_field_get_ref(this, clazz, declaringClass);
+               LLNI_class_get(this, referer);
 
-               declaredAnnotations = reflect_get_declaredannotatios(annotations, declaringClass, o->vftbl->class);
+               declaredAnnotations = reflect_get_declaredannotatios(annotations, declaringClass, referer);
 
                LLNI_field_set_ref(this, declaredAnnotations, declaredAnnotations);
        }
@@ -317,16 +317,17 @@ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Method_declaredAn
  */
 JNIEXPORT java_handle_objectarray_t* JNICALL Java_java_lang_reflect_Method_getParameterAnnotations(JNIEnv *env, java_lang_reflect_Method *this)
 {
-       java_handle_t           *o                    = (java_handle_t*)this;
        java_handle_bytearray_t *parameterAnnotations = NULL;
        int32_t                  slot                 = -1;
        java_lang_Class         *declaringClass       = NULL;
+       classinfo               *referer              = NULL;
 
        LLNI_field_get_ref(this, parameterAnnotations, parameterAnnotations);
        LLNI_field_get_val(this, slot, slot);
        LLNI_field_get_ref(this, clazz, declaringClass);
+       LLNI_class_get(this, referer);
 
-       return reflect_get_parameterannotations((java_handle_t*)parameterAnnotations, slot, declaringClass, o->vftbl->class);
+       return reflect_get_parameterannotations((java_handle_t*)parameterAnnotations, slot, declaringClass, referer);
 }
 #endif
 
index 2fb8eaf7f061b6c4a945517544a75e7b3c7c3008..b2138421ff66adbabdd081eb927781ee559f3c1b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_reflect_VMProxy.c 7910 2007-05-16 08:02:52Z twisti $
-
 */
 
 
index 615c7109a2b74936d75c3a2366a7eda87a9d15a3..4040c083fa8af76171407071a6f8c4db5c7b4293 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_security_VMAccessController.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index 48d9f53fc72776c10e9ab6ac456e90cb3b6676c4..ac9aa388258dc7331d64d061db02d88cb8e05a18 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMString.c 8017 2007-06-05 23:46:59Z twisti $
-
 */
 
 
index 77030ca4ee5238663e9dbe482a869955b4a53e2c..cf6bc2aa4e1b69bc5a9dd8ab440c7562f10ebfaa 100644 (file)
@@ -1,6 +1,6 @@
 /* src/native/vm/gnu/sun_reflect_ConstantPool.c
 
-   Copyright (C) 1996-2005, 2006, 2007 R. Grafl, A. Krall, C. Kruegel,
+   Copyright (C) 2007 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, M. S. Panzenböck Institut f. Computersprachen - TU Wien
 #include "mm/memory.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 #include "native/native.h"
+
 #include "native/include/java_lang_Object.h"
 #include "native/include/java_lang_Class.h"
 #include "native/include/sun_reflect_ConstantPool.h"
+
 #include "native/vm/reflect.h"
 
 #include "toolbox/logging.h"
@@ -55,6 +58,7 @@
 #include "vmcore/class.h"
 #include "vmcore/utf8.h"
 
+
 /* native methods implemented by this file ************************************/
 
 static JNINativeMethod methods[] = {
@@ -83,7 +87,7 @@ static JNINativeMethod methods[] = {
 
 void _Jv_sun_reflect_ConstantPool_init(void)
 {
-       native_method_register(utf_sun_reflect_ConstantPool, methods, NATIVE_METHODS_COUNT);
+       native_method_register(utf_new_char("sun/reflect/ConstantPool"), methods, NATIVE_METHODS_COUNT);
 }
 
 /*
@@ -259,7 +263,7 @@ JNIEXPORT struct java_lang_reflect_Field* JNICALL Java_sun_reflect_ConstantPool_
  */
 JNIEXPORT java_handle_objectarray_t* JNICALL Java_sun_reflect_ConstantPool_getMemberRefInfoAt0(JNIEnv *env, struct sun_reflect_ConstantPool* this, struct java_lang_Object* jcpool, int32_t index)
 {
-       log_println("Java_sun_reflect_ConstantPool_getMemberRefInfoAt0: jcpool=%p, index=%d, IMPLEMENT ME!", jcpool, index);
+       log_println("Java_sun_reflect_ConstantPool_getMemberRefInfoAt0(env=%p, jcpool=%p, index=%d): IMPLEMENT ME!", env, jcpool, index);
        return NULL;
 }
 
@@ -388,3 +392,18 @@ JNIEXPORT struct java_lang_String* JNICALL Java_sun_reflect_ConstantPool_getUTF8
        /* XXX: I hope literalstring_new is the right Function. */
        return (java_lang_String*)literalstring_new(ref);
 }
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index af28dd3c41734de137dc9ea78f1b42a2ee3f1ae2..d404ba300c83850f8ce3e04fa835f9bc2e525561 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_Class.c 8363 2007-08-20 19:10:46Z michi $
-
 */
 
 
@@ -62,7 +60,6 @@
 #endif
 
 #include "native/vm/java_lang_Class.h"
-#include "native/vm/java_lang_String.h"
 
 #if defined(ENABLE_JAVASE)
 # include "native/vm/reflect.h"
 #include "vmcore/loader.h"
 
 #if defined(WITH_CLASSPATH_GNU) && defined(ENABLE_ANNOTATIONS)
+#include "native/include/sun_reflect_ConstantPool.h"
+
 #include "vm/vm.h"
+
 #include "vmcore/annotation.h"
-#include "native/include/sun_reflect_ConstantPool.h"
 #endif
 
 /*
@@ -631,33 +630,23 @@ void _Jv_java_lang_Class_throwException(java_lang_Throwable *t)
  */
 java_handle_objectarray_t *_Jv_java_lang_Class_getDeclaredAnnotations(java_lang_Class* klass)
 {
-       classinfo                *c               = LLNI_classinfo_unwrap(klass);
+       classinfo                *c               = NULL;
        static methodinfo        *m_parseAnnotationsIntoArray   = NULL;
        utf                      *utf_parseAnnotationsIntoArray = NULL;
        utf                      *utf_desc        = NULL;
        java_handle_bytearray_t  *annotations     = NULL;
        sun_reflect_ConstantPool *constantPool    = NULL;
-       uint32_t                  size            = 0;
        java_lang_Object         *constantPoolOop = (java_lang_Object*)klass;
 
-       if (c == NULL) {
+       if (klass == NULL) {
                exceptions_throw_nullpointerexception();
                return NULL;
        }
        
-       /* Return null for arrays and primitives: */
-       if (class_is_primitive(c) || class_is_array(c)) {
-               return NULL;
-       }
-
-       if (c->annotations != NULL) {
-               size        = c->annotations->size;
-               annotations = builtin_newarray_byte(size);
+       c = LLNI_classinfo_unwrap(klass);
 
-               if(annotations != NULL) {
-                       MCOPY(annotations->data, c->annotations->data, uint8_t, size);
-               }
-       }
+       /* get annotations: */
+       annotations = class_get_annotations(c);
 
        constantPool = 
                (sun_reflect_ConstantPool*)native_new_and_init(
index 676d1d53a765bfaedf578f8bb9c008082238cf4b..124ccbc6aa1e1f4a6c2d5543a82074bea4d99bc0 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMClass.c 6131 2006-12-06 22:15:57Z twisti $
-
 */
 
 
index 43a4f87b4f5c5e69e62aaafbed6dfd75e1b116f6..5eaed828ca99a386a0c5e6547d8d2283c8a67524 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMClass.c 6131 2006-12-06 22:15:57Z twisti $
-
 */
 
 
  */
 java_lang_Class *_Jv_java_lang_ClassLoader_defineClass(java_lang_ClassLoader *cl, java_lang_String *name, java_handle_bytearray_t *data, s4 offset, s4 len, java_security_ProtectionDomain *pd)
 {
-       utf               *utfname;
-       classinfo         *c;
-       classloader       *loader;
-       java_lang_Class   *o;
+       utf             *utfname;
+       classinfo       *c;
+       classloader     *loader;
+       java_lang_Class *o;
 
 #if defined(ENABLE_JVMTI)
        jint new_class_data_len = 0;
index 33364bbe11d91fe2539130a37310fd61e7eab532..79a5e25ecab99184372bb9d4ca122505f8e3a73c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMClass.c 6131 2006-12-06 22:15:57Z twisti $
-
 */
 
 
index 191ed2448ebde4cd97625b352cb10c246c75af79..1438afec7b915d87f98f3a8e5ba82e12380c316d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMObject.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 
@@ -120,6 +118,12 @@ void _Jv_java_lang_Object_wait(java_lang_Object *o, s8 ms, s4 ns)
        if (jvmti) jvmti_MonitorWaiting(true, o, ms);
 #endif
 
+    if (ms < 0) {
+/*             exceptions_throw_illegalargumentexception("argument out of range"); */
+               exceptions_throw_illegalargumentexception();
+               return;
+       }
+
 #if defined(ENABLE_THREADS)
        lock_wait_for_object(&LLNI_field_direct(o, header), ms, ns);
 #endif
index a33e4bcfd7bc958ed6942ff2ea8ef211110990eb..21878bccd1a46e0b862d3975c17fcb4c5a1b84d4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMObject.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 
index 4a363e368392965dc34c310086674e199ef910c6..d167ec35373028b5abf5229b35a4370c769918bd 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
index eed7b92a908e33f68441cfb9d2261276959d254a..d936432bc66503d0008a7d1026acca55f7c80a59 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMRuntime.c 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
index c235fb63f662abfb6c20b587092225d384996dbd..f2ec76695c16a6015f3e32a2a09a31479506210f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_Thread.c 8380 2007-08-21 12:43:00Z michi $
-
 */
 
 
index 8cc76c33daeef5b2e7b52d29f05484bd52e4a082..51db34bdfc3c02617c8df86065c0fbcc26390bb7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMThread.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 
diff --git a/src/native/vm/java_lang_reflect_Constructor.c b/src/native/vm/java_lang_reflect_Constructor.c
new file mode 100644 (file)
index 0000000..72deed8
--- /dev/null
@@ -0,0 +1,208 @@
+/* src/native/vm/java_lang_reflect_Constructor.c
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <assert.h>
+#include <stdlib.h>
+
+#include "vm/types.h"
+
+#include "native/jni.h"
+#include "native/llni.h"
+#include "native/native.h"
+
+#if defined(WITH_CLASSPATH_SUN)
+# include "native/include/java_lang_String.h"           /* required by j.l.CL */
+# include "native/include/java_nio_ByteBuffer.h"        /* required by j.l.CL */
+# include "native/include/java_lang_ClassLoader.h"       /* required my j.l.C */
+#endif
+
+#include "native/include/java_lang_Object.h"             /* required my j.l.C */
+#include "native/include/java_lang_Class.h"
+#include "native/include/java_lang_String.h"
+
+#include "native/include/java_lang_reflect_Constructor.h"
+
+#include "native/vm/java_lang_reflect_Constructor.h"
+
+#include "toolbox/logging.h"
+
+#include "vm/builtin.h"
+#include "vm/exceptions.h"
+#include "vm/access.h"
+#include "vm/stringlocal.h"
+
+#include "vmcore/class.h"
+#include "vmcore/method.h"
+
+
+/*
+ * Class:     java/lang/reflect/Constructor
+ * Method:    getModifiers
+ * Signature: ()I
+ */
+s4 _Jv_java_lang_reflect_Constructor_getModifiers(JNIEnv *env, java_lang_reflect_Constructor *this)
+{
+       classinfo  *c;
+       methodinfo *m;
+       int32_t     slot;
+
+       LLNI_field_get_cls(this, clazz, c);
+       LLNI_field_get_val(this, slot , slot);
+       m = &(c->methods[slot]);
+
+       return m->flags;
+}
+
+
+/*
+ * Class:     java/lang/reflect/Constructor
+ * Method:    getParameterTypes
+ * Signature: ()[Ljava/lang/Class;
+ */
+java_handle_objectarray_t *_Jv_java_lang_reflect_Constructor_getParameterTypes(JNIEnv *env, java_lang_reflect_Constructor *this)
+{
+       classinfo  *c;
+       methodinfo *m;
+       int32_t     slot;
+
+       LLNI_field_get_cls(this, clazz, c);
+       LLNI_field_get_val(this, slot , slot);
+       m = &(c->methods[slot]);
+
+       return method_get_parametertypearray(m);
+}
+
+
+/*
+ * Class:     java/lang/reflect/Constructor
+ * Method:    getExceptionTypes
+ * Signature: ()[Ljava/lang/Class;
+ */
+java_handle_objectarray_t *_Jv_java_lang_reflect_Constructor_getExceptionTypes(JNIEnv *env, java_lang_reflect_Constructor *this)
+{
+       classinfo  *c;
+       methodinfo *m;
+       int32_t     slot;
+
+       LLNI_field_get_cls(this, clazz, c);
+       LLNI_field_get_val(this, slot , slot);
+       m = &(c->methods[slot]);
+
+       return method_get_exceptionarray(m);
+}
+
+
+/*
+ * Class:     java/lang/reflect/Constructor
+ * Method:    newInstance
+ * Signature: ([Ljava/lang/Object;)Ljava/lang/Object;
+ */
+java_lang_Object *_Jv_java_lang_reflect_Constructor_newInstance(JNIEnv *env, java_lang_reflect_Constructor *this, java_handle_objectarray_t *args)
+{
+       classinfo     *c;
+       methodinfo    *m;
+       s4             override;
+       java_handle_t *o;
+       int32_t        slot;
+
+       LLNI_field_get_cls(this, clazz, c);
+       LLNI_field_get_val(this, slot , slot);
+       m = &(c->methods[slot]);
+
+       /* check method access */
+
+       /* check if we should bypass security checks (AccessibleObject) */
+
+#if defined(WITH_CLASSPATH_GNU)
+       LLNI_field_get_val(this, flag, override);
+#elif defined(WITH_CLASSPATH_SUN)
+       LLNI_field_get_val(this, override, override);
+#else
+# error unknown classpath configuration
+#endif
+
+       if (override == false) {
+               if (!access_check_method(m, 1))
+                       return NULL;
+       }
+
+       /* create object */
+
+       o = builtin_new(c);
+
+       if (o == NULL)
+               return NULL;
+        
+       /* call initializer */
+
+       (void) _Jv_jni_invokeNative(m, o, args);
+
+       return (java_lang_Object *) o;
+}
+
+
+/*
+ * Class:     java/lang/reflect/Constructor
+ * Method:    getSignature
+ * Signature: ()Ljava/lang/String;
+ */
+java_lang_String *_Jv_java_lang_reflect_Constructor_getSignature(JNIEnv *env, java_lang_reflect_Constructor *this)
+{
+       classinfo     *c;
+       methodinfo    *m;
+       java_handle_t *o;
+       int32_t        slot;
+
+       LLNI_field_get_cls(this, clazz, c);
+       LLNI_field_get_val(this, slot , slot);
+       m = &(c->methods[slot]);
+
+       if (m->signature == NULL)
+               return NULL;
+
+       o = javastring_new(m->signature);
+
+       /* in error case o is NULL */
+
+       return (java_lang_String *) o;
+}
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
diff --git a/src/native/vm/java_lang_reflect_Constructor.h b/src/native/vm/java_lang_reflect_Constructor.h
new file mode 100644 (file)
index 0000000..4d06fe8
--- /dev/null
@@ -0,0 +1,63 @@
+/* src/native/vm/java_lang_reflect_Constructor.h
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _JV_JAVA_LANG_REFLECT_CONSTRUCTOR_H
+#define _JV_JAVA_LANG_REFLECT_CONSTRUCTOR_H
+
+#include "config.h"
+#include "vm/types.h"
+
+#include "native/jni.h"
+
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_String.h"
+#include "native/include/java_lang_reflect_Constructor.h"
+
+
+/* function prototypes ********************************************************/
+
+s4                         _Jv_java_lang_reflect_Constructor_getModifiers(JNIEnv *env, java_lang_reflect_Constructor *this);
+java_handle_objectarray_t *_Jv_java_lang_reflect_Constructor_getParameterTypes(JNIEnv *env, java_lang_reflect_Constructor *this);
+java_handle_objectarray_t *_Jv_java_lang_reflect_Constructor_getExceptionTypes(JNIEnv *env, java_lang_reflect_Constructor *this);
+java_lang_Object          *_Jv_java_lang_reflect_Constructor_newInstance(JNIEnv *env, java_lang_reflect_Constructor *this, java_handle_objectarray_t *args);
+java_lang_String          *_Jv_java_lang_reflect_Constructor_getSignature(JNIEnv *env, java_lang_reflect_Constructor *this);
+
+#endif /* _JV_JAVA_LANG_REFLECT_CONSTRUCTOR_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ */
index b532a520fb03b68947695e2503a3abe577ed71e9..b8c9646b206d3e102a2c86efcda407706e047f12 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_reflect_Method.c 8063 2007-06-11 14:44:58Z twisti $
-
 */
 
 
index 85fa518fbe10c65e08f36675d664c60df5123860..5ad53ccb08c230ea471266c8e524a4a679ffc47e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMObject.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 
index 378834db829c5c8ae105129c3c33c5db6aa719f3..8bb5fb628632ee65562d77679910076fee04798b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMObject.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 
index 944f0d3d39aca0dc70f9f0be4ec983c72171eceb..fe653dec84f3ab0ec984cd4a75b2864219ab66c1 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMObject.c 6213 2006-12-18 17:36:06Z twisti $
-
 */
 
 
index bc1f0b9b8ee21fa3afc569eb5e48a2a70e00195e..00171814555aee3b998fb856eccdc6d5fca3a9d6 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: native.c 7906 2007-05-14 17:25:33Z twisti $
-
 */
 
 
index f2b824bcc8a4572d7d9ae5efd63e515a0d3522f1..17e49446ace136a9a660718cc739264ced6661ca 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: native.c 7906 2007-05-14 17:25:33Z twisti $
-
 */
 
 
index c202319670f90742388e1999a67f3da9da37622f..72b268ab6f590094a162bd38cbaaf8890fb251ff 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: reflect.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -60,7 +58,6 @@
 #include "native/include/java_lang_reflect_Field.h"
 #include "native/include/java_lang_reflect_Method.h"
 
-#include "native/vm/java_lang_String.h"
 #include "native/vm/reflect.h"
 
 #include "vm/builtin.h"
@@ -169,7 +166,7 @@ java_lang_reflect_Field *reflect_field_new(fieldinfo *f)
        /* The name needs to be interned */
        /* XXX implement me better! */
 
-       LLNI_field_set_ref(rf, name          , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(f->name)));
+       LLNI_field_set_ref(rf, name          , javastring_intern((java_lang_String *) javastring_new(f->name)));
        LLNI_field_set_val(rf, slot          , slot);
        LLNI_field_set_ref(rf, annotations   , field_get_annotations(f));
 
@@ -180,7 +177,7 @@ java_lang_reflect_Field *reflect_field_new(fieldinfo *f)
        /* The name needs to be interned */
        /* XXX implement me better! */
 
-       LLNI_field_set_ref(rf, name          , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(f->name)));
+       LLNI_field_set_ref(rf, name          , javastring_intern((java_lang_String *) javastring_new(f->name)));
        LLNI_field_set_cls(rf, type          , (java_lang_Class *) field_get_type(f));
        LLNI_field_set_val(rf, modifiers     , f->flags);
        LLNI_field_set_val(rf, slot          , slot);
@@ -235,7 +232,7 @@ java_lang_reflect_Method *reflect_method_new(methodinfo *m)
        /* The name needs to be interned */
        /* XXX implement me better! */
 
-       LLNI_field_set_ref(rm, name                , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(m->name)));
+       LLNI_field_set_ref(rm, name                , javastring_intern((java_lang_String *) javastring_new(m->name)));
        LLNI_field_set_val(rm, slot                , slot);
        LLNI_field_set_ref(rm, annotations         , method_get_annotations(m));
        LLNI_field_set_ref(rm, parameterAnnotations, method_get_parameterannotations(m));
@@ -248,7 +245,7 @@ java_lang_reflect_Method *reflect_method_new(methodinfo *m)
        /* The name needs to be interned */
        /* XXX implement me better! */
 
-       LLNI_field_set_ref(rm, name                , _Jv_java_lang_String_intern((java_lang_String *) javastring_new(m->name)));
+       LLNI_field_set_ref(rm, name                , javastring_intern((java_lang_String *) javastring_new(m->name)));
        LLNI_field_set_ref(rm, parameterTypes      , method_get_parametertypearray(m));
        LLNI_field_set_cls(rm, returnType          , (java_lang_Class *) method_returntype_get(m));
        LLNI_field_set_ref(rm, exceptionTypes      , method_get_exceptionarray(m));
@@ -270,8 +267,8 @@ java_lang_reflect_Method *reflect_method_new(methodinfo *m)
 #if defined(WITH_CLASSPATH_GNU) && defined(ENABLE_ANNOTATIONS)
 /* reflect_get_declaredannotatios *********************************************
 
-   Returns a java.util.Map<Class, Annotation> of the declared
-   annotations.
+   Returns a java.util.Map<Class<? extends Annotation>, Annotation>
+   of the declared annotations.
 
 *******************************************************************************/
 
diff --git a/src/native/vm/reflect.h b/src/native/vm/reflect.h
new file mode 100644 (file)
index 0000000..ff83c26
--- /dev/null
@@ -0,0 +1,90 @@
+/* src/native/vm/reflect.h - helper functions for java/lang/reflect
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <stdint.h>
+
+#include "native/jni.h"
+#include "native/native.h"
+
+/* keep this order of the native includes */
+
+#include "native/include/java_lang_String.h"
+
+#if defined(ENABLE_JAVASE)
+# if defined(WITH_CLASSPATH_SUN)
+#  include "native/include/java_nio_ByteBuffer.h"       /* required by j.l.CL */
+# endif
+# include "native/include/java_lang_ClassLoader.h"
+#endif
+
+#include "native/include/java_lang_Object.h"
+#include "native/include/java_lang_Class.h"
+
+#if defined(ENABLE_JAVASE)
+# include "native/include/java_lang_reflect_Constructor.h"
+# include "native/include/java_lang_reflect_Field.h"
+# include "native/include/java_lang_reflect_Method.h"
+#endif
+
+#include "vmcore/field.h"
+#include "vmcore/method.h"
+
+
+/* function prototypes ********************************************************/
+
+java_lang_reflect_Constructor *reflect_constructor_new(methodinfo *m);
+java_lang_reflect_Field       *reflect_field_new(fieldinfo *f);
+java_lang_reflect_Method      *reflect_method_new(methodinfo *m);
+
+#if defined(WITH_CLASSPATH_GNU) && defined(ENABLE_ANNOTATIONS)
+struct java_util_Map* reflect_get_declaredannotatios(
+       java_handle_bytearray_t *annotations,
+       java_lang_Class         *declaringClass,
+       classinfo               *referer);
+
+java_handle_objectarray_t* reflect_get_parameterannotations(
+       java_handle_t   *parameterAnnotations,
+       int32_t          slot,
+       java_lang_Class *declaringClass,
+       classinfo       *referer);
+#endif
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
diff --git a/src/native/vm/sun/Makefile.am b/src/native/vm/sun/Makefile.am
new file mode 100644 (file)
index 0000000..e1f7372
--- /dev/null
@@ -0,0 +1,43 @@
+## src/native/vm/sun/Makefile.am
+##
+## Copyright (C) 2007 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.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2, or (at
+## your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+
+
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
+
+LIBS =
+
+noinst_LTLIBRARIES = \
+       libnativevmcore.la
+
+libnativevmcore_la_SOURCES = \
+       jvm.c
+
+
+## Local variables:
+## mode: Makefile
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End:
index 86a77e541fd7d27f27bb2305a64fb08eff36e60e..b4bc9d56543551e45a1786841e5744a7758d05a0 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jvm.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -79,7 +77,6 @@
 #include "native/vm/java_lang_ClassLoader.h"
 #include "native/vm/java_lang_Object.h"
 #include "native/vm/java_lang_Runtime.h"
-#include "native/vm/java_lang_String.h"
 #include "native/vm/java_lang_Thread.h"
 #include "native/vm/java_lang_reflect_Constructor.h"
 #include "native/vm/java_lang_reflect_Method.h"
@@ -87,6 +84,7 @@
 #include "native/vm/reflect.h"
 
 #include "threads/lock-common.h"
+#include "threads/threads-common.h"
 
 #include "toolbox/logging.h"
 
@@ -98,6 +96,7 @@
 #include "vm/primitive.h"
 #include "vm/properties.h"
 #include "vm/resolve.h"
+#include "vm/signallocal.h"
 #include "vm/stringlocal.h"
 #include "vm/vm.h"
 
 #include "vmcore/options.h"
 
 
-/* debugging macro ************************************************************/
+/* debugging macro***********************************************************/
 
 #if !defined(NDEBUG)
+
 # define TRACEJVMCALLS(...) \
     do { \
         if (opt_TraceJVMCalls) { \
             log_println(__VA_ARGS__); \
         } \
     } while (0)
+
+# define PRINTJVMWARNINGS(...)
+/*     do { \ */
+/*         if (opt_PrintJVMWarnings) { \ */
+/*             log_println(__VA_ARGS__); \ */
+/*         } \ */
+/*     } while (0) */
+
 #else
+
 # define TRACEJVMCALLS(...)
+# define PRINTJVMWARNINGS(...)
+
 #endif
 
 
@@ -344,7 +355,9 @@ jlong JVM_FreeMemory(void)
 
 jlong JVM_MaxMemory(void)
 {
-       log_println("JVM_MaxMemory: IMPLEMENT ME!");
+       TRACEJVMCALLS("JVM_MaxMemory()");
+
+       return gc_get_max_heap_size();
 }
 
 
@@ -578,7 +591,8 @@ jobject JVM_CompilerCommand(JNIEnv *env, jclass compCls, jobject arg)
 
 void JVM_EnableCompiler(JNIEnv *env, jclass compCls)
 {
-       log_println("JVM_EnableCompiler: IMPLEMENT ME!");
+       TRACEJVMCALLS("JVM_EnableCompiler(env=%p, compCls=%p)", env, compCls);
+       PRINTJVMWARNINGS("JVM_EnableCompiler not supported");
 }
 
 
@@ -586,7 +600,8 @@ void JVM_EnableCompiler(JNIEnv *env, jclass compCls)
 
 void JVM_DisableCompiler(JNIEnv *env, jclass compCls)
 {
-       log_println("JVM_DisableCompiler: IMPLEMENT ME!");
+       TRACEJVMCALLS("JVM_DisableCompiler(env=%p, compCls=%p)", env, compCls);
+       PRINTJVMWARNINGS("JVM_DisableCompiler not supported");
 }
 
 
@@ -618,11 +633,10 @@ jint JVM_GetLastErrorString(char *buf, int len)
 
 /* JVM_NativePath */
 
-char* JVM_NativePath(char* path)
+char *JVM_NativePath(char *path)
 {
-#if PRINTJVM
-       log_println("JVM_NativePath: path=%s", path);
-#endif
+       TRACEJVMCALLS("JVM_NativePath(path=%s)", path);
+
        /* XXX is this correct? */
 
        return path;
@@ -635,9 +649,7 @@ jclass JVM_GetCallerClass(JNIEnv* env, int depth)
 {
        java_handle_objectarray_t *oa;
 
-#if PRINTJVM
-       log_println("JVM_GetCallerClass: depth=%d", depth);
-#endif
+       TRACEJVMCALLS("JVM_GetCallerClass(env=%p, depth=%d)", env, depth);
 
        oa = stacktrace_getClassContext();
 
@@ -664,7 +676,7 @@ jclass JVM_FindPrimitiveClass(JNIEnv* env, const char* s)
        u = utf_new_char(s);
        c = primitive_class_get_by_name(u);
 
-       return LLNI_classinfo_wrap(c);
+       return (jclass) LLNI_classinfo_wrap(c);
 }
 
 
@@ -672,7 +684,8 @@ jclass JVM_FindPrimitiveClass(JNIEnv* env, const char* s)
 
 void JVM_ResolveClass(JNIEnv* env, jclass cls)
 {
-       log_println("JVM_ResolveClass: IMPLEMENT ME!");
+       TRACEJVMCALLS("JVM_ResolveClass(env=%p, cls=%p)", env, cls);
+       PRINTJVMWARNINGS("JVM_ResolveClass not implemented");
 }
 
 
@@ -680,13 +693,16 @@ void JVM_ResolveClass(JNIEnv* env, jclass cls)
 
 jclass JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, jboolean init, jobject loader, jboolean throwError)
 {
-       classinfo *c;
+       classinfo   *c;
+       utf         *u;
+       classloader *cl;
 
-#if PRINTJVM
-       log_println("JVM_FindClassFromClassLoader: name=%s, init=%d, loader=%p, throwError=%d", name, init, loader, throwError);
-#endif
+       TRACEJVMCALLS("JVM_FindClassFromClassLoader: name=%s, init=%d, loader=%p, throwError=%d", name, init, loader, throwError);
 
-       c = load_class_from_classloader(utf_new_char(name), (classloader *) loader);
+       u  = utf_new_char(name);
+       cl = (classloader *) loader;
+
+       c = load_class_from_classloader(u, cl);
 
        if (c == NULL)
                return NULL;
@@ -696,7 +712,7 @@ jclass JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, jboolean init
                        if (!initialize_class(c))
                                return NULL;
 
-       return LLNI_classinfo_wrap(c);
+       return (jclass) LLNI_classinfo_wrap(c);
 }
 
 
@@ -720,13 +736,20 @@ jclass JVM_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyt
 
 jclass JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize len, jobject pd, const char *source)
 {
-#if PRINTJVM
-       log_println("JVM_DefineClassWithSource: name=%s, loader=%p, buf=%p, len=%d, pd=%p, source=%s", name, loader, buf, len, pd, source);
-#endif
-       /* XXX do something with pd and source */
+       classinfo   *c;
+       utf         *u;
+       classloader *cl;
+
+       TRACEJVMCALLS("JVM_DefineClassWithSource(env=%p, name=%s, loader=%p, buf=%p, len=%d, pd=%p, source=%s)", env, name, loader, buf, len, pd, source);
+
+       u  = utf_new_char(name);
+       cl = (classloader *) loader;
 
-       return LLNI_classinfo_wrap( class_define(utf_new_char(name), (classloader *) loader, len, (u1 *) buf) );
+       /* XXX do something with source */
 
+       c = class_define(u, cl, len, (const uint8_t *) buf, (java_handle_t *) pd);
+
+       return (jclass) LLNI_classinfo_wrap(c);
 }
 
 
@@ -738,16 +761,14 @@ jclass JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name)
        utf         *u;
        classinfo   *c;
 
-       cl = (classloader *) loader;
+       TRACEJVMCALLS("JVM_FindLoadedClass(env=%p, loader=%p, name=%p)", env, loader, name);
 
-#if PRINTJVM
-       log_println("JVM_FindLoadedClass(loader=%p, name=%p)", loader, name);
-#endif
+       cl = (classloader *) loader;
 
        u = javastring_toutf((java_handle_t *) name, true);
        c = classcache_lookup(cl, u);
 
-       return LLNI_classinfo_wrap(c);
+       return (jclass) LLNI_classinfo_wrap(c);
 }
 
 
@@ -783,9 +804,8 @@ jobjectArray JVM_GetClassInterfaces(JNIEnv *env, jclass cls)
 
 jobject JVM_GetClassLoader(JNIEnv *env, jclass cls)
 {
-#if PRINTJVM
-       log_println("JVM_GetClassLoader: cls=%p", cls);
-#endif
+       TRACEJVMCALLS("JVM_GetClassLoader(env=%p, cls=%p)", env, cls);
+
        return (jobject) _Jv_java_lang_Class_getClassLoader((java_lang_Class *) cls);
 }
 
@@ -828,9 +848,7 @@ jobject JVM_GetProtectionDomain(JNIEnv *env, jclass cls)
 {
        classinfo *c;
 
-#if PRINTJVM || 1
-       log_println("JVM_GetProtectionDomain: cls=%p");
-#endif
+       TRACEJVMCALLS("JVM_GetProtectionDomain(env=%p, cls=%p)", env, cls);
 
        c = LLNI_classinfo_unwrap(cls);
 
@@ -844,7 +862,7 @@ jobject JVM_GetProtectionDomain(JNIEnv *env, jclass cls)
        if (class_is_primitive(c))
                return NULL;
 
-       return NULL;
+       return (jobject) c->protectiondomain;
 }
 
 
@@ -960,7 +978,7 @@ jclass JVM_GetComponentType(JNIEnv *env, jclass cls)
        
        component = class_get_componenttype(c);
 
-       return LLNI_classinfo_wrap(component);
+       return (jclass) LLNI_classinfo_wrap(component);
 }
 
 
@@ -1003,16 +1021,16 @@ jobjectArray JVM_GetDeclaredClasses(JNIEnv *env, jclass ofClass)
 
 jclass JVM_GetDeclaringClass(JNIEnv *env, jclass ofClass)
 {
-       classinfo *c = LLNI_classinfo_unwrap(ofClass);
+       classinfo *c;
+       classinfo *dc;
 
-       TRACEJVMCALLS("JVM_GetDeclaringClass: ofClass=%p", ofClass);
+       TRACEJVMCALLS("JVM_GetDeclaringClass(env=%p, ofClass=%p)", env, ofClass);
 
-       if(c == NULL) {
-               exceptions_throw_nullpointerexception();
-               return NULL;
-       }
+       c = LLNI_classinfo_unwrap(ofClass);
+
+       dc = class_get_declaringclass(c);
 
-       return LLNI_classinfo_wrap(class_get_declaringclass(c));
+       return (jclass) LLNI_classinfo_wrap(dc);
 }
 
 
@@ -1020,7 +1038,26 @@ jclass JVM_GetDeclaringClass(JNIEnv *env, jclass ofClass)
 
 jstring JVM_GetClassSignature(JNIEnv *env, jclass cls)
 {
-       log_println("JVM_GetClassSignature: IMPLEMENT ME!");
+       classinfo     *c;
+       utf           *u;
+       java_object_t *s;
+
+       TRACEJVMCALLS("JVM_GetClassSignature(env=%p, cls=%p)", env, cls);
+
+       c = (classinfo *) cls;
+
+       /* Get the signature of the class. */
+
+       u = class_get_signature(c);
+
+       if (u == NULL)
+               return NULL;
+
+       /* Convert UTF-string to a Java-string. */
+
+       s = javastring_new(u);
+
+       return (jstring) s;
 }
 
 
@@ -1028,8 +1065,7 @@ jstring JVM_GetClassSignature(JNIEnv *env, jclass cls)
 
 jbyteArray JVM_GetClassAnnotations(JNIEnv *env, jclass cls)
 {
-#if defined(ENABLE_ANNOTATIONS)
-       classinfo *c = LLNI_classinfo_unwrap(cls);
+       classinfo               *c           = NULL;
        java_handle_bytearray_t *annotations = NULL;
 
        TRACEJVMCALLS("JVM_GetClassAnnotations: cls=%p", cls);
@@ -1038,29 +1074,13 @@ jbyteArray JVM_GetClassAnnotations(JNIEnv *env, jclass cls)
                exceptions_throw_nullpointerexception();
                return NULL;
        }
+       
+       c = LLNI_classinfo_unwrap(cls);
 
-       /* Return null for arrays and primitives: */
-       if(class_is_primitive(c) || class_is_array(c))
-       {
-               return NULL;
-       }
-
-       if(c->annotations != NULL)
-       {
-               uint32_t size = c->annotations->size;
-               annotations = builtin_newarray_byte(size);
-
-               if(annotations != NULL)
-               {
-                       MCOPY(annotations->data, c->annotations->data, uint8_t, size);
-               }
-       }
+       /* get annotations: */
+       annotations = class_get_annotations(c);
 
        return (jbyteArray)annotations;
-#else
-       log_println("JVM_GetClassAnnotations: cls=%p, not implemented in this configuration!", cls);
-       return NULL;
-#endif
 }
 
 
@@ -1201,9 +1221,7 @@ jobject JVM_GetClassConstantPool(JNIEnv *env, jclass cls)
        sun_reflect_ConstantPool *constantPool    = NULL;
        java_lang_Object         *constantPoolOop = (java_lang_Object*)cls;
        
-       TRACEJVMCALLS("JVM_GetClassConstantPool: cls=%p", cls);
-
-       assert(cls != NULL);
+       TRACEJVMCALLS("JVM_GetClassConstantPool(env=%p, cls=%p)", env, cls);
 
        constantPool = 
                (sun_reflect_ConstantPool*)native_new_and_init(
@@ -1218,7 +1236,7 @@ jobject JVM_GetClassConstantPool(JNIEnv *env, jclass cls)
 
        return (jobject)constantPool;
 #else
-       log_println("JVM_GetClassConstantPool: cls=%p, not implemented in this configuration!", cls);
+       log_println("JVM_GetClassConstantPool(env=%p, cls=%p): not implemented in this configuration!", env, cls);
        return NULL;
 #endif
 }
@@ -1228,9 +1246,13 @@ jobject JVM_GetClassConstantPool(JNIEnv *env, jclass cls)
 
 jint JVM_ConstantPoolGetSize(JNIEnv *env, jobject unused, jobject jcpool)
 {
-       classinfo *cls = LLNI_classinfo_unwrap(jcpool);
-       TRACEJVMCALLS("JVM_ConstantPoolGetSize: jcpool=%p", jcpool);
-       return cls->cpcount;
+       classinfo *c;
+
+       TRACEJVMCALLS("JVM_ConstantPoolGetSize(env=%p, unused=%p, jcpool=%p)", env, unused, jcpool);
+
+       c = LLNI_classinfo_unwrap(jcpool);
+
+       return c->cpcount;
 }
 
 
@@ -1239,17 +1261,21 @@ jint JVM_ConstantPoolGetSize(JNIEnv *env, jobject unused, jobject jcpool)
 jclass JVM_ConstantPoolGetClassAt(JNIEnv *env, jobject unused, jobject jcpool, jint index)
 {
        constant_classref *ref;
-       classinfo *cls = LLNI_classinfo_unwrap(jcpool);
-       
-       TRACEJVMCALLS("JVM_ConstantPoolGetClassAt: jcpool=%p, index=%d", jcpool, index);
+       classinfo         *c;
+       classinfo         *result;
 
-       ref = (constant_classref*)class_getconstant(cls, index, CONSTANT_Class);
+       TRACEJVMCALLS("JVM_ConstantPoolGetClassAt(env=%p, jcpool=%p, index=%d)", env, jcpool, index);
 
-       if (ref == NULL) {
+       c = LLNI_classinfo_unwrap(jcpool);
+
+       ref = (constant_classref *) class_getconstant(c, index, CONSTANT_Class);
+
+       if (ref == NULL)
                return NULL;
-       }
 
-       return LLNI_classinfo_wrap(resolve_classref_eager(ref));
+       result = resolve_classref_eager(ref);
+
+       return (jclass) LLNI_classinfo_wrap(result);
 }
 
 
@@ -1258,26 +1284,26 @@ jclass JVM_ConstantPoolGetClassAt(JNIEnv *env, jobject unused, jobject jcpool, j
 jclass JVM_ConstantPoolGetClassAtIfLoaded(JNIEnv *env, jobject unused, jobject jcpool, jint index)
 {
        constant_classref *ref;
-       classinfo *c = NULL;
-       classinfo *cls = LLNI_classinfo_unwrap(jcpool);
+       classinfo         *c;
+       classinfo         *result;
 
-       TRACEJVMCALLS("JVM_ConstantPoolGetClassAtIfLoaded: jcpool=%p, index=%d", jcpool, index);
+       TRACEJVMCALLS("JVM_ConstantPoolGetClassAtIfLoaded(env=%p, unused=%p, jcpool=%p, index=%d)", env, unused, jcpool, index);
 
-       ref = (constant_classref*)class_getconstant(cls, index, CONSTANT_Class);
+       c = LLNI_classinfo_unwrap(jcpool);
 
-       if (ref == NULL) {
+       ref = (constant_classref *) class_getconstant(c, index, CONSTANT_Class);
+
+       if (ref == NULL)
                return NULL;
-       }
        
-       if (!resolve_classref(NULL, ref, resolveLazy, true, true, &c)) {
+       if (!resolve_classref(NULL, ref, resolveLazy, true, true, &result))
                return NULL;
-       }
 
-       if (c == NULL || !(c->state & CLASS_LOADED)) {
+       if ((result == NULL) || !(result->state & CLASS_LOADED)) {
                return NULL;
        }
        
-       return LLNI_classinfo_wrap(c);
+       return (jclass) LLNI_classinfo_wrap(result);
 }
 
 
@@ -1505,7 +1531,9 @@ jstring JVM_ConstantPoolGetUTF8At(JNIEnv *env, jobject unused, jobject jcpool, j
 
 jboolean JVM_DesiredAssertionStatus(JNIEnv *env, jclass unused, jclass cls)
 {
-       log_println("JVM_DesiredAssertionStatus: cls=%p, IMPLEMENT ME!", cls);
+       TRACEJVMCALLS("JVM_DesiredAssertionStatus(env=%p, unused=%p, cls=%p)", env, unused, cls);
+
+       /* TODO: Implement this one, but false should be OK. */
 
        return false;
 }
@@ -1859,69 +1887,21 @@ jint JVM_Write(jint fd, char *buf, jint nbytes)
 
 jint JVM_Available(jint fd, jlong *pbytes)
 {
-       TRACEJVMCALLS("JVM_Available(fd=%d, pbytes=%p)", fd, pbytes);
-
 #if defined(FIONREAD)
        int bytes;
 
+       TRACEJVMCALLS("JVM_Available(fd=%d, pbytes=%p)", fd, pbytes);
+
+       *pbytes = 0;
+
        if (ioctl(fd, FIONREAD, &bytes) < 0)
                return 0;
 
        *pbytes = bytes;
 
        return 1;
-#elif defined(HAVE_FSTAT)
-       struct stat statBuffer;
-       off_t n;
-       int result;
-
-       *pbytes = 0;
-
-       if ((fstat(fd, &statBuffer) == 0) && S_ISREG (statBuffer.st_mode)) {
-               n = lseek (fd, 0, SEEK_CUR);
-
-               if (n != -1) {
-                       *pbytes = statBuffer.st_size - n; 
-                       result = 1;
-               }
-               else {
-                       result = 0;
-               }
-       }
-       else {
-               result = 0;
-       }
-  
-       return result;
-#elif defined(HAVE_SELECT)
-       fd_set filedescriptset;
-       struct timeval tv;
-       int result;
-
-       *pbytes = 0;
-  
-       FD_ZERO(&filedescriptset);
-       FD_SET(fd, &filedescriptset);
-       memset(&tv, 0, sizeof(tv));
-
-       switch (select(fd+1, &filedescriptset, NULL, NULL, &tv))
-               {
-               case -1: 
-                       result = errno; 
-                       break;
-               case  0:
-                       *pbytes = 0;
-                       result = CPNATIVE_OK;
-                       break;      
-               default: 
-                       *pbytes = 1;
-                       result = CPNATIVE_OK;
-                       break;
-               }
-       return result;
 #else
-       *pbytes = 0;
-       return 0;
+# error FIONREAD not defined
 #endif
 }
 
@@ -2014,7 +1994,9 @@ void JVM_SetThreadPriority(JNIEnv* env, jobject jthread, jint prio)
 
 void JVM_Yield(JNIEnv *env, jclass threadClass)
 {
-       log_println("JVM_Yield: IMPLEMENT ME!");
+       TRACEJVMCALLS("JVM_Yield(env=%p, threadClass=%p)", env, threadClass);
+
+       threads_yield();
 }
 
 
@@ -2096,6 +2078,9 @@ jclass JVM_CurrentLoadedClass(JNIEnv *env)
 
 jobject JVM_CurrentClassLoader(JNIEnv *env)
 {
+    /* XXX if a method in a class in a trusted loader is in a
+          doPrivileged, return NULL */
+
        log_println("JVM_CurrentClassLoader: IMPLEMENT ME!");
 }
 
@@ -2131,7 +2116,11 @@ jint JVM_ClassLoaderDepth(JNIEnv *env)
 
 jstring JVM_GetSystemPackage(JNIEnv *env, jstring name)
 {
-       log_println("JVM_GetSystemPackage: IMPLEMENT ME!");
+       log_println("JVM_GetSystemPackage(env=%p, name=%p)");
+       javastring_print((java_handle_t *) name);
+       printf("\n");
+
+       return NULL;
 }
 
 
@@ -2179,24 +2168,13 @@ jclass JVM_LoadClass0(JNIEnv *env, jobject receiver, jclass currClass, jstring c
 
 jint JVM_GetArrayLength(JNIEnv *env, jobject arr)
 {
-       java_array_t *a;
+       java_handle_t *a;
 
        TRACEJVMCALLS("JVM_GetArrayLength(arr=%p)", arr);
 
-       a = (java_array_t *) arr;
-
-       if (a == NULL) {
-               exceptions_throw_nullpointerexception();
-               return 0;
-       }
-
-       if (!class_is_array(a->objheader.vftbl->class)) {
-/*             exceptions_throw_illegalargumentexception("Argument is not an array"); */
-               exceptions_throw_illegalargumentexception();
-               return 0;
-       }
+       a = (java_handle_t *) arr;
 
-       return a->size;
+       return array_length_get(a);
 }
 
 
@@ -2204,54 +2182,21 @@ jint JVM_GetArrayLength(JNIEnv *env, jobject arr)
 
 jobject JVM_GetArrayElement(JNIEnv *env, jobject arr, jint index)
 {
-       java_array_t *a;
-       int           elementtype;
+       java_handle_t *a;
+       java_handle_t *o;
 
        TRACEJVMCALLS("JVM_GetArrayElement(env=%p, arr=%p, index=%d)", env, arr, index);
 
-       a = (java_array_t *) arr;
+       a = (java_handle_t *) arr;
 
-       if (a == NULL) {
-               exceptions_throw_nullpointerexception();
-               return NULL;
-       }
+/*     if (!class_is_array(a->objheader.vftbl->class)) { */
+/*             exceptions_throw_illegalargumentexception(); */
+/*             return NULL; */
+/*     } */
 
-       if (!class_is_array(a->objheader.vftbl->class)) {
-               exceptions_throw_illegalargumentexception();
-               return NULL;
-       }
-       
-       if (index < 0 || index > a->size) {
-               exceptions_throw_arrayindexoutofboundsexception();
-               return NULL;
-       }
-       
-       elementtype = a->objheader.vftbl->arraydesc->elementtype;
-
-       switch (elementtype) {
-       case ARRAYTYPE_INT:
-               return (jobject)primitive_box_int(((java_handle_intarray_t*)a)->data[index]);
-       case ARRAYTYPE_LONG:
-               return (jobject)primitive_box_long(((java_handle_longarray_t*)a)->data[index]);
-       case ARRAYTYPE_FLOAT:
-               return (jobject)primitive_box_float(((java_handle_floatarray_t*)a)->data[index]);
-       case ARRAYTYPE_DOUBLE:
-               return (jobject)primitive_box_double(((java_handle_doublearray_t*)a)->data[index]);
-       case ARRAYTYPE_BYTE:
-               return (jobject)primitive_box_byte(((java_handle_bytearray_t*)a)->data[index]);
-       case ARRAYTYPE_CHAR:
-               return (jobject)primitive_box_char(((java_handle_chararray_t*)a)->data[index]);
-       case ARRAYTYPE_SHORT:
-               return (jobject)primitive_box_short(((java_handle_shortarray_t*)a)->data[index]);
-       case ARRAYTYPE_BOOLEAN:
-               return (jobject)primitive_box_boolean(((java_handle_booleanarray_t*)a)->data[index]);
-       case ARRAYTYPE_OBJECT:
-               return (jobject)((java_handle_objectarray_t*)a)->data[index];
-       default:
-               /* invalid element type */
-               exceptions_throw_internalerror("invalid element type code in array descriptor: %d", elementtype);
-               return (jobject)NULL;
-       }
+       o = array_element_get(a, index);
+
+       return (jobject) o;
 }
 
 
@@ -2267,7 +2212,15 @@ jvalue JVM_GetPrimitiveArrayElement(JNIEnv *env, jobject arr, jint index, jint w
 
 void JVM_SetArrayElement(JNIEnv *env, jobject arr, jint index, jobject val)
 {
-       log_println("JVM_SetArrayElement: IMPLEMENT ME!");
+       java_handle_t *a;
+       java_handle_t *value;
+
+       TRACEJVMCALLS("JVM_SetArrayElement(env=%p, arr=%p, index=%d, val=%p)", env, arr, index, val);
+
+       a     = (java_handle_t *) arr;
+       value = (java_handle_t *) val;
+
+       array_element_set(a, index, value);
 }
 
 
@@ -2290,6 +2243,13 @@ jobject JVM_NewArray(JNIEnv *env, jclass eltClass, jint length)
 
        TRACEJVMCALLS("JVM_NewArray(env=%p, eltClass=%p, length=%d)", env, eltClass, length);
 
+       if (eltClass == NULL) {
+               exceptions_throw_nullpointerexception();
+               return NULL;
+       }
+
+       /* NegativeArraySizeException is checked in builtin_newarray. */
+
        c = LLNI_classinfo_unwrap(eltClass);
 
        /* create primitive or object array */
@@ -2312,7 +2272,52 @@ jobject JVM_NewArray(JNIEnv *env, jclass eltClass, jint length)
 
 jobject JVM_NewMultiArray(JNIEnv *env, jclass eltClass, jintArray dim)
 {
-       log_println("JVM_NewMultiArray: IMPLEMENT ME!");
+       classinfo                 *c;
+       java_handle_intarray_t    *ia;
+       int32_t                    length;
+       long                      *dims;
+       int32_t                    value;
+       int32_t                    i;
+       classinfo                 *ac;
+       java_handle_objectarray_t *a;
+
+       TRACEJVMCALLS("JVM_NewMultiArray(env=%p, eltClass=%p, dim=%p)", env, eltClass, dim);
+
+       if (eltClass == NULL) {
+               exceptions_throw_nullpointerexception();
+               return NULL;
+       }
+
+       /* NegativeArraySizeException is checked in builtin_newarray. */
+
+       c = LLNI_classinfo_unwrap(eltClass);
+
+       /* XXX This is just a quick hack to get it working. */
+
+       ia = (java_handle_intarray_t *) dim;
+
+       length = array_length_get(ia);
+
+       dims = MNEW(long, length);
+
+       for (i = 0; i < length; i++) {
+               value = LLNI_array_direct(ia, i);
+               dims[i] = (long) value;
+       }
+
+       /* Create an array-class if necessary. */
+
+       if (class_is_primitive(c))
+               ac = primitive_arrayclass_get_by_name(c->name);
+       else
+               ac = class_array_of(c, true);
+
+       if (ac == NULL)
+               return NULL;
+
+       a = builtin_multianewarray(length, ac, dims);
+
+       return (jobject) a;
 }
 
 
@@ -2328,9 +2333,8 @@ jint JVM_InitializeSocketLibrary()
 
 jint JVM_Socket(jint domain, jint type, jint protocol)
 {
-#if PRINTJVM || 1
-       log_println("JVM_Socket: domain=%d, type=%d, protocol=%d", domain, type, protocol);
-#endif
+       TRACEJVMCALLS("JVM_Socket(domain=%d, type=%d, protocol=%d)", domain, type, protocol);
+
        return socket(domain, type, protocol);
 }
 
@@ -2339,9 +2343,8 @@ jint JVM_Socket(jint domain, jint type, jint protocol)
 
 jint JVM_SocketClose(jint fd)
 {
-#if PRINTJVM || 1
-       log_println("JVM_SocketClose: fd=%d", fd);
-#endif
+       TRACEJVMCALLS("JVM_SocketClose(fd=%d)", fd);
+
        return close(fd);
 }
 
@@ -2350,9 +2353,8 @@ jint JVM_SocketClose(jint fd)
 
 jint JVM_SocketShutdown(jint fd, jint howto)
 {
-#if PRINTJVM || 1
-       log_println("JVM_SocketShutdown: fd=%d, howto=%d", fd, howto);
-#endif
+       TRACEJVMCALLS("JVM_SocketShutdown(fd=%d, howto=%d)", fd, howto);
+
        return shutdown(fd, howto);
 }
 
@@ -2385,9 +2387,8 @@ jint JVM_Timeout(int fd, long timeout)
 
 jint JVM_Listen(jint fd, jint count)
 {
-#if PRINTJVM || 1
-       log_println("JVM_Listen: fd=%d, count=%d", fd, count);
-#endif
+       TRACEJVMCALLS("JVM_Listen(fd=%d, count=%d)", fd, count);
+
        return listen(fd, count);
 }
 
@@ -2396,9 +2397,8 @@ jint JVM_Listen(jint fd, jint count)
 
 jint JVM_Connect(jint fd, struct sockaddr *him, jint len)
 {
-#if PRINTJVM || 1
-       log_println("JVM_Connect: fd=%d, him=%p, len=%d", fd, him, len);
-#endif
+       TRACEJVMCALLS("JVM_Connect(fd=%d, him=%p, len=%d)", fd, him, len);
+
        return connect(fd, him, len);
 }
 
@@ -2415,9 +2415,8 @@ jint JVM_Bind(jint fd, struct sockaddr *him, jint len)
 
 jint JVM_Accept(jint fd, struct sockaddr *him, jint *len)
 {
-#if PRINTJVM || 1
-       log_println("JVM_Accept: fd=%d, him=%p, len=%p", fd, him, len);
-#endif
+       TRACEJVMCALLS("JVM_Accept(fd=%d, him=%p, len=%p)", fd, him, len);
+
        return accept(fd, him, (socklen_t *) len);
 }
 
@@ -2434,9 +2433,8 @@ jint JVM_RecvFrom(jint fd, char *buf, int nBytes, int flags, struct sockaddr *fr
 
 jint JVM_GetSockName(jint fd, struct sockaddr *him, int *len)
 {
-#if PRINTJVM || 1
-       log_println("JVM_GetSockName: fd=%d, him=%p, len=%p", fd, him, len);
-#endif
+       TRACEJVMCALLS("JVM_GetSockName(fd=%d, him=%p, len=%p)", fd, him, len);
+
        return getsockname(fd, him, (socklen_t *) len);
 }
 
@@ -2469,9 +2467,8 @@ jint JVM_GetSockOpt(jint fd, int level, int optname, char *optval, int *optlen)
 
 jint JVM_SetSockOpt(jint fd, int level, int optname, const char *optval, int optlen)
 {
-#if PRINTJVM || 1
-       log_println("JVM_SetSockOpt: fd=%d, level=%d, optname=%d, optval=%s, optlen=%d", fd, level, optname, optval, optlen);
-#endif
+       TRACEJVMCALLS("JVM_SetSockOpt(fd=%d, level=%d, optname=%d, optval=%s, optlen=%d)", fd, level, optname, optval, optlen);
+
        return setsockopt(fd, level, optname, optval, optlen);
 }
 
@@ -2480,9 +2477,8 @@ jint JVM_SetSockOpt(jint fd, int level, int optname, const char *optval, int opt
 
 int JVM_GetHostName(char* name, int namelen)
 {
-#if PRINTJVM || 1
-       log_println("JVM_GetHostName: name=%s, namelen=%d", name, namelen);
-#endif
+       TRACEJVMCALLS("JVM_GetHostName(name=%s, namelen=%d)", name, namelen);
+
        return gethostname(name, namelen);
 }
 
@@ -2513,12 +2509,15 @@ struct protoent* JVM_GetProtoByName(char* name)
 
 /* JVM_LoadLibrary */
 
-void* JVM_LoadLibrary(const char* name)
+void *JVM_LoadLibrary(const char *name)
 {
-#if PRINTJVM
-       log_println("JVM_LoadLibrary: name=%s", name);
-#endif
-    return native_library_open(utf_new_char(name));
+       utf *u;
+
+       TRACEJVMCALLS("JVM_LoadLibrary(name=%s)", name);
+
+       u = utf_new_char(name);
+
+       return native_library_open(u);
 }
 
 
@@ -2532,13 +2531,11 @@ void JVM_UnloadLibrary(void* handle)
 
 /* JVM_FindLibraryEntry */
 
-void* JVM_FindLibraryEntry(void* handle, const char* name)
+void *JVM_FindLibraryEntry(void *handle, const char *name)
 {
        lt_ptr symbol;
 
-#if PRINTJVM
-       log_println("JVM_FindLibraryEntry: handle=%p, name=%s", handle, name);
-#endif
+       TRACEJVMCALLS("JVM_FindLibraryEntry(handle=%p, name=%s)", handle, name);
 
        symbol = lt_dlsym(handle, name);
 
@@ -2558,13 +2555,13 @@ jboolean JVM_IsNaN(jdouble a)
 
 jboolean JVM_IsSupportedJNIVersion(jint version)
 {
-#if PRINTJVM
-       log_println("JVM_IsSupportedJNIVersion: version=%d", version);
-#endif
+       TRACEJVMCALLS("JVM_IsSupportedJNIVersion(version=%d)", version);
+
        switch (version) {
        case JNI_VERSION_1_1:
        case JNI_VERSION_1_2:
        case JNI_VERSION_1_4:
+       case JNI_VERSION_1_6:
                return true;
        default:
                return false;
@@ -2576,10 +2573,9 @@ jboolean JVM_IsSupportedJNIVersion(jint version)
 
 jstring JVM_InternString(JNIEnv *env, jstring str)
 {
-#if PRINTJVM
-       log_println("JVM_InternString: str=%p", str);
-#endif
-       return (jstring) _Jv_java_lang_String_intern((java_lang_String *) str);
+       TRACEJVMCALLS("JVM_InternString(env=%p, str=%p)", env, str);
+
+       return (jstring) javastring_intern((java_handle_t *) str);
 }
 
 
@@ -2849,15 +2845,212 @@ jobjectArray JVM_GetEnclosingMethodInfo(JNIEnv *env, jclass ofClass)
 
 jintArray JVM_GetThreadStateValues(JNIEnv* env, jint javaThreadState)
 {
-       log_println("JVM_GetThreadStateValues: IMPLEMENT ME!");
+       java_handle_intarray_t *ia;
+
+       TRACEJVMCALLS("JVM_GetThreadStateValues(env=%p, javaThreadState=%d)",
+                                 env, javaThreadState);
+
+       /* If new thread states are added in future JDK and VM versions,
+          this should check if the JDK version is compatible with thread
+          states supported by the VM.  Return NULL if not compatible.
+       
+          This function must map the VM java_lang_Thread::ThreadStatus
+          to the Java thread state that the JDK supports. */
+
+       switch (javaThreadState) {
+    case THREAD_STATE_NEW:
+               ia = builtin_newarray_int(1);
+
+               if (ia == NULL)
+                       return NULL;
+
+               array_intarray_element_set(ia, 0, THREAD_STATE_NEW);
+               break; 
+
+    case THREAD_STATE_RUNNABLE:
+               ia = builtin_newarray_int(1);
+
+               if (ia == NULL)
+                       return NULL;
+
+               array_intarray_element_set(ia, 0, THREAD_STATE_RUNNABLE);
+               break; 
+
+    case THREAD_STATE_BLOCKED:
+               ia = builtin_newarray_int(1);
+
+               if (ia == NULL)
+                       return NULL;
+
+               array_intarray_element_set(ia, 0, THREAD_STATE_BLOCKED);
+               break; 
+
+    case THREAD_STATE_WAITING:
+               ia = builtin_newarray_int(2);
+
+               if (ia == NULL)
+                       return NULL;
+
+               array_intarray_element_set(ia, 0, THREAD_STATE_WAITING);
+               /* XXX Implement parked stuff. */
+/*             array_intarray_element_set(ia, 1, PARKED); */
+               break; 
+
+    case THREAD_STATE_TIMED_WAITING:
+               ia = builtin_newarray_int(3);
+
+               if (ia == NULL)
+                       return NULL;
+
+               /* XXX Not sure about that one. */
+/*             array_intarray_element_set(ia, 0, SLEEPING); */
+               array_intarray_element_set(ia, 0, THREAD_STATE_TIMED_WAITING);
+               /* XXX Implement parked stuff. */
+/*             array_intarray_element_set(ia, 2, PARKED); */
+               break; 
+
+    case THREAD_STATE_TERMINATED:
+               ia = builtin_newarray_int(1);
+
+               if (ia == NULL)
+                       return NULL;
+
+               array_intarray_element_set(ia, 0, THREAD_STATE_TERMINATED);
+               break; 
+
+    default:
+               /* Unknown state - probably incompatible JDK version */
+               return NULL;
+       }
+
+       return (jintArray) ia;
 }
 
 
-/* JVM_GetThreadStateValues */
+/* JVM_GetThreadStateNames */
 
 jobjectArray JVM_GetThreadStateNames(JNIEnv* env, jint javaThreadState, jintArray values)
 {
-       log_println("JVM_GetThreadStateValues: IMPLEMENT ME!");
+       java_handle_intarray_t    *ia;
+       java_handle_objectarray_t *oa;
+       java_object_t             *s;
+
+       TRACEJVMCALLS("JVM_GetThreadStateNames(env=%p, javaThreadState=%d, values=%p)",
+                                 env, javaThreadState, values);
+
+       ia = (java_handle_intarray_t *) values;
+
+       /* If new thread states are added in future JDK and VM versions,
+          this should check if the JDK version is compatible with thread
+          states supported by the VM.  Return NULL if not compatible.
+       
+          This function must map the VM java_lang_Thread::ThreadStatus
+          to the Java thread state that the JDK supports. */
+
+       if (values == NULL) {
+               exceptions_throw_nullpointerexception();
+               return NULL;
+       }
+
+       switch (javaThreadState) {
+    case THREAD_STATE_NEW:
+               assert(ia->header.size == 1 && ia->data[0] == THREAD_STATE_NEW);
+
+               oa = builtin_anewarray(1, class_java_lang_String);
+
+               if (oa == NULL)
+                       return NULL;
+
+               s = javastring_new(utf_new_char("NEW"));
+
+               if (s == NULL)
+                       return NULL;
+
+               array_objectarray_element_set(oa, 0, s);
+               break; 
+
+    case THREAD_STATE_RUNNABLE:
+               oa = builtin_anewarray(1, class_java_lang_String);
+
+               if (oa == NULL)
+                       return NULL;
+
+               s = javastring_new(utf_new_char("RUNNABLE"));
+
+               if (s == NULL)
+                       return NULL;
+
+               array_objectarray_element_set(oa, 0, s);
+               break; 
+
+    case THREAD_STATE_BLOCKED:
+               oa = builtin_anewarray(1, class_java_lang_String);
+
+               if (oa == NULL)
+                       return NULL;
+
+               s = javastring_new(utf_new_char("BLOCKED"));
+
+               if (s == NULL)
+                       return NULL;
+
+               array_objectarray_element_set(oa, 0, s);
+               break; 
+
+    case THREAD_STATE_WAITING:
+               oa = builtin_anewarray(2, class_java_lang_String);
+
+               if (oa == NULL)
+                       return NULL;
+
+               s = javastring_new(utf_new_char("WAITING.OBJECT_WAIT"));
+/*             s = javastring_new(utf_new_char("WAITING.PARKED")); */
+
+               if (s == NULL)
+                       return NULL;
+
+               array_objectarray_element_set(oa, 0, s);
+/*             array_objectarray_element_set(oa, 1, s); */
+               break; 
+
+    case THREAD_STATE_TIMED_WAITING:
+               oa = builtin_anewarray(3, class_java_lang_String);
+
+               if (oa == NULL)
+                       return NULL;
+
+/*             s = javastring_new(utf_new_char("TIMED_WAITING.SLEEPING")); */
+               s = javastring_new(utf_new_char("TIMED_WAITING.OBJECT_WAIT"));
+/*             s = javastring_new(utf_new_char("TIMED_WAITING.PARKED")); */
+
+               if (s == NULL)
+                       return NULL;
+
+/*             array_objectarray_element_set(oa, 0, s); */
+               array_objectarray_element_set(oa, 0, s);
+/*             array_objectarray_element_set(oa, 2, s); */
+               break; 
+
+    case THREAD_STATE_TERMINATED:
+               oa = builtin_anewarray(1, class_java_lang_String);
+
+               if (oa == NULL)
+                       return NULL;
+
+               s = javastring_new(utf_new_char("TERMINATED"));
+
+               if (s == NULL)
+                       return NULL;
+
+               array_objectarray_element_set(oa, 0, s);
+               break; 
+
+       default:
+               /* Unknown state - probably incompatible JDK version */
+               return NULL;
+       }
+
+       return (jobjectArray) oa;
 }
 
 
@@ -2871,10 +3064,44 @@ void JVM_GetVersionInfo(JNIEnv* env, jvm_version_info* info, size_t info_size)
 
 /* OS: JVM_RegisterSignal */
 
-void* JVM_RegisterSignal(jint sig, void* handler)
+void *JVM_RegisterSignal(jint sig, void *handler)
 {
-       log_println("JVM_RegisterSignal: sig=%d, handler=%p, IMPLEMENT ME!", sig, handler);
-       return NULL;
+       functionptr newHandler;
+
+       TRACEJVMCALLS("JVM_RegisterSignal(sig=%d, handler=%p)", sig, handler);
+
+       if (handler == (void *) 2)
+               newHandler = (functionptr) signal_thread_handler;
+       else
+               newHandler = (functionptr) (uintptr_t) handler;
+
+       switch (sig) {
+    case SIGILL:
+    case SIGFPE:
+    case SIGUSR1:
+    case SIGSEGV:
+               /* These signals are already used by the VM. */
+               return (void *) -1;
+
+    case SIGQUIT:
+               /* This signal is used by the VM to dump thread stacks unless
+                  ReduceSignalUsage is set, in which case the user is allowed
+                  to set his own _native_ handler for this signal; thus, in
+                  either case, we do not allow JVM_RegisterSignal to change
+                  the handler. */
+               return (void *) -1;
+
+       case SIGHUP:
+       case SIGINT:
+       case SIGTERM:
+               break;
+       }
+
+       signal_register_signal(sig, newHandler, 0);
+
+       /* XXX Should return old handler. */
+
+       return (void *) 2;
 }
 
 
@@ -2882,7 +3109,7 @@ void* JVM_RegisterSignal(jint sig, void* handler)
 
 jboolean JVM_RaiseSignal(jint sig)
 {
-       log_println("JVM_RaiseSignal: sig=%s", sig);
+       log_println("JVM_RaiseSignal: IMPLEMENT ME! sig=%s", sig);
        return false;
 }
 
@@ -2891,8 +3118,22 @@ jboolean JVM_RaiseSignal(jint sig)
 
 jint JVM_FindSignal(const char *name)
 {
-       log_println("JVM_FindSignal: name=%s", name);
-       return 0;
+       TRACEJVMCALLS("JVM_FindSignal(name=%s)", name);
+
+#if defined(__LINUX__)
+       if (strcmp(name, "HUP") == 0)
+               return SIGHUP;
+
+       if (strcmp(name, "INT") == 0)
+               return SIGINT;
+
+       if (strcmp(name, "TERM") == 0)
+               return SIGTERM;
+#else
+# error not implemented for this OS
+#endif
+
+       return -1;
 }
 
 
index 496cff0de88d807c98fea597a7af12da7b5edc41..b310006fe234c5363110a3f08b7018eca3d0cbd2 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_VMObject.c 5153 2006-07-18 08:19:24Z twisti $
-
 */
 
 
 #include "config.h"
 
 #include <stdint.h>
+#include <unistd.h>
 
 #include "mm/memory.h"
 
@@ -54,6 +53,7 @@
 
 #include "native/include/sun_misc_Unsafe.h"
 
+#include "vm/builtin.h"
 #include "vm/exceptions.h"
 #include "vm/initialize.h"
 #include "vm/stringlocal.h"
@@ -73,14 +73,24 @@ static JNINativeMethod methods[] = {
        { "putBoolean",             "(Ljava/lang/Object;JZ)V",                                    (void *) (intptr_t) &Java_sun_misc_Unsafe_putBoolean                     },
        { "getByte",                "(Ljava/lang/Object;J)B",                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_getByte__Ljava_lang_Object_2J  },
        { "putByte",                "(Ljava/lang/Object;JB)V",                                    (void *) (intptr_t) &Java_sun_misc_Unsafe_putByte__Ljava_lang_Object_2JB },
+       { "putShort",               "(Ljava/lang/Object;JS)V",                                    (void *) (intptr_t) &Java_sun_misc_Unsafe_putShort__Ljava_lang_Object_2JS },
        { "getChar",                "(Ljava/lang/Object;J)C",                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_getChar__Ljava_lang_Object_2J  },
        { "putChar",                "(Ljava/lang/Object;JC)V",                                    (void *) (intptr_t) &Java_sun_misc_Unsafe_putChar__Ljava_lang_Object_2JC },
+       { "getLong",                "(Ljava/lang/Object;J)J",                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_getLong__Ljava_lang_Object_2J  },
+       { "getFloat",               "(Ljava/lang/Object;J)F",                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_getFloat__Ljava_lang_Object_2J },
+       { "putFloat",               "(Ljava/lang/Object;JF)V",                                    (void *) (intptr_t) &Java_sun_misc_Unsafe_putFloat__Ljava_lang_Object_2JF },
        { "getByte",                "(J)B",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_getByte__J                     },
+       { "putByte",                "(JB)V",                                                      (void *) (intptr_t) &Java_sun_misc_Unsafe_putByte__JB                    },
+       { "getShort",               "(J)S",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_getShort__J                    },
+       { "putShort",               "(JS)V",                                                      (void *) (intptr_t) &Java_sun_misc_Unsafe_putShort__JS                   },
        { "getInt",                 "(J)I",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_getInt__J                      },
+       { "putInt",                 "(JI)V",                                                      (void *) (intptr_t) &Java_sun_misc_Unsafe_putInt__JI                     },
        { "getLong",                "(J)J",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_getLong__J                     },
        { "putLong",                "(JJ)V",                                                      (void *) (intptr_t) &Java_sun_misc_Unsafe_putLong__JJ                    },
+       { "getFloat",               "(J)F",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_getFloat__J                    },
        { "objectFieldOffset",      "(Ljava/lang/reflect/Field;)J",                               (void *) (intptr_t) &Java_sun_misc_Unsafe_objectFieldOffset              },
        { "allocateMemory",         "(J)J",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_allocateMemory                 },
+       { "setMemory",              "(Ljava/lang/Object;JJB)V",                                   (void *) (intptr_t) &Java_sun_misc_Unsafe_setMemory                      },
        { "freeMemory",             "(J)V",                                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_freeMemory                     },
        { "staticFieldOffset",      "(Ljava/lang/reflect/Field;)J",                               (void *) (intptr_t) &Java_sun_misc_Unsafe_staticFieldOffset              },
        { "staticFieldBase",        "(Ljava/lang/reflect/Field;)Ljava/lang/Object;",              (void *) (intptr_t) &Java_sun_misc_Unsafe_staticFieldBase                },
@@ -88,13 +98,16 @@ static JNINativeMethod methods[] = {
        { "arrayBaseOffset",        "(Ljava/lang/Class;)I",                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_arrayBaseOffset                },
        { "arrayIndexScale",        "(Ljava/lang/Class;)I",                                       (void *) (intptr_t) &Java_sun_misc_Unsafe_arrayIndexScale                },
        { "addressSize",            "()I",                                                        (void *) (intptr_t) &Java_sun_misc_Unsafe_addressSize                    },
+       { "pageSize",               "()I",                                                        (void *) (intptr_t) &Java_sun_misc_Unsafe_pageSize                       },
        { "defineClass",            "(Ljava/lang/String;[BIILjava/lang/ClassLoader;Ljava/security/ProtectionDomain;)Ljava/lang/Class;", (void *) (intptr_t) &Java_sun_misc_Unsafe_defineClass__Ljava_lang_String_2_3BIILjava_lang_ClassLoader_2Ljava_security_ProtectionDomain_2 },
+       { "allocateInstance",       "(Ljava/lang/Class;)Ljava/lang/Object;",                      (void *) (intptr_t) &Java_sun_misc_Unsafe_allocateInstance               },
        { "throwException",         "(Ljava/lang/Throwable;)V",                                   (void *) (intptr_t) &Java_sun_misc_Unsafe_throwException                 },
        { "compareAndSwapObject",   "(Ljava/lang/Object;JLjava/lang/Object;Ljava/lang/Object;)Z", (void *) (intptr_t) &Java_sun_misc_Unsafe_compareAndSwapObject           },
        { "compareAndSwapInt",      "(Ljava/lang/Object;JII)Z",                                   (void *) (intptr_t) &Java_sun_misc_Unsafe_compareAndSwapInt              },
        { "compareAndSwapLong",     "(Ljava/lang/Object;JJJ)Z",                                   (void *) (intptr_t) &Java_sun_misc_Unsafe_compareAndSwapLong             },
        { "getObjectVolatile",      "(Ljava/lang/Object;J)Ljava/lang/Object;",                    (void *) (intptr_t) &Java_sun_misc_Unsafe_getObjectVolatile              },
        { "getIntVolatile",         "(Ljava/lang/Object;J)I",                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_getIntVolatile                 },
+       { "getLongVolatile",        "(Ljava/lang/Object;J)J",                                     (void *) (intptr_t) &Java_sun_misc_Unsafe_getLongVolatile                },
        { "unpark",                 "(Ljava/lang/Object;)V",                                      (void *) (intptr_t) &Java_sun_misc_Unsafe_unpark                         },
        { "park",                   "(ZJ)V",                                                      (void *) (intptr_t) &Java_sun_misc_Unsafe_park                           },
 };
@@ -261,6 +274,21 @@ JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putByte__Ljava_lang_Object_2JB(JNIEn
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    putShort
+ * Signature: (Ljava/lang/Object;JS)V
+ */
+JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putShort__Ljava_lang_Object_2JS(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Object *o, int64_t offset, int32_t x)
+{
+       int32_t *p;
+
+       p = (int32_t *) (((uint8_t *) o) + offset);
+
+       *p = x;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    getChar
@@ -294,6 +322,57 @@ JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putChar__Ljava_lang_Object_2JC(JNIEn
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    getLong
+ * Signature: (Ljava/lang/Object;J)J
+ */
+JNIEXPORT int64_t JNICALL Java_sun_misc_Unsafe_getLong__Ljava_lang_Object_2J(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Object *o, int64_t offset)
+{
+       int64_t *p;
+       int64_t  value;
+
+       p = (int64_t *) (((uint8_t *) o) + offset);
+
+       value = *p;
+
+       return value;
+}
+
+
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    getFloat
+ * Signature: (Ljava/lang/Object;J)F
+ */
+JNIEXPORT float JNICALL Java_sun_misc_Unsafe_getFloat__Ljava_lang_Object_2J(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Object *o, int64_t offset)
+{
+       float *p;
+       float  value;
+
+       p = (float *) (((uint8_t *) o) + offset);
+
+       value = *p;
+
+       return value;
+}
+
+
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    putFloat
+ * Signature: (Ljava/lang/Object;JF)V
+ */
+JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putFloat__Ljava_lang_Object_2JF(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Object *o, int64_t offset, float x)
+{
+       float *p;
+
+       p = (float *) (((uint8_t *) o) + offset);
+
+       *p = x;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    getByte
@@ -312,6 +391,54 @@ JNIEXPORT int32_t JNICALL Java_sun_misc_Unsafe_getByte__J(JNIEnv *env, sun_misc_
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    putByte
+ * Signature: (JB)V
+ */
+JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putByte__JB(JNIEnv *env, sun_misc_Unsafe *this, int64_t address, int32_t value)
+{
+       int8_t *p;
+
+       p = (int8_t *) (intptr_t) address;
+
+       *p = (int8_t) value;
+}
+
+
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    getShort
+ * Signature: (J)S
+ */
+JNIEXPORT int32_t JNICALL Java_sun_misc_Unsafe_getShort__J(JNIEnv *env, sun_misc_Unsafe *this, int64_t address)
+{
+       int16_t *p;
+       int16_t  value;
+
+       p = (int16_t *) (intptr_t) address;
+
+       value = *p;
+
+       return (int32_t) value;
+}
+
+
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    putShort
+ * Signature: (JS)V
+ */
+JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putShort__JS(JNIEnv *env, sun_misc_Unsafe *this, int64_t address, int32_t value)
+{
+       int16_t *p;
+
+       p = (int16_t *) (intptr_t) address;
+
+       *p = (int16_t) value;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    getInt
@@ -330,6 +457,21 @@ JNIEXPORT int32_t JNICALL Java_sun_misc_Unsafe_getInt__J(JNIEnv *env, sun_misc_U
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    putInt
+ * Signature: (JI)V
+ */
+JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putInt__JI(JNIEnv *env, struct sun_misc_Unsafe* this, int64_t address, int32_t value)
+{
+       int32_t *p;
+
+       p = (int32_t *) (intptr_t) address;
+
+       *p = value;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    getLong
@@ -363,12 +505,30 @@ JNIEXPORT void JNICALL Java_sun_misc_Unsafe_putLong__JJ(JNIEnv *env, sun_misc_Un
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    getFloat
+ * Signature: (J)F
+ */
+JNIEXPORT float JNICALL Java_sun_misc_Unsafe_getFloat__J(JNIEnv *env, sun_misc_Unsafe *this, int64_t address)
+{
+       float *p;
+       float  value;
+
+       p = (float *) (intptr_t) address;
+
+       value = *p;
+
+       return value;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    objectFieldOffset
  * Signature: (Ljava/lang/reflect/Field;)J
  */
-JNIEXPORT int64_t JNICALL Java_sun_misc_Unsafe_objectFieldOffset(JNIEnv *env, sun_misc_Unsafe* this, java_lang_reflect_Field* field)
+JNIEXPORT int64_t JNICALL Java_sun_misc_Unsafe_objectFieldOffset(JNIEnv *env, sun_misc_Unsafe *this, java_lang_reflect_Field *field)
 {
        classinfo *c;
        fieldinfo *f;
@@ -376,6 +536,7 @@ JNIEXPORT int64_t JNICALL Java_sun_misc_Unsafe_objectFieldOffset(JNIEnv *env, su
 
        LLNI_field_get_cls(field, clazz, c);
        LLNI_field_get_val(field, slot , slot);
+
        f = &c->fields[slot];
 
        return (int64_t) f->offset;
@@ -405,6 +566,33 @@ JNIEXPORT int64_t JNICALL Java_sun_misc_Unsafe_allocateMemory(JNIEnv *env, sun_m
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    setMemory
+ * Signature: (Ljava/lang/Object;JJB)V
+ */
+JNIEXPORT void JNICALL Java_sun_misc_Unsafe_setMemory(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Object *o, int64_t offset, int64_t bytes, int32_t value)
+{
+       size_t  length;
+       void   *p;
+
+       length = (size_t) bytes;
+
+       if ((length != (uint64_t) bytes) || (bytes < 0)) {
+               exceptions_throw_illegalargumentexception();
+               return;
+       }
+
+       /* XXX Missing LLNI: we need to unwrap this object. */
+
+       p = (void *) (((uint8_t *) o) + offset);
+
+       /* XXX Not sure this is correct. */
+
+       MSET(p, value, uint8_t, length);
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    freeMemory
@@ -530,6 +718,21 @@ JNIEXPORT int32_t JNICALL Java_sun_misc_Unsafe_addressSize(JNIEnv *env, sun_misc
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    pageSize
+ * Signature: ()I
+ */
+JNIEXPORT int32_t JNICALL Java_sun_misc_Unsafe_pageSize(JNIEnv *env, sun_misc_Unsafe *this)
+{
+       int sz;
+
+       sz = getpagesize();
+
+       return sz;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    defineClass
@@ -569,7 +772,8 @@ JNIEXPORT java_lang_Class* JNICALL Java_sun_misc_Unsafe_defineClass__Ljava_lang_
 
        /* define the class */
 
-       c = class_define(utfname, cl, len, (const uint8_t *) &LLNI_array_direct(b, off));
+       c = class_define(utfname, cl, len, (const uint8_t *) &b->data[off],
+                                        protectionDomain);
 
        if (c == NULL)
                return NULL;
@@ -588,6 +792,24 @@ JNIEXPORT java_lang_Class* JNICALL Java_sun_misc_Unsafe_defineClass__Ljava_lang_
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    allocateInstance
+ * Signature: (Ljava/lang/Class;)Ljava/lang/Object;
+ */
+JNIEXPORT java_lang_Object* JNICALL Java_sun_misc_Unsafe_allocateInstance(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Class *cls)
+{
+       classinfo     *c;
+       java_object_t *o;
+
+       c = LLNI_classinfo_unwrap(cls);
+
+       o = builtin_new(c);
+
+       return (java_lang_Object *) o;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    throwException
@@ -717,6 +939,24 @@ JNIEXPORT int32_t JNICALL Java_sun_misc_Unsafe_getIntVolatile(JNIEnv *env, sun_m
 }
 
 
+/*
+ * Class:     sun/misc/Unsafe
+ * Method:    getLongVolatile
+ * Signature: (Ljava/lang/Object;J)J
+ */
+JNIEXPORT int64_t JNICALL Java_sun_misc_Unsafe_getLongVolatile(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Object *o, int64_t offset)
+{
+       volatile int64_t *p;
+       volatile int64_t  value;
+
+       p = (volatile int64_t *) (((uint8_t *) o) + offset);
+
+       value = *p;
+
+       return value;
+}
+
+
 /*
  * Class:     sun/misc/Unsafe
  * Method:    unpark
index c9fd64fa973fa306302f215c51ff4e7e599eb3e3..f774795efd38f70ee53afe079b8a5d3504483b56 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 5660 2006-10-04 12:09:26Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
index 8a402e48f99ad6945c15667d271fe70d03251502..717fc77685831bbcef6ea2d459848eb4a18c81fc 100644 (file)
@@ -29,7 +29,5 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: java.in 5659 2006-10-04 10:37:09Z twisti $
 
 exec cacao ${1+"$@"}
index f8e34c8d0671ff001c8380ebe1b561dfe9dabbf4..9ef68cfb57debb621b491f136d0fc1fa487e196d 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7813 2007-04-25 19:20:13Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index d49ca068da14a2073ab6046fce609d086d738c48..51c331747607de2a01786e409becdde4a68c44ef 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.c 4903 2006-05-11 12:48:43Z edwin $
-
 */
 
 
index 7bfcb1197e5fa50307c3b45aa708e1154546af59..5ff4ae2e406e9dff358fc9277fb2ed268bcedcf5 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: threads.h 4866 2006-05-01 21:40:38Z edwin $
-
 */
 
 
diff --git a/src/threads/lock-common.h b/src/threads/lock-common.h
new file mode 100644 (file)
index 0000000..6984b23
--- /dev/null
@@ -0,0 +1,89 @@
+/* src/threads/lock-common.h - common stuff of lock implementation
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _LOCK_COMMON_H
+#define _LOCK_COMMON_H
+
+#include "config.h"
+#include "vm/types.h"
+
+#include "vm/global.h"
+
+/* ATTENTION: Don't include a threads header here, as it could include
+   java_lang_Thread.h and thus break the build (means, it recompiles
+   every time)!  Take care of that... */
+
+#if defined(ENABLE_THREADS)
+# include "threads/native/lock.h"
+#else
+# include "threads/none/lock.h"
+#endif
+
+
+/* only define the following stuff with thread enabled ************************/
+
+#if defined(ENABLE_THREADS)
+
+/* functions ******************************************************************/
+
+void lock_init(void);
+
+void lock_init_object_lock(java_object_t *);
+lock_record_t *lock_get_initial_lock_word(void);
+
+ptrint lock_pre_compute_thinlock(s4 index);
+
+bool lock_monitor_enter(java_object_t *);
+bool lock_monitor_exit(java_object_t *);
+
+#define LOCK_monitor_enter    (functionptr) lock_monitor_enter
+#define LOCK_monitor_exit     (functionptr) lock_monitor_exit
+
+bool lock_is_held_by_current_thread(java_object_t *o);
+
+void lock_wait_for_object(java_object_t *o, s8 millis, s4 nanos);
+void lock_notify_object(java_object_t *o);
+void lock_notify_all_object(java_object_t *o);
+
+#endif /* ENABLE_THREADS */
+
+#endif /* _LOCK_COMMON_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index a8ce9b28449a23cfc17fad06b0696f5deba118e4..abc3419f826b902f08c6f66e3089dfa50be45c8d 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7786 2007-04-21 12:37:47Z edwin $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src -I$(top_srcdir)/contrib/vmlog
 
index 4dd165d9f96232fa25ffda2b70a322235c8a88f8..312e380ea3bb6ed84091de8312a215e2737472ed 100644 (file)
@@ -30,7 +30,6 @@
 
    Changes: 
 
-   $Id: generic-primitives.h 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index fd5e6f5faff0dc37fd91cc74ee8fe987b13a7e41..3adfb24dc3ff802a7b820aceb310abbab88de4e0 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: lock.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index b6cf995cafa606d19ffc862ff3d2ad96c968866d..db06d6eb53c633b23e2a5be8ec978e33be2bd086 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: lock.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 86558cfc56101ca2e026f083d85f697c7b568c3e..e5f30aac5d177ae24d72b9cd50b97de009de9241 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.c 8374 2007-08-21 10:20:33Z michi $
-
 */
 
 
@@ -888,13 +886,22 @@ bool threads_init(void)
                                                                 utf_new_char("(Ljava/lang/VMThread;Ljava/lang/String;IZ)V"),
                                                                 class_java_lang_Thread,
                                                                 true);
-#else
+#elif defined(WITH_CLASSPATH_SUN)
        method_thread_init =
                class_resolveclassmethod(class_java_lang_Thread,
                                                                 utf_init,
                                                                 utf_new_char("(Ljava/lang/String;)V"),
                                                                 class_java_lang_Thread,
                                                                 true);
+#elif defined(WITH_CLASSPATH_CLDC1_1)
+       method_thread_init =
+               class_resolveclassmethod(class_java_lang_Thread,
+                                                                utf_init,
+                                                                utf_new_char("(Ljava/lang/String;)V"),
+                                                                class_java_lang_Thread,
+                                                                true);
+#else
+# error unknown classpath configuration
 #endif
 
        if (method_thread_init == NULL)
@@ -964,11 +971,17 @@ bool threads_init(void)
 
 #elif defined(WITH_CLASSPATH_SUN)
 
-       /* We trick java.lang.Thread.init, which sets the priority of the
-          current thread to the parent's one. */
+       /* We trick java.lang.Thread.<init>, which sets the priority of
+          the current thread to the parent's one. */
 
        t->priority = NORM_PRIORITY;
 
+       /* Call java.lang.Thread.<init>(Ljava/lang/String;)V */
+
+       o = (java_object_t *) t;
+
+       (void) vm_call_method(method_thread_init, o, threadname);
+
 #elif defined(WITH_CLASSPATH_CLDC1_1)
 
        /* set the thread */
@@ -1215,8 +1228,9 @@ static void *threads_startup_thread(void *arg)
                jvmti_ThreadStartEnd(JVMTI_EVENT_THREAD_END);
 #endif
 
-       if (!threads_detach_thread(thread))
-               vm_abort("threads_startup_thread: threads_detach_thread failed");
+       /* We ignore the return value. */
+
+       (void) threads_detach_thread(thread);
 
        /* set ThreadMXBean variables */
 
@@ -1497,25 +1511,68 @@ bool threads_attach_current_thread(JavaVMAttachArgs *vm_aargs, bool isdaemon)
 
 *******************************************************************************/
 
-bool threads_detach_thread(threadobject *thread)
+bool threads_detach_thread(threadobject *t)
 {
 #if defined(ENABLE_JAVASE)
+       java_lang_Thread      *object;
        java_lang_ThreadGroup *group;
+       java_handle_t         *e;
+       java_lang_Object      *handler;
        classinfo             *c;
        methodinfo            *m;
        java_handle_t         *o;
-       java_lang_Thread      *t;
 #endif
 
-       /* XXX implement uncaught exception stuff (like JamVM does) */
-
 #if defined(ENABLE_JAVASE)
-       /* remove thread from the thread group */
+       object = t->object;
+
+       group = LLNI_field_direct(object, group);
+
+    /* If there's an uncaught exception, call uncaughtException on the
+       thread's exception handler, or the thread's group if this is
+       unset. */
 
-       group = LLNI_field_direct(thread->object, group);
+       e = exceptions_get_and_clear_exception();
+
+    if (e != NULL) {
+               /* We use a java_lang_Object here, as it's not trivial to
+                  build the java_lang_Thread_UncaughtExceptionHandler header
+                  file. */
+
+# if defined(WITH_CLASSPATH_GNU)
+               handler = (java_lang_Object *) LLNI_field_direct(object, exceptionHandler);
+# elif defined(WITH_CLASSPATH_SUN)
+               handler = (java_lang_Object *) LLNI_field_direct(object, uncaughtExceptionHandler);
+# endif
+
+               if (handler != NULL) {
+                       LLNI_class_get(handler, c);
+                       o = (java_handle_t *) handler;
+               }
+               else {
+                       LLNI_class_get(group, c);
+                       o = (java_handle_t *) group;
+               }
+
+               m = class_resolveclassmethod(c,
+                                                                        utf_uncaughtException,
+                                                                        utf_java_lang_Thread_java_lang_Throwable__V,
+                                                                        NULL,
+                                                                        true);
+
+               if (m == NULL)
+                       return false;
+
+               (void) vm_call_method(m, o, object, e);
+
+               if (exceptions_get_exception())
+                       return false;
+    }
 
        /* XXX TWISTI: should all threads be in a ThreadGroup? */
 
+       /* Remove thread from the thread group. */
+
        if (group != NULL) {
                LLNI_class_get(group, c);
 
@@ -1539,9 +1596,8 @@ bool threads_detach_thread(threadobject *thread)
                        return false;
 
                o = (java_handle_t *) group;
-               t = thread->object;
 
-               (void) vm_call_method(m, o, t);
+               (void) vm_call_method(m, o, object);
 
                if (exceptions_get_exception())
                        return false;
@@ -1550,12 +1606,12 @@ bool threads_detach_thread(threadobject *thread)
 
        /* thread is terminated */
 
-       threads_thread_state_terminated(thread);
+       threads_thread_state_terminated(t);
 
 #if !defined(NDEBUG)
        if (opt_verbosethreads) {
                printf("[Detaching thread ");
-               threads_thread_print_info(thread);
+               threads_thread_print_info(t);
                printf("]\n");
        }
 #endif
@@ -1568,7 +1624,7 @@ bool threads_detach_thread(threadobject *thread)
 
        /* free the vm internal thread object */
 
-       threads_thread_free(thread);
+       threads_thread_free(t);
 
        /* Signal that this thread has finished and leave the mutex. */
 
index 12a5c0279c71cb40ae8bda1c1e7cc56a9389f8dc..8de392338d988032dc19833ec8b5c156b809ac75 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.h 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
index 21b390b93eff9be8aeb21af3dff98b1946014bad..a58f7af17cc881b64b5af366aca9d22266768c55 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4908 2006-05-12 16:49:50Z edwin $
 
 ## Process this file with automake to produce Makefile.in
 
index c8f8424d27cc4e61088c01ba6ccd8210526f3181..dcf09918d5eb036dcdd2d2fed7560e647ee37b91 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.h 4866 2006-05-01 21:40:38Z edwin $
-
 */
 
 
index fef5a81dac4a9485bc5831ca73120204cdd50efd..1083844526072d58d12f1a31db7a5df5fa381bdf 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads.h 4405 2006-02-03 12:46:22Z twisti $
-
 */
 
 
index 8c467e6765436f6d8edb596ad0e3cd25b8c8f15b..33691910e3b2aeccf89e96aae7fd64b2dc8dff86 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads-common.c 8374 2007-08-21 10:20:33Z michi $
-
 */
 
 
index 24a797f9b5e2428ab92910046ff6790c7a440836..60fd1155833fc0e19bac467dc2c3287d4c8d4cca 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: threads-common.h 8245 2007-07-31 09:55:04Z michi $
-
 */
 
 
 
 /* thread states **************************************************************/
 
-#define THREAD_STATE_NEW              1
-#define THREAD_STATE_RUNNABLE         2
-#define THREAD_STATE_BLOCKED          3
-#define THREAD_STATE_WAITING          4
-#define THREAD_STATE_TIMED_WAITING    5
-#define THREAD_STATE_TERMINATED       6
+#define THREAD_STATE_NEW              0
+#define THREAD_STATE_RUNNABLE         1
+#define THREAD_STATE_BLOCKED          2
+#define THREAD_STATE_WAITING          3
+#define THREAD_STATE_TIMED_WAITING    4
+#define THREAD_STATE_TERMINATED       5
 
 
 /* thread priorities **********************************************************/
index 58b5da3356f201cd9a9f0161d2cf754033a1029a..0a5d3377c4c05591cf38c283fa0f527fc6901ec8 100644 (file)
 ##
 ## Authors: Christian Thalinger
 ##
-## $Id: Makefile.am 7246 2007-01-29 18:49:05Z twisti $
-
-## Process this file with automake to produce Makefile.in
-
+##
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR)
 
 LIBS =
index ded095ab5be08fe88bd9c388fededbb09804641d..4fe67c5c992af864f4d44c727f00df683831af79 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: avl.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 5b2ce8808ae693262c431ba851f63f4721c94ff6..a8dcaba588949a370324a4f0adb0daecf23861ce 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: avl.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 8e8e2ad3fc3d63f19e42d707e3168d63f5c17632..bde41ff7ce95d2f4aecff7f569eede28e8d8ede1 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: bitvector.c$
 
 */
 
index 3a29e3af8595efa3f7ac64a41d8d043e3a75a30f..a9428c226a725861155b2fd436c282b2039a8934 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: bitvector.h$
 
 */
 
index 0b3f400f3269891b89888af55cf9fcc3df412ac8..ae1bb7c2cbce101f09da45accb0381fb6bb39375 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: chain.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index b656ab34d045fc6790accf69d80b0f795bc4a70c..29ec7460a4c8e0fe27d30b537643c6dd63349df4 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Reinhard Grafl
 
-   $Id: chain.h 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index fa3519266676ba0822cbc8d7f40b5e136baac8e1..f502fca4d8e48ad819c84b06e5ee6a1fcc9a27be 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: hashtable.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index f88f6f888057248f857da222953d726264f2b263..1712ae99dd8cd1174fe641e5066e20a7edc8b2d2 100644 (file)
@@ -27,8 +27,6 @@
    Authors: Reinhard Grafl
             Christian Thalinger
 
-   $Id: hashtable.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 6b391bab4537464d44623a99cacba3a9aab8f2da..720621e55b0e3823c53de29669e5bbe90fa97382 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: list.c 7915 2007-05-18 14:22:19Z twisti $
-
 */
 
 
index 0552d6bbf348d22b806dd020ed44539fee9c5767..f84f5e39806621f3beb446ae14408164f6d9f121 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: list.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 8a90374b76d6292bd393a85df39b0b05d0d737ae..de04b1e573aee75d7623e6fe8254701a5b1c4cb8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: logging.c 7685 2007-04-11 08:21:06Z twisti $
-
 */
 
 
index 3af0a0df971404b2f67b3966481cc0b0e501df79..f6def38059908089d224f4f29446b0f8ac2e031e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: logging.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
index 7fc988fe8d9a901f6a077280c90442921f8b2dd3..e76fd23c63a97f110c812d11c83def54e1606ae7 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Reinhard Grafl
 
-   $Id: tree.c 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index 3640c01dbbd1a1fe74e32697ba0b02bf8c54b606..e031f9336043103b7d3afae80ebdac5417ba2750 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Reinhard Grafl
 
-   $Id: tree.h 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index a692879057fb3fecde4be869996fc47120b5fec1..82acc8ff7f517543a2999cb0fd9af244295f7f15 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: util.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index afc68f0605a1fbf74e944537cee51c83912decb7..866f410a800be978d805931c80230b242b45e8d3 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: util.h 5252 2006-08-18 13:07:21Z twisti $
-
 */
 
 
index 1e3ae2c7548fd45216eef6bb46b15c2fff3c3f6c..6cb9fb37a90daf9838c3f9c6963fc15f65ee5e36 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: worklist.c$
 
 */
 
index d8d5be07b097950f2df7862a85d8b09f902ed60b..0380c3c7f5ca5fd453a008de56e4eef56f6a57c4 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: worklist.h$
 
 */
 
index 6a6e8d8c5a9acba79edad620b7713485e760c106..34cdc2a2cceb332bcb0fbead6721eb69d5d193d8 100644 (file)
@@ -21,8 +21,6 @@
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8343 2007-08-17 21:39:32Z michi $
 
 ## Process this file with automake to produce Makefile.in
 
index 032921095d698f45daad6a3e50de73a1ecc44fcb..c8d1b68fb8779d6ffb7f9c0a35780774f31fa2d7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: access.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
 #include "vmcore/method.h"
 
 
-/****************************************************************************/
-/* ACCESS CHECKS                                                            */
-/****************************************************************************/
-
 /* access_is_accessible_class **************************************************
  
    Check if a class is accessible from another class
@@ -97,7 +91,7 @@ bool access_is_accessible_class(classinfo *referer, classinfo *cls)
        /* NOTE: This check must be before checks that could return
           false. */
 
-       if (class_issubclass(cls, class_sun_reflect_MagicAccessorImpl))
+       if (class_issubclass(referer, class_sun_reflect_MagicAccessorImpl))
                return true;
 #endif
 
@@ -152,7 +146,7 @@ bool access_is_accessible_member(classinfo *referer, classinfo *declarer,
        /* NOTE: This check must be before checks that could return
           false. */
 
-       if (class_issubclass(declarer, class_sun_reflect_MagicAccessorImpl))
+       if (class_issubclass(referer, class_sun_reflect_MagicAccessorImpl))
                return true;
 #endif
 
index c11bcd557f7002de1c493660e9f3cb78dcce08b2..4197126f8ae758da42035772ae3726725d32e409 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: access.h 7976 2007-05-29 12:22:55Z twisti $
-
 */
 
 
index 2f7abe9f5c5999bf297dfdffe8eaae73028c85cc..b03937f5a23a9234814ff7de6eca437f6565b28f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: access.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
 #include "native/llni.h"
 
 #include "vm/array.h"
+#include "vm/exceptions.h"
 #include "vm/global.h"
+#include "vm/primitive.h"
 #include "vm/vm.h"
 
 
+/* array_element_get ***********************************************************
+
+   Returns a boxed element of the given Java array.
+
+*******************************************************************************/
+
+java_handle_t *array_element_get(java_handle_t *a, int32_t index)
+{
+       vftbl_t       *v;
+       int            type;
+       imm_union      value;
+       java_handle_t *o;
+
+       v = LLNI_vftbl_direct(a);
+
+       type = v->arraydesc->arraytype;
+
+       value = array_element_primitive_get(a, index);
+
+       o = primitive_box(type, value);
+
+       return o;
+}
+
+
+/* array_element_set ***********************************************************
+
+   Sets a boxed element in the given Java array.
+
+*******************************************************************************/
+
+void array_element_set(java_handle_t *a, int32_t index, java_handle_t *o)
+{
+       imm_union value;
+
+       value = primitive_unbox(o);
+
+       array_element_primitive_set(a, index, value);
+}
+
+
 /* array_element_primitive_get *************************************************
 
    Returns a primitive element of the given Java array.
 imm_union array_element_primitive_get(java_handle_t *a, int32_t index)
 {
        vftbl_t  *v;
-       int       elementtype;
+       int       type;
        imm_union value;
 
        v = LLNI_vftbl_direct(a);
 
-       elementtype = v->arraydesc->elementtype;
+       type = v->arraydesc->arraytype;
 
-       switch (elementtype) {
+       switch (type) {
        case ARRAYTYPE_BOOLEAN:
-               value.i = array_booleanarray_element_get(a, index);
+               value.i = array_booleanarray_element_get((java_handle_booleanarray_t *) a, index);
                break;
        case ARRAYTYPE_BYTE:
-               value.i = array_bytearray_element_get(a, index);
+               value.i = array_bytearray_element_get((java_handle_bytearray_t *) a,
+                                                                                         index);
                break;
        case ARRAYTYPE_CHAR:
-               value.i = array_chararray_element_get(a, index);
+               value.i = array_chararray_element_get((java_handle_chararray_t *) a,
+                                                                                         index);
                break;
        case ARRAYTYPE_SHORT:
-               value.i = array_shortarray_element_get(a, index);
+               value.i = array_shortarray_element_get((java_handle_shortarray_t *) a,
+                                                                                          index);
                break;
        case ARRAYTYPE_INT:
-               value.i = array_intarray_element_get(a, index);
+               value.i = array_intarray_element_get((java_handle_intarray_t *) a,
+                                                                                        index);
                break;
        case ARRAYTYPE_LONG:
-               value.l = array_longarray_element_get(a, index);
+               value.l = array_longarray_element_get((java_handle_longarray_t *) a,
+                                                                                         index);
                break;
        case ARRAYTYPE_FLOAT:
-               value.f = array_floatarray_element_get(a, index);
+               value.f = array_floatarray_element_get((java_handle_floatarray_t *) a,
+                                                                                          index);
                break;
        case ARRAYTYPE_DOUBLE:
-               value.d = array_doublearray_element_get(a, index);
+               value.d = array_doublearray_element_get((java_handle_doublearray_t *) a,
+                                                                                               index);
                break;
        case ARRAYTYPE_OBJECT:
-               value.a = array_objectarray_element_get(a, index);
+               value.a = array_objectarray_element_get((java_handle_objectarray_t *) a,
+                                                                                               index);
                break;
-
        default:
                vm_abort("array_element_primitive_get: invalid array element type %d",
-                                elementtype);
+                                type);
        }
 
        return value;
 }
 
 
+/* array_element_primitive_set *************************************************
+
+   Sets a primitive element in the given Java array.
+
+*******************************************************************************/
+
+void array_element_primitive_set(java_handle_t *a, int32_t index, imm_union value)
+{
+       vftbl_t *v;
+       int      type;
+
+       v = LLNI_vftbl_direct(a);
+
+       type = v->arraydesc->arraytype;
+
+       switch (type) {
+       case ARRAYTYPE_BOOLEAN:
+               array_booleanarray_element_set((java_handle_booleanarray_t *) a,
+                                                                          index, value.i);
+               break;
+       case ARRAYTYPE_BYTE:
+               array_bytearray_element_set((java_handle_bytearray_t *) a,
+                                                                       index, value.i);
+               break;
+       case ARRAYTYPE_CHAR:
+               array_chararray_element_set((java_handle_chararray_t *) a,
+                                                                       index, value.i);
+               break;
+       case ARRAYTYPE_SHORT:
+               array_shortarray_element_set((java_handle_shortarray_t *) a,
+                                                                        index, value.i);
+               break;
+       case ARRAYTYPE_INT:
+               array_intarray_element_set((java_handle_intarray_t *) a,
+                                                                  index, value.i);
+               break;
+       case ARRAYTYPE_LONG:
+               array_longarray_element_set((java_handle_longarray_t *) a,
+                                                                       index, value.l);
+               break;
+       case ARRAYTYPE_FLOAT:
+               array_floatarray_element_set((java_handle_floatarray_t *) a,
+                                                                        index, value.f);
+               break;
+       case ARRAYTYPE_DOUBLE:
+               array_doublearray_element_set((java_handle_doublearray_t *) a,
+                                                                         index, value.d);
+               break;
+       case ARRAYTYPE_OBJECT:
+               array_objectarray_element_set((java_handle_objectarray_t *) a,
+                                                                         index, value.a);
+               break;
+       default:
+               vm_abort("array_element_primitive_set: invalid array element type %d",
+                                type);
+       }
+}
+
+
 /* array_xxxarray_element_get **************************************************
 
    Returns a primitive element of the given Java array.
 
 *******************************************************************************/
 
-#define ARRAY_TYPEARRAY_ELEMENT_GET(name, type)                       \
-type array_##name##array_element_get(java_handle_t *a, int32_t index) \
-{                                                                     \
-       java_handle_##name##array_t *ja;                                  \
-       type                         value;                               \
-                                                                      \
-       ja = (java_handle_##name##array_t *) a;                           \
-                                                                      \
-       value = LLNI_array_direct(ja, index);                             \
-                                                                      \
-       return value;                                                     \
+#define ARRAY_TYPEARRAY_ELEMENT_GET(name, type)                                \
+type array_##name##array_element_get(java_handle_##name##array_t *a, int32_t index) \
+{                                                                              \
+       type    value;                                                             \
+       int32_t size;                                                              \
+                                                                               \
+       if (a == NULL) {                                                           \
+               exceptions_throw_nullpointerexception();                               \
+               return (type) 0;                                                       \
+       }                                                                          \
+                                                                               \
+       size = LLNI_array_size(a);                                                 \
+                                                                               \
+       if ((index < 0) || (index > size)) {                                       \
+               exceptions_throw_arrayindexoutofboundsexception();                     \
+               return (type) 0;                                                       \
+       }                                                                          \
+                                                                               \
+       value = LLNI_array_direct(a, index);                                       \
+                                                                               \
+       return value;                                                              \
 }
 
 ARRAY_TYPEARRAY_ELEMENT_GET(boolean, uint8_t)
@@ -122,6 +239,73 @@ ARRAY_TYPEARRAY_ELEMENT_GET(double,  double)
 ARRAY_TYPEARRAY_ELEMENT_GET(object,  java_handle_t*)
 
 
+/* array_xxxarray_element_set **************************************************
+
+   Sets a primitive element in the given Java array.
+
+*******************************************************************************/
+
+#define ARRAY_TYPEARRAY_ELEMENT_SET(name, type)                                \
+void array_##name##array_element_set(java_handle_##name##array_t *a, int32_t index, type value) \
+{                                                                              \
+       int32_t size;                                                              \
+                                                                               \
+       if (a == NULL) {                                                           \
+               exceptions_throw_nullpointerexception();                               \
+               return;                                                                \
+       }                                                                          \
+                                                                               \
+       size = LLNI_array_size(a);                                                 \
+                                                                               \
+       if ((index < 0) || (index > size)) {                                       \
+               exceptions_throw_arrayindexoutofboundsexception();                     \
+               return;                                                                \
+       }                                                                          \
+                                                                               \
+       LLNI_array_direct(a, index) = value;                                       \
+}
+
+ARRAY_TYPEARRAY_ELEMENT_SET(boolean, uint8_t)
+ARRAY_TYPEARRAY_ELEMENT_SET(byte,    int8_t)
+ARRAY_TYPEARRAY_ELEMENT_SET(char,    uint16_t)
+ARRAY_TYPEARRAY_ELEMENT_SET(short,   int16_t)
+ARRAY_TYPEARRAY_ELEMENT_SET(int,     int32_t)
+ARRAY_TYPEARRAY_ELEMENT_SET(long,    int64_t)
+ARRAY_TYPEARRAY_ELEMENT_SET(float,   float)
+ARRAY_TYPEARRAY_ELEMENT_SET(double,  double)
+ARRAY_TYPEARRAY_ELEMENT_SET(object,  java_handle_t*)
+
+
+/* array_length_get ***********************************************************
+
+   Returns a the length of the given Java array.
+
+*******************************************************************************/
+
+int32_t array_length_get(java_handle_t *a)
+{
+       vftbl_t *v;
+       int32_t  size;
+
+       if (a == NULL) {
+               exceptions_throw_nullpointerexception();
+               return 0;
+       }
+
+       v = LLNI_vftbl_direct(a);
+
+       if (!class_is_array(v->class)) {
+/*             exceptions_throw_illegalargumentexception("Argument is not an array"); */
+               exceptions_throw_illegalargumentexception();
+               return 0;
+       }
+
+       size = LLNI_array_size(a);
+
+       return size;
+}
+
+
 /*
  * These are local overrides for various environment variables in Emacs.
  * Please do not remove this and leave it at the end of the file, where
index 02b20d1227eea9335ef226230530a95b0164347f..6910ff82650d29be2d6abc8fc23d0c6a3bc9dede 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: access.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
 
 /* function prototypes ********************************************************/
 
-imm_union      array_element_primitive_get(java_handle_t *a, int32_t index);
+java_handle_t *array_element_get(java_handle_t *a, int32_t index);
+void           array_element_set(java_handle_t *a, int32_t index, java_handle_t *o);
 
-uint8_t        array_booleanarray_element_get(java_handle_t *a, int32_t index);
-int8_t         array_bytearray_element_get(java_handle_t *a, int32_t index);
-uint16_t       array_chararray_element_get(java_handle_t *a, int32_t index);
-int16_t        array_shortarray_element_get(java_handle_t *a, int32_t index);
-int32_t        array_intarray_element_get(java_handle_t *a, int32_t index);
-int64_t        array_longarray_element_get(java_handle_t *a, int32_t index);
-float          array_floatarray_element_get(java_handle_t *a, int32_t index);
-double         array_doublearray_element_get(java_handle_t *a, int32_t index);
-java_handle_t *array_objectarray_element_get(java_handle_t *a, int32_t index);
+imm_union      array_element_primitive_get(java_handle_t *a, int32_t index);
+void           array_element_primitive_set(java_handle_t *a, int32_t index, imm_union value);
+
+uint8_t        array_booleanarray_element_get(java_handle_booleanarray_t *a, int32_t index);
+int8_t         array_bytearray_element_get(java_handle_bytearray_t *a, int32_t index);
+uint16_t       array_chararray_element_get(java_handle_chararray_t *a, int32_t index);
+int16_t        array_shortarray_element_get(java_handle_shortarray_t *a, int32_t index);
+int32_t        array_intarray_element_get(java_handle_intarray_t *a, int32_t index);
+int64_t        array_longarray_element_get(java_handle_longarray_t *a, int32_t index);
+float          array_floatarray_element_get(java_handle_floatarray_t *a, int32_t index);
+double         array_doublearray_element_get(java_handle_doublearray_t *a, int32_t index);
+java_handle_t *array_objectarray_element_get(java_handle_objectarray_t *a, int32_t index);
+
+void           array_booleanarray_element_set(java_handle_booleanarray_t *a, int32_t index, uint8_t value);
+void           array_bytearray_element_set(java_handle_bytearray_t *a, int32_t index, int8_t value);
+void           array_chararray_element_set(java_handle_chararray_t *a, int32_t index, uint16_t value);
+void           array_shortarray_element_set(java_handle_shortarray_t *a, int32_t index, int16_t value);
+void           array_intarray_element_set(java_handle_intarray_t *a, int32_t index, int32_t value);
+void           array_longarray_element_set(java_handle_longarray_t *a, int32_t index, int64_t value);
+void           array_floatarray_element_set(java_handle_floatarray_t *a, int32_t index, float value);
+void           array_doublearray_element_set(java_handle_doublearray_t *a, int32_t index, double value);
+void           array_objectarray_element_set(java_handle_objectarray_t *a, int32_t index, java_handle_t *value);
+
+int32_t        array_length_get(java_handle_t *a);
 
 #endif /* _VM_ARRAY_H */
 
index 55504d46052b04d0a5fdd3a78ce9d743d00efb86..22a3c214471ddb34f7e3c6524ac43a958d8f7443 100644 (file)
@@ -28,8 +28,6 @@
    calls instead of machine instructions, using the C calling
    convention.
 
-   $Id: builtin.c 8360 2007-08-20 18:02:50Z michi $
-
 */
 
 
 #include "native/include/java_lang_Throwable.h"
 
 #include "threads/lock-common.h"
+#if defined(ENABLE_THREADS)
+#include "threads/native/threads.h"
+#else
+#include "threads/none/threads.h"
+#endif
 
 #include "toolbox/logging.h"
 #include "toolbox/util.h"
@@ -1264,7 +1267,11 @@ java_handle_t *builtin_trace_exception(java_handle_t *xptr,
 #endif
 
        if (opt_verbosecall && indent)
+#if defined(__S390__)
+               TRACEJAVACALLINDENT--;
+#else
                methodindent--;
+#endif
 
        /* calculate message length */
 
index 3df7a1b10f8716330bb535ee4a53b7a053811089..e391157f8dd83f526599019d8b4ec0d0860b35c7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: builtin.h 8360 2007-08-20 18:02:50Z michi $
-
 */
 
 
index 4e4dbcba758f0df44e7ae37f858f485462998635..9d884d1bd2a365cad1e4cecf6c563514111c7ee8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: builtintable.inc 8358 2007-08-20 14:25:59Z michi $
-
 */
 
 
index cffac210fe6624791aa72d212b50e8c16ac0a8ba..87d2c5101524138960ddfe7d541efd110dcc062e 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id$
-
 */
 
 #include "config.h"
index 0d01349cd5726638d77d775a089d4a2604157849..d70c9d1cbde582cad5bc9ce380875dd45a1c1a64 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id$
-
 */
 
 #ifndef _CYCLES_STATS_H
index 3b2859d8b76a6e9151da7a420c6eeece18a83c88..6a340702f6d46ebf34ac87cd05c95b3faad9f2ee 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: exceptions.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index 627169e7d579101521f86abf8190955aa1bf6eb3..6c60a2793bf49f3fde324ba492a396f86f6b0b0c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: exceptions.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index d265cfae04b55c6c9b60639efa33e437c58ffd0f..4716be0b12dba1a199b0afbb746947cb032cb6f4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: finalizer.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 2c1ca6068a804af8d6632537429d9055af3ae698..ca3682735d684e789419f0e440d66c8c0a92c0a8 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: finalizer.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 2fde322831ff69e08af276cf3e30b51e0e408ace..24cd4fb9595fb8ddd32627238570105c5616ee72 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: global.h 8359 2007-08-20 17:02:14Z michi $
-
 */
 
 
index e7b9df43686b1d1aff0767ed4c9b62835d0b5d54..cc847933a6c921c2124d993f1508da4bc74dce61 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: initialize.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 39ecc07a0bfd3d79f4ef8231ddb4796a0919b986..82a8a09fd8b6af192a9ec88656880338be42be52 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: initialize.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
index 2ea63caecb5072ef4dc46e94ed4fac63a2e5b3d9..bc1ad834b2f607b7da77c33887e43fcdd1f822ca 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8304 2007-08-14 19:57:20Z pm $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src -I$(top_srcdir)/contrib/vmlog
 
index b8be4f1769dd9eff8cef070ac9d9d43abdaf8a5f..2a5f0458ac6c201f58512f95da3bc9073c13528f 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: abi.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index ca37b0ae9c7718a8b944bb06f8e778e8e3b4a3e9..99ed02b6d1154192e20578e329a606f2c43ff1e2 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: abi.h 7938 2007-05-23 09:37:37Z tbfg $
-
 */
 
 
index d96cee66bf57ec5b52b490a2d4cefabd03483b4b..22f2c0ba9380b4bf6c0aab97b75f8d8af90fb98b 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Ullrich
 ##
 ## Changes: Christian Thalinger
-##
-## $Id: Makefile.am 5234 2006-08-14 17:50:12Z christian $
 
 ## Process this file with automake to produce Makefile.in
 
index 826bc45c42d50ff5af10781e12707a4f4f264d0a..32ebf4dda5883b489a8c79d2a580a03a243d331c 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: liveness.c $
 
 */
 
index 584f055abd4b8b0f64f3c7e4cf34ad5384d82c4a..eba3cf49fae56356edcb3ce40dfef2a7d57b4d52 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: liveness.h$
 
 */
 
index 69972dce98a974ad20bfb778574c8e9c3a43b9b6..84eca5251681a764f157b5c62217fc906bd2fd52 100644 (file)
@@ -28,8 +28,6 @@
             Christian Thalinger
             Edwin Steiner
 
-   $Id: lsra.c 6286 2007-01-10 10:03:38Z twisti $
-
 */
 
 
index 07bd4fe1190effa5e8345ca04ae8f2f4367d2622..306480e5346d79f459c2637687d8f0450a6aea2a 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Edwin Steiner
 
-   $Id: lsra.h 5240 2006-08-16 11:31:02Z christian $
-
 */
 
 
index 8449ce8a973e323334b0b90e34add1ff83f77e63..a2a14bdc9088aa69e9cb5def082a1f37a3e6f161 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    02111-1307, USA.
 
-   $Id: simplereg.c 8320 2007-08-16 11:35:14Z michi $
-
 */
 
 
index 05503eed25ac3fc09295183f55b3b35a54e7701a..e7f2c44e7ecb38fc6f41aa2efbfbd52dc451f8bf 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Christian Ullrich
 
-   $Id: simplereg.h 5708 2006-10-06 22:37:13Z edwin $
-
 */
 
 
index ae5f78ef3a6c10319d496fb21508ba24133afaab..e94ae058709c270487bfa5973b03a063e328fb83 100644 (file)
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 ##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
-
-## Process this file with automake to produce Makefile.in
-
+##
 DIST_SUBDIRS = \
        freebsd \
        linux
index 3706b4cec8f5e349d0383cfef67f66c593dffee1..ee3d3047a0b335af492719735dcc378491f076b4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 8e9f02b2092805ee17568d781f827a96d93eb6db..c19d61f3a99671a69f45c5bb6e94c248edb65ccc 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8279 2007-08-09 09:36:57Z michi $
-
 */
 
 
index a56dc0b522fabcb124c7f7c3a168d96659ff87eb..dc5d76cfdbfe7ffd40f8d51fdd26182e58ff1edd 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
index cf6b20901d35ec11f9674c28332fa5f32c8f903e..9598e1b24f88fa317cf026a977500be8573a645c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 7691 2007-04-12 12:45:10Z twisti $
-
 */
 
 
index 28a953ee69909eb4366af48e97f64b5fbb0fe919..b47846b62ea6d14ccb78b9895f332163474acf7a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: disass.c 7335 2007-02-12 10:43:33Z twisti $
-
 */
 
 
index 84c3bf3ea9cd981e9f760aed213589814054caa3..13515ccda7166e6f20f70291cb505fce201cd478 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index 600c752db1a4b3404a54a44b1f7ba887c9aba07d..76889306e43a66b8e798555aba30af12531f6013 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7355 2007-02-14 10:57:32Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 61eebf5f6953f1d0b8376119ea1f5bd303825c3a..10deba916971329c656e275b2405e1054bcedd78 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-os.c 4921 2006-05-15 14:24:36Z twisti $
-
 */
 
 
index c6004e90e5d1a5b7fde018b12ddd121f106d9725..0aea31d70f9c8f0eb0da22e166938d13ac64c07f 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7355 2007-02-14 10:57:32Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 807843b8e4f04cbed602269283c73c5b08f015af..e9c02d40c4e9db5703431915e7e5977b753fe7fe 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
index 2fed88870da49d2dee57e2968126d7137c299b2a..2bc665662a31b3fed76332acc6aa5d8f13092798 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8198 2007-07-12 07:16:24Z twisti $
-
 */
 
 
index 7ed86e5bce92af456ca378cb08fb64c4100730f7..3551725f1ad5d78318cc94d13836527563f85f2e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 7356 2007-02-14 11:00:28Z twisti $
-
 */
 
 
index 2bc36ebae68ec378757a7f7fb5ea13ffcf9d0d38..b839df6289490e2e5c381c8311712c91f0465e75 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 4498 2006-02-12 23:43:09Z twisti $
-
 */
 
 
index 5de83eecfbffccbaaa18b5bef4504da5b74eedb8..c069ebbe32371fd01d2d1a56b21a55f1550c1c61 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 80200715f81b54668962279d395e73ffeda3e9e7..40908469833aab177e6788f5ecafe88c1bafb65f 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md.h 4392 2006-01-31 15:35:22Z twisti $
-
 */
 
 
index e9280929ec11c4bcd4dafd9a98fa628ea08514fa..74e97e60517031d065a646e8b20c2b70340268e7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $
-
 */
 
 
index f5fc9a53d8e3c41c402516d2ba9c41990080688a..0113cc7ca2ef713ba9484af7fd5ab647aa537d5b 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        linux
index 5b04850061686cb28bd16eb8865ea7afebba8237..a1175a355be9e7d26b6ff0eca08f7396311a97ea 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 3e7bacb2427beb23d782587f7a30648fdb606cc0..a5154c1db68acfab4b245681f82630ce3f34e21f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8276 2007-08-08 16:09:14Z twisti $
-
 */
 
 
index 188165dd43ffed4c0885cb4e03decd43d9488a27..f87c1b0db1fd373682b2f038d7f93bcc557fa19b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
index 073281110c63fea192c890827f98209327e26b14..37620a22957dbbf5ac9ee2581307d7df8c6b77e2 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 8160 2007-06-28 01:52:19Z michi $
-
 */
 
 
index 18cebee2691193df8e0f3f7528b21dbcaa0db26a..4201affc9d52325161d1cb5ee178e627b437d4f4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: disass.c 7333 2007-02-11 22:17:27Z twisti $
-
 */
 
 
index c238b99311ee6c233892e8d47d722e3f79dd82bb..456d27cb9a86201a225db9972fbbe122965ee6a8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 4398 2006-01-31 23:43:08Z twisti $
-
 */
 
 
index c4a5d85aefe50232d24fae0ca8f925b150615afb..f0a05c73be7b5661ee0332b2004786bf11eaa915 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes: Michael Starzinger
-##
-## $Id$
 
 ## Process this file with automake to produce Makefile.in
 
index 38209100d8fd26bc0df16b34be538ee7abd86d0c..da889e87379581d30ac90c908a4a40b5f8e98eea 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 166 2006-01-22 23:38:44Z twisti $
-
 */
 
 
index 0abca2ad64b8f80f23ec256dfe1b3fd576cbe80b..8ba32c8ad90c2bb7a0866ac2d68d9a9b3ddd101d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8127 2007-06-21 11:55:56Z michi $
-
 */
 
 
index b7970eff2fcf1fbd1e361c44fb770c12f436c7cc..f88ce67325fdcc9e3fcedfea55fb960490ea91ae 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 7713 2007-04-15 21:49:48Z twisti $
-
 */
 
 
index 1d43e36c67731d2be969848b503a50a2370b495d..2641d8af982c7dad10cb0a1575eebb25e3d05c1f 100644 (file)
@@ -27,8 +27,6 @@
    Authors: Michael Starzinger
             Christian Thalinger
 
-   $Id: md-asm.h 7227 2007-01-18 13:21:36Z twisti $
-
 */
 
 
index e97ca5df4a968b6266a75c98561c8e68f8913bea..5d89dd8a6d85ba3d63b036422fb13cc1824a7d16 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8185 2007-07-05 21:34:47Z michi $
-
 */
 
 
index cc12574b9e0ed5a450101b3303a8f2d2c8c8f203..66510fd6fdea33f0daf7f09d3b6ea7c360fb5482 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $
-
 */
 
 
index a6bd7ad34a77e1293838c2dc4e9c3f51ee531d46..e1ad0480786e0522c8f556df2769961a1db7a0ac 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 3db8d394feb15742c079c8f6eb97da77b7b0c283..4163852371c5261bf9242c1c3aedd4d00928f033 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Edwin Steiner
 
-   $Id: cacao.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 5f71bf30033fa67279d5c6f7e6d93a9eb70a0c19..a885aa9f8494b8c945c2ecad0ccec538d75ebba9 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: cacao.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 8fae6af26badd766b47d12a72c5be27615be8c8e..4a2e252ab36278f0f989ecee272dadf410760270 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index db25e78b3866551ffe35450dd4226f07fdddc528..cc6db31ac0dbe8a39332680ffa95ac18b4e1a49f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index e03d57f4e21eecf2e76bf229d22458ef4f915cd0..8789e282c3f5092cc07eb6ace928a7ea4525c85a 100644 (file)
@@ -39,8 +39,6 @@
    memory. All functions writing values into the data area return the offset
    relative the begin of the code area (start of procedure).   
 
-   $Id: codegen-common.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
index 94792a8d9a7051e0e0b60204c69091c164488829..cd05415f41baf510f5efacc7230e6041a231b5ad 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen-common.h 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
index 725563674f78cb68cb3185a7629c249e8b73488d..f3636f88d1118d9635bb60741de06f9ffb065593 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: disass-common.c 7596 2007-03-28 21:05:53Z twisti $
-
 */
 
 
index cf7c92291c69baa2ecb87381aec62a9aa90fb180..70869659fe22b0b8948d1c96db20bcb7ed0b4969 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: disass.h 7596 2007-03-28 21:05:53Z twisti $
-
 */
 
 
index 558241b71d66f0ae00579af98c1e96d6fa330dcc..f6079d09aded9b3d8174a99e16aaa321875054b4 100644 (file)
@@ -30,7 +30,6 @@
             Joseph Wenninger
             Edwin Steiner
 
-   $Id: dseg.c 8298 2007-08-12 18:49:16Z pm $
 
 */
 
index 5863710b0017a1fd7c00ab8ab8ccabea0bb0db25..229f34d347d7aca264483d20dffeb993adea3e78 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: dseg.h 7903 2007-05-14 11:15:33Z tbfg $
-
 */
 
 
index 5639853ef8d333c4becb5368bc80a1af78523dc2..aa2f38997165a63b4ce578f3b4a9e64b36c51db3 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit-common.c 8265 2007-08-06 16:10:42Z twisti $
-
 */
 
 
index 0f4880ccfadf80381543fac8e480c60b0bb91431..538c40742e4b132b6872f4d5a657914f296f96de 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit-common.h 8265 2007-08-06 16:10:42Z twisti $
-
 */
 
 
index 7fdbb7126ea4355656a1200599eff9fc3734d9fb..22561291dac22cf1d5a299b0792aa353144eafb8 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        cygwin \
index 0c589f4d4f24dfe9d2f162bdd72272c20632579c..fe086a8d775566519bbc7b7ed47caff36a4d9718 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 522a39c2a5b3b9f0727cebc497639b7ca0da08df..179fbd038c0022f442e095b5d74c6d12cdd2aa02 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
-
 */
 
 
index be5f8fa88517952aaa1b35cefb93533ee8813c7e..997f0e5d5a14af9badd5c0ffb754c7085ddc5c36 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
index 114d7c05823fcf4d49c6d8f33856fbf8ebed1ea1..aa635ed5673c119c6d1a72d908db4758e1e284d1 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 7691 2007-04-12 12:45:10Z twisti $
-
 */
 
 
index 671467218bbed2bca348ce4e12d5fe82d52a363b..b7067d6fee7d6bb390b3e5cc9c9de3d337c3ab70 100644 (file)
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 ##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
-
-## Process this file with automake to produce Makefile.in
-
+##
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
 LIBS =
index 2053034ad15d36df81819e3388b39224f5862b23..ea5532a0c4a8e4e8ea4b4583252a76ebc6404844 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 5107 2006-07-11 18:35:27Z twisti $
-
 */
 
 
index 341baae68065b8b951d4555bc1bb54ef3be81a66..bd96c8bdd83663a5a93a466901af407ef86cd8f1 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-os.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 3480c2d15fbfb1ae1957472b65d0a3fcf9aa6797..b9c420d090d01c31754222807b13509a5959eee4 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index f54b9af063a3cc48979c6474057b49d734182c23..e7f2327fac3413f07c5f6b57a92662791936ff70 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index b26d04d42ca764736f9895778827d7e3c38ecc8a..0c593d052cf217d9ccf55b7a6985acf256385681 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 5074 2006-07-04 16:05:35Z twisti $
-
 */
 
 
index 431da83085b16c995a57c43278916ed32939e307..1d39b72715c2d5d9606841dfc426a0d9a79191ac 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: disass.c 6260 2006-12-28 20:56:09Z twisti $
-
 */
 
 
index b74a2959e0f4a98aa4552975a3623d9a42a552dc..9e1f42d14c8023b5082404f089dd73a085f84c95 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index d497c2ba1454b9e2ee2d616d2c8ccc22a25fd28a..4e333cd2075e5941bad50d982da19106a2265982 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: emit.h 6049 2006-11-27 14:20:57Z edwin $
-
 */
 
 
index 0ad2213ac0f9b89294e481bf3d29adf0444556e2..e899b732a6f1154d3db5dd38f58641959ce5a251 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7355 2007-02-14 10:57:32Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 2c9c5d54483e76caf0472909ba5939943107ca38..bb6ddf75b656d48b77800c469626258d2ee345f8 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 5107 2006-07-11 18:35:27Z twisti $
-
 */
 
 
index ccafbff196bb695049404ccb16514fcc8e05b063..4eebf69877da4a0e589657b06a81982089c15989 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-os.c 4921 2006-05-15 14:24:36Z twisti $
-
 */
 
 
index ec9a55db8dd48e6db5b87b937574cd4f2a42200e..fbc51512cf49c1d5818e385f5275bee292bdf0d8 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7355 2007-02-14 10:57:32Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 2c9c5d54483e76caf0472909ba5939943107ca38..bb6ddf75b656d48b77800c469626258d2ee345f8 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 5107 2006-07-11 18:35:27Z twisti $
-
 */
 
 
index 031c6774afe8aa75d8ac377a6d89c01d12536e05..05945d0fa8850ed9680464475f88c0391a14d021 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
index c0e94dd979b7dd4cab177237ddf657adf0ba292a..71f99b0b8d573151547282d80e33a9c01a18730c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8210 2007-07-18 12:51:00Z twisti $
-
 */
 
 
index fc099b1e1299224e58f903de151a1f804bffc8a9..99b0b2b5ad4c1dbc230e827dd37e9b78bd7054c3 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-abi.h 5106 2006-07-11 18:34:45Z twisti $
-
 */
 
 
index 7051bb72c3cd11f8fac5e1e79105ba576bf282be..4b98f219198c95ab0f9647b9b07be1985c66f44a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 709cc5a031c5306283ca66d91c55df1fae806762..42f138e1d63aab9d4d4e49c11b7bd3f219a872cd 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index a43d248e1a84e92e83deb542d9152e1d33efc6c8..8b46e133284226aa11fffb07bd6e6b8ac2b1e63f 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7841 2007-04-30 11:58:57Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index b790fe4dbb27ab0fd2a53b9237fc3396463e9b32..773a11f48848d17493ebef33e5be6fbd95486e74 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: inline.c 7813 2007-04-25 19:20:13Z twisti $
-
 */
 
 
index 9a8bf8b4253f5cdb9f5897a1418bf68d18b42439..cdd41ee4daeeac32ee13b8396d09673fdbb5111b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: inline.h 7835 2007-04-26 13:43:08Z twisti $
-
 */
 
 
index ec554d39b2e370c2e44ae17fa2fd9c80005f073a..5dd875335698581d6c53cba987e1085a87d81749 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes: Edwin Steiner
-##
-## $Id: Makefile.am 5706 2006-10-06 20:11:03Z edwin $
 
 ## Process this file with automake to produce Makefile.in
 
index 1de3e70eefaed1b1e890347613ce4946ee66af8f..1d886a5352158e742c1b0f7d4fad50422b68410c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.c 7785 2007-04-21 10:55:30Z edwin $
-
 */
 
 
index 7dcb09566ca8c7b3610c3d43decb2350b749dc4c..e49678bea92f6f5d4c51fb37c8c0a4068351a4c4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 7357 2007-02-14 11:35:59Z twisti $
-
 */
 
 
index 5e68085f9f4b14d5f46d4ea8dba2fa6c3e8fa1c8..8513658f056366990fb17604ac429fd06140dd54 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: codegen.h 4826 2006-04-24 16:06:16Z twisti $
-
 */
 
 
index 90a8ea66914ad696376972088b532ee29e2d0d5b..5d5098990218ae758f65dbdb79711c42c418d90c 100644 (file)
@@ -31,8 +31,6 @@
             Anton Ertl
                        Edwin Steiner
 
-   $Id: disass.c 5684 2006-10-05 00:06:23Z edwin $
-
 */
 
 
index dbbc2ef72a3d098737a65291f553322f7c3c4163..923a9f510a7f2339d4a6dfe21e0f6811824ddae5 100644 (file)
@@ -24,8 +24,6 @@
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
-
-   $Id: dynamic-super.c 7366 2007-02-15 19:48:11Z twisti $
 */
 
 
index 5aba6908a69c62665d82a2ece41eb88d87e80e58..d80ce18a798ff64490eec79656b92dc9d48f7f06 100644 (file)
@@ -22,7 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: engine.c 7366 2007-02-15 19:48:11Z twisti $
 */
 
 
index caf1bc0a0fd31d1dabde7df168402345eee16d0c..1df0b6fef1a332c5bf8331aabdc5429d6da859fd 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes:
 
-   $Id: engine1.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 #define LABEL(name) H_##name: __asm__(""); I_##name:
index 688961ea88f375f4adae2e98626819e3533ef9c9..852fd612b3577962091e1792396b966eb48c8564 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes:
 
-   $Id: engine2.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 #define engine engine2
index ab30b840355fe5aad85e4a83cb504641a3ccb937..c4e988201eab15b97ef0c81c2fc49db147684526 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: intrp.h 7486 2007-03-08 13:50:07Z twisti $
-
 */
 
 
index d3aaf583a54d87f934b48d4a66f96415460d7955..1ee5156101af1d42f225c0635214548856f1f8d3 100644 (file)
@@ -30,7 +30,6 @@
    Changes: Joseph Wenninger
             Christian Thalinger
 
-   $Id: md.c 5666 2006-10-04 15:04:52Z twisti $
 
 */
 
index bb2bf155098e93a584c860b7a8c13901a428350b..51d34cbf0ff22b898c570284a8bdb960b32fb3bc 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 7486 2007-03-08 13:50:07Z twisti $
-
 */
 
 
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 9061bd8c779b0111e4d3c8e854193c3aa8908c16..b8d8cdc2e36c6080ff19684e74aff8934b453390 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jit.c 7966 2007-05-25 12:41:03Z pm $
-
 */
 
 
index a9dff9f3391bcb7769141d9f76e3ecfcdc69fa3a..a4147c5b541a4b4de1be4b1c63aa01f827d41ce5 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jit.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index dd3f132f9f9d3764c85d5d548abbf0b5de910845..f6e4208e237770fe3ee48b2110fe0c7ab1cc6a43 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4627 2006-03-16 12:53:32Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
index 574e793868a96424c4169093268250451e919e30..67f06a1f3b478e6302b60a19772f26b9ea698bb5 100644 (file)
@@ -34,8 +34,6 @@
    bounds are never violated. The function to call is
    optimize_loops().
 
-   $Id: analyze.c 5925 2006-11-05 23:11:27Z edwin $
-
 */
 
 
index e4afed299ab44cd352a23f7c0b2f0af2d5518b15..d8fbc5e0196904fef374d279455e8c6f5169d3f0 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: analyze.h 4699 2006-03-28 14:52:32Z twisti $
-
 */
 
 
index 4caeb94b876afd7c9f32f79636cde6c3db4afb07..09cd21d5384dca04ab91ecc15a5570d94a83763d 100644 (file)
@@ -31,8 +31,6 @@
    Contains the functions which build a list, that represents the
    control flow graph of the procedure, that is being analyzed.
 
-   $Id: graph.c 4699 2006-03-28 14:52:32Z twisti $
-
 */
 
 
index e8facd3937654883cc1c70f1c02024ab970f8df3..ff3beb1f530d3cbae3725bccfe5b9b1d67ecd43c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: graph.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
index 6534449efa26097f62e8a5a35fa0579e63eacb05..e817f02ba0dc012836bb7d64f915f5bdc9fe4986 100644 (file)
@@ -32,7 +32,6 @@
    algorithm that uses dominator trees (found eg. in modern compiler
    implementation by a.w. appel)
 
-   $Id: loop.c 4699 2006-03-28 14:52:32Z twisti $
 
 */
 
index 3d791e0e73b65a281b3074c39d8c84934e064dd5..881fc746a7ae8b13050a9785a5b20737dc468288 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: loop.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
index 73050f0b319940d7e4111433621ad7834c7f0369..13df1e949bc33f7854deb4d3e7771a603546fe02 100644 (file)
@@ -31,8 +31,6 @@
    instruction. For more details see function tracing(basicblock, int,
    int) below.
 
-   $Id: tracing.c 4862 2006-04-30 15:58:53Z edwin $
-
 */
 
 
index 331b45779abfcdd364d601257960b37240b36459..d506be50e45d59500dcbf01dad8314599b70e2cd 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Thalinger
 
-   $Id: tracing.h 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index 983a7a2b0df9af3b7cb1af6d0b5b9e89b635a119..8aaf6a7ae55b4c821bdd5e17dd9e2a5a2873a752 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 5794 2006-10-18 15:09:56Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        linux
index 46bb58dcb5ee92d94af1370cc8c0b0b9f44a638d..5c7b88bf7e791524fbd5508ee25e85c70325ec11 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 
 #define TRACE_ARGS_NUM                 8
 
 #define REG_ZERO -1
-#define REPLACEMENT_PATCH_SIZE 0               /* XXX FIXME */
 
 #define SPECIALMEMUSE
 /* #define HAS_4BYTE_STACKSLOT */
index 3bac5562615bf8ddde4579bce58a18ebc9fb396e..22b2e9ae80502783b60ee0275449fb5df250e6db 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8210 2007-07-18 12:51:00Z twisti $
-
 */
 
 
index 1c18cf124664bf1a2773f189147fa74784e053e0..342baca4614ebfa059a8ff17fe2b087f8cb6e395 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 7564 2007-03-23 23:36:17Z twisti $
-
 */
 
 
index 10155725b96c5d30f7519d9ea8c94086a1f6df8e..2f4a5f6619b4d5716d2c1377c1dde9358bfde843 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 
index a35551be4acbb1524c8f38052bd9e77dc2a71d65..f53e321908243d02abd547655ee457b1d68ca351 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 
diff --git a/src/vm/jit/m68k/emit.h b/src/vm/jit/m68k/emit.h
new file mode 100644 (file)
index 0000000..778c700
--- /dev/null
@@ -0,0 +1,41 @@
+/* src/vm/jit/m68k/emit.h
+   Copyright (C) 1996-2005, 2006, 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+#ifndef _EMIT_H_
+#define _EMIT_H_
+
+#include "config.h"
+
+#include "vm/types.h"
+#include "vm/vm.h"
+#include "vm/jit/codegen-common.h"
+
+void emit_mov_imm_reg (codegendata *cd, s4 imm, s4 dreg);
+void emit_mov_imm_areg(codegendata *cd, s4 imm, s4 dreg);
+void emit_verbosecall_enter(jitdata* jd);
+void emit_verbosecall_exit(jitdata* jd);
+
+#endif
diff --git a/src/vm/jit/m68k/linux/Makefile.am b/src/vm/jit/m68k/linux/Makefile.am
new file mode 100644 (file)
index 0000000..508ce9b
--- /dev/null
@@ -0,0 +1,55 @@
+## src/vm/jit/powerpc64/linux/Makefile.am
+##
+## 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
+##
+## This file is part of CACAO.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2, or (at
+## your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+##
+## Contact: cacao@cacaojvm.org
+##
+## Authors: Christian Thalinger
+##
+## Changes:
+
+## Process this file with automake to produce Makefile.in
+
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)
+
+LIBS =
+
+noinst_HEADERS = \
+       md-asm.h
+
+noinst_LTLIBRARIES = libmd.la
+
+libmd_la_SOURCES = \
+       md-abi.c \
+       md-abi.h \
+       md-os.h \
+       md-os.c
+
+
+## Local variables:
+## mode: Makefile
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End:
index 8ad83aa098a8fa22249c4aacbbf49c93e73b6e85..3acb38c64636f5e1cce1480a82d439764b840c7a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 
index fc7d09caf8c10ed41a95c1d9990e519d23a3fb2c..3ddf9a9e5c91854186fa1f49cf95b21f199ff692 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-abi.h 5940 2006-11-09 09:59:28Z tbfg $
-
 */
 
 
diff --git a/src/vm/jit/m68k/linux/md-asm.h b/src/vm/jit/m68k/linux/md-asm.h
new file mode 100644 (file)
index 0000000..e69de29
index 1cdab5f81a78ee75a4df256c7ec3bce7472fdc19..f8132b62949a64697e05acb0c5f4bec234a9b5bc 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 #include "config.h"
index 2f730f3b0bde2c495329a51f4cc438c29e2fb7c1..7ebfe074eff9f7f3cb81fcebc77d93866b72d6d7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 #include "config.h"
index 16eaec2ff30285f5aeb0bbd169b5b18bbd9b671b..2f9fa6fae4ca0c223459c3eaf01872664737e51d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 
index 2d28f43d656c74698f310f7073442bb8904b600d..098c52e5bd93ab5d0b36674a5f9ffe33a434bbc8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 #include "config.h"
 
index 0774f4e41193f05c72705550d9a996b7b6a123f9..7ae6ca2cf9446d349045bdf42417661f8d923cd3 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5330 2006-09-05 18:43:12Z edwin $
-
 */
 
 #include "config.h"
index 6369233ae9b34c0ac57ab4d4316480ab1852083a..b9970fc83e5308a2bb0c2c88db55603dea57587c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jit.h 6265 2007-01-02 20:40:57Z edwin $
-
 */
 
 
index b2f9e918f577ae5af24ad877e10fd4c6896359ff..00029dfc243ab45382313b19d50d949899fa8801 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: methodheader.h 5090 2006-07-08 22:07:05Z twisti $
-
 */
 
 
index 709c9b84d16101029852ca33286359732a5ccc08..c5fdfc9b54ccd4ab2b4930bea997b14682b4d26b 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        irix \
index 0514af1c9b3e4d12b7f52c3172d3b1785f94f5c0..1f91cddf8dcc6109ebcc5efbd309fd2eb2413308 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8263 2007-08-06 14:41:05Z twisti $
-
 */
 
 
index 5f3be73bea0a1f795824090af8bf783eb0b43566..ab19557308eb7f5c740a9f49834119cc40f74547 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
-
 */
 
 
index d58e6b0483b6ab8ef5a3a53b078c65c7d178c70a..01f0c30027544525d76041631cfc21ed9fd6826f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index 6619a4ebd1890bcad2537e8fae83ae005f6a3aa1..12a88b412fe7e2adee0848fee2afaf62043ebe8c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 8264 2007-08-06 16:02:28Z twisti $
-
 */
 
 
index 385023e70687c1599958dc6b6fdf58bec6838c09..c70318d8908d09846bc1a3136af07cd8325dd898 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: disass.c 7351 2007-02-13 21:32:36Z twisti $
-
 */
 
 
index b418863715f9990a633bfdf9ed9a27ca5b51ce9a..924b09b230c386b30659d913a9e2f40a5f671f1c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 4398 2006-01-31 23:43:08Z twisti $
-
 */
 
 
index 3c1fc61c7e4c51670b4d7d4ef78d115dbef9fd51..06df1a4d1ef4e81262a2745bd1ec7b9632350bbc 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7356 2007-02-14 11:00:28Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 530e08398d739791672735f69697bfac5bf6b73a..ce32b596b405bbdd375414559f88f5b70425d187 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
index b2000dc6392c635b6d5381a8e24f3e7a7a0e4848..be820446cbac858052a24749005cd80beff7981e 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7356 2007-02-14 11:00:28Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 0f403a69af774a9ada4b546d0a003045323d1026..d0973e45a74948c1b4d1969fb20c3964c8f49ce9 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
index f7c89bd4b9ca41e246e6c6c7f988a39e89f5f18c..1b3065edf3b80ce477aa745496fc87d644b46d82 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8123 2007-06-20 23:50:55Z michi $
-
 */
 
 
index f956298a736d7bd11fea11ba64de2505958c98bc..ab8bf31994831343799d39b5bf8c0aa2bfe6db82 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 7659 2007-04-03 18:02:48Z twisti $
-
 */
 
 
index b0c00fee856322743fdac8f0cb13daa56037be37..715aeb9934e6f438fa18574953e5727cca773410 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 7224 2007-01-18 11:43:03Z twisti $
-
 */
 
 
index 03c50c82d1508cdcc8c6262c8d6d5523fe165ff1..d675d64ceddc7b5fc5c28c93211d639038e42855 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 8ad124171a6d825d8339193cd0a9e40df5c5319b..703ee87695d84a25916d608eb541315712b6d1aa 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $
-
 */
 
 
diff --git a/src/vm/jit/mips/uclinux/Makefile.am b/src/vm/jit/mips/uclinux/Makefile.am
new file mode 100644 (file)
index 0000000..930ca31
--- /dev/null
@@ -0,0 +1,45 @@
+## src/vm/jit/mips/uclinux/Makefile.am
+##
+## Copyright (C) 2007 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.
+##
+## This program is free software; you can redistribute it and/or
+## modify it under the terms of the GNU General Public License as
+## published by the Free Software Foundation; either version 2, or (at
+## your option) any later version.
+##
+## This program is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+## 02110-1301, USA.
+
+
+AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
+
+LIBS =
+
+noinst_HEADERS =
+
+noinst_LTLIBRARIES = \
+       libmd.la
+
+libmd_la_SOURCES = \
+       md-os.c
+
+
+## Local variables:
+## mode: Makefile
+## indent-tabs-mode: t
+## c-basic-offset: 4
+## tab-width: 8
+## compile-command: "automake --add-missing"
+## End:
diff --git a/src/vm/jit/mips/uclinux/md-os.c b/src/vm/jit/mips/uclinux/md-os.c
new file mode 100644 (file)
index 0000000..a28d2d1
--- /dev/null
@@ -0,0 +1,101 @@
+/* src/vm/jit/mips/uclinux/md-os.c - machine dependent MIPS uClinux functions
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <signal.h>
+#include <ucontext.h>
+
+#include "vm/types.h"
+
+#include "vm/vm.h"
+
+
+/* md_init *********************************************************************
+
+   Do some machine dependent initialization.
+
+*******************************************************************************/
+
+void md_init(void)
+{
+}
+
+
+/* md_signal_handler_sigsegv ***************************************************
+
+   NullPointerException signal handler for hardware null pointer
+   check.
+
+*******************************************************************************/
+
+void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p)
+{
+       vm_abort("md_signal_handler_sigsegv: IMPLEMENT ME!");
+}
+
+
+/* md_signal_handler_sigusr2 ***************************************************
+
+   DOCUMENT ME
+
+*******************************************************************************/
+
+void md_signal_handler_sigusr2(int sig, siginfo_t *siginfo, void *_p)
+{
+       vm_abort("md_signal_handler_sigusr2: IMPLEMENT ME!");
+}
+
+
+/* md_critical_section_restart *************************************************
+
+   Search the critical sections tree for a matching section and set
+   the PC to the restart point, if necessary.
+
+*******************************************************************************/
+
+#if defined(ENABLE_THREADS)
+void md_critical_section_restart(ucontext_t *_uc)
+{
+       vm_abort("md_critical_section_restart: IMPLEMENT ME!");
+}
+#endif
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index c95bd639216d130231f13a208a5fdb4efcfc3fe3..b82b941f7b33383225b2d05f34ad5e51adcfcbb7 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 ## 02111-1307, USA.
-##
-## $Id: Makefile.am,v 1.8 2004/12/07 14:33:21 twisti Exp $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)/src
 
index f9138d7cb2537339841b7da07dd7551d7cd8d902..82768c3417d2e1b6479cf0fe9246aa0a5ffad579 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: $
 
 */
 #include "mm/memory.h"
index b9594a2576e8883acaa39523cd177eafda9c6bf2..13ac48c0cff3fd377e7ee341de9f11bcddabd6b4 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: dominators.h$
 
 */
 
index 461cca8e60b64d29423f001f35c9d324193daeaa..d4ef46bedb8a52027fb4ffb4be3567a2b46016e1 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: graph.c$
 
 */
 
index a887b472336d6d5f5f2d545192861c4647e5b233..12ad79381d988df044227004e16566caa8a6bf1c 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: graph.h$
 
 */
 
index cb032b8e66bc46937643a2a908ed81471fd544b0..bfaef14a792812d1e8d9c44f17ce89b2e0deb34e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: stack.c 4455 2006-02-06 01:02:59Z edwin $
-
 */
 
 
index d1f185d14ea0391cff48a7c562a808bfc5fac1e4..3fe01878dc4677519a6cbfdf29b3f998b9968330 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: stack.c 4455 2006-02-06 01:02:59Z edwin $
-
 */
 
 
index f2ac6d7038fc5c0e2c60fe1a25f31a72686c4a7c..adc0c95a15b3bc2b2a2e9fe5155836421aa79f17 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: lifetimes.c $
 
 */
 
index e6776ea4907cac4ea2e92fc0903a329e0ece7107..f46b51b078e29318a3be0312e6f41c34fca591dc 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: lifetime.h$
 
 */
 
index 693798e5de8502da9469c7b818344072d73fa2ac..1f04a1cba65cb53506a8c460ddfb6dd63218c771 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: lsra.c $
 
 */
 #include "config.h"
index d758139f14d4f1dea5c98d1fbba2c9db9fa9cac5..98f9b9a7de19e6258f98db0352727d3b996df6bd 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: lsra.h,v 1.17 2005/11/22 14:36:16 christian Exp $
 
 */
 
index 1f988b702a17348fb05af75bd0bdb7520f49452f..0880a21a64344227374f1b418cc49396932b6bc4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: profile.c 7952 2007-05-23 17:53:13Z twisti $
-
 */
 
 
index ee427a8ed6f18e406481b68d9ad92f569cee85c3..a88c1b611a24fcb91cd389e845a7c182416de86d 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: cacao.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 558236c20f7378394a04ac44eea3cd078ca6f1e6..aee255d866c79484032f86c8193cedc66564bdd8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: cacao.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index cb1e4fedba495c062282c9d68099a762ece26234..ca71ac98c09b6d53d91942096f873ab27181ec9e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: cacao.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 181540ffaa5fa9aa9711f66f16fd5c6b63a4666a..bd43c368579dc04a8f6bb7cdaecb7c37c77e929c 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: cacao.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 5dfff915b5162c51af43cdba18fda4c04af71c1a..d76b463519aed72456924fd1beac55f60998345c 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: cacao.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index a842537c1f2a7b112fae171f4efe477eb0800c98..a785ba42944791ac73e273b17679d5f5f66836ce 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: $
 
 */
 #include <stdio.h>
index df8dbf424312db1fee6dddc12a99f2197a8c2d9b..72e9b898bc1e043e5562da9f977aa2f62b71fba1 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Ullrich
 
-   $Id: ssa.h$
 
 */
 
index c22eaba43946b5fc015a14736551882ffd6c57aa..b1063f5f9bd0e84b415cd0bf6c25b9964a3b4cdd 100644 (file)
 ## Contact: cacao@cacaojvm.org
 ##
 ## Authors: Christian Thalinger
-##
-## $Id: Makefile.am 4826 2006-04-24 16:06:16Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        linux
index 0e2f2d47b4162987b1d45403ec9fb9d68e25822f..6b99040fbb0b3c880db694b9dedbd9b56d62cb78 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5173 2006-07-25 15:57:11Z twisti $
-
 */
 
 
index 225e7aae359c131a56956b040367ac6ab62c213e..6cffc305b35ade4e56cfe83af657404e458e0197 100644 (file)
 ## Contact: cacao@cacaojvm.org
 ##
 ## Authors: Christian Thalinger
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)
 
index 99216a2ee6760a0b0c109b4774638183e8be8179..e3379bd51c66a3333b1c245a71d1d395209f5c5c 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-abi.h 5387 2006-09-06 22:16:48Z twisti $
-
 */
 
 
index 15e0c4dc1c01cda8b630392dedb9ec7dafd8a8e0..4178864f04f2a161bcfe9195e74e39f7817f162b 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md.c 5233 2006-08-14 10:59:39Z twisti $
-
 */
 
 
index 75074bc0cde6241d5f2b2ca03b2b2c8ea342c60a..068dc65afed4e81e1d102e31ffbf3505206554c9 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: parse.c 8159 2007-06-28 00:31:31Z michi $
-
 */
 
 
index d5c7438ec92ba62db625c61bfa65ac6cfd72ae68..4b791301bf56f75c77820af0c93ee2f6788bf7b4 100644 (file)
@@ -27,8 +27,6 @@
    Author:  Christian Thalinger
             Edwin Steiner
 
-   $Id: parse.h 7663 2007-04-04 22:14:42Z twisti $
-
 */
 
 
diff --git a/src/vm/jit/patcher-common.c b/src/vm/jit/patcher-common.c
new file mode 100644 (file)
index 0000000..7a91ce2
--- /dev/null
@@ -0,0 +1,290 @@
+/* src/vm/jit/patcher-common.c - architecture independent code patching stuff
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <assert.h>
+#include <stdint.h>
+
+#include "codegen.h"                   /* for PATCHER_NOPS */
+
+#include "mm/memory.h"
+
+#include "threads/lock-common.h"
+
+#include "toolbox/list.h"
+#include "toolbox/logging.h"           /* XXX remove me! */
+
+#include "vm/exceptions.h"
+#include "vm/vm.h"                     /* for vm_abort */
+
+#include "vm/jit/code.h"
+#include "vm/jit/jit.h"
+#include "vm/jit/patcher-common.h"
+
+#include "vmcore/options.h"
+
+
+/* patcher_list_create *********************************************************
+
+   TODO
+
+*******************************************************************************/
+
+void patcher_list_create(codeinfo *code)
+{
+       code->patchers = list_create(OFFSET(patchref_t, linkage));
+}
+
+
+/* patcher_list_reset **********************************************************
+
+   TODO
+
+*******************************************************************************/
+
+void patcher_list_reset(codeinfo *code)
+{
+       patchref_t *pr;
+
+       /* free all elements of the list */
+
+       while((pr = list_first(code->patchers)) != NULL) {
+               list_remove(code->patchers, pr);
+
+               FREE(pr, patchref_t);
+
+#if defined(ENABLE_STATISTICS)
+               if (opt_stat)
+                       size_patchref -= sizeof(patchref_t);
+#endif
+       }
+}
+
+/* patcher_list_free ***********************************************************
+
+   TODO
+
+*******************************************************************************/
+
+void patcher_list_free(codeinfo *code)
+{
+       /* free all elements of the list */
+
+       patcher_list_reset(code);
+
+       /* free the list itself */
+
+       FREE(code->patchers, list_t);
+}
+
+
+/* patcher_list_find ***********************************************************
+
+   TODO
+
+   NOTE: Caller should hold the patcher list lock or maintain
+   exclusive access otherwise.
+
+*******************************************************************************/
+
+static patchref_t *patcher_list_find(codeinfo *code, u1 *pc)
+{
+       patchref_t *pr;
+
+       /* walk through all patcher references for the given codeinfo */
+
+       pr = list_first_unsynced(code->patchers);
+       while (pr) {
+
+               if (pr->mpc == (ptrint) pc)
+                       return pr;
+
+               pr = list_next_unsynced(code->patchers, pr);
+       }
+
+       return NULL;
+}
+
+
+/* patcher_add_patch_ref *******************************************************
+
+   Appends a new patcher reference to the list of patching positions.
+
+*******************************************************************************/
+
+void patcher_add_patch_ref(jitdata *jd, functionptr patcher, voidptr ref,
+                           s4 disp)
+{
+       codegendata *cd;
+    codeinfo    *code;
+    patchref_t  *pr;
+    s4           patchmpc;
+
+       cd       = jd->cd;
+    code     = jd->code;
+    patchmpc = cd->mcodeptr - cd->mcodebase;
+
+#if !defined(NDEBUG)
+       if (patcher_list_find(code, (u1 *) (intptr_t) patchmpc) != NULL)
+               vm_abort("patcher_add_patch_ref: different patchers at same position.");
+#endif
+
+    /* allocate patchref on heap (at least freed together with codeinfo) */
+
+       pr = NEW(patchref_t);
+       list_add_first_unsynced(code->patchers, pr);
+
+#if defined(ENABLE_STATISTICS)
+       if (opt_stat)
+               size_patchref += sizeof(patchref_t);
+#endif
+
+    /* set patcher information (mpc is resolved later) */
+
+    pr->mpc     = patchmpc;
+    pr->disp    = disp;
+    pr->patcher = patcher;
+    pr->ref     = ref;
+       pr->mcode   = 0;
+       pr->done    = false;
+
+    /* Generate NOPs for opt_shownops. */
+
+    if (opt_shownops)
+        PATCHER_NOPS;
+}
+
+
+/* patcher_handler *************************************************************
+
+   TODO
+
+*******************************************************************************/
+
+/*#define TRACE_PATCHER*/
+
+#ifdef TRACE_PATCHER
+/* XXX this indent is not thread safe! */
+/* XXX if you want it thread safe, place patcher_depth in threadobject! */
+static int patcher_depth = 0;
+# define TRACE_PATCHER_INDENT for (i=0; i<patcher_depth; i++) printf("\t")
+#endif
+
+java_handle_t *patcher_handler(u1 *pc)
+{
+       codeinfo      *code;
+       patchref_t    *pr;
+       bool           result;
+       java_handle_t *e;
+#ifdef TRACE_PATCHER
+       int            i;
+#endif
+
+       /* define the patcher function */
+
+       bool (*patcher_function)(patchref_t *);
+
+       /* search the codeinfo for the given PC */
+
+       code = code_find_codeinfo_for_pc(pc);
+       assert(code);
+
+       /* enter a monitor on the patcher list */
+
+       LOCK_MONITOR_ENTER(code->patchers);
+
+       /* search the patcher information for the given PC */
+
+       pr = patcher_list_find(code, pc);
+
+       if (pr == NULL)
+               vm_abort("patcher_handler: Unable to find patcher reference.");
+
+       if (pr->done) {
+               log_println("patcher_handler: double-patching detected!");
+               LOCK_MONITOR_EXIT(code->patchers);
+               return NULL;
+       }
+
+#ifdef TRACE_PATCHER
+       TRACE_PATCHER_INDENT; printf("patching in "); method_print(code->m); printf("\n");
+       TRACE_PATCHER_INDENT; printf("\texception program counter = %p\n", (void *) pr->mpc);
+       TRACE_PATCHER_INDENT; printf("\tmcodes before = "); for (i=0; i<5; i++) printf("0x%08x ", *((u4 *) pr->mpc + i)); printf("\n");
+       patcher_depth++;
+       assert(patcher_depth > 0);
+#endif
+
+       /* cast the passed function to a patcher function */
+
+       patcher_function = (bool (*)(patchref_t *)) (ptrint) pr->patcher;
+
+       /* call the proper patcher function */
+
+       result = (patcher_function)(pr);
+
+#ifdef TRACE_PATCHER
+       assert(patcher_depth > 0);
+       patcher_depth--;
+       TRACE_PATCHER_INDENT; printf("\tmcodes after  = "); for (i=0; i<5; i++) printf("0x%08x ", *((u4 *) pr->mpc + i)); printf("\n");
+       if (result == false) {
+               TRACE_PATCHER_INDENT; printf("\tPATCHER EXCEPTION!\n");
+       }
+#endif
+
+       /* check for return value and exit accordingly */
+
+       if (result == false) {
+               e = exceptions_get_and_clear_exception();
+
+               LOCK_MONITOR_EXIT(code->patchers);
+
+               return e;
+       }
+
+       pr->done = true; /* XXX this is only preliminary to prevent double-patching */
+
+       LOCK_MONITOR_EXIT(code->patchers);
+
+       return NULL;
+}
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
+
diff --git a/src/vm/jit/patcher-common.h b/src/vm/jit/patcher-common.h
new file mode 100644 (file)
index 0000000..91e46ed
--- /dev/null
@@ -0,0 +1,186 @@
+/* src/vm/jit/patcher-common.h - architecture independent code patching stuff
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _PATCHER_COMMON_H
+#define _PATCHER_COMMON_H
+
+/* forward typedefs ***********************************************************/
+
+#include "config.h"
+#include "vm/types.h"
+
+#include "toolbox/list.h"
+
+#include "vm/global.h"
+
+#include "vm/jit/jit.h"
+
+
+/* patchref_t ******************************************************************
+
+   A patcher reference contains information about a code position
+   which needs additional code patching during runtime.
+
+*******************************************************************************/
+
+typedef struct patchref_t {
+       ptrint       mpc;           /* absolute position in code segment          */
+       ptrint       datap;         /* absolute position in data segment          */
+       s4           disp;          /* displacement of ref in the data segment    */
+       functionptr  patcher;       /* patcher function to call                   */
+       voidptr      ref;           /* reference passed                           */
+       u8           mcode;         /* machine code to be patched back in         */
+       bool         done;          /* XXX preliminary: patch already applied?    */
+       listnode_t   linkage;
+} patchref_t;
+
+
+/* macros *********************************************************************/
+
+
+/* function prototypes ********************************************************/
+
+void patcher_list_create(codeinfo *code);
+void patcher_list_reset(codeinfo *code);
+void patcher_list_free(codeinfo *code);
+
+void patcher_add_patch_ref(jitdata *jd, functionptr patcher, voidptr ref,
+                           s4 disp);
+
+java_handle_t *patcher_handler(u1 *pc);
+
+
+/* patcher prototypes and macros **********************************************/
+
+#if defined(__ALPHA__) || defined(__ARM__) || defined(__MIPS__) || defined(__POWERPC__) || defined (__S390__)
+
+/* new patcher functions */
+
+bool patcher_resolve_class(patchref_t *pr);
+#define PATCHER_resolve_class (functionptr) patcher_resolve_class
+
+bool patcher_initialize_class(patchref_t *pr);
+#define PATCHER_initialize_class (functionptr) patcher_initialize_class
+
+bool patcher_resolve_classref_to_classinfo(patchref_t *pr);
+#define PATCHER_resolve_classref_to_classinfo (functionptr) patcher_resolve_classref_to_classinfo
+
+bool patcher_resolve_classref_to_vftbl(patchref_t *pr);
+#define PATCHER_resolve_classref_to_vftbl (functionptr) patcher_resolve_classref_to_vftbl
+
+bool patcher_resolve_classref_to_index(patchref_t *pr);
+#define PATCHER_resolve_classref_to_index (functionptr) patcher_resolve_classref_to_index
+
+bool patcher_resolve_classref_to_flags(patchref_t *pr);
+#define PATCHER_resolve_classref_to_flags (functionptr) patcher_resolve_classref_to_flags
+
+#if !defined(WITH_STATIC_CLASSPATH)
+bool patcher_resolve_native_function(patchref_t *pr);
+#define PATCHER_resolve_native_function (functionptr) patcher_resolve_native_function
+#endif
+
+/* old patcher functions */
+
+bool patcher_get_putstatic(patchref_t *pr);
+#define PATCHER_get_putstatic (functionptr) patcher_get_putstatic
+
+#if defined(__I386__)
+
+bool patcher_getfield(patchref_t *pr);
+#define PATCHER_getfield (functionptr) patcher_getfield
+
+bool patcher_putfield(patchref_t *pr);
+#define PATCHER_putfield (functionptr) patcher_putfield
+
+#else
+
+bool patcher_get_putfield(patchref_t *pr);
+#define PATCHER_get_putfield (functionptr) patcher_get_putfield
+
+#endif /* defined(__I386__) */
+
+#if defined(__I386__) || defined(__X86_64__)
+
+bool patcher_putfieldconst(patchref_t *pr);
+#define PATCHER_putfieldconst (functionptr) patcher_putfieldconst
+
+#endif /* defined(__I386__) || defined(__X86_64__) */
+
+bool patcher_invokestatic_special(patchref_t *pr);
+#define PATCHER_invokestatic_special (functionptr) patcher_invokestatic_special
+
+bool patcher_invokevirtual(patchref_t *pr);
+#define PATCHER_invokevirtual (functionptr) patcher_invokevirtual
+
+bool patcher_invokeinterface(patchref_t *pr);
+#define PATCHER_invokeinterface (functionptr) patcher_invokeinterface
+
+#if defined(__ALPHA__) || defined(__MIPS__) || defined(__POWERPC__) || defined(__S390__) 
+
+bool patcher_checkcast_interface(patchref_t *pr);
+#define PATCHER_checkcast_interface (functionptr) patcher_checkcast_interface
+
+bool patcher_instanceof_interface(patchref_t *pr);
+#define PATCHER_instanceof_interface (functionptr) patcher_instanceof_interface
+
+#endif /* defined(__ALPHA__) || defined(__MIPS__) || defined(__POWERPC__) || defined(__S390__) */
+
+/* very old patcher functions */
+/* XXX use newer patcher function names above! */
+
+#if defined(__S390__)
+
+bool patcher_clinit(patchref_t *pr);
+#define PATCHER_clinit (functionptr) patcher_clinit
+
+bool patcher_athrow_areturn(patchref_t *pr);
+#define PATCHER_athrow_areturn (functionptr) patcher_athrow_areturn
+
+bool patcher_checkcast_instanceof_interface(patchref_t *pr);
+#define PATCHER_checkcast_instanceof_interface (functionptr) patcher_checkcast_instanceof_interface
+
+#endif /* defined (__S390__) */
+
+#endif /* architecture list */
+
+
+#endif /* _PATCHER_COMMON_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index 53181485e8ba4ec04c2181f448265f3c4c8a0c83..2d7f68ea390448667f91a1fd8609695e2a32a0c5 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 0c3ae2687b2be686e636c82c81180503f7125bfd..0ff53a68d00daa192d50791be0a5297c0bfce54b 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        darwin \
index 77408218a29f2cd19d8de566cdc1056797d1fda0..3fadd04a7ed39f2ad8fe0c17ed9e9377b764cf24 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8270 2007-08-08 13:57:12Z twisti $
-
 */
 
 
index 4a4cb27f1355c3dd8b3802fb51f5e16e3a301b14..a17fe5217c394ee5659ac43ae1a4cf76ab5fdf84 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
-
 */
 
 
index 1efb03229a519ff63989f5d6db511776e4e4ae82..5c7f3195c27a2ab07056eb7753d289ac21106df4 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
index b7f4056aaa1a718492e9d40b138a5073d5ab01d5..ea0cc8d23ad6d697dda70bed23c7dd4af4ce76fe 100644 (file)
@@ -23,8 +23,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 7691 2007-04-12 12:45:10Z twisti $
-
 */
 
 
index a8408108e4ace736252e3cf2869298253d8926dd..1a5526dbfaaca7ed8d028166f42fbd29f6c61967 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7355 2007-02-14 10:57:32Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 74a3ea914c21231ec928b4c35723f19fe5915f3e..4d6d08f94269f69b5879c8ada4ec840b2990ffea 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8270 2007-08-08 13:57:12Z twisti $
-
 */
 
 
index 7d4459eb9b9b13df0b1b315eafdd08a0050a4db4..fef65e4162ab82261e5a988f5a16fcbf5c4692ba 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 8191 2007-07-08 15:15:53Z twisti $
-
 */
 
 
index 3e469acac29c68a9b61dea8d09ff0956005c9b98..04947e59e3067c854d1351ce012d97a496413cc6 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 8274 2007-08-08 15:58:17Z twisti $
-
 */
 
 
index b2bc5c433f05c0e7b981d11400c52e7cd3840791..2086b8eac341d7c1242b6cc4a2830aa1687081f2 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 8283 2007-08-09 15:10:05Z twisti $
-
 */
 
 
index 7ccb0f29640487c6d652f45742b1da9bf6910a39..404055649273d4094da27a2e77ecf85de2a77e6b 100644 (file)
@@ -30,7 +30,6 @@
    Changes: Stefan Ring
             Christian Thalinger
 
-   $Id: disass.c 4712 2006-03-30 11:59:46Z twisti $
 
 */
 
index 85973a2f6e9f4568f9f879ac7ccd4658180a908a..f616af44016f9aff61343a3aacf9a69b18ad8e27 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index 2996f18ebad11cabb42d404b5ee42380f7c30e1a..e849f1137baed9bef8e3a45884c5a3eb082875f5 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7355 2007-02-14 10:57:32Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index bb5bb932daf157e87948249f9770d34da5075660..b57a0815d57ddd4d5a177f12b576901c36918507 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8270 2007-08-08 13:57:12Z twisti $
-
 */
 
 
index 716afad9f2ab0068996cbf00f56d91467be2a8ce..a3ae17f9239757a13b3862e4e37ee51cd0204551 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 8191 2007-07-08 15:15:53Z twisti $
-
 */
 
 
index 65519348e2fbb358d30bde1db00f4846073669f3..2e448389da3980aa12a9e197577e594a9828d798 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 5179 2006-07-26 10:16:50Z twisti $
-
 */
 
 
index ce41acbcf04a684ef2e14aebbc5c2f2e202033b9..1a9d6d98cf639d78eabec587e5cae083e29a6bc6 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 8283 2007-08-09 15:10:05Z twisti $
-
 */
 
 
index c9263fe3b1ea376b57f4271cdf7a08813d4173df..c583d97abbbc6ed292312b8f6eee30b31a169a36 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 6f71012679332f47172fee4d58bddb0bc2bb087c..a3a96bb3713a3c620eec09bbb3b87449eb62ff7d 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 9e8181666be7bda357ce911a8af7fdc3d4c73cac..140a820e7d0616fc37c1c593d1ddd800d79d01c2 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Christian Ullrich
 
-   $Id: md-abi.c 4384 2006-01-28 14:42:58Z twisti $
-
 */
 
 
index aa0a91fb3620494e915b884d69375ad4526dbcfa..06f33ca9703d13486b4aead98798c9de3a0d0783 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-abi.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index cf2d819a43f39c0f4721768211b6f3cc64dbba20..386f270462209565a626433beb1f0b67958a066c 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 77b853c67f22764c4552e9c971aa24e5a26c7a6e..6955088303b909764671e2cf0d4c18881b7d6c73 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-os.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 2bdbf42aa61c9c063c4dc34b24c0e1ae7abddbf4..d941b7d632e95e76426f7c100b245c56d534c7f3 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 8286 2007-08-10 10:46:17Z michi $
-
 */
 
 
index cb078b60fb25e58cbb2a81392b7fb67301574ddd..53e98ecc1ba5b11187cea378df8eaa7b79e5e27d 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        linux 
index a2ad0086b04cd924ce711affa9787b82c6eda74e..6a092db61c8e831232f2397b0ee5b3afbb8f6940 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 919623fef4910f1111dc8d06d7be770d1abc3a39..541722a9ffb3eb9999fe3e8d3533f9db5c3fda76 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
-
 */
 
 
index 96cebb8d0c37c91882cb956a77dfac1a670b8c97..104754408550fc77feaf2bd46ebb4766c35c48bc 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index 3159c16aabee6b7bb5c7c6de1101b3c9de3abdba..2b82467bc6a4622a438a9f4785f3d6dd42db9dde 100644 (file)
@@ -30,7 +30,6 @@
             Christian Thalinger
             Christian Ullrich
 
-   $Id: codegen.h 7691 2007-04-12 12:45:10Z twisti $
 
 */
 
index 76ea0177eb756d5e7479de2e52a1231e3107c976..bd216fd6783374c00c0af3444fa94e62bb3db1a6 100644 (file)
@@ -30,7 +30,6 @@
    Changes: Stefan Ring
             Christian Thalinger
 
-   $Id: disass.c 5279 2006-08-25 11:55:21Z tbfg $
 
 */
 
index 6c0bee647298089781b74fecd0a64ec32e13e8f7..041f8da4d347b4e8be6c909fe4161385d0c2cbf6 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emitfuncs.c 4398 2006-01-31 23:43:08Z twisti $
-
 */
 
 
index 38c7e085b2c46cae5ffa9ff426c05a47af5da2b7..29c9e3f511a805e78b87779361549616d11845c0 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 7766 2007-04-19 13:24:48Z michi $
 
 ## Process this file with automake to produce Makefile.in
 
index 2a6c5e418966d71a3a4f1141fad39938f6a83dd6..4349b45bddd594e987069e01f7c565be59c50bf9 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8123 2007-06-20 23:50:55Z michi $
-
 */
 
 
index f21759fccade4bf5a877ee58168c2188c4ce35ea..5a0f9cd534ec644cc8e9e8747988d8ac384378ad 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 7596 2007-03-28 21:05:53Z twisti $
-
 */
 
 
index e710e4ac3926a5eb35a64d7c6bcb2d85cced9a04..19ac100bf547da3eff87cc73b0daaf8fb5523fc8 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 5940 2006-11-09 09:59:28Z tbfg $
-
 */
 
 
index 98c2c2bbd0307b5d7732c47f4a66548472289c44..3e62f609598ae29371a409dc0d70b8dea04934d8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 8283 2007-08-09 15:10:05Z twisti $
-
 */
 
 
index e07b3532a403235a399b08f41329f42902982a76..85741ef7924865bab635b018445efd3d0eeb4159 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index aecd6bb81ccbf0eaf65b3073ae0506cb089bda05..b14fa4268a20b424d1e5c4d9994f82c60770428d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $
-
 */
 
 
index 417f1429a933545dc70c7fd94a312ab669bc7d2d..699b362befc08de266cbc692e4cc69d680791719 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: reg.c 7713 2007-04-15 21:49:48Z twisti $
-
 */
 
 
index 3c5d51976525c6be2bb7e61a00bcdc4e6beaa290..f734563619715334708d3dbbdf1fc757d7ecf73a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: reg.h 7713 2007-04-15 21:49:48Z twisti $
-
 */
 
 
index f7b8d678d6d518f7aac79ff344e3f92f06ad2ffb..f30f10cdbb0d3726a1493bb2e6833dcc0797904c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 #include "config.h"
index 551cf57b6dab24c0d54df541a71a4b6e26aaf88f..c0570ee8b7da53e6f65005ef7ca0c86b9c2d8739 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index 246189da4a1da0f1c9f2b79d005009ad597e1cb3..5723b241c8ee4cac660b61ef0cc3bcb370851a8c 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir) -I$(top_builddir)/src
 AM_CCASFLAGS = $(AM_CPPFLAGS) $(AM_LDFLAGS)
index 805d8a2939d7bbf4a5b34ac90479aaa6f911d566..14626e8f6d23955661e3a6d02b39626db63c5b61 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8296 2007-08-11 22:38:38Z pm $
-
 */
 
 
index de89c58db6d4d6335bd9ba312c1e3d23ac7c1dad..b711f0c27637f3cbc21714cdfcc1a195c64ab1ca 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
@@ -80,6 +78,24 @@ asm_builtin_d2i:
 asm_builtin_d2l:
        .long 0
 
+/* Generates a PIC call.
+ *
+ * func: function to call
+ * tag: tag unique for this call to generate a label
+ * tmp: one temporary register needed for calculation
+ *
+ * The offset table used is located at the bottom of this file.
+ *
+ * Note: destroys r12/itmp2. r12 MUST contain GOT for PIC calls!
+ */
+#define CALL_PIC(func, tag)                                                         \
+       bras   %r14, L_bras_##tag;                           /* get PC */               \
+L_bras_##tag:                                                                       \
+       l      %r12, L_offsets - L_bras_##tag (%r14);        /* load offset to PLT */   \
+       la     %r12, L_offsets - L_bras_##tag (%r12, %r14);  /* load PLT address */     \
+       l      %r14, L_offset_##func - L_bras_##tag (%r14);  /* load offset to func */  \
+       bas    %r14, 0(%r14, %r12);
+
 /********************* function asm_calljavafunction ***************************
 *                                                                              *
 *   This function calls a Java-method (which possibly needs compilation)       *
@@ -180,13 +196,10 @@ L_asm_vm_call_method_return:
 asm_vm_call_method_exception_handler:
        lr    a0, xptr
 
-       bras  %r14, L_avcmeh_bras
-       .long builtin_throw_exception
-L_avcmeh_bras:
-       l     %r14, 0(%r14)
        ahi   sp, -96
-       basr  %r14, %r14
+       CALL_PIC(builtin_throw_exception, avcmeh)
        ahi   sp, 96
+
        j     L_asm_vm_call_method_return
 
 asm_vm_call_method_end:
@@ -222,7 +235,7 @@ argument registers: arguments (like in JIT)
 asm_call_jit_compiler:
 L_asm_call_jit_compiler:
 
-#      define ACJC_STACKFRAME (4 + (4 * 4) + (2 * 8) + 96)
+#      define ACJC_STACKFRAME (4 + (4 * 4) + (2 * 8) + 96 + 4)
 
        ahi     sp,-ACJC_STACKFRAME        /* allocate stack space */
 
@@ -238,13 +251,7 @@ L_asm_call_jit_compiler:
        la      a2,ACJC_STACKFRAME(sp)     /* pass java sp                       */
        la      a3,0(%r14)                 /* pass return address, make sure bit 32 is 0 */
 
-       /* call jit_asm_compile in a PIC way */
-
-       bras    itmp2, L_bras_jac
-       .long   jit_asm_compile
-L_bras_jac:
-       l       itmp2, 0(itmp2)
-       basr    %r14, itmp2
+       CALL_PIC(jit_asm_compile, acjc)
 
        lr      pv, v0                     /* save return value */
 
@@ -263,11 +270,9 @@ jit_code_entry:                        /* label to set breakpoint on */
 
 
 L_asm_call_jit_compiler_exception:
-       bras    itmp2, L_bras_acjce
-       .long exceptions_get_and_clear_exception
-L_bras_acjce:
-       l       itmp2, 0(itmp2)
-       basr    %r14, itmp2
+
+       CALL_PIC(exceptions_get_and_clear_exception, acjce)
+
        lr      xptr, %r2
        l       xpc,96+32(sp)              /* restore return address */
        ahi     sp, ACJC_STACKFRAME        /* remove stack frame */
@@ -331,11 +336,7 @@ L_asm_handle_exception:
        la    a1, FREGS(sp)
        la    a2, OUT(sp)
 
-       bras    %r14,L_ahe_bras
-       .long   md_handle_exception
-L_ahe_bras:
-       l       %r14,0(%r14)
-       basr    %r14,%r14
+       CALL_PIC(md_handle_exception, ahe)
 
        l     itmp3, OUT+(2*4)(sp)  /* out[2] contains maybe leaf flag */
        ltr   itmp3, itmp3           
@@ -446,139 +447,18 @@ asm_abstractmethoderror:
 
 #endif
 
-#if 0
-
-/* asm_replacement_out *********************************************************
-
-   This code is jumped to from the replacement-out stubs that are executed
-   when a thread reaches an activated replacement point.
-
-   The purpose of asm_replacement_out is to read out the parts of the
-   execution state that cannot be accessed from C code, store this state,
-   and then call the C function replace_me.
-
-   Stack layout:
-      8                 start of stack inside method to replace
-      0   rplpoint *    info on the replacement point that was reached
-
-*******************************************************************************/
-
-/* some room to accomodate changes of the stack frame size during replacement */
-       /* XXX we should find a cleaner solution here */
-#define REPLACEMENT_ROOM  512
-
-asm_replacement_out:
-    /* create stack frame */
-       sub     $(sizeexecutionstate + REPLACEMENT_ROOM),sp
-
-       /* save registers in execution state */
-       mov     %rax,(RAX*8+offes_intregs)(sp)
-       mov     %rbx,(RBX*8+offes_intregs)(sp)
-       mov     %rcx,(RCX*8+offes_intregs)(sp)
-       mov     %rdx,(RDX*8+offes_intregs)(sp)
-       mov     %rsi,(RSI*8+offes_intregs)(sp)
-       mov     %rdi,(RDI*8+offes_intregs)(sp)
-       mov     %rbp,(RBP*8+offes_intregs)(sp)
-       movq    $0  ,(RSP*8+offes_intregs)(sp) /* not used */
-       mov     %r8 ,(R8 *8+offes_intregs)(sp)
-       mov     %r9 ,(R9 *8+offes_intregs)(sp)
-       mov     %r10,(R10*8+offes_intregs)(sp)
-       mov     %r11,(R11*8+offes_intregs)(sp)
-       mov     %r12,(R12*8+offes_intregs)(sp)
-       mov     %r13,(R13*8+offes_intregs)(sp)
-       mov     %r14,(R14*8+offes_intregs)(sp)
-       mov     %r15,(R15*8+offes_intregs)(sp)
-
-       movq    %xmm0 ,(XMM0 *8+offes_fltregs)(sp)
-       movq    %xmm1 ,(XMM1 *8+offes_fltregs)(sp)
-       movq    %xmm2 ,(XMM2 *8+offes_fltregs)(sp)
-       movq    %xmm3 ,(XMM3 *8+offes_fltregs)(sp)
-       movq    %xmm4 ,(XMM4 *8+offes_fltregs)(sp)
-       movq    %xmm5 ,(XMM5 *8+offes_fltregs)(sp)
-       movq    %xmm6 ,(XMM6 *8+offes_fltregs)(sp)
-       movq    %xmm7 ,(XMM7 *8+offes_fltregs)(sp)
-       movq    %xmm8 ,(XMM8 *8+offes_fltregs)(sp)
-       movq    %xmm9 ,(XMM9 *8+offes_fltregs)(sp)
-       movq    %xmm10,(XMM10*8+offes_fltregs)(sp)
-       movq    %xmm11,(XMM11*8+offes_fltregs)(sp)
-       movq    %xmm12,(XMM12*8+offes_fltregs)(sp)
-       movq    %xmm13,(XMM13*8+offes_fltregs)(sp)
-       movq    %xmm14,(XMM14*8+offes_fltregs)(sp)
-       movq    %xmm15,(XMM15*8+offes_fltregs)(sp)
-
-       /* calculate sp of method */
-       mov     sp,itmp1
-       add     $(sizeexecutionstate + REPLACEMENT_ROOM + 8),itmp1
-       mov     itmp1,(offes_sp)(sp)
-
-       /* pv must be looked up via AVL tree */
-       movq    $0,(offes_pv)(sp)
-
-       /* call replace_me */
-       mov     -8(itmp1),a0                /* rplpoint *                         */
-    mov     sp,a1                       /* arg1: execution state              */
-    call    replace_me@PLT              /* call C function replace_me         */
-    call    abort@PLT                   /* NEVER REACHED                      */
-
-/* asm_replacement_in **********************************************************
-
-   This code writes the given execution state and jumps to the replacement
-   code.
-
-   This function never returns!
-
-   C prototype:
-      void asm_replacement_in(executionstate *es);
-
-*******************************************************************************/
-
-asm_replacement_in:
-       mov     a0,%rbp                     /* executionstate *es                 */
-
-       /* set new sp */
-       mov     (offes_sp)(%rbp),%rsp
-       
-       /* store address of new code */
-       push    (offes_pc)(%rbp)
-       
-       /* copy registers from execution state */
-       movq    (XMM0 *8+offes_fltregs)(%rbp),%xmm0
-       movq    (XMM1 *8+offes_fltregs)(%rbp),%xmm1
-       movq    (XMM2 *8+offes_fltregs)(%rbp),%xmm2
-       movq    (XMM3 *8+offes_fltregs)(%rbp),%xmm3
-       movq    (XMM4 *8+offes_fltregs)(%rbp),%xmm4
-       movq    (XMM5 *8+offes_fltregs)(%rbp),%xmm5
-       movq    (XMM6 *8+offes_fltregs)(%rbp),%xmm6
-       movq    (XMM7 *8+offes_fltregs)(%rbp),%xmm7
-       movq    (XMM8 *8+offes_fltregs)(%rbp),%xmm8
-       movq    (XMM9 *8+offes_fltregs)(%rbp),%xmm9
-       movq    (XMM10*8+offes_fltregs)(%rbp),%xmm10
-       movq    (XMM11*8+offes_fltregs)(%rbp),%xmm11
-       movq    (XMM12*8+offes_fltregs)(%rbp),%xmm12
-       movq    (XMM13*8+offes_fltregs)(%rbp),%xmm13
-       movq    (XMM14*8+offes_fltregs)(%rbp),%xmm14
-       movq    (XMM15*8+offes_fltregs)(%rbp),%xmm15
-
-       mov     (RAX*8+offes_intregs)(%rbp),%rax
-       mov     (RBX*8+offes_intregs)(%rbp),%rbx
-       mov     (RCX*8+offes_intregs)(%rbp),%rcx
-       mov     (RDX*8+offes_intregs)(%rbp),%rdx
-       mov     (RSI*8+offes_intregs)(%rbp),%rsi
-       mov     (RDI*8+offes_intregs)(%rbp),%rdi
-       mov     (R8 *8+offes_intregs)(%rbp),%r8
-       mov     (R9 *8+offes_intregs)(%rbp),%r9
-       mov     (R10*8+offes_intregs)(%rbp),%r10
-       mov     (R11*8+offes_intregs)(%rbp),%r11
-       mov     (R12*8+offes_intregs)(%rbp),%r12
-       mov     (R13*8+offes_intregs)(%rbp),%r13
-       mov     (R14*8+offes_intregs)(%rbp),%r14
-       mov     (R15*8+offes_intregs)(%rbp),%r15
-
-       mov     (RBP*8+offes_intregs)(%rbp),%rbp
-
-       /* jump to new code */
-       ret
-#endif
+/* Offset table for PIC calls, see CALL_PIC */
+
+L_offsets:
+       .long  _GLOBAL_OFFSET_TABLE_ - L_offsets
+L_offset_builtin_throw_exception:
+       .long  builtin_throw_exception@PLTOFF
+L_offset_jit_asm_compile:
+       .long  jit_asm_compile@PLTOFF
+L_offset_exceptions_get_and_clear_exception:
+       .long  exceptions_get_and_clear_exception@PLTOFF
+L_offset_md_handle_exception:
+       .long  md_handle_exception@PLTOFF
 
 
 /*
index 943d374abfb99d27d0ba870b972273db3f583ec4..c9b4cfbad66c06c2f300337c72fa86741c59ee43 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
@@ -598,6 +596,16 @@ bool codegen_emit(jitdata *jd)
                                } else {
                                        disp = dseg_add_unique_address(cd, iptr->sx.val.anyptr);
                                        M_ALD_DSEG(d, disp);
+                                       /*
+                                       if (((u4)(iptr->sx.val.anyptr) & 0x00008000) == 0) {
+                                               N_LHI(d, ((u4)(iptr->sx.val.anyptr) >> 16) & 0xFFFF);
+                                               M_SLL_IMM(16, d);
+                                               N_AHI(d, (u4)(iptr->sx.val.anyptr) & 0xFFFF);
+                                       } else {
+                                               disp = dseg_add_unique_address(cd, iptr->sx.val.anyptr);
+                                               M_ALD_DSEG(d, disp);
+                                       }
+                                       */
                                }
                        }
                        emit_store_dst(jd, iptr, d);
@@ -2659,7 +2667,6 @@ nowperformreturn:
                        PROFILE_CYCLE_STOP;
 
                        M_RET;
-                       ALIGNCODENOP;
                        }
                        break;
 
index 8a451a411dc0a6f10403f25bcaf9640bbf88448a..7ef8c41eab21529fcc69bc0b18f2a466a67a88c2 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 8251 2007-08-01 15:26:59Z pm $
-
 */
 
 
             codegen_increase(cd); \
     } while (0)
 
-#define ALIGNCODENOP \
-    if ((s4) (((ptrint) cd->mcodeptr) & 7)) { \
-        M_NOP; \
-    }
-
 /* some patcher defines *******************************************************/
 
 #define PATCHER_CALL_SIZE    2          /* size in bytes of a patcher call    */
  * In debug mode, the instructions assert that %r0 was not given as argument.
  */
 
-#if 1
+#if !defined(NDEBUG)
+
 #      include <stdlib.h>
+
        /* register none */
 #      define RN 16
-       /* Optional register.
-        * Check that value given is %r1 - %r15 or RN
-        */
-#      define _WITH_LINE(f, ...) f(__FILE__, __LINE__, __VA_ARGS__)
+
        static inline int _OR_IMPL(const char *file, int line, int r) {
                if(!(
                        ((0 < r) && (r < 16)) ||
                }
                return ((r == RN) ? 0 : r);
        }
-#      define _OR(r) _WITH_LINE(_OR_IMPL, r)
+#      define _OR(r) _OR_IMPL(__FILE__, __LINE__, r)
 
 #      define _SMIN(b) (-(1 << (bits - 1)))
 #      define _SMAX(b) ((1 << (b - 1)) - 1)
                }
                return i;
        }
-#      define _UBITS(i, bits) _WITH_LINE(_UBITS_IMPL, i, bits)
+
+#      define _UBITS(i, bits) _UBITS_IMPL(__FILE__, __LINE__, i, bits)
+
        static inline int _SBITS_IMPL(const char *file, int line, int i, int bits) {
                if(!((_SMIN(bits) <= i) && (i <= _SMAX(bits)))) {
                        fprintf(stdout, "%d (0x%X) is not an signed %d bit integer at %s:%d.\n", i, i, bits, file, line);
                }
                return i;
        }
-#      define _SBITS(i, bits) _WITH_LINE(_SBITS_IMPL, i, bits)
+
+#      define _SBITS(i, bits) _SBITS_IMPL(__FILE__, __LINE__, i, bits)
+
        static inline int _BITS_IMPL(const char *file, int line, int i, int bits) {
                if (!(
                        ((_UMIN(bits) <= i) && (i <= _UMAX(bits))) ||
                }
                return i;
        }
-#      define _BITS(i, bits) _WITH_LINE(_BITS_IMPL, i, bits)
+
+#      define _BITS(i, bits) _BITS_IMPL(__FILE__, __LINE__, i, bits)
+
 #else
 #      define RN 0
 #      define _OR(x) (x)
 
 #define M_ASUB_IMM32(imm, tmpreg, reg) M_ISUB_IMM32(imm, tmpreg, reg)
 
-/* ----------------------------------------------- */
-
-#define _DEPR(x) \
-       do { \
-               fprintf(stdout, \
-                       "Using old x86_64 instruction %s at %s (%s:%d), fix this.\n", \
-                       #x, __FUNCTION__, __FILE__, __LINE__); \
-       } while (0)
-
-#define M_MOV_IMM(a,b) _DEPR( M_MOV_IMM(a,b) )
-
-#define M_IMOV(a,b) _DEPR( M_IMOV(a,b) )
-#define M_IMOV_IMM(a,b) _DEPR( M_IMOV_IMM(a,b) )
-
-
-#define M_ILD32(a,b,disp) _DEPR( M_ILD32(a,b,disp) )
-#define M_LLD32(a,b,disp) _DEPR( M_LLD32(a,b,disp) )
-
-
-#define M_IST_IMM(a,b,disp) _DEPR( M_IST_IMM(a,b,disp) )
-#define M_LST_IMM32(a,b,disp) _DEPR( M_LST_IMM32(a,b,disp) )
-
-#define M_IST32(a,b,disp) _DEPR( M_IST32(a,b,disp) )
-#define M_LST32(a,b,disp) _DEPR( M_LST32(a,b,disp) )
-
-#define M_IST32_IMM(a,b,disp) _DEPR( M_IST32_IMM(a,b,disp) )
-#define M_LST32_IMM32(a,b,disp) _DEPR( M_LST32_IMM32(a,b,disp) )
-
-
-#define M_LADD(a,b) _DEPR( M_LADD(a,b) )
-#define M_LSUB(a,b) _DEPR( M_LSUB(a,b) )
-#define M_LMUL(a,b) _DEPR( M_LMUL(a,b) )
-
-#define M_LADD_IMM(a,b) _DEPR( M_LADD_IMM(a,b) )
-#define M_LSUB_IMM(a,b) _DEPR( M_LSUB_IMM(a,b) )
-#define M_LMUL_IMM(a,b,c) _DEPR( M_LMUL_IMM(a,b,c) )
-
-#define M_IINC(a) _DEPR( M_IINC(a) )
-#define M_IDEC(a) _DEPR( M_IDEC(a) )
-
-#define M_ALD32(a,b,disp) _DEPR( M_ALD32(a,b,disp) )
-
-#define M_AST_IMM32(a,b,c) _DEPR( M_AST_IMM32(a,b,c) )
-
-#define M_LADD_IMM32(a,b) _DEPR( M_LADD_IMM32(a,b) )
-#define M_AADD_IMM32(a,b) _DEPR( M_AADD_IMM32(a,b) )
-#define M_LSUB_IMM32(a,b) _DEPR( M_LSUB_IMM32(a,b) )
-
-#define M_ILEA(a,b,c) _DEPR( M_ILEA(a,b,c) )
-#define M_LLEA(a,b,c) _DEPR( M_LLEA(a,b,c) )
-#define M_ALEA(a,b,c) _DEPR( M_ALEA(a,b,c) )
-
-#define M_LNEG(a) _DEPR( M_LNEG(a) )
-
-#define M_IAND_IMM(a,b) _DEPR( M_IAND_IMM(a,b) )
-#define M_IOR_IMM(a,b) _DEPR( M_IOR_IMM(a,b) )
-#define M_IXOR_IMM(a,b) _DEPR( M_IXOR_IMM(a,b) )
-
-#define M_LAND(a,b) _DEPR( M_LAND(a,b) )
-#define M_LOR(a,b) _DEPR( M_LOR(a,b) )
-#define M_LXOR(a,b) _DEPR( M_LXOR(a,b) )
-
-#define M_LAND_IMM(a,b) _DEPR( M_LAND_IMM(a,b) )
-#define M_LOR_IMM(a,b) _DEPR( M_LOR_IMM(a,b) )
-#define M_LXOR_IMM(a,b) _DEPR( M_LXOR_IMM(a,b) )
-
-#define M_SSEXT(a,b) _DEPR( M_SSEXT(a,b) )
-#define M_ISEXT(a,b) _DEPR( M_ISEXT(a,b) )
-
-#define M_CZEXT(a,b) _DEPR( M_CZEXT(a,b) )
-
-#define M_ISRA_IMM(a,b) _DEPR( M_ISRA_IMM(a,b) )
-
-#define M_LSLL_IMM(a,b) _DEPR( M_LSLL_IMM(a,b) )
-#define M_LSRA_IMM(a,b) _DEPR( M_LSRA_IMM(a,b) )
-#define M_LSRL_IMM(a,b) _DEPR( M_LSRL_IMM(a,b) )
-
-#define M_LCMP(a,b) _DEPR( M_LCMP(a,b) )
-#define M_LCMP_IMM(a,b) _DEPR( M_LCMP_IMM(a,b) )
-#define M_LCMP_IMM_MEMBASE(a,b,c) _DEPR( M_LCMP_IMM_MEMBASE(a,b,c) )
-#define M_LCMP_MEMBASE(a,b,c) _DEPR( M_LCMP_MEMBASE(a,b,c) )
-
-#define M_ICMP_IMM_MEMBASE(a,b,c) _DEPR( M_ICMP_IMM_MEMBASE(a,b,c) )
-#define M_ICMP_MEMBASE(a,b,c) _DEPR( M_ICMP_MEMBASE(a,b,c) )
-
-#define M_BAE(disp) _DEPR( M_BAE(disp) )
-#define M_BA(disp) _DEPR( M_BA(disp) )
-
-#define M_CMOVEQ(a,b) _DEPR( M_CMOVEQ(a,b) )
-#define M_CMOVNE(a,b) _DEPR( M_CMOVNE(a,b) )
-#define M_CMOVLT(a,b) _DEPR( M_CMOVLT(a,b) )
-#define M_CMOVLE(a,b) _DEPR( M_CMOVLE(a,b) )
-#define M_CMOVGE(a,b) _DEPR( M_CMOVGE(a,b) )
-#define M_CMOVGT(a,b) _DEPR( M_CMOVGT(a,b) )
-
-#define M_CMOVEQ_MEMBASE(a,b,c) _DEPR( M_CMOVEQ_MEMBASE(a,b,c) )
-#define M_CMOVNE_MEMBASE(a,b,c) _DEPR( M_CMOVNE_MEMBASE(a,b,c) )
-#define M_CMOVLT_MEMBASE(a,b,c) _DEPR( M_CMOVLT_MEMBASE(a,b,c) )
-#define M_CMOVLE_MEMBASE(a,b,c) _DEPR( M_CMOVLE_MEMBASE(a,b,c) )
-#define M_CMOVGE_MEMBASE(a,b,c) _DEPR( M_CMOVGE_MEMBASE(a,b,c) )
-#define M_CMOVGT_MEMBASE(a,b,c) _DEPR( M_CMOVGT_MEMBASE(a,b,c) )
-
-#define M_CMOVB(a,b) _DEPR( M_CMOVB(a,b) )
-#define M_CMOVA(a,b) _DEPR( M_CMOVA(a,b) )
-#define M_CMOVP(a,b) _DEPR( M_CMOVP(a,b) )
-
-#define M_PUSH(a) _DEPR( M_PUSH(a) )
-#define M_PUSH_IMM(a) _DEPR( M_PUSH_IMM(a) )
-#define M_POP(a) _DEPR( M_POP(a) )
-
-#define M_JMP_IMM(a) _DEPR( M_JMP_IMM(a) )
-#define M_CALL_IMM(a) _DEPR( M_CALL_IMM(a) )
-
-#define M_FLD32(a,b,disp) _DEPR( M_FLD32(a,b,disp) )
-#define M_DLD32(a,b,disp) _DEPR( M_DLD32(a,b,disp) )
-
-#define M_FST32(a,b,disp) _DEPR( M_FST32(a,b,disp) )
-#define M_DST32(a,b,disp) _DEPR( M_DST32(a,b,disp) )
-
-
-/* system instructions ********************************************************/
-
-#define M_RDTSC _DEPR( M_RDTSC )
-
-#define M_IINC_MEMBASE(a,b) _DEPR( M_IINC_MEMBASE(a,b) )
-
-#define M_IADD_MEMBASE(a,b,c) _DEPR( M_IADD_MEMBASE(a,b,c) )
-#define M_IADC_MEMBASE(a,b,c) _DEPR( M_IADC_MEMBASE(a,b,c) )
-#define M_ISUB_MEMBASE(a,b,c) _DEPR( M_ISUB_MEMBASE(a,b,c) )
-#define M_ISBB_MEMBASE(a,b,c) _DEPR( M_ISBB_MEMBASE(a,b,c) )
-
 #define PROFILE_CYCLE_START 
-#define __PROFILE_CYCLE_START _DEPR( __PROFILE_CYCLE_START )
 
 #define PROFILE_CYCLE_STOP 
-#define __PROFILE_CYCLE_STOP _DEPR( __PROFILE_CYCLE_STOP )
-
-#endif /* _CODEGEN_H */
-
 
 s4 codegen_reg_of_dst_notzero(jitdata *jd, instruction *iptr, s4 tempregnum);
 
+#endif /* _CODEGEN_H */
 
 /*
  * These are local overrides for various environment variables in Emacs.
index 234ad92786940c5b309d6d431e2365fac75da4a4..56a7df1de945bb2e58c06b42e068a60c43e453a8 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: disass.c 7848 2007-05-01 21:40:26Z pm $
-
 */
 
 
index d9c89657ecb157c916f460374673b4bbfb0f2ec0..24419bd5472b827b3d57d6cabd9df65e2f6c05de 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 #include "config.h"
@@ -161,48 +159,57 @@ void emit_copy(jitdata *jd, instruction *iptr)
                        return;
                }
 
-               /* If one of the variables resides in memory, we can eliminate
-                  the register move from/to the temporary register with the
-                  order of getting the destination register and the load. */
-
-               if (IS_INMEMORY(src->flags)) {
-                       if (IS_FLT_DBL_TYPE(dst->type)) {
-                               d = codegen_reg_of_var(iptr->opc, dst, REG_FTMP1);
+               if (IS_INMEMORY(src->flags) && IS_INMEMORY(dst->flags)) {
+                       if (IS_2_WORD_TYPE(src->type)) {
+                               N_MVC(dst->vv.regoff, 8, REG_SP, src->vv.regoff, REG_SP);
                        } else {
-                               if (IS_2_WORD_TYPE(dst->type)) {
-                                       d = codegen_reg_of_var(iptr->opc, dst, REG_ITMP12_PACKED);
+                               N_MVC(dst->vv.regoff, 4, REG_SP, src->vv.regoff, REG_SP);
+                       }
+               } else {
+
+                       /* If one of the variables resides in memory, we can eliminate
+                          the register move from/to the temporary register with the
+                          order of getting the destination register and the load. */
+
+                       if (IS_INMEMORY(src->flags)) {
+                               if (IS_FLT_DBL_TYPE(dst->type)) {
+                                       d = codegen_reg_of_var(iptr->opc, dst, REG_FTMP1);
                                } else {
-                                       d = codegen_reg_of_var(iptr->opc, dst, REG_ITMP1);
+                                       if (IS_2_WORD_TYPE(dst->type)) {
+                                               d = codegen_reg_of_var(iptr->opc, dst, REG_ITMP12_PACKED);
+                                       } else {
+                                               d = codegen_reg_of_var(iptr->opc, dst, REG_ITMP1);
+                                       }
                                }
+                               s1 = emit_load(jd, iptr, src, d);
                        }
-                       s1 = emit_load(jd, iptr, src, d);
-               }
-               else {
-                       if (IS_FLT_DBL_TYPE(src->type)) {
-                               s1 = emit_load(jd, iptr, src, REG_FTMP1);
-                       } else {
-                               if (IS_2_WORD_TYPE(src->type)) {
-                                       s1 = emit_load(jd, iptr, src, REG_ITMP12_PACKED);
+                       else {
+                               if (IS_FLT_DBL_TYPE(src->type)) {
+                                       s1 = emit_load(jd, iptr, src, REG_FTMP1);
                                } else {
-                                       s1 = emit_load(jd, iptr, src, REG_ITMP1);
+                                       if (IS_2_WORD_TYPE(src->type)) {
+                                               s1 = emit_load(jd, iptr, src, REG_ITMP12_PACKED);
+                                       } else {
+                                               s1 = emit_load(jd, iptr, src, REG_ITMP1);
+                                       }
                                }
+                               d = codegen_reg_of_var(iptr->opc, dst, s1);
                        }
-                       d = codegen_reg_of_var(iptr->opc, dst, s1);
-               }
 
-               if (s1 != d) {
-                       if (IS_FLT_DBL_TYPE(src->type)) {
-                               M_FMOV(s1, d);
-                       } else {
-                               if (IS_2_WORD_TYPE(src->type)) {
-                                       M_LNGMOVE(s1, d);
+                       if (s1 != d) {
+                               if (IS_FLT_DBL_TYPE(src->type)) {
+                                       M_FMOV(s1, d);
                                } else {
-                                       M_MOV(s1, d);
+                                       if (IS_2_WORD_TYPE(src->type)) {
+                                               M_LNGMOVE(s1, d);
+                                       } else {
+                                               M_MOV(s1, d);
+                                       }
                                }
                        }
-               }
 
-               emit_store(jd, iptr, dst, d);
+                       emit_store(jd, iptr, dst, d);
+               }
        }
 }
 
@@ -252,7 +259,7 @@ void emit_verbosecall_enter(jitdata *jd)
 
        /* allocate stack frame */
 
-       stackframesize = 96 + (ARG_CNT * 8);
+       stackframesize = 96 + (ARG_CNT * 8) + (TMP_CNT * 8);
        M_ASUB_IMM(stackframesize, REG_SP);
 
        /* store argument registers in array */
@@ -270,6 +277,18 @@ void emit_verbosecall_enter(jitdata *jd)
                M_DST(abi_registers_float_argument[i], REG_SP, off);
        }
        
+       /* save temporary registers for leaf methods */
+
+       if (jd->isleafmethod) {
+               for (i = 0; i < INT_TMP_CNT; ++i, off += 8) {
+                       M_IST(abi_registers_integer_temporary[i], REG_SP, off);
+               }
+
+               for (i = 0; i < FLT_TMP_CNT; ++i, off += 8) {
+                       M_DST(abi_registers_float_temporary[i], REG_SP, off);
+               }
+       }
+
        /* load arguments for trace_java_call_enter */
 
        /* methodinfo */
@@ -298,6 +317,18 @@ void emit_verbosecall_enter(jitdata *jd)
                M_DLD(abi_registers_float_argument[i], REG_SP, off);
        }
 
+       /* restore temporary registers for leaf methods */
+
+       if (jd->isleafmethod) {
+               for (i = 0; i < INT_TMP_CNT; ++i, off += 8) {
+                       M_ILD(abi_registers_integer_temporary[i], REG_SP, off);
+               }
+
+               for (i = 0; i < FLT_TMP_CNT; ++i, off += 8) {
+                       M_DLD(abi_registers_float_temporary[i], REG_SP, off);
+               }
+       }
+
        /* remove stack frame */
 
        M_AADD_IMM(stackframesize, REG_SP);
index a8d6654001deedd6ebc1c15708ac32b8e53b4a44..2724ec6d4f9cb92009d1a21ee4d316434a946e54 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: emit.h 7848 2007-05-01 21:40:26Z pm $
-
 */
 
 
index 0257c5a2c9085efb317d252f3eec489cf67e5900..916ba099b9222edeeeac841f78af74445926deea 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-abi.c 8298 2007-08-12 18:49:16Z pm $
-
 */
 
 
index ae55f750587dad4ed4173a4333f75e553edf2065..ca1e89f80d0aae9a3fade9428c7b46088aeb2e79 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-abi.h 8298 2007-08-12 18:49:16Z pm $
-
 */
 
 
index db6c69e0fdccf02dedc7ea989272295606c0f6cc..ea09fe7c68adeb607388f7d767ca69c91e7a9052 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 8296 2007-08-11 22:38:38Z pm $
-
 */
 
 
index 9f9331869609ae8f48efcf58dfa5df5529e0c566..936fa329ac997daaa88eeedf783871c5a1f503da 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
@@ -104,7 +102,7 @@ void md_dump_context(u1 *pc, mcontext_t *mc) {
                m = (*(codeinfo **)(pv + CodeinfoPointer))->m;
                log_println(
                        "Java method: class %s, method %s, descriptor %s.",
-                       utf_bytes(m->class->name), utf_bytes(m->name), utf_bytes(m->descriptor)
+                       m->class->name->text, m->name->text, m->descriptor->text
                );
        }
 
@@ -175,6 +173,9 @@ void md_signal_handler_sigsegv(int sig, siginfo_t *siginfo, void *_p)
                                is_null = 0;
                        }
                        break;
+               default:
+                       is_null = 0;
+                       break;
        }
 
        if (! is_null) {
index 2eb44fe5a6ea4f9988bcbf7d6602402fd5b56944..78c9b1797774239993890e7a15dd821e7b926a13 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Peter Molnar
 
-   $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $
-
 */
 
 
diff --git a/src/vm/jit/s390/tests/Makefile b/src/vm/jit/s390/tests/Makefile
new file mode 100644 (file)
index 0000000..70d02ab
--- /dev/null
@@ -0,0 +1,14 @@
+all: install
+
+tests.java: tests.java.pp
+       cpp tests.java.pp | \
+       sed -e '/__JAVA_LINE__/{=;d};s.^#.// cpp: .' > tests.java
+
+tests.class: tests.java
+       ecj -bootclasspath /home/peter/cacao-dev/cldc-classes $<
+
+install: tests.class
+       cp *.class /home/peter/cacao-dev/cldc-classes/tests
+
+clean:
+       rm *.class tests.java
diff --git a/src/vm/jit/s390/tests/jasmin.status b/src/vm/jit/s390/tests/jasmin.status
new file mode 100644 (file)
index 0000000..ebb321a
--- /dev/null
@@ -0,0 +1,102 @@
+./runtest: warning: running without timeout
+java command: /home/tutors/pm/cacao-dev/inst-cacao-s390/bin/cacao 
+jasmin command: /home/tutors/pm/cacao-dev/inst-cacao-s390/bin/cacao  -cp /home/tutors/tbfg/jasmin-sable.jar jasmin.Main
+PASS: test
+PASS: test_coalesce_simple_store
+PASS: test_dup
+PASS: test_dup2
+PASS: test_dup2_x1
+PASS: test_dup2_x2
+PASS: test_dup_x1
+PASS: test_dup_x1_interface_slots
+PASS: test_dup_x2
+PASS: test_dup_x2_interface_slots
+PASS: test_dup_x2_to_dup_x1
+PASS: test_iinc
+PASS: test_load_store_conflict
+PASS: test_load_store_conflict_by_exception
+PASS: test_load_store_conflict_by_exception_not_thrown
+PASS: test_load_store_conflict_via_dup
+PASS: test_load_store_conflict_via_swap
+PASS: test_many_dup
+PASS: test_many_dup2
+PASS: test_many_dup2_x1
+PASS: test_many_dup2_x2
+PASS: test_many_dup_x1
+PASS: test_many_dup_x2
+PASS: test_many_monitors
+PASS: test_many_swap
+PASS: test_no_store_load_conflict
+PASS: test_no_store_store_conflict
+PASS: test_nullpointerexception_monitorexit
+PASS: test_simple_load_store
+PASS: test_store_load_conflict
+PASS: test_store_store_conflict
+PASS: test_store_store_conflict_2
+PASS: test_swap
+PASS: test_swap_interface_slots
+PASS: test_swap_locals
+PASS: test_verify_fail_aload_retaddress - got expected error: VerifyError
+PASS: test_verify_fail_areturn_wrong_reftype - got expected error: VerifyError\|LinkageError
+PASS: test_verify_fail_athrow_wrong_reftype - got expected error: VerifyError\|LinkageError
+PASS: test_verify_fail_athrow_wrong_reftype_unresolved - got expected error: VerifyError\|LinkageError
+PASS: test_verify_fail_backward_with_new_on_stack - got expected error: VerifyError
+PASS: test_verify_fail_double_local_index - got expected error: VerifyError
+PASS: test_verify_fail_double_overwritten - got expected error: VerifyError
+PASS: test_verify_fail_getfield_basic_type_instance - got expected error: VerifyError
+PASS: test_verify_fail_getfield_basic_type_lookup - got expected error: NoSuchFieldError
+PASS: test_verify_fail_getfield_basic_type_value - got expected error: VerifyError
+PASS: test_verify_fail_handler_bad_local - got expected error: VerifyError
+PASS: test_verify_fail_init_nullpointer - got expected error: VerifyError
+PASS: test_verify_fail_invoke_basic_type - got expected error: VerifyError
+PASS: test_verify_fail_invoke_return_basic_type - got expected error: VerifyError
+PASS: test_verify_fail_ireturn_wrong_type - got expected error: VerifyError
+PASS: test_verify_fail_jsr_called_with_different_stackdepths - got expected error: VerifyError
+PASS: test_verify_fail_jsr_exceptions - got expected error: VerifyError
+PASS: test_verify_fail_jsr_handler_in_sub - got expected error: VerifyError
+PASS: test_verify_fail_jsr_merge_subroutines - got expected error: VerifyError
+PASS: test_verify_fail_jsr_merge_subroutines_via_stack - got expected error: VerifyError
+FAIL: test_verify_fail_jsr_multiple_returns - expected status 1, but got 0
+       * fails on i386 too
+FAIL: test_verify_fail_jsr_multiple_returns - did not get expected error: VerifyError
+       * fails on i386 too
+PASS: test_verify_fail_jsr_polymorphic_pop - got expected error: VerifyError
+PASS: test_verify_fail_load_wrong_type - got expected error: VerifyError
+PASS: test_verify_fail_load_wrong_type_within_block - got expected error: VerifyError
+PASS: test_verify_fail_local_index - got expected error: VerifyError
+PASS: test_verify_fail_long_local - got expected error: VerifyError
+PASS: test_verify_fail_long_local_index - got expected error: VerifyError
+PASS: test_verify_fail_long_overwritten - got expected error: VerifyError
+PASS: test_verify_fail_merge_different_new_objects - got expected error: VerifyError
+PASS: test_verify_fail_merge_init_nullpointer - got expected error: VerifyError
+PASS: test_verify_fail_putfield_basic_type_instance - got expected error: VerifyError
+PASS: test_verify_fail_putfield_basic_type_lookup - got expected error: NoSuchFieldError
+PASS: test_verify_fail_putfield_basic_type_value - got expected error: VerifyError
+PASS: test_verify_fail_putfieldconst_basic_type_instance - got expected error: VerifyError
+PASS: test_verify_fail_putfieldconst_basic_type_value - got expected error: VerifyError
+PASS: test_verify_fail_putstatic_basic_type_value - got expected error: VerifyError
+PASS: test_verify_fail_putstaticconst_basic_type_value - got expected error: VerifyError
+PASS: test_verify_fail_ret_bad_type - got expected error: VerifyError
+PASS: test_verify_fail_ret_uninit_var - got expected error: VerifyError
+PASS: test_verify_fail_retaddr_as_object - got expected error: VerifyError
+PASS: test_verify_fail_split_local - got expected error: VerifyError
+PASS: test_verify_ok_jsr
+PASS: test_verify_ok_jsr_handler_in_sub2
+PASS: test_verify_ok_jsr_improper_nesting
+PASS: test_verify_ok_jsr_multiple_blocks
+PASS: test_verify_ok_jsr_pop
+PASS: test_verify_ok_jsr_push
+PASS: test_verify_ok_jsr_subroutine_loops_to_start
+PASS: test_verify_ok_jsr_swap
+PASS: test_verify_ok_jsr_through_variable
+PASS: test_verify_ok_local_as_retaddr_and_reference
+PASS: test_verify_ok_overwrite_local_type
+PASS: test_verify_ok_untyped_local
+PASS: test_verify_unspecced_ok_backward_with_new_in_local
+PASS: test_verify_unspecced_ok_backward_with_new_on_stack
+PASS: test_verify_unspecced_ok_new_in_local_within_try
+
+Not run, because they run for too long. On i386 they run for too long too.
+
+test_verify_fail_jsr_recursion.j
+test_verify_fail_jsr_recursion_terminates.j
index 85431f132a5d7cec2af3683f0d8457e30b7f6ff7..b9cc98f4d2bf1066af77bc4a82c5a83ee90d2519 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
index 4be98b1503912d257d00476dcb05f2f25c04863e..894821011cf8f1a252cdc7d3172dbcd8cd881df6 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes:
 
-   $Id: schedule.c 4384 2006-01-28 14:42:58Z twisti $
-
 */
 
 
index 7bcec506ec41cea61a43288b4f3da134e742a999..b94e3f3882071c27a6b12b17a92106b88c0570aa 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes:
 
-   $Id: schedule.h 5785 2006-10-15 22:25:54Z edwin $
-
 */
 
 
index 11f01a5c352f33860460700076a7ef9f1db5633a..fa2e4a06fecdb85e414fbf36e53fe82b12240653 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
@@ -1235,13 +1233,15 @@ void show_icmd(jitdata *jd, instruction *iptr, bool deadcode, int stage)
                else {
                        printf("argcount=%d ", iptr->s1.argcount);
                }
+               class_classref_or_classinfo_print(iptr->sx.s23.s3.c);
+               putchar(' ');
                SHOW_DST(iptr);
                break;
 
        case ICMD_CHECKCAST:
                SHOW_S1(iptr);
-               putchar(' ');
                class_classref_or_classinfo_print(iptr->sx.s23.s3.c);
+               putchar(' ');
                SHOW_DST(iptr);
                break;
 
index 4690513c6a84d42bded80612c4588909c8283cdf..573932273bfd0669fd6d4269d595aebf38230c87 100644 (file)
@@ -30,7 +30,6 @@
             Christian Thalinger
             Christian Ullrich
 
-   $Id$
 
 */
 
index fd86b637198d3d6f9a76a94c4f7ca4e69391f0d2..3f0c8f47a557db2473658fbe2fa71e74458a1c51 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 DIST_SUBDIRS = \
        linux \
index b4806af763d4a209c684fd1aa02556e09e19b931..93581b3630ca15e43ec3f61ddd33dee93a147dbb 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 5081 2006-07-06 13:59:01Z tbfg $
-
 */
 
 
index 671afc88ebe2ff39bcaf49eab321a31af9644a4c..30e64416f719ea624fc4234afe5ae89b78a68057 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 4749 2006-04-11 10:20:18Z twisti $
-
 */
 
 
index bee77ffc880e6fe72638e3f382ef868389e04d0f..eb900438efb804b39190095d316c808f19ecfcf7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 4644 2006-03-16 18:44:46Z edwin $
-
 */
 
 
@@ -2419,7 +2417,7 @@ nowperformreturn:
                        md = bte->md;
                        
                        /* XXX: builtin calling with stack arguments not implemented */
-                       assert(md->paramcount <= 4 && md->argfltreguse <= 16);
+                       assert(md->paramcount <= 5 && md->argfltreguse <= 16);
                        
                        s3 = md->paramcount;
 
index e46299737c42277f3a3c52e83d91668c46a739e3..ade165128a665165191011b905ce4d3424039e77 100644 (file)
@@ -23,8 +23,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 4722 2006-04-03 15:36:00Z twisti $
-
 */
 
 #ifndef _CODEGEN_H
index c8b3ba9e359271dd6024218437b93a3c359587ad..35cb540563cce80216b331730bb1cd8bf7e17d1d 100644 (file)
@@ -31,8 +31,6 @@
 
    Changes:      
 
-   $Id: disass.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
diff --git a/src/vm/jit/sparc64/emit-arch.h b/src/vm/jit/sparc64/emit-arch.h
new file mode 100644 (file)
index 0000000..4cc01ae
--- /dev/null
@@ -0,0 +1,76 @@
+/* src/vm/jit/sparc64/emit-arch.h - sparc64 code emitter functions
+
+   Copyright (C) 2006, 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _EMIT_ARCH_H
+#define _EMIT_ARCH_H
+
+#include "config.h"
+#include "vm/types.h"
+
+/* SPARC branch options */
+
+#define BRANCH_OPT_XCC      0x1
+#define BRANCH_OPT_PREDICT  0x2
+#define BRANCH_OPT_ANNULL   0x4
+
+#define BRANCH_CHECKS_XCC(options) \
+       ((options) & BRANCH_OPT_XCC)
+       
+#define BRANCH_WITH_PREDICT(options) \
+       ((options) & BRANCH_OPT_PREDICT)
+       
+#define BRANCH_WITH_ANNULL(options) \
+       ((options) & BRANCH_OPT_ANNULL)
+
+
+
+/* wrappers for branches on 64-bit condition codes */
+
+void emit_beq_xcc(codegendata *cd, basicblock *target);
+void emit_bne_xcc(codegendata *cd, basicblock *target);
+void emit_blt_xcc(codegendata *cd, basicblock *target);
+void emit_bge_xcc(codegendata *cd, basicblock *target);
+void emit_bgt_xcc(codegendata *cd, basicblock *target);
+void emit_ble_xcc(codegendata *cd, basicblock *target);
+
+
+#endif /* _EMIT_ARCH_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index 187dc8a7116cf0609d542f7d24c7d8a200872b00..dc89473eab6eb8d8837f1a5836ac5bfc1d075de1 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 4398 2006-01-31 23:43:08Z twisti $
-
 */
 
 
diff --git a/src/vm/jit/sparc64/emit.h b/src/vm/jit/sparc64/emit.h
new file mode 100644 (file)
index 0000000..7eb6f95
--- /dev/null
@@ -0,0 +1,76 @@
+/* src/vm/jit/sparc64/emit.h - sparc64 code emitter functions
+
+   Copyright (C) 2006, 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#ifndef _EMIT_H
+#define _EMIT_H
+
+#include "config.h"
+#include "vm/types.h"
+
+/* SPARC branch options */
+
+#define BRANCH_OPT_XCC      0x1
+#define BRANCH_OPT_PREDICT  0x2
+#define BRANCH_OPT_ANNULL   0x4
+
+#define BRANCH_CHECKS_XCC(options) \
+       ((options) & BRANCH_OPT_XCC)
+       
+#define BRANCH_WITH_PREDICT(options) \
+       ((options) & BRANCH_OPT_PREDICT)
+       
+#define BRANCH_WITH_ANNULL(options) \
+       ((options) & BRANCH_OPT_ANNULL)
+
+
+
+/* wrappers for branches on 64-bit condition codes */
+
+void emit_beq_xcc(codegendata *cd, basicblock *target);
+void emit_bne_xcc(codegendata *cd, basicblock *target);
+void emit_blt_xcc(codegendata *cd, basicblock *target);
+void emit_bge_xcc(codegendata *cd, basicblock *target);
+void emit_bgt_xcc(codegendata *cd, basicblock *target);
+void emit_ble_xcc(codegendata *cd, basicblock *target);
+
+
+#endif /* _EMIT_H */
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index bb1941c82a7c5e36c521ce861a09629732d0c128..2812760ccd7a4c9818d4da655230014beb6e3b95 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
index ffa0b449524781baa07c6082e922cedc27b24b76..aa6fa8a401dfc8f010716ad0fb36692897587eec 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 7363 2007-02-15 14:57:04Z twisti $
-
 */
 
 
index 0aaf68aa85bf26750d3a4ab2a60c5343cd8342fa..633e67e7a39f98eb9d9a9d189ebdbd40ae44d537 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index 772b45ba8e576647054b955ea0ed81ce506e00ab..1e0c91292c25f4ad9638768b14e5c60b3ebb678f 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-abi.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 #ifndef _MD_ABI_H
index 50017946f378d78c8ea663d4c93da6d044ac3681..907f292e2f09df59cc79f9feb58a73c00fdba23e 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes:
 
-   $Id: md-asm.h 4498 2006-02-12 23:43:09Z twisti $
-
 */
 
 #ifndef _MD_ASM_H
index f7f6f2f1de7566e1a48b73fb7b8d660857507b58..492390c0fd1d93de6df765a6cf13f23ab340d2df 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 6265 2007-01-02 20:40:57Z edwin $
-
 */
 
 
index 038963487af951b8bf819ddc9e8efec495cdd833..0f822d9c6e16f4faf14b0e6f61c236429eb4f349 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 5164 2006-07-19 15:54:01Z twisti $
-
 */
 
 
index 146f78bd46afa33fff7a55df09a3a7e26a0227d2..372f8ddd8908e7dc2b8c0ba3c23d5d86b10ab460 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
 ## Process this file with automake to produce Makefile.in
 
diff --git a/src/vm/jit/sparc64/solaris/macro_rename.h b/src/vm/jit/sparc64/solaris/macro_rename.h
new file mode 100644 (file)
index 0000000..5ec44c4
--- /dev/null
@@ -0,0 +1,9 @@
+
+/* work around name clash in Solaris */
+#if (REG_SP != 14)
+#warning the bastard is defined
+# define REG_SP_SOLARIS REG_SP
+# undef REG_SP
+# define REG_SP 14
+#endif
+
index 7e47210ec18db390d8770a0943b20247c0714288..d1528079df1b58bd58791be656870e235b59e0e3 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-os.c 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index b81dfd45e1a62f1a736c595dc7f225b9d6350908..ab0d3381c4dcc6f9a529c70ce6e444e067fbb1b5 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: stack.c 7908 2007-05-15 09:55:17Z christian $
-
 */
 
 
index a754941cd445bf2bba42b2e9aed8e0c66668d091..2af166477e2e98c6358f6bdc976a8c5d869a1f3d 100644 (file)
@@ -29,8 +29,6 @@
    Changes: Christian Ullrich
                        Edwin Steiner
 
-   $Id: stack.h 6062 2006-11-27 15:15:54Z edwin $
-
 */
 
 
index 7a906084bdb6e2ca27577088018f16e5802d3363..e2bf3e81afb1d1812d644ad426d563169bf81a68 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: stacktrace.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
index e2e993cbe76e9381d64c46beae2cdb1e820a8732..6fae083e9ec5dca5d8b21233d11a5eb9e2fbf096 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: stacktrace.h 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
@@ -39,8 +37,6 @@ typedef struct stacktrace_entry stacktrace_entry;
 #include "config.h"
 #include "vm/types.h"
 
-#include "md-abi.h"
-
 #include "vmcore/class.h"
 #include "vmcore/method.h"
 
index d6b8f5a62cafa8f719db625d92cb6893033f932a..aa95d7274877e06d29030c615a756b1803983f65 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: trace.c 8321 2007-08-16 11:37:25Z michi $
-
 */
 
+#include "config.h"
+
 #include "arch.h"
 #include "md-abi.h"
 
@@ -248,6 +248,19 @@ static char *trace_java_call_print_argument(char *logtext, s4 *logtextlen,
        return logtext;
 }
 
+/* trace_java_call_enter ******************************************************
+   Traces an entry into a java method.
+
+   arg_regs: Array of size ARG_CNT containing all argument registers in
+   the same format as in asm_vm_call_method. The array is usually allocated
+   on the stack and used for restoring the argument registers later.
+
+   stack: Pointer to first on stack argument in the same format passed to 
+   asm_vm_call_method.
+
+*******************************************************************************/
+
 void trace_java_call_enter(methodinfo *m, uint64_t *arg_regs, uint64_t *stack) {
        methoddesc *md;
        paramdesc *pd;
@@ -367,6 +380,20 @@ void trace_java_call_enter(methodinfo *m, uint64_t *arg_regs, uint64_t *stack) {
 
 }
 
+/* trace_java_call_exit ********************************************************
+   Traces an exit form a java method.
+
+   return_regs: Array of size 3 containing return registers:
+     [0] : REG_RESULT
+        [1] : REG_RESULT2 (if available on architecture)
+        [2] : REG_FRESULT
+   The array is usually allocated on the stack and used for restoring the
+   registers later. The format of the array is the same as the format of 
+   register arguments passed to asm_vm_call_method.
+
+*******************************************************************************/
+
 void trace_java_call_exit(methodinfo *m, uint64_t *return_regs)
 {
        methoddesc *md;
@@ -452,3 +479,16 @@ void trace_java_call_exit(methodinfo *m, uint64_t *return_regs)
 
 #endif /* !defined(NDEBUG) */
 
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index 0659e87fcc5bdb15ca8ef41bff47d28e0bca06d0..9945c2048ff62c8e6dc0a4db9264303b0982da90 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: trace.h 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 #ifndef _VM_JIT_TRACE_H
 #define _VM_JIT_TRACE_H
 
+#include "config.h"
+
 #include <stdint.h>
 
 #include "vmcore/method.h"
 
 #if !defined(NDEBUG)
 
-/* trace_java_call_enter ******************************************************
-   Traces an entry into a java method.
-
-   arg_regs: Array of size ARG_CNT containing all argument registers in
-   the same format as in asm_vm_call_method. The array is usually allocated
-   on the stack and used for restoring the argument registers later.
-
-   stack: Pointer to first on stack argument in the same format passed to 
-   asm_vm_call_method.
-
-*******************************************************************************/
-
 void trace_java_call_enter(methodinfo *m, uint64_t *arg_regs, uint64_t *stack);
 
-/* trace_java_call_exit ********************************************************
-   Traces an exit form a java method.
-
-   return_regs: Array of size 3 containing return registers:
-     [0] : REG_RESULT
-        [1] : REG_RESULT2 (if available on architecture)
-        [2] : REG_FRESULT
-   The array is usually allocated on the stack and used for restoring the
-   registers later. The format of the array is the same as the format of 
-   register arguments passed to asm_vm_call_method.
-
-*******************************************************************************/
-
 void trace_java_call_exit(methodinfo *m, uint64_t *return_regs);
 
 #endif /* !defined(NDEBUG) */
 
 #endif
 
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index 7419f19549e2f960d646bb603df0176a314f38a4..8be3839e3a1ae3c916c7df1fd1c917bea5bbad69 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes: Edwin Steiner
-##
-## $Id: Makefile.am 6275 2007-01-03 22:39:14Z edwin $
 
 ## Process this file with automake to produce Makefile.in
 
old mode 100755 (executable)
new mode 100644 (file)
index 3823dba..62234f3
@@ -28,8 +28,6 @@
 # Authors: Edwin Steiner
 #
 # Changes:
-#
-# $Id$
 
 
 use strict;
index e47c5f58bbc8a1ebc6edb4c13688aa3e8d810574..67cd6203d70acb9829b2d6b4208a0ee15b00c4fd 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 #if 0 /* (needed for code examples in the following comment) */
index 9183e4b17dfcc7222119c9098f4778d31df725a7..5ca682273764fd8b3c6713b834ff23fbec36730e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index ee70cbb0c1eda2cdb79799bb577d100bb7415038..a06c12da764078e5f02e08f5b7ccce2dca583496 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: 
 
-   $Id$
-
 */
 
 
index e6a02dec479d75a5b09969e3a0f9e2e992fe10ef..ac91170dc7e9e4fa25d7d70e4ec44ce5c3d93899 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id$
-
 */
 
 
index bac879428e65b22908213d3db7b542d4d69227d8..845680236cf666a199fa82e0fc020170ffff6874 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: 
 
-   $Id$
-
 */
 
 
index 1e4ee26ddcab552e2883adb471a7ddd41d49c7dd..0055ff3a8bd7d411848858a3f27751e906b48119 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Edwin Steiner
 
-   $Id$
 
 */
 
index 8f4969fdd4277ca943a9e7769bf1ade138664250..d4e094e52daffab5c7b5e9861af7d26ac505fc75 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Edwin Steiner
 
-   $Id$
 
 */
 
index 20ae99134a10504d109d5026c9cb36a3b468c7de..ac4377507fa248d44db0df275d8698b4f8587dbb 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index ef1498669307df5215ba5a85842db1920ccf398c..35005828ce73aaa81c534a8828c75a1a08097071 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 #include "config.h"
index 387ab195c12d0384ce0d38ace3acf5bcceb973d8..530a5e1e2870c45bcacccd9adfd4841c1c5f9dcf 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Edwin Steiner
 
-   $Id$
 
 */
 
index 98883754754e50ff94c1aebef3cf51daea8ab025..3b89744d3d3e8fc9219324bcb94c756f137f47b8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: typecheck.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 /*
index f30e88d28fca9cf46dac46b853b0eaf37e24c5e4..01492ea53e041e4314d43d9caaea139a5b253509 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Thalinger
 
-   $Id: typecheck.h 5773 2006-10-13 14:34:19Z edwin $
 
 */
 
index aa35b4a9215c88be13feeefc1f7c570da7aecd25..3d0a47888fc582644cd9ca2a1e5292a6735a8e8e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: typeinfo.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
index 8cfeca6c9e1828d05ade9ac63a51ae72955b5f8f..10125f12cd620f368e1fa803f98910c21427d49c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: typeinfo.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 #ifndef _TYPEINFO_H
index bcd8db4b67c709ca5cda7330fbbc07b959602efb..528e9d14bcf487543a85f49c60614f180c88f02d 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 8274 2007-08-08 15:58:17Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_builddir) -I$(top_builddir)/src -I$(top_builddir)/src
 AM_CCASFLAGS = $(AM_CPPFLAGS) $(AM_LDFLAGS)
index 0fcb8aac461c0df276b636cfe547978bad2ac641..2f941e040ddabe9f6383cb64e791bcae44ec0c77 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: arch.h 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 8d7b76f7a71dff5067a8bc60a641ce3e7073c733..58ab38124a894b21f02c4bb48d912dfc5a899660 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: asmpart.S 8274 2007-08-08 15:58:17Z twisti $
-
 */
 
 
index d8cef10988af5bccb2e80c7e2e8889d96756a1ed..2ba864bffa825e110ca8222e7c0e0e1f07bb5d79 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.c 8361 2007-08-20 18:06:03Z michi $
-
 */
 
 
index ea29b9851debc3795e86e05c9b330579187ef8f3..e6b1a3786cab57bb26ea21318a4d5a780df98b47 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: codegen.h 7691 2007-04-12 12:45:10Z twisti $
-
 */
 
 
index bd391181c3cc31328595a56adf015fffa386eecd..0a949b98058a97b69bd2d0bc5649ff94a28c21b3 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: disass.c 6259 2006-12-28 20:50:14Z twisti $
-
 */
 
 
index bc2eb4ca79664f0568fa18345c0d92375a967890..44f3742a704166127f9e5f0a97401c5cfbe85e59 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.c 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 #include "config.h"
index 5296dd2591f8f203b180bfe3b495212ada2d0d5e..35c2c559d841fbedfc1d0a6f61968040ba64ba03 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: emit.h 7596 2007-03-28 21:05:53Z twisti $
-
 */
 
 
index f404059bbbed4dba16ac684dd0c66bafb2668db2..109d994a9e14edec9e9bb8c6f11135bf2b52dbe8 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 1bbeab093f65e06fbb335bfffc58f6865de80939..0f0f74f51e72e3e845688e8b0fac8a8e4737c6a1 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 7249 2007-01-29 19:32:52Z twisti $
-
 */
 
 
index 797ecf31c7438b368a17fa3426c0e19f8c579390..cfb56386d523725b969a878c17682d9315d17ea5 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 4563 2006-03-06 13:03:05Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_builddir)/src
 
index 4bd57c91eb64465336b4d186b96e9f65308b63b0..69a9b2b47baace592d7ca116aa06eb9b4e77b1b5 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 7249 2007-01-29 19:32:52Z twisti $
-
 */
 
 
index c90e0c61dfb89a32914383e074366a1aa1dcf43b..34bc9e4f7bd063d93c20a5a13876b480dba8c564 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.c 8123 2007-06-20 23:50:55Z michi $
-
 */
 
 
index eca9ccc3304f91d1000819db7f307ba3b1ed1473..a4b76425ea371483e87ca630eab6f005b2c0629b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md-abi.h 7356 2007-02-14 11:00:28Z twisti $
-
 */
 
 
index e624dcac146def244b4fde211a398c58b5a6ca44..76fa89f0ccdd07d4e059041ee6e6796ca7472563 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: md-asm.h 4805 2006-04-21 10:54:24Z twisti $
-
 */
 
 
index 546da55cea320deec6a50faec3443fc3b84193c8..02a369cff7e7ee065738884fba23de94a4c0ac16 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: md.c 8247 2007-07-31 12:06:44Z michi $
-
 */
 
 
index 664090fa334472e74b8df88fbd7aec98b0379ac8..4d6cfa39a2ea415f71b252eb20aed15cacfde8ed 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: patcher.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 7147677e4debc5ef37437208082ae3ef12ab6d4f..2dca6379e71da87bbd025a530adb60441c3db887 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: jit_interface.h 8210 2007-07-18 12:51:00Z twisti $
-
 */
 
 
index d5f5ad48c536f5f19c480bb6b433ec29338cc2e4..d15128692a174169d3fda2ca9e5ca5fba0dd1a5e 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: linker.c 8042 2007-06-07 17:43:29Z twisti $
-
 */
 
 
@@ -192,7 +190,8 @@ int primitive_type_get_by_wrapperclass(classinfo *c)
 
 /* primitive_box ***************************************************************
 
-   Box a primitive of the given type.
+   Box a primitive of the given type.  If the type is an object,
+   simply return it.
 
 *******************************************************************************/
 
@@ -225,6 +224,9 @@ java_handle_t *primitive_box(int type, imm_union value)
        case PRIMITIVETYPE_DOUBLE:
                o = primitive_box_double(value.d);
                break;
+       case PRIMITIVETYPE_VOID:
+               o = value.a;
+               break;
        default:
                vm_abort("primitive_box: invalid primitive type %d", type);
        }
@@ -235,7 +237,8 @@ java_handle_t *primitive_box(int type, imm_union value)
 
 /* primitive_unbox *************************************************************
 
-   Unbox a primitive of the given type.
+   Unbox a primitive of the given type.  If the type is an object,
+   simply return it.
 
 *******************************************************************************/
 
@@ -274,6 +277,11 @@ imm_union primitive_unbox(java_handle_t *o)
        case PRIMITIVETYPE_DOUBLE:
                value.d = primitive_unbox_double(o);
                break;
+       case -1:
+               /* If type is -1 the object is not a primitive box but a
+                  normal object. */
+               value.a = o;
+               break;
        default:
                vm_abort("primitive_unbox: invalid primitive type %d", type);
        }
index 6aa09df77657042a467070d6bd86d4e3519aced8..f5ce4d6b4841512ab7f805015e95ba7b6c33783b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: linker.c 8042 2007-06-07 17:43:29Z twisti $
-
 */
 
 
@@ -90,7 +88,8 @@ extern primitivetypeinfo primitivetype_table[PRIMITIVETYPE_COUNT];
 /* function prototypes ********************************************************/
 
 /* this function is in src/vmcore/primitivecore.c */
-bool       primitive_init(void);
+void       primitive_init(void);
+void       primitive_postinit(void);
 
 classinfo *primitive_class_get_by_name(utf *name);
 classinfo *primitive_class_get_by_type(int type);
index 49b3f424e3b463872457a9f71bebd1c8ec29f591..1f2e6f0762df2146e08ae720582126628ca102df 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: properties.c 8380 2007-08-21 12:43:00Z michi $
-
 */
 
 
 #include "config.h"
 
+#include <errno.h>
 #include <stdlib.h>
 #include <string.h>
-#include <sys/utsname.h>
 #include <time.h>
+#include <unistd.h>
+#include <sys/utsname.h>
+
+#if defined(WITH_JRE_LAYOUT)
+# include <libgen.h>
+#endif
 
 #include "vm/types.h"
 
@@ -60,9 +64,9 @@
 
 /* internal property structure ************************************************/
 
-typedef struct list_properties_entry list_properties_entry;
+typedef struct list_properties_entry_t list_properties_entry_t;
 
-struct list_properties_entry {
+struct list_properties_entry_t {
        char       *key;
        char       *value;
        listnode_t  linkage;
@@ -81,12 +85,29 @@ static list_t *list_properties = NULL;
 
 *******************************************************************************/
 
-bool properties_init(void)
+void properties_init(void)
 {
-#if defined(ENABLE_JAVASE)
-       char           *env_java_home;
+       list_properties = list_create(OFFSET(list_properties_entry_t, linkage));
+}
+
+
+/* properties_set **************************************************************
+
+   Fill the properties list with default values.
+
+*******************************************************************************/
+
+void properties_set(void)
+{
+       int             len;
+       char           *p;
+
        char           *java_home;
-       s4              len;
+       char           *boot_class_path;
+
+#if defined(ENABLE_JAVASE)
+       char           *class_path;
+       char           *boot_library_path;
 
 # if defined(WITH_CLASSPATH_GNU)
        char           *cwd;
@@ -97,37 +118,255 @@ bool properties_init(void)
        char           *lang;
        char           *country;
        struct utsname *utsnamebuf;
+
+       char           *java_library_path;
 # endif
 #endif
 
-       /* create the properties list */
+#if defined(WITH_JRE_LAYOUT)
+       /* SUN also uses a buffer of 4096-bytes (strace is your friend). */
 
-       list_properties = list_create(OFFSET(list_properties_entry, linkage));
+       p = MNEW(char, 4096);
 
-#if defined(ENABLE_JAVASE)
+       if (readlink("/proc/self/exe", p, 4095) == -1)
+               vm_abort("properties_set: readlink failed: %s\n", strerror(errno));
+
+       /* Get the path of the current executable. */
 
-       /* get properties from system */
+       p = dirname(p);
 
-       env_java_home = getenv("JAVA_HOME");
+# if defined(WITH_CLASSPATH_GNU)
+
+       /* Set java.home. */
 
-       /* set JAVA_HOME to default prefix if not defined */
+       len = strlen(path) + strlen("/..") + strlen("0");
+
+       java_home = MNEW(char, len);
 
-       if (env_java_home == NULL)
-               env_java_home = cacao_prefix;
+       strcpy(java_home, p);
+       strcat(java_home, "/..");
 
-       /* fill in system properties */
+       /* Set the path to Java core native libraries. */
 
-       /* add /jre to java.home property */
+       len = strlen(cacao_prefix) + strlen("/lib/classpath") + strlen("0");
 
-       len = strlen(env_java_home) + strlen("/jre") + strlen("0");
+       boot_library_path = MNEW(char, len);
+
+       strcpy(boot_library_path, java_home);
+       strcat(boot_library_path, "/lib/classpath");
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+       /* Find correct java.home.  We check if there is a JRE
+          co-located. */
+
+       /* NOTE: We use the server VM here as it should be available on
+          all architectures. */
+
+       len =
+               strlen(p) +
+               strlen("/../jre/lib/"JAVA_ARCH"/server/libjvm.so") +
+               strlen("0");
 
        java_home = MNEW(char, len);
 
-       strcpy(java_home, env_java_home);
-       strcat(java_home, "/jre");
+       strcpy(java_home, p);
+       strcat(java_home, "/../jre/lib/"JAVA_ARCH"/server/libjvm.so");
+
+       /* Check if that libjvm.so exists. */
+
+       if (access(java_home, F_OK) == 0) {
+               /* Yes, we add /jre to java.home. */
+
+               strcpy(java_home, p);
+               strcat(java_home, "/../jre");
+       }
+       else {
+               /* No, java.home is parent directory. */
+
+               strcpy(java_home, p);
+               strcat(java_home, "/..");
+       }
+
+       /* Set the path to Java core native libraries. */
+
+       len = strlen(java_home) + strlen("/lib/"JAVA_ARCH) + strlen("0");
+
+       boot_library_path = MNEW(char, len);
+
+       strcpy(boot_library_path, java_home);
+       strcat(boot_library_path, "/lib/"JAVA_ARCH);
+
+# else
+#  error unknown classpath configuration
+# endif
+
+       /* Free path. */
+
+       MFREE(p, char, len);
+
+#else
+       java_home         = CACAO_PREFIX;
+
+# if defined(WITH_CLASSPATH_GNU)
+
+       boot_library_path = CLASSPATH_LIBDIR"/classpath";
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+       boot_library_path = CLASSPATH_LIBDIR;
+
+# elif defined(WITH_CLASSPATH_CLDC1_1)
+
+       /* No boot_library_path required. */
+
+# else
+#  error unknown classpath configuration
+# endif
+#endif
 
        properties_add("java.home", java_home);
 
+       /* Set the bootclasspath. */
+
+       p = getenv("BOOTCLASSPATH");
+
+       if (p != NULL) {
+               boot_class_path = MNEW(char, strlen(p) + strlen("0"));
+               strcpy(boot_class_path, p);
+       }
+       else {
+#if defined(WITH_JRE_LAYOUT)
+# if defined(WITH_CLASSPATH_GNU)
+
+               len =
+                       strlen(java_home) + strlen("/share/cacao/vm.zip:") +
+                       strlen(java_home) + strlen("/share/classpath/glibj.zip") +
+                       strlen("0");
+
+               boot_class_path = MNEW(char, len);
+
+               strcpy(boot_class_path, java_home);
+               strcat(boot_class_path, "/share/cacao/vm.zip");
+               strcat(boot_class_path, ":");
+               strcat(boot_class_path, java_home);
+               strcat(boot_class_path, "/share/classpath/glibj.zip");
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+               /* This is the bootclasspath taken from HotSpot (see
+                  hotspot/src/share/vm/runtime/os.cpp
+                  (os::set_boot_path)). */
+
+               len =
+                       strlen(java_home) + strlen("/lib/resources.jar:") +
+                       strlen(java_home) + strlen("/lib/rt.jar:") +
+                       strlen(java_home) + strlen("/lib/sunrsasign.jar:") +
+                       strlen(java_home) + strlen("/lib/jsse.jar:") +
+                       strlen(java_home) + strlen("/lib/jce.jar:") +
+                       strlen(java_home) + strlen("/lib/charsets.jar:") +
+                       strlen(java_home) + strlen("/classes") +
+                       strlen("0");
+
+               boot_class_path = MNEW(char, len);
+
+               strcpy(boot_class_path, java_home);
+               strcat(boot_class_path, "/lib/resources.jar:");
+               strcat(boot_class_path, java_home);
+               strcat(boot_class_path, "/lib/rt.jar:");
+               strcat(boot_class_path, java_home);
+               strcat(boot_class_path, "/lib/sunrsasign.jar:");
+               strcat(boot_class_path, java_home);
+               strcat(boot_class_path, "/lib/jsse.jar:");
+               strcat(boot_class_path, java_home);
+               strcat(boot_class_path, "/lib/jce.jar:");
+               strcat(boot_class_path, java_home);
+               strcat(boot_class_path, "/lib/charsets.jar:");
+               strcat(boot_class_path, java_home);
+               strcat(boot_class_path, "/classes");
+
+# else
+#  error unknown classpath configuration
+# endif
+#else
+# if defined(WITH_CLASSPATH_GNU)
+
+               len =
+                       strlen(CACAO_VM_ZIP) +
+                       strlen(":") +
+                       strlen(CLASSPATH_CLASSES) +
+                       strlen("0");
+
+               boot_class_path = MNEW(char, len);
+
+               strcpy(boot_class_path, CACAO_VM_ZIP);
+               strcat(boot_class_path, ":");
+               strcat(boot_class_path, CLASSPATH_CLASSES);
+
+# elif defined(WITH_CLASSPATH_SUN)
+
+               /* This is the bootclasspath taken from HotSpot (see
+                  hotspot/src/share/vm/runtime/os.cpp
+                  (os::set_boot_path)). */
+
+               len =
+                       strlen(CLASSPATH_PREFIX"/lib/resources.jar:") +
+                       strlen(CLASSPATH_PREFIX"/lib/rt.jar:") +
+                       strlen(CLASSPATH_PREFIX"/lib/sunrsasign.jar:") +
+                       strlen(CLASSPATH_PREFIX"/lib/jsse.jar:") +
+                       strlen(CLASSPATH_PREFIX"/lib/jce.jar:") +
+                       strlen(CLASSPATH_PREFIX"/lib/charsets.jar:") +
+                       strlen(CLASSPATH_PREFIX"/classes") +
+                       strlen("0");
+
+               boot_class_path = MNEW(char, len);
+
+               strcpy(boot_class_path, CLASSPATH_PREFIX"/lib/resources.jar:");
+               strcat(boot_class_path, CLASSPATH_PREFIX"/lib/rt.jar:");
+               strcat(boot_class_path, CLASSPATH_PREFIX"/lib/sunrsasign.jar:");
+               strcat(boot_class_path, CLASSPATH_PREFIX"/lib/jsse.jar:");
+               strcat(boot_class_path, CLASSPATH_PREFIX"/lib/jce.jar:");
+               strcat(boot_class_path, CLASSPATH_PREFIX"/lib/charsets.jar:");
+               strcat(boot_class_path, CLASSPATH_PREFIX"/classes");
+
+# elif defined(WITH_CLASSPATH_CLDC1_1)
+
+               len =
+                       strlen(CLASSPATH_CLASSES) +
+                       strlen("0");
+
+               boot_class_path = MNEW(char, len);
+
+               strcpy(boot_class_path, CLASSPATH_CLASSES);
+
+# else
+#  error unknown classpath configuration
+# endif
+#endif
+       }
+
+       properties_add("sun.boot.class.path", boot_class_path);
+       properties_add("java.boot.class.path", boot_class_path);
+
+#if defined(ENABLE_JAVASE)
+
+       /* Set the classpath. */
+
+       p = getenv("CLASSPATH");
+
+       if (p != NULL) {
+               class_path = MNEW(char, strlen(p) + strlen("0"));
+               strcpy(class_path, p);
+       }
+       else {
+               class_path = MNEW(char, strlen(".") + strlen("0"));
+               strcpy(class_path, ".");
+       }
+
+       properties_add("java.class.path", class_path);
+
+       /* Add java.vm properties. */
+
        properties_add("java.vm.specification.version", "1.0");
        properties_add("java.vm.specification.vendor", "Sun Microsystems Inc.");
        properties_add("java.vm.specification.name", "Java Virtual Machine Specification");
@@ -151,7 +390,7 @@ bool properties_init(void)
 
 # if defined(WITH_CLASSPATH_GNU)
 
-       /* get properties from system */
+       /* Get properties from system. */
 
        cwd      = _Jv_getcwd();
 
@@ -174,25 +413,22 @@ bool properties_init(void)
        properties_add("java.vendor", "GNU Classpath");
        properties_add("java.vendor.url", "http://www.gnu.org/software/classpath/");
 
-       properties_add("java.class.path", _Jv_classpath);
        properties_add("java.class.version", CLASS_VERSION);
 
-       /* Set bootclasspath properties. One for GNU classpath and the
-          other for compatibility with Sun (required by most
-          applications). */
-
-       properties_add("java.boot.class.path", _Jv_bootclasspath);
-       properties_add("sun.boot.class.path", _Jv_bootclasspath);
-
 #  if defined(WITH_STATIC_CLASSPATH)
        properties_add("gnu.classpath.boot.library.path", ".");
        properties_add("java.library.path" , ".");
 #  else
-       /* fill gnu.classpath.boot.library.path with GNU Classpath library
-       path */
+       properties_add("gnu.classpath.boot.library.path", boot_library_path);
+
+       /* Get and set java.library.path. */
 
-       properties_add("gnu.classpath.boot.library.path", classpath_libdir);
-       properties_add("java.library.path", _Jv_java_library_path);
+       java_library_path = getenv("LD_LIBRARY_PATH");
+
+       if (java_library_path == NULL)
+               java_library_path = "";
+
+       properties_add("java.library.path", java_library_path);
 #  endif
 
        properties_add("java.io.tmpdir", "/tmp");
@@ -209,11 +445,11 @@ bool properties_init(void)
 
        /* set the java.ext.dirs property */
 
-       len = strlen(env_java_home) + strlen("/jre/lib/ext") + strlen("0");
+       len = strlen(java_home) + strlen("/jre/lib/ext") + strlen("0");
 
        extdirs = MNEW(char, len);
 
-       strcpy(extdirs, env_java_home);
+       strcpy(extdirs, java_home);
        strcat(extdirs, "/jre/lib/ext");
 
        properties_add("java.ext.dirs", extdirs);
@@ -231,22 +467,7 @@ bool properties_init(void)
        properties_add("os.name", "unknown");
        properties_add("os.version", "unknown");
 #  else
-       /* We need to set the os.arch hardcoded to be compatible with SUN. */
-
-#   if defined(__I386__)
-       /* map all x86 architectures (i386, i486, i686) to i386 */
-
-       properties_add("os.arch", "i386");
-#   elif defined(__POWERPC__)
-       properties_add("os.arch", "ppc");
-#   elif defined(__X86_64__)
-       properties_add("os.arch", "amd64");
-#   else
-       /* default to what uname returns */
-
-       properties_add("os.arch", utsnamebuf->machine);
-#   endif
-
+       properties_add("os.arch", JAVA_ARCH);
        properties_add("os.name", utsnamebuf->sysname);
        properties_add("os.version", utsnamebuf->release);
 #  endif
@@ -304,7 +525,10 @@ bool properties_init(void)
 
 # elif defined(WITH_CLASSPATH_SUN)
 
-       properties_add("sun.boot.library.path", classpath_libdir);
+       /* Actually this property is set by OpenJDK, but we need it in
+          nativevm_preinit(). */
+
+       properties_add("sun.boot.library.path", boot_library_path);
 
 # else
 
@@ -324,10 +548,6 @@ bool properties_init(void)
 # error unknown Java configuration
 
 #endif
-
-       /* everything's ok */
-
-       return true;
 }
 
 
@@ -340,7 +560,7 @@ bool properties_init(void)
 
 void properties_add(char *key, char *value)
 {
-       list_properties_entry *pe;
+       list_properties_entry_t *pe;
 
        /* search for the entry */
 
@@ -357,7 +577,7 @@ void properties_add(char *key, char *value)
 
        /* entry was not found, insert a new one */
 
-       pe = NEW(list_properties_entry);
+       pe = NEW(list_properties_entry_t);
 
        pe->key   = key;
        pe->value = value;
@@ -374,7 +594,7 @@ void properties_add(char *key, char *value)
 
 char *properties_get(char *key)
 {
-       list_properties_entry *pe;
+       list_properties_entry_t *pe;
 
        for (pe = list_first_unsynced(list_properties); pe != NULL;
                 pe = list_next_unsynced(list_properties, pe)) {
@@ -434,11 +654,11 @@ void properties_system_add(java_handle_t *p, char *key, char *value)
 #if defined(ENABLE_JAVASE)
 void properties_system_add_all(java_handle_t *p)
 {
-       list_properties_entry *pe;
-       classinfo             *c;
-       methodinfo            *m;
-       java_handle_t         *key;
-       java_handle_t         *value;
+       list_properties_entry_t *pe;
+       classinfo               *c;
+       methodinfo              *m;
+       java_handle_t           *key;
+       java_handle_t           *value;
 
        /* search for method to add properties */
 
index d1e383751e876b5f8cca2530a9817eb0a93611e6..7c21aa6350b7d3df79e628c9c629f553d846f59d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: properties.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
 #define _PROPERTIES_H
 
 #include "config.h"
-#include "vm/types.h"
+
+#include <stdint.h>
 
 #include "vm/global.h"
 
 
 /* function prototypes ********************************************************/
 
-bool  properties_init(void);
+void  properties_init(void);
+void  properties_set(void);
 
 void  properties_add(char *key, char *value);
 char *properties_get(char *key);
index a02e120c9ff93185e673b727b00b7a33311f3290..a1235b901100bde201f9ae49dd6e557447405ff8 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: resolve.c 8288 2007-08-10 15:12:00Z twisti $
-
 */
 
 
index f828d3ac0c0a5a07dbbbb3cae4d8e2e8a76f1b46..b38b80b7606a3a35117920be3c0f02c3caab607d 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: resolve.h 7486 2007-03-08 13:50:07Z twisti $
-
 */
 
 
index 8ec93b19fa087019b3b867963e2bb42aa9a74481..c40d0c79160b80fbdc6dd028d5e54b1ea90ab376 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: signal.c 8360 2007-08-20 18:02:50Z michi $
-
 */
 
 
@@ -96,8 +94,12 @@ bool signal_init(void)
        if (sigemptyset(&mask) != 0)
                vm_abort("signal_init: sigemptyset failed: %s", strerror(errno));
 
+#if !defined(WITH_CLASSPATH_SUN)
+       /* Let OpenJDK handle SIGINT itself. */
+
        if (sigaddset(&mask, SIGINT) != 0)
                vm_abort("signal_init: sigaddset failed: %s", strerror(errno));
+#endif
 
 #if !defined(__FREEBSD__)
        if (sigaddset(&mask, SIGQUIT) != 0)
@@ -198,6 +200,7 @@ bool signal_init(void)
 void signal_register_signal(int signum, functionptr handler, int flags)
 {
        struct sigaction act;
+
        void (*function)(int, siginfo_t *, void *);
 
        function = (void (*)(int, siginfo_t *, void *)) handler;
@@ -311,26 +314,30 @@ static void signal_thread(void)
        if (sigemptyset(&mask) != 0)
                vm_abort("signal_thread: sigemptyset failed: %s", strerror(errno));
 
+#if !defined(WITH_CLASSPATH_SUN)
+       /* Let OpenJDK handle SIGINT itself. */
+
        if (sigaddset(&mask, SIGINT) != 0)
                vm_abort("signal_thread: sigaddset failed: %s", strerror(errno));
+#endif
 
 #if !defined(__FREEBSD__)
        if (sigaddset(&mask, SIGQUIT) != 0)
                vm_abort("signal_thread: sigaddset failed: %s", strerror(errno));
 #endif
 
-       while (true) {
+       for (;;) {
                /* just wait for a signal */
 
+#if defined(ENABLE_THREADS)
+               threads_thread_state_waiting(t);
+#endif
+
                /* XXX We don't check for an error here, although the man-page
                   states sigwait does not return an error (which is wrong!),
                   but it seems to make problems with Boehm-GC.  We should
                   revisit this code with our new exact-GC. */
 
-#if defined(ENABLE_THREADS)
-               threads_thread_state_waiting(t);
-#endif
-
 /*             if (sigwait(&mask, &sig) != 0) */
 /*                     vm_abort("signal_thread: sigwait failed: %s", strerror(errno)); */
                (void) sigwait(&mask, &sig);
@@ -339,30 +346,41 @@ static void signal_thread(void)
                threads_thread_state_runnable(t);
 #endif
 
-               switch (sig) {
-               case SIGINT:
-                       /* exit the vm properly */
+               /* Handle the signal. */
 
-                       vm_exit(0);
-                       break;
+               signal_thread_handler(sig);
+       }
+}
+
+
+/* signal_thread_handler *******************************************************
+
+   Handles the signals caught in the signal handler thread.  Also used
+   from sun.misc.Signal with OpenJDK.
+
+*******************************************************************************/
+
+void signal_thread_handler(int sig)
+{
+       switch (sig) {
+       case SIGINT:
+               /* exit the vm properly */
 
-               case SIGQUIT:
-                       /* print a thread dump */
+               vm_exit(0);
+               break;
+
+       case SIGQUIT:
+               /* print a thread dump */
 #if defined(ENABLE_THREADS)
-                       threads_dump();
+               threads_dump();
 #endif
 
 #if defined(ENABLE_STATISTICS)
-                       if (opt_stat)
-                               statistics_print_memory_usage();
+               if (opt_stat)
+                       statistics_print_memory_usage();
 #endif
-                       break;
-               }
+               break;
        }
-
-       /* this should not happen */
-
-       vm_abort("signal_thread: this thread should not exit!");
 }
 
 
index aa4e05f461a967c47c83d2ca44b62a4a07619eb6..a32f74b4d6331cebd23767a9e167befdba21aa3a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: signallocal.h 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
@@ -42,6 +40,7 @@
 bool  signal_init(void);
 void  signal_register_signal(int signum, functionptr handler, int flags);
 void *signal_handle(void *xpc, int type, intptr_t val);
+void  signal_thread_handler(int sig);
 bool  signal_start_thread(void);
 
 /* machine dependent signal handler */
index 837d27e90f409426a536e3c05b66cecba0f0fdf9..d8a1520b4e2d894a3c9c2d35359790459576d8f6 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: string.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -701,6 +699,61 @@ void literalstring_free(java_object_t* string)
 }
 
 
+/* javastring_intern ***********************************************************
+
+   Intern the given Java string.
+
+*******************************************************************************/
+
+java_handle_t *javastring_intern(java_handle_t *s)
+{
+       java_lang_String *so;
+       java_chararray_t *value;
+       int32_t           count;
+       int32_t           offset;
+/*     java_lang_String *o; */
+       java_object_t    *o;
+
+       so = (java_lang_String *) s;
+
+       value  = LLNI_field_direct(so, value);
+       count  = LLNI_field_direct(so, count);
+       offset = LLNI_field_direct(so, offset);
+
+       o = literalstring_u2(value, count, offset, true);
+
+       return o;
+}
+
+
+/* javastring_print ************************************************************
+
+   Print the given Java string.
+
+*******************************************************************************/
+
+void javastring_print(java_handle_t *s)
+{
+       java_lang_String *so;
+       java_chararray_t *value;
+       int32_t           count;
+       int32_t           offset;
+       uint16_t          c;
+       int               i;
+
+       so = (java_lang_String *) s;
+
+       value  = LLNI_field_direct(so, value);
+       count  = LLNI_field_direct(so, count);
+       offset = LLNI_field_direct(so, offset);
+
+       for (i = offset; i < offset + count; i++) {
+               c = LLNI_array_direct(value, i);
+               putchar(c);
+       }
+}
+
+
 /*
  * These are local overrides for various environment variables in Emacs.
  * Please do not remove this and leave it at the end of the file, where
index d367d28c91087ab96e8df2d1aed263337f0d0817..42a53782fc2d7cadbde0acfacc4e0fc601861f37 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: stringlocal.h 8321 2007-08-16 11:37:25Z michi $
-
 */
 
 
@@ -93,6 +91,9 @@ java_object_t *literalstring_new(utf *u);
 /* dispose a javastring */
 void literalstring_free(java_object_t*);
 
+java_handle_t *javastring_intern(java_handle_t *s);
+void           javastring_print(java_handle_t *s);
+
 #endif /* _STRINGLOCAL_H */
 
 
index af88926269a9280c7376c1bace08dd9b1d228ec0..8282b082ebcf17fae0f82ccf1535ce20d867a836 100644 (file)
@@ -29,8 +29,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: types.h 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 
index ec7b8f863f165dfffbd27532ba20ed2185207ffb..aefd786077bea9c30e9d44edf4e277d091ee34c2 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: vm.c 8362 2007-08-20 18:35:26Z michi $
-
 */
 
 
 #include <stdint.h>
 #include <stdlib.h>
 
-#if defined(WITH_JRE_LAYOUT)
-# include <libgen.h>
-# include <unistd.h>
-#endif
-
 #include "vm/types.h"
 
 #include "arch.h"
 
 #include "native/include/java_lang_Class.h"
 
-#include "native/include/java_lang_Byte.h"
-#include "native/include/java_lang_Character.h"
-#include "native/include/java_lang_Short.h"
-#include "native/include/java_lang_Integer.h"
-#include "native/include/java_lang_Boolean.h"
-#include "native/include/java_lang_Long.h"
-#include "native/include/java_lang_Float.h"
-#include "native/include/java_lang_Double.h"
-
 #include "native/vm/nativevm.h"
 
 #include "threads/threads-common.h"
@@ -126,22 +110,9 @@ s4 vms = 0;                             /* number of VMs created              */
 bool vm_initializing = false;
 bool vm_exiting = false;
 
-char      *cacao_prefix = NULL;
-char      *cacao_libjvm = NULL;
-char      *classpath_libdir = NULL;
-
-char      *_Jv_bootclasspath;           /* contains the boot classpath        */
-char      *_Jv_classpath;               /* contains the classpath             */
-char      *_Jv_java_library_path;
-
 char      *mainstring = NULL;
 classinfo *mainclass = NULL;
 
-char *specificmethodname = NULL;
-char *specificsignature = NULL;
-
-bool startit = true;
-
 #if defined(ENABLE_INTRP)
 u1 *intrp_main_stack = NULL;
 #endif
@@ -329,6 +300,7 @@ opt_struct opts[] = {
        { "noasyncgc",         false, OPT_IGNORE },
 #if defined(ENABLE_VERIFIER)
        { "noverify",          false, OPT_NOVERIFY },
+       { "Xverify:none",      false, OPT_NOVERIFY },
 #endif
        { "v",                 false, OPT_VERBOSE1 },
        { "verbose:",          true,  OPT_VERBOSE },
@@ -679,21 +651,35 @@ void vm_printconfig(void)
        printf("  maximum heap size              : %d\n", HEAP_MAXSIZE);
        printf("  initial heap size              : %d\n", HEAP_STARTSIZE);
        printf("  stack size                     : %d\n", STACK_SIZE);
-#if defined(WITH_CLASSPATH_GNU)
-       puts("  java.boot.class.path           : "CACAO_VM_ZIP":"CLASSPATH_CLASSES"");
+
+#if defined(WITH_JRE_LAYOUT)
+       /* When we're building with JRE-layout, the default paths are the
+          same as the runtime paths. */
 #else
-       puts("  java.boot.class.path           : "CLASSPATH_CLASSES"");
+# if defined(WITH_CLASSPATH_GNU)
+       puts("  gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR);
+       puts("  java.boot.class.path           : "CACAO_VM_ZIP":"CLASSPATH_CLASSES"");
+# elif defined(WITH_CLASSPATH_SUN)
+       puts("  sun.boot.library.path          : "CLASSPATH_LIBDIR);
+       puts("  java.boot.class.path           : "CLASSPATH_CLASSES);
+# endif
 #endif
-       puts("  gnu.classpath.boot.library.path: "CLASSPATH_LIBDIR"/classpath\n");
+
+       puts("");
 
        puts("Runtime variables:\n");
        printf("  maximum heap size              : %d\n", opt_heapmaxsize);
        printf("  initial heap size              : %d\n", opt_heapstartsize);
        printf("  stack size                     : %d\n", opt_stacksize);
-       printf("  libjvm.so                      : %s\n", cacao_libjvm);
-       printf("  java.boot.class.path           : %s\n", _Jv_bootclasspath);
-       printf("  gnu.classpath.boot.library.path: %s\n", classpath_libdir);
-       printf("  java.class.path                : %s\n", _Jv_classpath);
+
+#if defined(WITH_CLASSPATH_GNU)
+       printf("  gnu.classpath.boot.library.path: %s\n", properties_get("gnu.classpath.boot.library.path"));
+#elif defined(WITH_CLASSPATH_SUN)
+       printf("  sun.boot.library.path          : %s\n", properties_get("sun.boot.library.path"));
+#endif
+
+       printf("  java.boot.class.path           : %s\n", properties_get("java.boot.class.path"));
+       printf("  java.class.path                : %s\n", properties_get("java.class.path"));
 }
 
 
@@ -787,10 +773,12 @@ bool vm_createjvm(JavaVM **p_vm, void **p_env, void *vm_args)
 
 bool vm_create(JavaVMInitArgs *vm_args)
 {
-       char *cp;
-       s4    len;
-       s4    opt;
-       s4    i, j;
+       int   len;
+       char *p;
+       char *boot_class_path;
+       char *class_path;
+       int   opt;
+       int   i, j;
        bool  opt_version;
        bool  opt_exit;
 
@@ -839,153 +827,6 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
        _Jv_jvm->starttime = builtin_currenttimemillis();
 
-       /* get stuff from the environment *****************************************/
-
-#if defined(WITH_JRE_LAYOUT)
-       /* SUN also uses a buffer of 4096-bytes (strace is your friend). */
-
-       cacao_prefix = MNEW(char, 4096);
-
-       if (readlink("/proc/self/exe", cacao_prefix, 4095) == -1)
-               vm_abort("readlink failed: %s\n", strerror(errno));
-
-       /* get the path of the current executable */
-
-       cacao_prefix = dirname(cacao_prefix);
-
-       if ((strlen(cacao_prefix) + strlen("/..") + strlen("0")) > 4096)
-               vm_abort("libjvm name to long for buffer\n");
-
-       /* concatenate the library name */
-
-       strcat(cacao_prefix, "/..");
-
-       /* now set path to libjvm.so */
-
-       len = strlen(cacao_prefix) + strlen("/lib/libjvm") + strlen("0");
-
-       cacao_libjvm = MNEW(char, len);
-       strcpy(cacao_libjvm, cacao_prefix);
-       strcat(cacao_libjvm, "/lib/libjvm");
-
-       /* and finally set the path to GNU Classpath libraries */
-
-       len = strlen(cacao_prefix) + strlen("/lib/classpath") + strlen("0");
-
-       classpath_libdir = MNEW(char, len);
-       strcpy(classpath_libdir, cacao_prefix);
-       strcat(classpath_libdir, "/lib/classpath");
-#else
-       cacao_prefix     = CACAO_PREFIX;
-       cacao_libjvm     = CACAO_LIBDIR"/libjvm";
-
-# if defined(WITH_CLASSPATH_GNU)
-       classpath_libdir = CLASSPATH_LIBDIR"/classpath";
-# else
-       classpath_libdir = CLASSPATH_LIBDIR;
-# endif
-#endif
-
-       /* set the bootclasspath */
-
-       cp = getenv("BOOTCLASSPATH");
-
-       if (cp != NULL) {
-               _Jv_bootclasspath = MNEW(char, strlen(cp) + strlen("0"));
-               strcpy(_Jv_bootclasspath, cp);
-       }
-       else {
-#if defined(WITH_JRE_LAYOUT)
-               len =
-# if defined(WITH_CLASSPATH_GNU)
-                       strlen(cacao_prefix) +
-                       strlen("/share/cacao/vm.zip") +
-                       strlen(":") +
-# endif
-                       strlen(cacao_prefix) +
-                       strlen("/share/classpath/glibj.zip") +
-                       strlen("0");
-
-               _Jv_bootclasspath = MNEW(char, len);
-# if defined(WITH_CLASSPATH_GNU)
-               strcat(_Jv_bootclasspath, cacao_prefix);
-               strcat(_Jv_bootclasspath, "/share/cacao/vm.zip");
-               strcat(_Jv_bootclasspath, ":");
-# endif
-               strcat(_Jv_bootclasspath, cacao_prefix);
-               strcat(_Jv_bootclasspath, "/share/classpath/glibj.zip");
-#else
-# if defined(WITH_CLASSPATH_GNU)
-               len =
-                       strlen(CACAO_VM_ZIP) +
-                       strlen(":") +
-                       strlen(CLASSPATH_CLASSES) +
-                       strlen("0");
-# elif defined(WITH_CLASSPATH_SUN)
-               /* This is the bootclasspath taken from HotSpot (see
-                  hotspot/src/share/vm/runtime/os.cpp
-                  (os::set_boot_path)). */
-
-               len =
-                       strlen(CLASSPATH_PREFIX"/lib/resources.jar:"
-                                  CLASSPATH_PREFIX"/lib/rt.jar:"
-                                  CLASSPATH_PREFIX"/lib/sunrsasign.jar:"
-                                  CLASSPATH_PREFIX"/lib/jsse.jar:"
-                                  CLASSPATH_PREFIX"/lib/jce.jar:"
-                                  CLASSPATH_PREFIX"/lib/charsets.jar:"
-                                  CLASSPATH_PREFIX"/classes") +
-                       strlen("0");
-# elif defined(WITH_CLASSPATH_CLDC1_1)
-               len =
-                       strlen(CLASSPATH_CLASSES) +
-                       strlen("0");
-# else
-#  error unknown classpath configuration
-# endif
-
-               _Jv_bootclasspath = MNEW(char, len);
-
-# if defined(WITH_CLASSPATH_GNU)
-               strcpy(_Jv_bootclasspath, CACAO_VM_ZIP);
-               strcat(_Jv_bootclasspath, ":");
-               strcat(_Jv_bootclasspath, CLASSPATH_CLASSES);
-# elif defined(WITH_CLASSPATH_SUN)
-               strcpy(_Jv_bootclasspath,
-                          CLASSPATH_PREFIX"/lib/resources.jar:"
-                          CLASSPATH_PREFIX"/lib/rt.jar:"
-                          CLASSPATH_PREFIX"/lib/sunrsasign.jar:"
-                          CLASSPATH_PREFIX"/lib/jsse.jar:"
-                          CLASSPATH_PREFIX"/lib/jce.jar:"
-                          CLASSPATH_PREFIX"/lib/charsets.jar:"
-                          CLASSPATH_PREFIX"/classes");
-# elif defined(WITH_CLASSPATH_CLDC1_1)
-               strcat(_Jv_bootclasspath, CLASSPATH_CLASSES);
-# else
-#  error unknown classpath configuration
-# endif
-#endif
-       }
-
-       /* set the classpath */
-
-       cp = getenv("CLASSPATH");
-
-       if (cp != NULL) {
-               _Jv_classpath = MNEW(char, strlen(cp) + strlen("0"));
-               strcat(_Jv_classpath, cp);
-       }
-       else {
-               _Jv_classpath = MNEW(char, strlen(".") + strlen("0"));
-               strcpy(_Jv_classpath, ".");
-       }
-
-       /* Get and set java.library.path. */
-
-       _Jv_java_library_path = getenv("LD_LIBRARY_PATH");
-
-       if (_Jv_java_library_path == NULL)
-               _Jv_java_library_path = "";
-
        /* interpret the options **************************************************/
 
        opt_version       = false;
@@ -1005,16 +846,8 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
        /* Initialize and fill properties before command-line handling. */
 
-       if (!properties_init())
-               vm_abort("vm_create: properties_init failed");
-
-       /* Set the classpath properties. */
-
-#if defined(ENABLE_JAVASE)
-       properties_add("java.boot.class.path", _Jv_bootclasspath);
-       properties_add("sun.boot.class.path", _Jv_bootclasspath);
-       properties_add("java.class.path", _Jv_classpath);
-#endif
+       properties_init();
+       properties_set();
 
        /* iterate over all passed options */
 
@@ -1046,15 +879,20 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        break;
 
                case OPT_CLASSPATH:
-                       /* forget old classpath and set the argument as new classpath */
-                       MFREE(_Jv_classpath, char, strlen(_Jv_classpath));
+                       /* Forget old classpath and set the argument as new
+                          classpath. */
+
+                       class_path = properties_get("java.class.path");
+
+                       p = MNEW(char, strlen(opt_arg) + strlen("0"));
 
-                       _Jv_classpath = MNEW(char, strlen(opt_arg) + strlen("0"));
-                       strcpy(_Jv_classpath, opt_arg);
+                       strcpy(p, opt_arg);
 
 #if defined(ENABLE_JAVASE)
-                       properties_add("java.class.path", _Jv_classpath);
+                       properties_add("java.class.path", p);
 #endif
+
+                       MFREE(class_path, char, strlen(class_path));
                        break;
 
                case OPT_D:
@@ -1077,78 +915,79 @@ bool vm_create(JavaVMInitArgs *vm_args)
                        /* Forget default bootclasspath and set the argument as
                           new boot classpath. */
 
-                       MFREE(_Jv_bootclasspath, char, strlen(_Jv_bootclasspath));
+                       boot_class_path = properties_get("sun.boot.class.path");
 
-                       _Jv_bootclasspath = MNEW(char, strlen(opt_arg) + strlen("0"));
-                       strcpy(_Jv_bootclasspath, opt_arg);
+                       p = MNEW(char, strlen(opt_arg) + strlen("0"));
 
-#if defined(ENABLE_JAVASE)
-                       properties_add("java.boot.class.path", _Jv_bootclasspath);
-                       properties_add("sun.boot.class.path", _Jv_bootclasspath);
-#endif
+                       strcpy(p, opt_arg);
+
+                       properties_add("sun.boot.class.path", p);
+                       properties_add("java.boot.class.path", p);
+
+                       MFREE(boot_class_path, char, strlen(boot_class_path));
                        break;
 
                case OPT_BOOTCLASSPATH_A:
-                       /* append to end of bootclasspath */
+                       /* Append to bootclasspath. */
 
-                       len = strlen(_Jv_bootclasspath);
+                       boot_class_path = properties_get("sun.boot.class.path");
 
-                       _Jv_bootclasspath = MREALLOC(_Jv_bootclasspath,
-                                                                                char,
-                                                                                len + strlen("0"),
-                                                                                len + strlen(":") +
-                                                                                strlen(opt_arg) + strlen("0"));
+                       len = strlen(boot_class_path);
 
-                       strcat(_Jv_bootclasspath, ":");
-                       strcat(_Jv_bootclasspath, opt_arg);
+                       p = MREALLOC(boot_class_path,
+                                                char,
+                                                len + strlen("0"),
+                                                len + strlen(":") +
+                                                strlen(opt_arg) + strlen("0"));
 
-#if defined(ENABLE_JAVASE)
-                       properties_add("java.boot.class.path", _Jv_bootclasspath);
-                       properties_add("sun.boot.class.path", _Jv_bootclasspath);
-#endif
+                       strcat(p, ":");
+                       strcat(p, opt_arg);
+
+                       properties_add("sun.boot.class.path", p);
+                       properties_add("java.boot.class.path", p);
                        break;
 
                case OPT_BOOTCLASSPATH_P:
-                       /* prepend in front of bootclasspath */
+                       /* Prepend to bootclasspath. */
 
-                       cp = _Jv_bootclasspath;
-                       len = strlen(cp);
+                       boot_class_path = properties_get("sun.boot.class.path");
 
-                       _Jv_bootclasspath = MNEW(char, strlen(opt_arg) + strlen(":") +
-                                                                        len + strlen("0"));
+                       len = strlen(boot_class_path);
 
-                       strcpy(_Jv_bootclasspath, opt_arg);
-                       strcat(_Jv_bootclasspath, ":");
-                       strcat(_Jv_bootclasspath, cp);
+                       p = MNEW(char, strlen(opt_arg) + strlen(":") + len + strlen("0"));
 
-                       MFREE(cp, char, len);
+                       strcpy(p, opt_arg);
+                       strcat(p, ":");
+                       strcat(p, boot_class_path);
 
-#if defined(ENABLE_JAVASE)
-                       properties_add("java.boot.class.path", _Jv_bootclasspath);
-                       properties_add("sun.boot.class.path", _Jv_bootclasspath);
-#endif
+                       properties_add("sun.boot.class.path", p);
+                       properties_add("java.boot.class.path", p);
+
+                       MFREE(boot_class_path, char, len);
                        break;
 
                case OPT_BOOTCLASSPATH_C:
-                       /* use as Java core library, but prepend VM interface classes */
+                       /* Use as Java core library, but prepend VM interface
+                          classes. */
 
-                       MFREE(_Jv_bootclasspath, char, strlen(_Jv_bootclasspath));
+                       boot_class_path = properties_get("sun.boot.class.path");
 
-                       len = strlen(CACAO_VM_ZIP) +
+                       len =
+                               strlen(CACAO_VM_ZIP) +
                                strlen(":") +
                                strlen(opt_arg) +
                                strlen("0");
 
-                       _Jv_bootclasspath = MNEW(char, len);
+                       p = MNEW(char, len);
 
-                       strcpy(_Jv_bootclasspath, CACAO_VM_ZIP);
-                       strcat(_Jv_bootclasspath, ":");
-                       strcat(_Jv_bootclasspath, opt_arg);
+                       strcpy(p, CACAO_VM_ZIP);
+                       strcat(p, ":");
+                       strcat(p, opt_arg);
 
-#if defined(ENABLE_JAVASE)
-                       properties_add("java.boot.class.path", _Jv_bootclasspath);
-                       properties_add("sun.boot.class.path", _Jv_bootclasspath);
-#endif
+                       properties_add("sun.boot.class.path", p);
+                       properties_add("java.boot.class.path", p);
+
+                       MFREE(boot_class_path, char, strlen(boot_class_path));
                        break;
 
 #if defined(ENABLE_JVMTI)
@@ -1551,16 +1390,16 @@ bool vm_create(JavaVMInitArgs *vm_args)
                if (opt_jar == true) {
                        /* free old classpath */
 
-                       MFREE(_Jv_classpath, char, strlen(_Jv_classpath));
+/*                     MFREE(_Jv_classpath, char, strlen(_Jv_classpath)); */
 
                        /* put jarfile into classpath */
 
-                       _Jv_classpath = MNEW(char, strlen(mainstring) + strlen("0"));
+                       p = MNEW(char, strlen(mainstring) + strlen("0"));
 
-                       strcpy(_Jv_classpath, mainstring);
+                       strcpy(p, mainstring);
 
 #if defined(ENABLE_JAVASE)
-                       properties_add("java.class.path", _Jv_classpath);
+                       properties_add("java.class.path", p);
 #endif
                }
                else {
@@ -1640,7 +1479,8 @@ bool vm_create(JavaVMInitArgs *vm_args)
 
        /* AFTER: utf8_init */
 
-       suck_add(_Jv_bootclasspath);
+       boot_class_path = properties_get("sun.boot.class.path");
+       suck_add(boot_class_path);
 
        /* initialize the classcache hashtable stuff: lock, hashtable
           (must be done _after_ threads_preinit) */
@@ -1681,20 +1521,21 @@ bool vm_create(JavaVMInitArgs *vm_args)
        intrp_md_init();
 #endif
 
-       /* initialize the loader subsystems (must be done _after_
-       classcache_init) */
+       /* AFTER: utf8_init, classcache_init */
 
-       if (!loader_init())
-               vm_abort("vm_create: loader_init failed");
+       loader_preinit();
+       linker_preinit();
 
-       /* Link some important VM classes. */
-       /* AFTER: utf8_init */
+       /* AFTER: loader_preinit, linker_preinit */
+
+       primitive_init();
+
+       loader_init();
+       linker_init();
 
-       if (!linker_init())
-               vm_abort("vm_create: linker_init failed");
+       /* AFTER: loader_init, linker_init */
 
-       if (!primitive_init())
-               vm_abort("vm_create: primitive_init failed");
+       primitive_postinit();
 
        if (!exceptions_init())
                vm_abort("vm_create: exceptions_init failed");
index 8e2a1a810ba75b6da0b57e13b8a1aab41523b416..7f1a46771fd5111eed44c8e28df456fda78ce760 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: vm.h 8318 2007-08-16 10:05:34Z michi $
-
 */
 
 
@@ -52,14 +50,6 @@ extern _Jv_JNIEnv *_Jv_env;
 extern bool vm_initializing;
 extern bool vm_exiting;
 
-extern char      *cacao_prefix;
-extern char      *cacao_libjvm;
-extern char      *classpath_libdir;
-
-extern char      *_Jv_bootclasspath;
-extern char      *_Jv_classpath;
-extern char      *_Jv_java_library_path;
-
 extern char      *mainstring;
 extern classinfo *mainclass;
 
index 7a21b34fe85a072e8ee5a9718858ac55bb8d1523..00ca24c96d3501fb6fa332e10012c10e9f3c2a2e 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 6216 2006-12-18 18:21:37Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR)
 
index a266b4aa49daf3f5a44f28ccb5426bfc5c77bdc8..1a8533b672af1286a4369b9a62d4de59185f8b25 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
+
 #include "config.h"
 
 #include <assert.h>
+#include <stdint.h>
+
+#include "native/llni.h"
 
 #include "vm/types.h"
+#include "vm/array.h"
+#include "vm/builtin.h"
+#include "vm/primitive.h"
 
 #include "mm/memory.h"
 
 
 #include "vmcore/annotation.h"
 #include "vmcore/class.h"
+#include "vmcore/loader.h"
 #include "vmcore/suck.h"
 
 #if !defined(ENABLE_ANNOTATIONS)
 # error annotation support has to be enabled when compling this file!
 #endif
 
-/* annotation_bytearray_new ***************************************************
-
-   Allocate a new bytearray.
-
-*******************************************************************************/
-
-annotation_bytearray_t *annotation_bytearray_new(uint32_t size)
-{
-       annotation_bytearray_t *ba =
-               mem_alloc(sizeof(uint32_t) + sizeof(uint8_t) * size);
-
-       if (ba != NULL) {
-               ba->size = size;
-       }
-
-       return ba;
-}
-
-
-/* annotation_bytearray_free **************************************************
-
-   Free a bytearray.
-
-*******************************************************************************/
-
-void annotation_bytearray_free(annotation_bytearray_t *ba)
-{
-       if (ba != NULL) {
-               mem_free(ba, sizeof(uint32_t) + sizeof(uint8_t) * ba->size);
-       }
-}
-
-
-/* annotation_bytearrays_new **************************************************
-
-   Allocate a new array of bytearrays.
-
-*******************************************************************************/
-
-annotation_bytearrays_t *annotation_bytearrays_new(uint32_t size)
-{
-       annotation_bytearrays_t *bas =
-               mem_alloc(sizeof(uint32_t) + sizeof(annotation_bytearray_t*) * size);
-
-       if (bas != NULL) {
-               bas->size = size;
-       }
-
-       return bas;
-}
-
 
 /* annotation_bytearrays_resize ***********************************************
 
@@ -102,31 +57,38 @@ annotation_bytearrays_t *annotation_bytearrays_new(uint32_t size)
 
 *******************************************************************************/
 
-bool annotation_bytearrays_resize(annotation_bytearrays_t **bas,
+static bool annotation_bytearrays_resize(java_handle_objectarray_t **bas,
        uint32_t size)
 {
-       annotation_bytearrays_t *newbas = NULL;
-       uint32_t i;
+       java_handle_objectarray_t *newbas = NULL;
        uint32_t minsize;
+       uint32_t oldsize;
        
        assert(bas != NULL);
        
-       newbas = annotation_bytearrays_new(size);
+       if (*bas != NULL) {
+               oldsize = array_length_get((java_handle_t*)*bas);
+
+               /* if the size already fits do nothing */
+               if (size == oldsize) {
+                       return true;
+               }
+       }
+
+       newbas = builtin_anewarray(size,
+               primitive_arrayclass_get_by_type(PRIMITIVETYPE_BYTE));
        
        if (newbas == NULL) {
+               /* out of memory */
                return false;
        }
        
+       /* is there a old byte array array? */
        if (*bas != NULL) {
-               minsize = size < (*bas)->size ? size : (*bas)->size;
+               minsize = size < oldsize ? size : oldsize;
 
-               for (i = size; i < (*bas)->size; ++ i) {
-                       annotation_bytearray_free((*bas)->data[i]);
-               }
-
-               for (i = 0; i < minsize; ++i) {
-                       newbas->data[i] = (*bas)->data[i];
-               }
+               MCOPY(LLNI_array_data(newbas), LLNI_array_data(*bas),
+                       java_object_t*, minsize);
        }
 
        *bas = newbas;
@@ -141,56 +103,45 @@ bool annotation_bytearrays_resize(annotation_bytearrays_t **bas,
 
 *******************************************************************************/
 
-bool annotation_bytearrays_insert(annotation_bytearrays_t **bas,
-       uint32_t index, annotation_bytearray_t *ba)
+static bool annotation_bytearrays_insert(java_handle_objectarray_t **bas,
+       uint32_t index, java_handle_bytearray_t *ba)
 {
+       uint32_t size = 0;
+
        assert(bas != NULL);
 
-       if (ba != NULL) {
-               if (*bas == NULL || (*bas)->size <= index) {
+       /* do nothing if NULL is inserted but no array exists */
+       if (ba == NULL && *bas == NULL) {
+               return true;
+       }
+
+       /* get lengths if array exists */
+       if (*bas != NULL) {
+               size = array_length_get((java_handle_t*)*bas);
+       }
+
+       if (ba == NULL) {
+               /* insert NULL only if array is big enough */
+               if (size > index) {
+                       array_objectarray_element_set(*bas, index, NULL);
+               }
+       }
+       else {
+               /* resize array if it's not enough for inserted value */
+               if (size <= index) {
                        if (!annotation_bytearrays_resize(bas, index + 1)) {
+                               /* out of memory */
                                return false;
                        }
                }
-               else {
-                       /* free old bytearray (if any) */
-                       annotation_bytearray_free((*bas)->data[index]);
-               }
 
-               /* insert new bytearray */
-               (*bas)->data[index] = ba;
-       }
-       else if (*bas != NULL && (*bas)->size > index) {
-               /* do not resize when just inserting NULL,
-                * but free old bytearray if there is any */
-               annotation_bytearray_free((*bas)->data[index]);
+               array_objectarray_element_set(*bas, index, (java_handle_t*)ba);
        }
-
+       
        return true;
 }
 
 
-/* annotation_bytearrays_free *************************************************
-
-   Free an array of bytearrays.
-
-*******************************************************************************/
-
-void annotation_bytearrays_free(annotation_bytearrays_t *bas)
-{
-       uint32_t i;
-
-       if (bas != NULL) {
-               for (i = 0; i < bas->size; ++ i) {
-                       annotation_bytearray_free(bas->data[i]);
-               }
-
-               mem_free(bas, sizeof(uint32_t) +
-                       sizeof(annotation_bytearray_t*) * bas->size);
-       }
-}
-
-
 /* annotation_load_attribute_body *********************************************
 
    This function loads the body of a generic attribute.
@@ -217,10 +168,10 @@ void annotation_bytearrays_free(annotation_bytearrays_t *bas)
 *******************************************************************************/
 
 static bool annotation_load_attribute_body(classbuffer *cb,
-       annotation_bytearray_t **attribute, const char *errormsg_prefix)
+       java_handle_bytearray_t **attribute, const char *errormsg_prefix)
 {
        uint32_t size = 0;
-       annotation_bytearray_t *ba = NULL;
+       java_handle_bytearray_t *ba = NULL;
 
        assert(cb != NULL);
        assert(attribute != NULL);
@@ -241,7 +192,7 @@ static bool annotation_load_attribute_body(classbuffer *cb,
        /* if attribute_length == 0 then NULL is
         * the right value for this attribute */
        if (size > 0) {
-               ba = annotation_bytearray_new(size);
+               ba = builtin_newarray_byte(size);
 
                if (ba == NULL) {
                        /* out of memory */
@@ -249,7 +200,7 @@ static bool annotation_load_attribute_body(classbuffer *cb,
                }
 
                /* load data */
-               suck_nbytes(ba->data, cb, size);
+               suck_nbytes((uint8_t*)LLNI_array_data(ba), cb, size);
 
                /* return data */
                *attribute = ba;
@@ -283,9 +234,9 @@ static bool annotation_load_attribute_body(classbuffer *cb,
 bool annotation_load_method_attribute_annotationdefault(
                classbuffer *cb, methodinfo *m)
 {
-       int slot = 0;
-       annotation_bytearray_t   *annotationdefault  = NULL;
-       annotation_bytearrays_t **annotationdefaults = NULL;
+       int                         slot               = 0;
+       java_handle_bytearray_t    *annotationdefault  = NULL;
+       java_handle_objectarray_t **annotationdefaults = NULL;
 
        assert(cb != NULL);
        assert(m != NULL);
@@ -293,8 +244,8 @@ bool annotation_load_method_attribute_annotationdefault(
        annotationdefaults = &(m->class->method_annotationdefaults);
 
        if (!annotation_load_attribute_body(
-               cb, &annotationdefault,
-               "invalid annotation default method attribute")) {
+                       cb, &annotationdefault,
+                       "invalid annotation default method attribute")) {
                return false;
        }
 
@@ -302,8 +253,7 @@ bool annotation_load_method_attribute_annotationdefault(
                slot = m - m->class->methods;
 
                if (!annotation_bytearrays_insert(
-                       annotationdefaults, slot, annotationdefault)) {
-                       annotation_bytearray_free(annotationdefault);
+                               annotationdefaults, slot, annotationdefault)) {
                        return false;
                }
        }
@@ -340,9 +290,9 @@ bool annotation_load_method_attribute_annotationdefault(
 bool annotation_load_method_attribute_runtimevisibleparameterannotations(
                classbuffer *cb, methodinfo *m)
 {
-       int slot = 0;
-       annotation_bytearray_t  *annotations = NULL;
-       annotation_bytearrays_t **parameterannotations = NULL;
+       int                         slot                 = 0;
+       java_handle_bytearray_t    *annotations          = NULL;
+       java_handle_objectarray_t **parameterannotations = NULL;
 
        assert(cb != NULL);
        assert(m != NULL);
@@ -350,8 +300,8 @@ bool annotation_load_method_attribute_runtimevisibleparameterannotations(
        parameterannotations = &(m->class->method_parameterannotations);
 
        if (!annotation_load_attribute_body(
-               cb, &annotations,
-               "invalid runtime visible parameter annotations method attribute")) {
+                       cb, &annotations,
+                       "invalid runtime visible parameter annotations method attribute")) {
                return false;
        }
 
@@ -359,8 +309,7 @@ bool annotation_load_method_attribute_runtimevisibleparameterannotations(
                slot = m - m->class->methods;
 
                if (!annotation_bytearrays_insert(
-                       parameterannotations, slot, annotations)) {
-                       annotation_bytearray_free(annotations);
+                               parameterannotations, slot, annotations)) {
                        return false;
                }
        }
@@ -456,9 +405,9 @@ bool annotation_load_class_attribute_runtimeinvisibleannotations(
 bool annotation_load_method_attribute_runtimevisibleannotations(
        classbuffer *cb, methodinfo *m)
 {
-       int slot = 0;
-       annotation_bytearray_t  *annotations = NULL;
-       annotation_bytearrays_t **method_annotations = NULL;
+       int                         slot               = 0;
+       java_handle_bytearray_t    *annotations        = NULL;
+       java_handle_objectarray_t **method_annotations = NULL;
 
        assert(cb != NULL);
        assert(m != NULL);
@@ -466,8 +415,8 @@ bool annotation_load_method_attribute_runtimevisibleannotations(
        method_annotations = &(m->class->method_annotations);
 
        if (!annotation_load_attribute_body(
-               cb, &annotations,
-               "invalid runtime visible annotations method attribute")) {
+                       cb, &annotations,
+                       "invalid runtime visible annotations method attribute")) {
                return false;
        }
 
@@ -475,8 +424,7 @@ bool annotation_load_method_attribute_runtimevisibleannotations(
                slot = m - m->class->methods;
 
                if (!annotation_bytearrays_insert(
-                       method_annotations, slot, annotations)) {
-                       annotation_bytearray_free(annotations);
+                               method_annotations, slot, annotations)) {
                        return false;
                }
        }
@@ -507,9 +455,9 @@ bool annotation_load_method_attribute_runtimeinvisibleannotations(
 bool annotation_load_field_attribute_runtimevisibleannotations(
        classbuffer *cb, fieldinfo *f)
 {
-       int slot = 0;
-       annotation_bytearray_t  *annotations = NULL;
-       annotation_bytearrays_t **field_annotations = NULL;
+       int                          slot             = 0;
+       java_handle_bytearray_t    *annotations       = NULL;
+       java_handle_objectarray_t **field_annotations = NULL;
 
        assert(cb != NULL);
        assert(f != NULL);
@@ -517,8 +465,8 @@ bool annotation_load_field_attribute_runtimevisibleannotations(
        field_annotations = &(f->class->field_annotations);
 
        if (!annotation_load_attribute_body(
-               cb, &annotations,
-               "invalid runtime visible annotations field attribute")) {
+                       cb, &annotations,
+                       "invalid runtime visible annotations field attribute")) {
                return false;
        }
 
@@ -526,8 +474,7 @@ bool annotation_load_field_attribute_runtimevisibleannotations(
                slot = f - f->class->fields;
 
                if (!annotation_bytearrays_insert(
-                       field_annotations, slot, annotations)) {
-                       annotation_bytearray_free(annotations);
+                               field_annotations, slot, annotations)) {
                        return false;
                }
        }
index 3d2f4b768d77619e8fb9c7c7e6b1ef005507918b..7ec071d3dfc98a73bdc652ebddec69fe512f8883 100644 (file)
 #ifndef _ANNOTATION_H
 #define _ANNOTATION_H
 
-/* forward typedefs ***********************************************************/
-
-typedef struct annotation_bytearray_t annotation_bytearray_t;
-typedef struct annotation_t           annotation_t;
-typedef struct element_value_t        element_value_t;
-typedef struct annotation_bytearrays_t annotation_bytearrays_t;
 
 #include "config.h"
-#include "vm/types.h"
 
+#include "vm/types.h"
 #include "vm/global.h"
 
 #include "vmcore/class.h"
 #include "vmcore/field.h"
-#include "vmcore/method.h"
 #include "vmcore/loader.h"
-#include "vmcore/utf8.h"
-
-
-/* annotation_bytearray *******************************************************/
-
-struct annotation_bytearray_t {
-       uint32_t size;
-       uint8_t  data[1];
-};
-
-/* annotation_bytearrays ******************************************************/
-
-struct annotation_bytearrays_t {
-       uint32_t size;
-       annotation_bytearray_t *data[1];
-};
-
-/* annotation *****************************************************************/
-
-struct annotation_t {
-       utf             *type;
-       s4               element_valuescount;
-       element_value_t *element_values;
-};
-
-/* element_value **************************************************************/
-
-struct element_value_t {
-       utf *name;
-       u1   tag;
-};
+#include "vmcore/method.h"
 
 
 /* function prototypes ********************************************************/
 
-annotation_bytearray_t *annotation_bytearray_new(uint32_t size);
-
-void annotation_bytearray_free(annotation_bytearray_t *ba);
-
-annotation_bytearrays_t *annotation_bytearrays_new(uint32_t size);
-
-bool annotation_bytearrays_resize(annotation_bytearrays_t **bas,
-       uint32_t size);
-
-bool annotation_bytearrays_insert(annotation_bytearrays_t **bas,
-       uint32_t index, annotation_bytearray_t *ba);
-
-void annotation_bytearrays_free(annotation_bytearrays_t *bas);
-
 bool annotation_load_class_attribute_runtimevisibleannotations(
        classbuffer *cb);
 
index 27b9739c82b55ff75ee9db1ebe284eaca6eb0733..5c810efa571a4f13a4b34da39c5573f70ccb7d2a 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: class.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -140,9 +138,11 @@ classinfo *arrayclass_java_lang_Object;
 
 #if defined(ENABLE_ANNOTATIONS)
 classinfo *class_sun_reflect_ConstantPool;
+#if defined(WITH_CLASSPATH_GNU)
 classinfo *class_sun_reflect_annotation_AnnotationParser;
 #endif
 #endif
+#endif
 
 
 /* pseudo classes for the typechecker */
@@ -298,7 +298,7 @@ void class_postset_header_vftbl(void)
 
 *******************************************************************************/
 
-classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data)
+classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data, java_handle_t *pd)
 {
        classinfo   *c;
        classinfo   *r;
@@ -364,6 +364,14 @@ classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_
                return NULL;
        }
 
+#if defined(ENABLE_JAVASE)
+# if defined(WITH_CLASSPATH_SUN)
+       /* Store the protection domain. */
+
+       c->protectiondomain = pd;
+# endif
+#endif
+
        /* Store the newly defined class in the class cache. This call
           also checks whether a class of the same name has already been
           defined by the same defining loader, and if so, replaces the
@@ -1537,11 +1545,12 @@ static classinfo *class_resolve_superclass(classinfo *c)
        if (c->super.any == NULL)
                return NULL;
 
-       /* Do we have a super class reference or is it already
-          resolved? */
+       /* Check if the super class is a reference. */
 
        if (IS_CLASSREF(c->super)) {
+               /* XXX I'm very sure this is not correct. */
                super = resolve_classref_or_classinfo_eager(c->super, true);
+/*             super = resolve_classref_or_classinfo_eager(c->super, false); */
 
                if (super == NULL)
                        return NULL;
@@ -1570,7 +1579,13 @@ bool class_issubclass(classinfo *sub, classinfo *super)
                if (sub == super)
                        return true;
 
-               sub = class_resolve_superclass(sub);
+/*             sub = class_resolve_superclass(sub); */
+               if (sub->super.any == NULL)
+                       return false;
+
+               assert(IS_CLASSREF(sub->super) == 0);
+
+               sub = sub->super.cls;
        }
 }
 
@@ -1976,6 +1991,23 @@ java_handle_objectarray_t *class_get_interfaces(classinfo *c)
 }
 
 
+/* class_get_annotations *******************************************************
+
+   Return the unparsed declared annotations in an byte array
+   of the given class (or NULL if there aren't any).
+
+*******************************************************************************/
+
+java_handle_bytearray_t *class_get_annotations(classinfo *c)
+{
+#if defined(ENABLE_ANNOTATIONS)
+       return c->annotations;
+#else
+       return NULL;
+#endif
+}
+
+
 /* class_get_signature *********************************************************
 
    Return the signature of the given class.  For array and primitive
index 2f6de435f4b97c6046830222158160d2162b1f21..fddb1279da5cf5b6b9e24b778f23a44402d45119 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: class.h 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -139,26 +137,36 @@ struct classinfo {                /* class structure                          */
        innerclassinfo *innerclass;
 
        classref_or_classinfo  declaringclass;
-
-#if defined(ENABLE_JAVASE)
        classref_or_classinfo  enclosingclass;  /* enclosing class                */
        constant_nameandtype  *enclosingmethod; /* enclosing method               */
-#endif
 
        utf        *packagename;      /* full name of the package                 */
        utf        *sourcefile;       /* SourceFile attribute                     */
 #if defined(ENABLE_JAVASE)
        utf        *signature;        /* Signature attribute                      */
 #if defined(ENABLE_ANNOTATIONS)
-       annotation_bytearray_t  *annotations;
+       /* All the annotation attributes are NULL (and not a zero length array)   */
+       /* if there is nothing.                                                   */
+       java_handle_bytearray_t   *annotations; /* annotations of this class      */
        
-       annotation_bytearrays_t *method_annotations;
-       annotation_bytearrays_t *method_parameterannotations;
-       annotation_bytearrays_t *method_annotationdefaults;
-
-       annotation_bytearrays_t *field_annotations;
+       java_handle_objectarray_t *method_annotations; /* array of annotations    */
+                                     /* for the methods                          */
+       java_handle_objectarray_t *method_parameterannotations; /* array of       */
+                                     /* parameter annotations for the methods    */
+       java_handle_objectarray_t *method_annotationdefaults; /* array for        */
+                                     /* annotation default values for the        */
+                                     /* methods                                  */
+
+       java_handle_objectarray_t *field_annotations; /* array of annotations for */
+                                     /* the fields                               */
+#endif
 #endif
-       classloader *classloader;     /* NULL for bootstrap classloader           */
+       classloader *classloader;       /* NULL for bootstrap classloader         */
+
+#if defined(ENABLE_JAVASE)
+# if defined(WITH_CLASSPATH_SUN)
+       java_object_t *protectiondomain;
+# endif
 #endif
 };
 
@@ -306,7 +314,7 @@ extern classinfo *pseudo_class_New;
 
 classinfo *class_create_classinfo(utf *u);
 void       class_postset_header_vftbl(void);
-classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data);
+classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data, java_handle_t *pd);
 void       class_set_packagename(classinfo *c);
 
 bool       class_load_attributes(classbuffer *cb);
@@ -375,6 +383,7 @@ java_handle_objectarray_t *class_get_declaredclasses(classinfo *c, bool publicOn
 classinfo                 *class_get_declaringclass(classinfo *c);
 classinfo                 *class_get_enclosingclass(classinfo *c);
 java_handle_objectarray_t *class_get_interfaces(classinfo *c);
+java_handle_bytearray_t   *class_get_annotations(classinfo *c);
 
 #if defined(ENABLE_JAVASE)
 utf                       *class_get_signature(classinfo *c);
index 27013ef2fc7abc9f639e1e68f83cc8d755be4f22..91e51a3919e693cb503786cd3c2b18a2778fa19c 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: classcache.c 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 78d70487207e7e02bd02316efb4f30c3df5d1c1f..bd89d1475a50bd0a7d5af649f54727bffbaf6697 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: classcache.h 7399 2007-02-23 23:29:13Z michi $
-
 */
 
 
@@ -54,7 +52,6 @@ typedef struct classcache_name_entry classcache_name_entry;
 typedef struct classcache_class_entry classcache_class_entry;
 typedef struct classcache_loader_entry classcache_loader_entry;
 
-
 /* global variables ***********************************************************/
 
 extern hashtable hashtable_classcache;
index a9b8a378bcc8f8f49dff9d22ebec919d50def5eb..9d476e271274c5a54f2d95d3781f525c37fdde0b 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: descriptor.c 8288 2007-08-10 15:12:00Z twisti $
-
 */
 
 
index 8c8e9b4541c8b4e7566300bd70a7d8993f135150..dae43e7212ad34510e372336fb04e7c9195f36f5 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: descriptor.h 8233 2007-07-25 15:11:20Z twisti $
-
 */
 
 
index 570c6958507f58e3d3ddbe9522a6c9dd71602dd9..f1fb070081c3e85154ad371dc5b8b8a5ec0648eb 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: field.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -37,8 +35,7 @@
 
 #include "vm/types.h"
 
-#include "mm/memory.h"
-
+#include "vm/array.h"
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
 #include "vm/global.h"
@@ -397,23 +394,18 @@ java_handle_bytearray_t *field_get_annotations(fieldinfo *f)
 #if defined(ENABLE_ANNOTATIONS)
        classinfo               *c;
        int                      slot;
-       annotation_bytearray_t  *ba;
        java_handle_bytearray_t *annotations;
+       java_handle_t           *a;
 
        c           = f->class;
        slot        = f - c->fields;
        annotations = NULL;
+       a           = (java_handle_t*)c->field_annotations;
        
-       if (c->field_annotations != NULL && c->field_annotations->size > slot) {
-               ba = c->field_annotations->data[slot];
-               
-               if (ba != NULL) {
-                       annotations = builtin_newarray_byte(ba->size);
-                       
-                       if (annotations != NULL) {
-                               MCOPY(annotations->data, ba->data, uint8_t, ba->size);
-                       }
-               }
+       if (c->field_annotations != NULL && array_length_get(a) > slot) {
+               annotations = (java_handle_bytearray_t*)
+                       array_objectarray_element_get(
+                               c->field_annotations, slot);
        }
        
        return annotations;
index 3a97ab976c207c5194f1ba56ac95e76160ee4748..4f9dcd121ffe8076674a1ba7c0c12f9679a3da36 100644 (file)
@@ -22,7 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: field.h 8343 2007-08-17 21:39:32Z michi $
 */
 
 
index 7e7cd867a06b5d809aafe8f2dcf4303da47cddf7..df4911add3b1cb00aeea5c254ecf47f02200fec8 100644 (file)
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: linker.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
 #include "config.h"
 
 #include <assert.h>
+#include <stdint.h>
 
 #include "vm/types.h"
 
@@ -107,34 +106,35 @@ struct dummy_alignment_double_t {
 
 /* linker_init *****************************************************************
 
-   Initializes the linker subsystem.
+   Initializes the linker subsystem and links classes required for the
+   primitive table.
 
 *******************************************************************************/
 
-bool linker_init(void)
+void linker_preinit(void)
 {
        /* Check for if alignment for long and double matches what we
           assume for the current architecture. */
 
 #if defined(__I386__) || (defined(__ARM__) && !defined(__ARM_EABI__)) || (defined(__POWERPC__) && defined(__DARWIN__))
        if (OFFSET(dummy_alignment_long_t, l) != 4)
-               vm_abort("linker_init: long alignment is different from what assumed: %d != %d",
+               vm_abort("linker_preinit: long alignment is different from what assumed: %d != %d",
                                 OFFSET(dummy_alignment_long_t, l), 4);
 
        if (OFFSET(dummy_alignment_double_t, d) != 4)
-               vm_abort("linker_init: double alignment is different from what assumed: %d != %d",
+               vm_abort("linker_preinit: double alignment is different from what assumed: %d != %d",
                                 OFFSET(dummy_alignment_double_t, d), 4);
 #else
        if (OFFSET(dummy_alignment_long_t, l) != 8)
-               vm_abort("linker_init: long alignment is different from what assumed: %d != %d",
+               vm_abort("linker_preinit: long alignment is different from what assumed: %d != %d",
                                 OFFSET(dummy_alignment_long_t, l), 8);
 
        if (OFFSET(dummy_alignment_double_t, d) != 8)
-               vm_abort("linker_init: double alignment is different from what assumed: %d != %d",
+               vm_abort("linker_preinit: double alignment is different from what assumed: %d != %d",
                                 OFFSET(dummy_alignment_double_t, d), 8);
 #endif
 
-       /* reset interface index */
+       /* Reset interface index. */
 
        interfaceindex = 0;
 
@@ -146,94 +146,102 @@ bool linker_init(void)
        LOCK_INIT_OBJECT_LOCK(linker_classrenumber_lock);
 #endif
 
-       /* link java.lang.Class as first class of the system, because we
-       need it's vftbl for all other classes so we can use a class as
-       object */
+       /* Link the most basic classes. */
 
-       if (!link_class(class_java_lang_Class))
-               return false;
+       if (!link_class(class_java_lang_Object))
+               vm_abort("linker_preinit: linking java/lang/Object failed");
 
-       /* now set the header.vftbl of all classes which were created
-       before java.lang.Class was linked */
+#if defined(ENABLE_JAVASE)
+       if (!link_class(class_java_lang_Cloneable))
+               vm_abort("linker_preinit: linking java/lang/Cloneable failed");
 
-       class_postset_header_vftbl();
+       if (!link_class(class_java_io_Serializable))
+               vm_abort("linker_preinit: linking java/io/Serializable failed");
+#endif
+}
 
 
-       /* link important system classes */
+/* linker_init *****************************************************************
 
-       if (!link_class(class_java_lang_Object))
-               return false;
+   Links all classes required in the VM.
 
-       if (!link_class(class_java_lang_String))
-               return false;
+*******************************************************************************/
 
-#if defined(ENABLE_JAVASE)
-       if (!link_class(class_java_lang_Cloneable))
-               return false;
+void linker_init(void)
+{
+       /* Link java.lang.Class as first class of the system, because we
+       need it's vftbl for all other classes so we can use a class as
+       object. */
 
-       if (!link_class(class_java_io_Serializable))
-               return false;
-#endif
+       if (!link_class(class_java_lang_Class))
+               vm_abort("linker_init: linking java/lang/Class failed");
+
+       /* Now set the header.vftbl of all classes which were created
+       before java.lang.Class was linked. */
+
+       class_postset_header_vftbl();
 
-       /* link classes for wrapping primitive types */
+       /* Link primitive-type wrapping classes. */
 
 #if defined(ENABLE_JAVASE)
        if (!link_class(class_java_lang_Void))
-               return false;
+               vm_abort("linker_init: linking failed");
 #endif
 
        if (!link_class(class_java_lang_Boolean))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Byte))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Character))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Short))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Integer))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Long))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Float))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Double))
-               return false;
+               vm_abort("linker_init: linking failed");
 
+       /* Link important system classes. */
 
-       /* load some other important classes */
+       if (!link_class(class_java_lang_String))
+               vm_abort("linker_init: linking java/lang/String failed");
 
 #if defined(ENABLE_JAVASE)
        if (!link_class(class_java_lang_ClassLoader))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_SecurityManager))
-               return false;
+               vm_abort("linker_init: linking failed");
 #endif
 
        if (!link_class(class_java_lang_System))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_Thread))
-               return false;
+               vm_abort("linker_init: linking failed");
 
 #if defined(ENABLE_JAVASE)
        if (!link_class(class_java_lang_ThreadGroup))
-               return false;
+               vm_abort("linker_init: linking failed");
 #endif
 
 #if defined(WITH_CLASSPATH_GNU)
        if (!link_class(class_java_lang_VMSystem))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_VMThread))
-               return false;
+               vm_abort("linker_init: linking failed");
 #endif
 
 
@@ -241,30 +249,30 @@ bool linker_init(void)
 
 #if defined(ENABLE_JAVASE)
        if (!link_class(class_java_lang_StackTraceElement))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_reflect_Constructor))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_reflect_Field))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_lang_reflect_Method))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_security_PrivilegedAction))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        if (!link_class(class_java_util_Vector))
-               return false;
+               vm_abort("linker_init: linking failed");
 
 # if defined(WITH_CLASSPATH_SUN)
        if (!link_class(class_sun_reflect_MagicAccessorImpl))
-               return false;
+               vm_abort("linker_init: linking failed");
 # endif
 
        if (!link_class(arrayclass_java_lang_Object))
-               return false;
+               vm_abort("linker_init: linking failed");
 #endif
 
 
@@ -278,22 +286,26 @@ bool linker_init(void)
        pseudo_class_Arraystub->super.cls         = class_java_lang_Object;
 
 #if defined(ENABLE_JAVASE)
+
        pseudo_class_Arraystub->interfacescount   = 2;
        pseudo_class_Arraystub->interfaces        = MNEW(classref_or_classinfo, 2);
        pseudo_class_Arraystub->interfaces[0].cls = class_java_lang_Cloneable;
        pseudo_class_Arraystub->interfaces[1].cls = class_java_io_Serializable;
+
 #elif defined(ENABLE_JAVAME_CLDC1_1)
+
        pseudo_class_Arraystub->interfacescount   = 0;
        pseudo_class_Arraystub->interfaces        = NULL;
+
+#else
+# error unknown Java configuration
 #endif
 
-       if (!classcache_store_unique(pseudo_class_Arraystub)) {
-               log_text("could not cache pseudo_class_Arraystub");
-               assert(0);
-       }
+       if (!classcache_store_unique(pseudo_class_Arraystub))
+               vm_abort("linker_init: could not cache pseudo_class_Arraystub");
 
        if (!link_class(pseudo_class_Arraystub))
-               return false;
+               vm_abort("linker_init: linking pseudo_class_Arraystub failed");
 
        /* pseudo class representing the null type */
 
@@ -305,7 +317,7 @@ bool linker_init(void)
                vm_abort("linker_init: could not cache pseudo_class_Null");
 
        if (!link_class(pseudo_class_Null))
-               return false;
+               vm_abort("linker_init: linking failed");
 
        /* pseudo class representing new uninitialized objects */
     
@@ -321,8 +333,6 @@ bool linker_init(void)
           java/lang/String). */
 
        stringtable_update();
-
-       return true;
 }
 
 
@@ -349,9 +359,9 @@ classinfo *link_class(classinfo *c)
 
        LOCK_MONITOR_ENTER(c);
 
-       /* maybe the class is already linked */
+       /* Maybe the class is currently linking or is already linked.*/
 
-       if (c->state & CLASS_LINKED) {
+       if ((c->state & CLASS_LINKING) || (c->state & CLASS_LINKED)) {
                LOCK_MONITOR_EXIT(c);
 
                return c;
@@ -371,9 +381,10 @@ classinfo *link_class(classinfo *c)
 
        r = link_class_intern(c);
 
-       /* if return value is NULL, we had a problem and the class is not linked */
+       /* If return value is NULL, we had a problem and the class is not
+          linked. */
 
-       if (!r)
+       if (r == NULL)
                c->state &= ~CLASS_LINKING;
 
 #if defined(ENABLE_STATISTICS)
@@ -507,11 +518,6 @@ static classinfo *link_class_intern(classinfo *c)
 
        RT_TIMING_GET_TIME(time_start);
 
-       /* the class is already linked */
-
-       if (c->state & CLASS_LINKED)
-               return c;
-
 #if !defined(NDEBUG)
        if (linkverbose)
                log_message_class("Linking class: ", c);
@@ -522,6 +528,10 @@ static classinfo *link_class_intern(classinfo *c)
        /* XXX should this be a specific exception? */
        assert(c->state & CLASS_LOADED);
 
+       /* This is check in link_class. */
+
+       assert(!(c->state & CLASS_LINKED));
+
        /* cache the self-reference of this class                          */
        /* we do this for cases where the defining loader of the class     */
        /* has not yet been recorded as an initiating loader for the class */
@@ -581,15 +591,18 @@ static classinfo *link_class_intern(classinfo *c)
 
                c->finalizer = NULL;
 
-       } else {
-               /* resolve super class */
+       }
+       else {
+               /* Resolve super class. */
 
-               if ((super = resolve_classref_or_classinfo_eager(c->super, true)) == NULL)
+               super = resolve_classref_or_classinfo_eager(c->super, true);
+
+               if (super == NULL)
                        return NULL;
 
                c->super.cls = super;
                
-               /* detect circularity */
+               /* Detect circularity. */
 
                if (super == c) {
                        exceptions_throw_classcircularityerror(c);
index 2f5c17d7b87a632f862ce3f8f72d56f816274be2..35a2950a7b4378c1fc6bec4498b97b082c40632d 100644 (file)
@@ -22,7 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: linker.h 8343 2007-08-17 21:39:32Z michi $
 */
 
 
@@ -144,10 +143,8 @@ extern java_object_t *linker_classrenumber_lock;
 
 /* function prototypes ********************************************************/
 
-/* initialize the linker subsystem */
-bool linker_init(void);
-
-/* link a class */
+void       linker_preinit(void);
+void       linker_init(void);
 classinfo *link_class(classinfo *c);
 
 #endif /* _LINKER_H */
index 5e33409541320906ab0ee0a6347b6c2bfbbbc965..68e0edf4426a5ced0805df5e68f024cd2ce042a7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: loader.c 8374 2007-08-21 10:20:33Z michi $
-
 */
 
 
 static hashtable *hashtable_classloader;
 
 
-/* loader_init *****************************************************************
+/* loader_preinit **************************************************************
 
-   Initializes all lists and loads all classes required for the system
-   or the compiler.
+   Initializes the classpath list and loads classes required for the
+   primitive table.
 
 *******************************************************************************/
  
-bool loader_init(void)
+void loader_preinit(void)
 {
 #if defined(ENABLE_THREADS)
        list_classpath_entry *lce;
@@ -101,9 +99,10 @@ bool loader_init(void)
        /* Initialize the monitor pointer for zip/jar file locking. */
 
        for (lce = list_first(list_classpath_entries); lce != NULL;
-                lce = list_next(list_classpath_entries, lce))
+                lce = list_next(list_classpath_entries, lce)) {
                if (lce->type == CLASSPATH_ARCHIVE)
                        LOCK_INIT_OBJECT_LOCK(lce);
+       }
 #endif
 
        /* initialize classloader hashtable, 10 entries should be enough */
@@ -111,96 +110,104 @@ bool loader_init(void)
        hashtable_classloader = NEW(hashtable);
        hashtable_create(hashtable_classloader, 10);
 
-       /* load some important classes */
+       /* Load the most basic class. */
 
        if (!(class_java_lang_Object = load_class_bootstrap(utf_java_lang_Object)))
-               return false;
-
-       if (!(class_java_lang_String = load_class_bootstrap(utf_java_lang_String)))
-               return false;
+               vm_abort("loader_preinit: loading java/lang/Object failed");
 
 #if defined(ENABLE_JAVASE)
        if (!(class_java_lang_Cloneable =
                  load_class_bootstrap(utf_java_lang_Cloneable)))
-               return false;
+               vm_abort("loader_preinit: loading java/lang/Cloneable failed");
 
        if (!(class_java_io_Serializable =
                  load_class_bootstrap(utf_java_io_Serializable)))
-               return false;
+               vm_abort("loader_preinit: loading java/io/Serializable failed");
 #endif
+}
+
+
+/* loader_init *****************************************************************
 
-       /* load classes for wrapping primitive types */
+   Loads all classes required in the VM.
+
+*******************************************************************************/
+void loader_init(void)
+{
+       /* Load primitive-type wrapping classes. */
 
 #if defined(ENABLE_JAVASE)
        if (!(class_java_lang_Void = load_class_bootstrap(utf_java_lang_Void)))
-               return false;
+               vm_abort("loader_init: loading failed");
 #endif
 
        if (!(class_java_lang_Boolean =
                  load_class_bootstrap(utf_java_lang_Boolean)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Byte = load_class_bootstrap(utf_java_lang_Byte)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Character =
                  load_class_bootstrap(utf_java_lang_Character)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Short = load_class_bootstrap(utf_java_lang_Short)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Integer =
                  load_class_bootstrap(utf_java_lang_Integer)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Long = load_class_bootstrap(utf_java_lang_Long)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Float = load_class_bootstrap(utf_java_lang_Float)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Double = load_class_bootstrap(utf_java_lang_Double)))
-               return false;
-
+               vm_abort("loader_init: loading failed");
 
-       /* load some other important classes */
+       /* Load important system classes. */
 
        if (!(class_java_lang_Class = load_class_bootstrap(utf_java_lang_Class)))
-               return false;
+               vm_abort("loader_init: loading failed");
+
+       if (!(class_java_lang_String = load_class_bootstrap(utf_java_lang_String)))
+               vm_abort("loader_init: loading failed");
 
 #if defined(ENABLE_JAVASE)
        if (!(class_java_lang_ClassLoader =
                  load_class_bootstrap(utf_java_lang_ClassLoader)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_SecurityManager =
                  load_class_bootstrap(utf_java_lang_SecurityManager)))
-               return false;
+               vm_abort("loader_init: loading failed");
 #endif
 
        if (!(class_java_lang_System = load_class_bootstrap(utf_java_lang_System)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_Thread =
                  load_class_bootstrap(utf_new_char("java/lang/Thread"))))
-               return false;
+               vm_abort("loader_init: loading failed");
 
 #if defined(ENABLE_JAVASE)
        if (!(class_java_lang_ThreadGroup =
                  load_class_bootstrap(utf_java_lang_ThreadGroup)))
-               return false;
+               vm_abort("loader_init: loading failed");
 #endif
 
 #if defined(WITH_CLASSPATH_GNU)
        if (!(class_java_lang_VMSystem =
                  load_class_bootstrap(utf_new_char("java/lang/VMSystem"))))
-
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_VMThread =
                  load_class_bootstrap(utf_new_char("java/lang/VMThread"))))
-               return false;
+               vm_abort("loader_init: loading failed");
 #endif
 
 
@@ -209,50 +216,50 @@ bool loader_init(void)
 #if defined(ENABLE_JAVASE)
        if (!(class_java_lang_StackTraceElement =
                  load_class_bootstrap(utf_java_lang_StackTraceElement)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_reflect_Constructor =
                  load_class_bootstrap(utf_java_lang_reflect_Constructor)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_reflect_Field =
                  load_class_bootstrap(utf_java_lang_reflect_Field)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_lang_reflect_Method =
                  load_class_bootstrap(utf_java_lang_reflect_Method)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_security_PrivilegedAction =
                  load_class_bootstrap(utf_new_char("java/security/PrivilegedAction"))))
-               return false;
+               vm_abort("loader_init: loading failed");
 
        if (!(class_java_util_Vector = load_class_bootstrap(utf_java_util_Vector)))
-               return false;
+               vm_abort("loader_init: loading failed");
 
 # if defined(WITH_CLASSPATH_SUN)
        if (!(class_sun_reflect_MagicAccessorImpl =
                  load_class_bootstrap(utf_new_char("sun/reflect/MagicAccessorImpl"))))
-               return false;
+               vm_abort("loader_init: loading failed");
 # endif
 
        if (!(arrayclass_java_lang_Object =
                  load_class_bootstrap(utf_new_char("[Ljava/lang/Object;"))))
                return false;
 
-#if defined(ENABLE_ANNOTATIONS)
+# if defined(ENABLE_ANNOTATIONS)
        /* needed by annotation support */
        if (!(class_sun_reflect_ConstantPool = 
-                 load_class_bootstrap(utf_sun_reflect_ConstantPool)))
-               return false;
+                 load_class_bootstrap(utf_new_char("sun/reflect/ConstantPool"))))
+               vm_abort("loader_init: loading failed");
 
-#if defined(WITH_CLASSPATH_GNU)
+#  if defined(WITH_CLASSPATH_GNU)
        /* needed by GNU Classpaths annotation support */
        if (!(class_sun_reflect_annotation_AnnotationParser = 
-                 load_class_bootstrap(utf_sun_reflect_annotation_AnnotationParser)))
-               return false;
-#endif
-#endif
+                 load_class_bootstrap(utf_new_char("sun/reflect/annotation/AnnotationParser"))))
+               vm_abort("loader_init: loading failed");
+#  endif
+# endif
 #endif
 
 
@@ -1123,15 +1130,24 @@ classinfo *load_class_from_classloader(utf *name, classloader *cl)
                        }
                }
                
-               assert(class_java_lang_Object);
+#if defined(WITH_CLASSPATH_SUN)
+               /* OpenJDK uses this internal function because it's
+                  synchronized. */
 
                lc = class_resolveclassmethod(cl->object->vftbl->class,
+                                                                         utf_loadClassInternal,
+                                                                         utf_java_lang_String__java_lang_Class,
+                                                                         NULL,
+                                                                         true);
+#else
+               lc = class_resolveclassmethod(cl->vftbl->class,
                                                                          utf_loadClass,
                                                                          utf_java_lang_String__java_lang_Class,
-                                                                         class_java_lang_Object,
+                                                                         NULL,
                                                                          true);
+#endif
 
-               if (!lc)
+               if (lc == NULL)
                        return false; /* exception */
 
                /* move return value into `o' and cast it afterwards to a classinfo* */
@@ -1351,27 +1367,24 @@ classinfo *load_class_bootstrap(utf *name)
 }
 
 
-/* load_class_from_classbuffer *************************************************
+/* load_class_from_classbuffer_intern ******************************************
        
-   Loads everything interesting about a class from the class file. The
-   'classinfo' structure must have been allocated previously.
-
-   The super class and the interfaces implemented by this class need
-   not be loaded. The link is set later by the function 'class_link'.
+   Loads a class from a classbuffer into a given classinfo structure.
+   Super-classes are also loaded at this point and some verfication
+   checks are done.
 
    SYNCHRONIZATION:
        This function is NOT synchronized!
    
 *******************************************************************************/
 
-classinfo *load_class_from_classbuffer(classbuffer *cb)
+static bool load_class_from_classbuffer_intern(classbuffer *cb)
 {
        classinfo *c;
        utf *name;
        utf *supername;
        u4 i,j;
        u4 ma, mi;
-       s4 dumpsize;
        descriptor_pool *descpool;
 #if defined(ENABLE_STATISTICS)
        u4 classrefsize;
@@ -1386,44 +1399,18 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
 
        RT_TIMING_GET_TIME(time_start);
 
-       /* get the classbuffer's class */
+       /* Get the classbuffer's class. */
 
        c = cb->class;
 
-       /* the class is already loaded */
-
-       if (c->state & CLASS_LOADED)
-               return c;
-
-#if defined(ENABLE_STATISTICS)
-       if (opt_stat)
-               count_class_loads++;
-#endif
-
-#if !defined(NDEBUG)
-       /* output for debugging purposes */
-
-       if (loadverbose)
-               log_message_class("Loading class: ", c);
-#endif
-
-       /* mark start of dump memory area */
-
-       dumpsize = dump_size();
-
-       /* class is currently loading */
-
-       c->state |= CLASS_LOADING;
-
        if (!suck_check_classbuffer_size(cb, 4 + 2 + 2))
-               goto return_exception;
+               return false;
 
        /* check signature */
 
        if (suck_u4(cb) != MAGIC) {
                exceptions_throw_classformaterror(c, "Bad magic number");
-
-               goto return_exception;
+               return false;
        }
 
        /* check version */
@@ -1433,7 +1420,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
 
        if (!(ma < MAJOR_VERSION || (ma == MAJOR_VERSION && mi <= MINOR_VERSION))) {
                exceptions_throw_unsupportedclassversionerror(c, ma, mi);
-               goto return_exception;
+               return false;
        }
 
        RT_TIMING_GET_TIME(time_checks);
@@ -1447,14 +1434,14 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        /* load the constant pool */
 
        if (!load_constantpool(cb, descpool))
-               goto return_exception;
+               return false;
 
        RT_TIMING_GET_TIME(time_cpool);
 
        /* ACC flags */
 
        if (!suck_check_classbuffer_size(cb, 2))
-               goto return_exception;
+               return false;
 
        /* We OR the flags here, as we set already some flags in
           class_create_classinfo. */
@@ -1475,7 +1462,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                        exceptions_throw_classformaterror(c,
                                                                                          "Illegal class modifiers: 0x%X",
                                                                                          c->flags);
-                       goto return_exception;
+                       return false;
                }
 
                if (c->flags & ACC_SUPER) {
@@ -1487,18 +1474,18 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                exceptions_throw_classformaterror(c,
                                                                                  "Illegal class modifiers: 0x%X",
                                                                                  c->flags);
-               goto return_exception;
+               return false;
        }
 
        if (!suck_check_classbuffer_size(cb, 2 + 2))
-               goto return_exception;
+               return false;
 
        /* this class */
 
        i = suck_u2(cb);
 
        if (!(name = (utf *) class_getconstant(c, i, CONSTANT_Class)))
-               goto return_exception;
+               return false;
 
        if (c->name == utf_not_named_yet) {
                /* we finally have a name for this class */
@@ -1507,7 +1494,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        }
        else if (name != c->name) {
                exceptions_throw_noclassdeffounderror_wrong_name(c, name);
-               goto return_exception;
+               return false;
        }
 
        /* retrieve superclass */
@@ -1516,48 +1503,49 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
 
        if ((i = suck_u2(cb))) {
                if (!(supername = (utf *) class_getconstant(c, i, CONSTANT_Class)))
-                       goto return_exception;
+                       return false;
 
                /* java.lang.Object may not have a super class. */
 
                if (c->name == utf_java_lang_Object) {
                        exceptions_throw_classformaterror(NULL, "java.lang.Object with superclass");
-                       goto return_exception;
+                       return false;
                }
 
                /* Interfaces must have java.lang.Object as super class. */
 
                if ((c->flags & ACC_INTERFACE) && (supername != utf_java_lang_Object)) {
                        exceptions_throw_classformaterror(c, "Interfaces must have java.lang.Object as superclass");
-                       goto return_exception;
+                       return false;
                }
-
-       else {
+       }
+       else {
                supername = NULL;
 
                /* This is only allowed for java.lang.Object. */
 
                if (c->name != utf_java_lang_Object) {
                        exceptions_throw_classformaterror(c, "Bad superclass index");
-                       goto return_exception;
+                       return false;
                }
        }
 
        /* retrieve interfaces */
 
        if (!suck_check_classbuffer_size(cb, 2))
-               goto return_exception;
+               return false;
 
        c->interfacescount = suck_u2(cb);
 
        if (!suck_check_classbuffer_size(cb, 2 * c->interfacescount))
-               goto return_exception;
+               return false;
 
        c->interfaces = MNEW(classref_or_classinfo, c->interfacescount);
+
        for (i = 0; i < c->interfacescount; i++) {
                /* the classrefs are created later */
                if (!(c->interfaces[i].any = (utf *) class_getconstant(c, suck_u2(cb), CONSTANT_Class)))
-                       goto return_exception;
+                       return false;
        }
 
        RT_TIMING_GET_TIME(time_setup);
@@ -1565,7 +1553,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        /* load fields */
 
        if (!suck_check_classbuffer_size(cb, 2))
-               goto return_exception;
+               return false;
 
        c->fieldscount = suck_u2(cb);
        c->fields      = MNEW(fieldinfo, c->fieldscount);
@@ -1574,7 +1562,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
 
        for (i = 0; i < c->fieldscount; i++) {
                if (!field_load(cb, &(c->fields[i]), descpool))
-                       goto return_exception;
+                       return false;
        }
 
        RT_TIMING_GET_TIME(time_fields);
@@ -1582,7 +1570,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        /* load methods */
 
        if (!suck_check_classbuffer_size(cb, 2))
-               goto return_exception;
+               return false;
 
        c->methodscount = suck_u2(cb);
        c->methods      = MNEW(methodinfo, c->methodscount);
@@ -1591,7 +1579,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        
        for (i = 0; i < c->methodscount; i++) {
                if (!method_load(cb, &(c->methods[i]), descpool))
-                       goto return_exception;
+                       return false;
        }
 
        RT_TIMING_GET_TIME(time_methods);
@@ -1632,7 +1620,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        if (supername) {
                c->super.ref = descriptor_pool_lookup_classref(descpool, supername);
                if (!c->super.ref)
-                       goto return_exception;
+                       return false;
        }
 
        /* set the super interfaces references */
@@ -1642,7 +1630,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                        descriptor_pool_lookup_classref(descpool,
                                                                                        (utf *) c->interfaces[i].any);
                if (!c->interfaces[i].ref)
-                       goto return_exception;
+                       return false;
        }
 
        RT_TIMING_GET_TIME(time_setrefs);
@@ -1654,7 +1642,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                        descriptor_pool_parse_field_descriptor(descpool,
                                                                                                   c->fields[i].descriptor);
                if (!c->fields[i].parseddesc)
-                       goto return_exception;
+                       return false;
        }
 
        RT_TIMING_GET_TIME(time_parsefds);
@@ -1667,23 +1655,25 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                        descriptor_pool_parse_method_descriptor(descpool, m->descriptor,
                                                                                                        m->flags, class_get_self_classref(m->class));
                if (!m->parseddesc)
-                       goto return_exception;
+                       return false;
 
                for (j = 0; j < m->rawexceptiontablelength; j++) {
                        if (!m->rawexceptiontable[j].catchtype.any)
                                continue;
+
                        if ((m->rawexceptiontable[j].catchtype.ref =
                                 descriptor_pool_lookup_classref(descpool,
                                                (utf *) m->rawexceptiontable[j].catchtype.any)) == NULL)
-                               goto return_exception;
+                               return false;
                }
 
                for (j = 0; j < m->thrownexceptionscount; j++) {
                        if (!m->thrownexceptions[j].any)
                                continue;
+
                        if ((m->thrownexceptions[j].ref = descriptor_pool_lookup_classref(descpool,
                                                (utf *) m->thrownexceptions[j].any)) == NULL)
-                               goto return_exception;
+                               return false;
                }
        }
 
@@ -1702,13 +1692,14 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                                descriptor_pool_parse_field_descriptor(descpool,
                                                                                                           fmi->descriptor);
                        if (!fmi->parseddesc.fd)
-                               goto return_exception;
+                               return false;
+
                        index = fmi->p.index;
                        fmi->p.classref =
                                (constant_classref *) class_getconstant(c, index,
                                                                                                                CONSTANT_Class);
                        if (!fmi->p.classref)
-                               goto return_exception;
+                               return false;
                        break;
                case CONSTANT_Methodref:
                case CONSTANT_InterfaceMethodref:
@@ -1718,14 +1709,14 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                                (constant_classref *) class_getconstant(c, index,
                                                                                                                CONSTANT_Class);
                        if (!fmi->p.classref)
-                               goto return_exception;
+                               return false;
                        fmi->parseddesc.md =
                                descriptor_pool_parse_method_descriptor(descpool,
                                                                                                                fmi->descriptor,
                                                                                                                ACC_UNDEF,
                                                                                                                fmi->p.classref);
                        if (!fmi->parseddesc.md)
-                               goto return_exception;
+                               return false;
                        break;
                }
        }
@@ -1781,7 +1772,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                                        if (c->fields[old].name == fi->name &&
                                                c->fields[old].descriptor == fi->descriptor) {
                                                exceptions_throw_classformaterror(c, "Repetitive field name/signature");
-                                               goto return_exception;
+                                               return false;
                                        }
                                } while ((old = next[old]));
                        }
@@ -1798,13 +1789,6 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                        index = ((((size_t) mi->name) +
                                          ((size_t) mi->descriptor)) >> shift) % hashlen;
 
-                       /*{ JOWENN
-                               int dbg;
-                               for (dbg=0;dbg<hashlen+hashlen/5;++dbg){
-                                       printf("Hash[%d]:%d\n",dbg,hashtab[dbg]);
-                               }
-                       }*/
-
                        if ((old = hashtab[index])) {
                                old--;
                                next[i] = old;
@@ -1812,7 +1796,7 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
                                        if (c->methods[old].name == mi->name &&
                                                c->methods[old].descriptor == mi->descriptor) {
                                                exceptions_throw_classformaterror(c, "Repetitive method name/signature");
-                                               goto return_exception;
+                                               return false;
                                        }
                                } while ((old = next[old]));
                        }
@@ -1836,12 +1820,11 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        /* load attribute structures */
 
        if (!class_load_attributes(cb))
-               goto return_exception;
+               return false;
 
-       /* Pre Java 1.5 version don't check this. This implementation is like
-          Java 1.5 do it: for class file version 45.3 we don't check it, older
-          versions are checked.
-        */
+       /* Pre Java 1.5 version don't check this. This implementation is
+          like Java 1.5 do it: for class file version 45.3 we don't check
+          it, older versions are checked. */
 
        if (((ma == 45) && (mi > 3)) || (ma > 45)) {
                /* check if all data has been read */
@@ -1849,32 +1832,12 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
 
                if (classdata_left > 0) {
                        exceptions_throw_classformaterror(c, "Extra bytes at the end of class file");
-                       goto return_exception;
+                       return false;
                }
        }
 
        RT_TIMING_GET_TIME(time_attrs);
 
-       /* release dump area */
-
-       dump_release(dumpsize);
-
-       /* revert loading state and class is loaded */
-
-       c->state = (c->state & ~CLASS_LOADING) | CLASS_LOADED;
-
-#if defined(ENABLE_JVMTI)
-       /* fire Class Prepare JVMTI event */
-
-       if (jvmti)
-               jvmti_ClassLoadPrepare(true, c);
-#endif
-
-#if !defined(NDEBUG)
-       if (loadverbose)
-               log_message_class("Loading done class: ", c);
-#endif
-
        RT_TIMING_TIME_DIFF(time_start     , time_checks    , RT_TIMING_LOAD_CHECKS);
        RT_TIMING_TIME_DIFF(time_checks    , time_ndpool    , RT_TIMING_LOAD_NDPOOL);
        RT_TIMING_TIME_DIFF(time_ndpool    , time_cpool     , RT_TIMING_LOAD_CPOOL);
@@ -1891,16 +1854,87 @@ classinfo *load_class_from_classbuffer(classbuffer *cb)
        RT_TIMING_TIME_DIFF(time_verify    , time_attrs     , RT_TIMING_LOAD_ATTRS);
        RT_TIMING_TIME_DIFF(time_start     , time_attrs     , RT_TIMING_LOAD_TOTAL);
 
-       return c;
+       return true;
+}
+
+
+/* load_class_from_classbuffer *************************************************
 
-return_exception:
-       /* release dump area */
+   Convenience wrapper for load_class_from_classbuffer.
+
+   SYNCHRONIZATION:
+       This function is NOT synchronized!
+   
+*******************************************************************************/
+
+classinfo *load_class_from_classbuffer(classbuffer *cb)
+{
+       classinfo *c;
+       int32_t    dumpsize;
+       bool       result;
+
+       /* Get the classbuffer's class. */
+
+       c = cb->class;
+
+       /* Check if the class is already loaded. */
+
+       if (c->state & CLASS_LOADED)
+               return c;
+
+#if defined(ENABLE_STATISTICS)
+       if (opt_stat)
+               count_class_loads++;
+#endif
+
+#if !defined(NDEBUG)
+       if (loadverbose)
+               log_message_class("Loading class: ", c);
+#endif
+
+       /* Mark start of dump memory area. */
+
+       dumpsize = dump_size();
+
+       /* Class is currently loading. */
+
+       c->state |= CLASS_LOADING;
+
+       /* Parse the classbuffer. */
+
+       result = load_class_from_classbuffer_intern(cb);
+
+       /* Release dump area. */
 
        dump_release(dumpsize);
 
-       /* an exception has been thrown */
+       /* An error occurred. */
 
-       return NULL;
+       if (result == false) {
+               /* Revert loading state. */
+
+               c->state = (c->state & ~CLASS_LOADING);
+
+               return NULL;
+       }
+
+       /* Revert loading state and set loaded. */
+
+       c->state = (c->state & ~CLASS_LOADING) | CLASS_LOADED;
+
+#if defined(ENABLE_JVMTI)
+       /* fire Class Prepare JVMTI event */
+
+       if (jvmti)
+               jvmti_ClassLoadPrepare(true, c);
+#endif
+
+#if !defined(NDEBUG)
+       if (loadverbose)
+               log_message_class("Loading done class: ", c);
+#endif
+
+       return c;
 }
 
 
index 09a382e918ec1919b8776a13994ea3a7bf138e1b..3295ef6b570324ef30b448b8dfdcdaaffdd4df2a 100644 (file)
@@ -22,7 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: loader.h 8324 2007-08-16 16:48:12Z michi $
 */
 
 
@@ -132,8 +131,8 @@ typedef hashtable_classloader_entry classloader;
 
 /* function prototypes ********************************************************/
 
-/* initialize loader, load important systemclasses */
-bool loader_init(void);
+void loader_preinit(void);
+void loader_init(void);
 
 /* classloader management functions */
 classloader *loader_hashtable_classloader_add(java_handle_t *cl);
index a9e90c3f9296469193c0533807f3eb1361b4a1cd..8cd8c9a19e98691a000b6cf2d665ae163379b468 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: method.c 8343 2007-08-17 21:39:32Z michi $
-
 */
 
 
@@ -41,6 +39,7 @@
 
 #include "threads/lock-common.h"
 
+#include "vm/array.h"
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
 #include "vm/global.h"
@@ -787,23 +786,17 @@ java_handle_bytearray_t *method_get_annotations(methodinfo *m)
 #if defined(ENABLE_ANNOTATIONS)
        classinfo               *c;
        int                      slot;
-       annotation_bytearray_t  *ba;
        java_handle_bytearray_t *annotations;
+       java_handle_t           *a;
 
        c           = m->class;
        slot        = m - c->methods;
        annotations = NULL;
+       a           = (java_handle_t*)c->method_annotations;
        
-       if (c->method_annotations != NULL && c->method_annotations->size > slot) {
-               ba = c->method_annotations->data[slot];
-               
-               if (ba != NULL) {
-                       annotations = builtin_newarray_byte(ba->size);
-                       
-                       if (annotations != NULL) {
-                               MCOPY(annotations->data, ba->data, uint8_t, ba->size);
-                       }
-               }
+       if (c->method_annotations != NULL && array_length_get(a) > slot) {
+               annotations = (java_handle_bytearray_t*)array_objectarray_element_get(
+                       c->method_annotations, slot);
        }
        
        return annotations;
@@ -824,24 +817,18 @@ java_handle_bytearray_t *method_get_parameterannotations(methodinfo *m)
 #if defined(ENABLE_ANNOTATIONS)
        classinfo               *c;
        int                      slot;
-       annotation_bytearray_t  *ba;
        java_handle_bytearray_t *parameterAnnotations;
+       java_handle_t           *a;
 
        c                    = m->class;
        slot                 = m - c->methods;
        parameterAnnotations = NULL;
+       a                    = (java_handle_t*)c->method_parameterannotations;
 
-       if (c->method_parameterannotations != NULL &&
-               c->method_parameterannotations->size > slot) {
-               ba = c->method_parameterannotations->data[slot];
-               
-               if (ba != NULL) {
-                       parameterAnnotations = builtin_newarray_byte(ba->size);
-                       
-                       if (parameterAnnotations != NULL) {
-                               MCOPY(parameterAnnotations->data, ba->data, uint8_t, ba->size);
-                       }
-               }
+       if (c->method_parameterannotations != NULL && array_length_get(a) > slot) {
+               parameterAnnotations =
+                       (java_handle_bytearray_t*)array_objectarray_element_get(
+                               c->method_parameterannotations, slot);
        }
        
        return parameterAnnotations;
@@ -862,24 +849,18 @@ java_handle_bytearray_t *method_get_annotationdefault(methodinfo *m)
 #if defined(ENABLE_ANNOTATIONS)
        classinfo               *c;
        int                      slot;
-       annotation_bytearray_t  *ba;
        java_handle_bytearray_t *annotationDefault;
+       java_handle_t           *a;
 
        c                 = m->class;
        slot              = m - c->methods;
        annotationDefault = NULL;
+       a                 = (java_handle_t*)c->method_annotationdefaults;
 
-       if (c->method_annotationdefaults != NULL &&
-               c->method_annotationdefaults->size > slot) {
-               ba = c->method_annotationdefaults->data[slot];
-               
-               if (ba != NULL) {
-                       annotationDefault = builtin_newarray_byte(ba->size);
-                       
-                       if (annotationDefault != NULL) {
-                               MCOPY(annotationDefault->data, ba->data, uint8_t, ba->size);
-                       }
-               }
+       if (c->method_annotationdefaults != NULL && array_length_get(a) > slot) {
+               annotationDefault = 
+                       (java_handle_bytearray_t*)array_objectarray_element_get(
+                               c->method_annotationdefaults, slot);
        }
        
        return annotationDefault;
index 724cc14ba5ea9d0d640a3a2d9e2e03fee1836ff8..73b67e90316174fe7f1a41e823f3c022219f0164 100644 (file)
@@ -22,7 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: method.h 8343 2007-08-17 21:39:32Z michi $
 */
 
 
index a55fbbdd9d033ee5a790a3f69ec8caf099d337c6..8fc1216d387bc6443c65e0d09c8a66fcbd6be283 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: options.c 8236 2007-07-27 10:18:17Z twisti $
-
 */
 
 
index dd319945c81ad9b7b4b0172543577a0b0f13d5d7..6e9b7b4a99c6686268ddb7de09c99f0809c311a5 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: options.h 8236 2007-07-27 10:18:17Z twisti $
-
 */
 
 
diff --git a/src/vmcore/primitivecore.c b/src/vmcore/primitivecore.c
new file mode 100644 (file)
index 0000000..a1bb2a7
--- /dev/null
@@ -0,0 +1,241 @@
+/* src/vmcore/primitivecore.c - core functions for primitive types
+
+   Copyright (C) 2007 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.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+*/
+
+
+#include "config.h"
+
+#include <assert.h>
+#include <stdint.h>
+
+#include "vm/global.h"
+#include "vm/primitive.h"
+#include "vm/vm.h"
+
+#include "vmcore/class.h"
+#include "vmcore/utf8.h"
+
+
+/* primitivetype_table *********************************************************
+
+   Structure for primitive classes: contains the class for wrapping
+   the primitive type, the primitive class, the name of the class for
+   wrapping, the one character type signature and the name of the
+   primitive class.
+   CAUTION: Don't change the order of the types. This table is indexed
+   by the ARRAYTYPE_ constants (except ARRAYTYPE_OBJECT).
+
+*******************************************************************************/
+
+primitivetypeinfo primitivetype_table[PRIMITIVETYPE_COUNT] = {
+       { "int"     , NULL, NULL, NULL, "java/lang/Integer",   'I', "[I", NULL },
+       { "long"    , NULL, NULL, NULL, "java/lang/Long",      'J', "[J", NULL },
+       { "float"   , NULL, NULL, NULL, "java/lang/Float",     'F', "[F", NULL },
+       { "double"  , NULL, NULL, NULL, "java/lang/Double",    'D', "[D", NULL },
+       { NULL      , NULL, NULL, NULL, NULL,                   0 , NULL, NULL },
+       { "byte"    , NULL, NULL, NULL, "java/lang/Byte",      'B', "[B", NULL },
+       { "char"    , NULL, NULL, NULL, "java/lang/Character", 'C', "[C", NULL },
+       { "short"   , NULL, NULL, NULL, "java/lang/Short",     'S', "[S", NULL },
+       { "boolean" , NULL, NULL, NULL, "java/lang/Boolean",   'Z', "[Z", NULL },
+       { NULL      , NULL, NULL, NULL, NULL,                   0 , NULL, NULL },
+#if defined(ENABLE_JAVASE)
+       { "void"    , NULL, NULL, NULL, "java/lang/Void",      'V', NULL, NULL }
+#else
+       { NULL      , NULL, NULL, NULL, NULL,                   0 , NULL, NULL },
+#endif
+};
+
+
+/* primitive_preinit ***********************************************************
+
+   Fill the primitive type table with the primitive-type classes,
+   array-classes and wrapper classes.  This is important in the VM
+   startup.
+
+   We split this primitive-type table initialization because of
+   annotations in the bootstrap classes.
+
+   But we may get a problem if we have annotations in:
+
+   java/lang/Object
+   java/lang/Cloneable
+   java/io/Serializable
+
+   Also see: loader_preinit and linker_preinit.
+
+*******************************************************************************/
+
+void primitive_init(void)
+{  
+       utf       *name;
+       classinfo *c;
+       utf       *u;
+       classinfo *ac;
+       int        i;
+
+       /* Load and link primitive-type classes and array-classes. */
+
+       for (i = 0; i < PRIMITIVETYPE_COUNT; i++) {
+               /* Skip dummy entries. */
+
+               if (primitivetype_table[i].cname == NULL)
+                       continue;
+
+               /* create UTF-8 name */
+
+               name = utf_new_char(primitivetype_table[i].cname);
+
+               primitivetype_table[i].name = name;
+
+               /* create primitive class */
+
+               c = class_create_classinfo(name);
+
+               /* primitive classes don't have a super class */
+
+               c->super.any = NULL;
+
+               /* set flags and mark it as primitive class */
+
+               c->flags = ACC_PUBLIC | ACC_FINAL | ACC_ABSTRACT | ACC_CLASS_PRIMITIVE;
+               
+               /* prevent loader from loading primitive class */
+
+               c->state |= CLASS_LOADED;
+
+               /* INFO: don't put primitive classes into the classcache */
+
+               if (!link_class(c))
+                       vm_abort("linker_init: linking failed");
+
+               /* Just to be sure. */
+
+               assert(c->state & CLASS_LOADED);
+               assert(c->state & CLASS_LINKED);
+
+               primitivetype_table[i].class_primitive = c;
+
+               /* Create primitive array class. */
+
+               if (primitivetype_table[i].arrayname != NULL) {
+                       u  = utf_new_char(primitivetype_table[i].arrayname);
+                       ac = class_create_classinfo(u);
+                       ac = load_newly_created_array(ac, NULL);
+
+                       if (ac == NULL)
+                               vm_abort("primitive_init: loading failed");
+
+                       assert(ac->state & CLASS_LOADED);
+
+                       if (!link_class(ac))
+                               vm_abort("primitive_init: linking failed");
+
+                       /* Just to be sure. */
+
+                       assert(ac->state & CLASS_LOADED);
+                       assert(ac->state & CLASS_LINKED);
+
+                       primitivetype_table[i].arrayclass = ac;
+               }
+       }
+
+       /* We use two for-loops to have the array-classes already in the
+          primitive-type table (hint: annotations in wrapper-classes). */
+
+       for (i = 0; i < PRIMITIVETYPE_COUNT; i++) {
+               /* Skip dummy entries. */
+
+               if (primitivetype_table[i].cname == NULL)
+                       continue;
+
+               /* Create class for wrapping the primitive type. */
+
+               u = utf_new_char(primitivetype_table[i].wrapname);
+               c = load_class_bootstrap(u);
+
+               if (c == NULL)
+                       vm_abort("primitive_init: loading failed");
+
+               if (!link_class(c))
+                       vm_abort("primitive_init: linking failed");
+
+               /* Just to be sure. */
+
+               assert(c->state & CLASS_LOADED);
+               assert(c->state & CLASS_LINKED);
+
+               primitivetype_table[i].class_wrap = c;
+       }
+}
+
+
+/* primitive_postinit **********************************************************
+
+   Finish the primitive-type table initialization.  In this step we
+   set the vftbl of the primitive-type classes.
+
+   This is necessary because java/lang/Class is loaded and linked
+   after the primitive types have been linked.
+
+   We have to do that in an extra function, as the primitive types are
+   not stored in the classcache.
+
+*******************************************************************************/
+
+void primitive_postinit(void)
+{
+       classinfo *c;
+       int        i;
+
+       assert(class_java_lang_Class);
+       assert(class_java_lang_Class->vftbl);
+
+       for (i = 0; i < PRIMITIVETYPE_COUNT; i++) {
+               /* Skip dummy entries. */
+
+               if (primitivetype_table[i].cname == NULL)
+                       continue;
+
+               c = primitivetype_table[i].class_primitive;
+
+               c->object.header.vftbl = class_java_lang_Class->vftbl;
+       }
+}
+
+
+/*
+ * These are local overrides for various environment variables in Emacs.
+ * Please do not remove this and leave it at the end of the file, where
+ * Emacs will automagically detect them.
+ * ---------------------------------------------------------------------
+ * Local variables:
+ * mode: c
+ * indent-tabs-mode: t
+ * c-basic-offset: 4
+ * tab-width: 4
+ * End:
+ * vim:noexpandtab:sw=4:ts=4:
+ */
index 04344fb874fc89b55d557831dbb6d83a99623371..6d2eec40590fb2213742b3abb910445bf6dc2b00 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: references.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 #ifndef _REFERENCES_H_
index f8e32889f6966d22ec6a634246d7440f3a850b28..7e535bef0fd4cd1f698ca7815b5d034014f73487 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index 88955dcddb7559f127d9ad3857f486bac6b64b31..d78e8c986420da1eaac8557c227e7ab86a1df4d7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id$
-
 */
 
 
index c29d7267b36a20c47097c6fb672753a04876ca7c..e5b93389a4d93b9ba5eb62d1bf85d5fa47696a75 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: utf8.h 5920 2006-11-05 21:23:09Z twisti $
-
 */
 
 
index e8e519ac777c3d3be13c9c3fe663245e8159572d..973941a7623e9611e46b1f436e7b7c17f5d37567 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: utf8.h 5920 2006-11-05 21:23:09Z twisti $
-
 */
 
 
index 2a40b363ed89cd358bc8295ca5dad48d88a6bb2f..3f4810115d5e3369541cb873e57b09d5d9a76124 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: statistics.c 8199 2007-07-13 00:39:49Z michi $
-
 */
 
 
index a5b25d080dac378594ec6b21cdcb787bbebf8dab..82e23d7e99359d6575fdd3018e8b1a4f474bf9db 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: statistics.h 8199 2007-07-13 00:39:49Z michi $
-
 */
 
 
index f46d243cf479667634995f6c97082593539abcbc..1f3638a550d6ca3c8a0ed7c30f77fb2666e396e7 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: suck.c 8236 2007-07-27 10:18:17Z twisti $
-
 */
 
 
@@ -244,7 +242,8 @@ void suck_add_from_property(char *key)
        s4              n;
        s4              i;
        s4              namlen;
-       char           *tmpbootclasspath;
+       char           *boot_class_path;
+       char           *p;
 
        /* get the property value */
 
@@ -293,40 +292,33 @@ void suck_add_from_property(char *key)
                                        namlen = strlen(namelist[i]->d_name);
 #endif
 
-                                       /* reallocate memory for bootclasspath */
-
-                                       tmpbootclasspath = MNEW(char,
-                                                                                       pathlen + strlen("/") + namlen +
-                                                                                       strlen(":") +
-                                                                                       strlen(_Jv_bootclasspath) +
-                                                                                       strlen("0"));
-
-                                       /* prepend the file found to bootclasspath */
+                                       /* Allocate memory for bootclasspath. */
 
-                                       strcpy(tmpbootclasspath, path);
-                                       strcat(tmpbootclasspath, "/");
-                                       strcat(tmpbootclasspath, namelist[i]->d_name);
-                                       strcat(tmpbootclasspath, ":");
+                                       boot_class_path = properties_get("sun.boot.class.path");
 
-                                       strcat(tmpbootclasspath, _Jv_bootclasspath);
+                                       p = MNEW(char,
+                                                        pathlen + strlen("/") + namlen +
+                                                        strlen(":") +
+                                                        strlen(boot_class_path) +
+                                                        strlen("0"));
 
-                                       /* free old bootclasspath memory */
+                                       /* Prepend the file found to the bootclasspath. */
 
-                                       MFREE(_Jv_bootclasspath, u1, strlen(_Jv_bootclasspath));
+                                       strcpy(p, path);
+                                       strcat(p, "/");
+                                       strcat(p, namelist[i]->d_name);
+                                       strcat(p, ":");
+                                       strcat(p, boot_class_path);
 
-                                       /* and set the new bootclasspath */
+                                       properties_add("sun.boot.class.path", p);
+                                       properties_add("java.boot.class.path", p);
 
-                                       _Jv_bootclasspath = tmpbootclasspath;
+                                       MFREE(boot_class_path, char, strlen(boot_class_path));
 
                                        /* free the memory allocated by scandir */
                                        /* (We use `free` as the memory came from the C library.) */
 
                                        free(namelist[i]);
-
-#if defined(ENABLE_JAVASE)
-                                       properties_add("java.boot.class.path", _Jv_bootclasspath);
-                                       properties_add("sun.boot.class.path", _Jv_bootclasspath);
-#endif
                                }
                        }
 
index 63543f411d6268332da1d38f896af3a614697199..cc29e061f63a8d16ccccbc3fa398aee34d2d10c1 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: suck.h 8295 2007-08-11 17:57:24Z michi $
-
 */
 
 
index 65cf490a60a635ce57002208a19e06390afe476d..99ccb65439b68e5a750c048c98fe1f9768ac782f 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: utf8.c 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
@@ -155,11 +153,6 @@ utf *utf_Signature;
 utf *utf_StackMapTable;
 
 #if defined(ENABLE_ANNOTATIONS)
-utf *utf_sun_reflect_ConstantPool;
-#if defined(WITH_CLASSPATH_GNU)
-utf *utf_sun_reflect_annotation_AnnotationParser;
-#endif
-
 utf *utf_RuntimeVisibleAnnotations;
 utf *utf_RuntimeInvisibleAnnotations;
 utf *utf_RuntimeVisibleParameterAnnotations;
@@ -180,6 +173,7 @@ utf *utf_addThread;
 utf *utf_removeThread;
 utf *utf_put;
 utf *utf_get;
+utf *utf_uncaughtException;
 utf *utf_value;
 
 utf *utf_fillInStackTrace;
@@ -187,6 +181,7 @@ utf *utf_findNative;
 utf *utf_getSystemClassLoader;
 utf *utf_initCause;
 utf *utf_loadClass;
+utf *utf_loadClassInternal;
 utf *utf_printStackTrace;
 
 utf *utf_division_by_zero;
@@ -219,6 +214,7 @@ utf *utf_java_lang_Object__java_lang_Object;
 utf *utf_java_lang_String__void;        /* (Ljava/lang/String;)V              */
 utf *utf_java_lang_String__java_lang_Class;
 utf *utf_java_lang_Thread__V;           /* (Ljava/lang/Thread;)V              */
+utf *utf_java_lang_Thread_java_lang_Throwable__V;
 utf *utf_java_lang_Throwable__void;     /* (Ljava/lang/Throwable;)V           */
 utf *utf_java_lang_Throwable__java_lang_Throwable;
 
@@ -408,11 +404,6 @@ bool utf8_init(void)
        utf_StackMapTable              = utf_new_char("StackMapTable");
 
 #if defined(ENABLE_ANNOTATIONS)
-       utf_sun_reflect_ConstantPool                = utf_new_char("sun/reflect/ConstantPool");
-#if defined(WITH_CLASSPATH_GNU)
-       utf_sun_reflect_annotation_AnnotationParser = utf_new_char("sun/reflect/annotation/AnnotationParser");
-#endif
-
        utf_RuntimeVisibleAnnotations            = utf_new_char("RuntimeVisibleAnnotations");
        utf_RuntimeInvisibleAnnotations          = utf_new_char("RuntimeInvisibleAnnotations");
        utf_RuntimeVisibleParameterAnnotations   = utf_new_char("RuntimeVisibleParameterAnnotations");
@@ -433,6 +424,7 @@ bool utf8_init(void)
        utf_removeThread               = utf_new_char("removeThread");
        utf_put                        = utf_new_char("put");
        utf_get                        = utf_new_char("get");
+       utf_uncaughtException          = utf_new_char("uncaughtException");
        utf_value                      = utf_new_char("value");
 
        utf_fillInStackTrace           = utf_new_char("fillInStackTrace");
@@ -440,6 +432,7 @@ bool utf8_init(void)
        utf_getSystemClassLoader       = utf_new_char("getSystemClassLoader");
        utf_initCause                  = utf_new_char("initCause");
        utf_loadClass                  = utf_new_char("loadClass");
+       utf_loadClassInternal          = utf_new_char("loadClassInternal");
        utf_printStackTrace            = utf_new_char("printStackTrace");
 
        utf_division_by_zero           = utf_new_char("/ by zero");
@@ -482,6 +475,10 @@ bool utf8_init(void)
                utf_new_char("(Ljava/lang/String;)Ljava/lang/Class;");
 
        utf_java_lang_Thread__V        = utf_new_char("(Ljava/lang/Thread;)V");
+
+       utf_java_lang_Thread_java_lang_Throwable__V =
+               utf_new_char("(Ljava/lang/Thread;Ljava/lang/Throwable;)V");
+
        utf_java_lang_Throwable__void  = utf_new_char("(Ljava/lang/Throwable;)V");
 
        utf_java_lang_Throwable__java_lang_Throwable =
index f0a654d3fc30867911d748f2444c3634aedf9542..46802a919e4c841cbd3e013f69a83175309966cc 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: utf8.h 8299 2007-08-13 08:41:18Z michi $
-
 */
 
 
@@ -151,16 +149,6 @@ extern utf *utf_Signature;
 extern utf *utf_StackMapTable;
 
 #if defined(ENABLE_ANNOTATIONS)
-/* OpenJDKs sun.reflect.ConstantPool class is for now only
- * used by annotations but will probably be used for other
- * things in the future. For now I just couple it with
- * annotation support.
- */
-extern utf *utf_sun_reflect_ConstantPool;
-#if defined(WITH_CLASSPATH_GNU)
-extern utf *utf_sun_reflect_annotation_AnnotationParser;
-#endif
-
 extern utf *utf_RuntimeVisibleAnnotations;
 extern utf *utf_RuntimeInvisibleAnnotations;
 extern utf *utf_RuntimeVisibleParameterAnnotations;
@@ -181,6 +169,7 @@ extern utf *utf_addThread;
 extern utf *utf_removeThread;
 extern utf *utf_put;
 extern utf *utf_get;
+extern utf *utf_uncaughtException;
 extern utf *utf_value;
 
 extern utf *utf_fillInStackTrace;
@@ -188,6 +177,7 @@ extern utf *utf_findNative;
 extern utf *utf_getSystemClassLoader;
 extern utf *utf_initCause;
 extern utf *utf_loadClass;
+extern utf *utf_loadClassInternal;
 extern utf *utf_printStackTrace;
 
 extern utf *utf_division_by_zero;
@@ -220,6 +210,7 @@ extern utf *utf_java_lang_Object__java_lang_Object;
 extern utf *utf_java_lang_String__void;
 extern utf *utf_java_lang_String__java_lang_Class;
 extern utf *utf_java_lang_Thread__V;
+extern utf *utf_java_lang_Thread_java_lang_Throwable__V;
 extern utf *utf_java_lang_Throwable__void;
 extern utf *utf_java_lang_Throwable__java_lang_Throwable;
 
index 757712c97444b18389bd7d72e06bea063d51d87b..d0a9f397c7536770ab79c46606cb20a0e4ccc6ac 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: zip.c 7601 2007-03-28 23:02:50Z michi $
-
 */
 
 
 
 #define SIGNATURE_LENGTH    4
 
-
-/* Local file header ***********************************************************
-
-   local file header signature     4 bytes  (0x04034b50)
-   version needed to extract       2 bytes
-   general purpose bit flag        2 bytes
-   compression method              2 bytes
-   last mod file time              2 bytes
-   last mod file date              2 bytes
-   crc-32                          4 bytes
-   compressed size                 4 bytes
-   uncompressed size               4 bytes
-   file name length                2 bytes
-   extra field length              2 bytes
-
-   file name (variable size)
-   extra field (variable size)
-
-*******************************************************************************/
-
-#define LFH_HEADER_SIZE              30
-
-#define LFH_SIGNATURE                0x04034b50
-#define LFH_FILE_NAME_LENGTH         26
-#define LFH_EXTRA_FIELD_LENGTH       28
-
-typedef struct lfh lfh;
-
-struct lfh {
-       u2 compressionmethod;
-       u4 compressedsize;
-       u4 uncompressedsize;
-       u2 filenamelength;
-       u2 extrafieldlength;
-};
-
-
 /* Central directory structure *************************************************
 
    [file header 1]
index 97e9e00d67c339349217a5bcd642be6eb98fadb3..0d09aa540badb23d3cc41b7f07fd3ad091fbaf93 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: zip.h 7246 2007-01-29 18:49:05Z twisti $
-
 */
 
 
 #include "vmcore/utf8.h"
 
 
+/* Local file header ***********************************************************
+
+   local file header signature     4 bytes  (0x04034b50)
+   version needed to extract       2 bytes
+   general purpose bit flag        2 bytes
+   compression method              2 bytes
+   last mod file time              2 bytes
+   last mod file date              2 bytes
+   crc-32                          4 bytes
+   compressed size                 4 bytes
+   uncompressed size               4 bytes
+   file name length                2 bytes
+   extra field length              2 bytes
+
+   file name (variable size)
+   extra field (variable size)
+
+*******************************************************************************/
+
+#define LFH_HEADER_SIZE              30
+
+#define LFH_SIGNATURE                0x04034b50
+#define LFH_FILE_NAME_LENGTH         26
+#define LFH_EXTRA_FIELD_LENGTH       28
+
+typedef struct lfh lfh;
+
+struct lfh {
+       u2 compressionmethod;
+       u4 compressedsize;
+       u4 uncompressedsize;
+       u2 filenamelength;
+       u2 extrafieldlength;
+};
+
 /* hashtable_zipfile_entry ****************************************************/
 
 typedef struct hashtable_zipfile_entry hashtable_zipfile_entry;
index 875c8ad228155971d7a03ee6ab3632d388cbbb6f..f5ff483c20ceeb27ec2e454ee3ff0b9d0f377ebc 100644 (file)
@@ -27,8 +27,6 @@
 ## Authors: Christian Thalinger
 ##
 ## Changes:
-##
-## $Id: Makefile.am 7882 2007-05-07 14:23:32Z tbfg $
 
 ## Process this file with automake to produce Makefile.in
 
diff --git a/tests/exception_restore_registers.java b/tests/exception_restore_registers.java
new file mode 100644 (file)
index 0000000..bc022eb
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ *     Tests if registers get restored correctly when exceptions are raised.
+ *     This file is part of cacao.
+ *     (c) Roland Lezuo, 2007
+ */
+public class exception_restore_registers       {
+       public static void main(String[] args)  {
+               int     i1=-1, i2=-1, i3=-1, i4=-1, i5=-1, i6=-1, i7=-1, i8=-1;
+               long    l1=-1, l2=-1, l3=-1, l4=-1, l5=-1, l6=-1, l7=-1, l8=-1;
+               float   f1=-1, f2=-1, f3=-1, f4=-1, f5=-1, f6=-1, f7=-1, f8=-1;
+               double  d1=-1, d2=-1, d3=-1, d4=-1, d5=-1, d6=-1, d7=-1, d8=-1;
+
+               try     {
+                       throw new Exception();
+               } catch (Exception e)   {
+                       System.out.println("Integers: " + i1 + " " + i2 + " " + i3 + " " + i4 + " " + i5 + " " + i6 + " " + i7 + " " + i8);
+                       System.out.println("Longs:    " + l1 + " " + l2 + " " + l3 + " " + l4 + " " + l5 + " " + l6 + " " + l7 + " " + l8);
+                       System.out.println("Floats:   " + f1 + " " + f2 + " " + f3 + " " + f4 + " " + f5 + " " + f6 + " " + f7 + " " + f8);
+                       System.out.println("Doubles:  " + d1 + " " + d2 + " " + d3 + " " + d4 + " " + d5 + " " + d6 + " " + d7 + " " + d8);
+               }
+
+               try     {
+                       m1();
+               } catch (Exception e)   {
+                       System.out.println("Integers: " + i1 + " " + i2 + " " + i3 + " " + i4 + " " + i5 + " " + i6 + " " + i7 + " " + i8);
+                       System.out.println("Longs:    " + l1 + " " + l2 + " " + l3 + " " + l4 + " " + l5 + " " + l6 + " " + l7 + " " + l8);
+                       System.out.println("Floats:   " + f1 + " " + f2 + " " + f3 + " " + f4 + " " + f5 + " " + f6 + " " + f7 + " " + f8);
+                       System.out.println("Doubles:  " + d1 + " " + d2 + " " + d3 + " " + d4 + " " + d5 + " " + d6 + " " + d7 + " " + d8);
+               }
+
+       }
+
+       private static void m1() throws Exception       {
+               int     i1=0, i2=0, i3=0, i4=0, i5=0, i6=0, i7=0, i8=0;
+               long    l1=0, l2=0, l3=0, l4=0, l5=0, l6=0, l7=0, l8=0;
+               float   f1=0, f2=0, f3=0, f4=0, f5=0, f6=0, f7=0, f8=0;
+               double  d1=0, d2=0, d3=0, d4=0, d5=0, d6=0, d7=0, d8=0;
+
+               System.out.println("Integers: " + i1 + " " + i2 + " " + i3 + " " + i4 + " " + i5 + " " + i6 + " " + i7 + " " + i8);
+               System.out.println("Longs:    " + l1 + " " + l2 + " " + l3 + " " + l4 + " " + l5 + " " + l6 + " " + l7 + " " + l8);
+               System.out.println("Floats:   " + f1 + " " + f2 + " " + f3 + " " + f4 + " " + f5 + " " + f6 + " " + f7 + " " + f8);
+               System.out.println("Doubles:  " + d1 + " " + d2 + " " + d3 + " " + d4 + " " + d5 + " " + d6 + " " + d7 + " " + d8);
+
+               throw new Exception();
+       }
+}
diff --git a/tests/exception_restore_registers.output b/tests/exception_restore_registers.output
new file mode 100644 (file)
index 0000000..20f962c
--- /dev/null
@@ -0,0 +1,12 @@
+Integers: -1 -1 -1 -1 -1 -1 -1 -1
+Longs:    -1 -1 -1 -1 -1 -1 -1 -1
+Floats:   -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0
+Doubles:  -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0
+Integers: 0 0 0 0 0 0 0 0
+Longs:    0 0 0 0 0 0 0 0
+Floats:   0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
+Doubles:  0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0
+Integers: -1 -1 -1 -1 -1 -1 -1 -1
+Longs:    -1 -1 -1 -1 -1 -1 -1 -1
+Floats:   -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0
+Doubles:  -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0 -1.0
index e94e9cf723941c4b9e1f695f824f5d5f55317223..a205dc10d1eaef39caa796629dd3573a8f727436 100644 (file)
 ## Contact: cacao@cacaojvm.org
 ##
 ## Authors: Christian Thalinger
-##
-## $Id: Makefile.am 8343 2007-08-17 21:39:32Z michi $
 
-## Process this file with automake to produce Makefile.in
 
 SUBDIRS = \
        codepatching \
@@ -55,7 +52,8 @@ SOURCE_FILES = \
        $(srcdir)/LoadDisplacementOverflow.java \
        $(srcdir)/FieldDisplacementOverflow.java \
        $(srcdir)/StackDisplacementOverflow.java \
-       $(srcdir)/MinimalClassReflection.java
+       $(srcdir)/MinimalClassReflection.java \
+       $(srcdir)/TestAnnotations.java
 
 EXTRA_DIST = \
        $(SOURCE_FILES) \
@@ -69,7 +67,8 @@ EXTRA_DIST = \
        LoadDisplacementOverflow.output \
        FieldDisplacementOverflow.output \
        StackDisplacementOverflow.output \
-       MinimalClassReflection.output
+       MinimalClassReflection.output \
+       TestAnnotations.output
 
 CLEANFILES = \
        *.class \
@@ -88,7 +87,8 @@ OUTPUT_JAVA_TESTS = \
        LoadDisplacementOverflow \
        FieldDisplacementOverflow \
        StackDisplacementOverflow \
-       MinimalClassReflection
+       MinimalClassReflection \
+       TestAnnotations
 
 check: build $(SIMPLE_JAVA_TESTS) $(OUTPUT_JAVA_TESTS)
 
index 1a198e05cbc3c30491ba4f1ef3b549fd8184dfc3..195abf4e29f3096b988aa1ccc75910a399166789 100644 (file)
@@ -27,8 +27,6 @@
 
    Authors: Mathias Panzenböck
 
-   $Id$
-
 */
 
 import java.lang.reflect.Method;
diff --git a/tests/regression/TestAnnotations.java b/tests/regression/TestAnnotations.java
new file mode 100644 (file)
index 0000000..d2f59d1
--- /dev/null
@@ -0,0 +1,1798 @@
+/* tests/regression/TestAnnotations.java - checks correct functionality of the
+   annotation API
+
+   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,
+   TU Wien
+
+   This file is part of CACAO.
+
+   This program is free software; you can redistribute it and/or
+   modify it under the terms of the GNU General Public License as
+   published by the Free Software Foundation; either version 2, or (at
+   your option) any later version.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Contact: cacao@cacaojvm.org
+
+   Authors: Mathias Panzenböck
+
+*/
+
+import java.lang.annotation.Annotation;
+import java.lang.annotation.Inherited;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Array;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Method;
+import java.lang.reflect.Field;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.LinkedHashMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.TreeSet;
+import java.util.LinkedHashSet;
+
+/* ********* helper classes for the tests *************************************/
+enum IndexingType {
+       HASH,
+       LINKED_HASH,
+       TREE
+}
+
+class MapFactory {
+       private IndexingType indexingType;
+       
+       public MapFactory(IndexingType indexingType) {
+               this.indexingType = indexingType;
+       }
+       
+       public <K, V> Map<K, V> createMap() {
+               switch (indexingType) {
+               case HASH:        return new HashMap<K, V>();
+               case LINKED_HASH: return new LinkedHashMap<K, V>(); 
+               case TREE:        return new TreeMap<K, V>();
+               default:
+                       throw new IllegalArgumentException(
+                                       "Illegal indexing type: " + indexingType);
+               }
+       }
+
+       public <K, V> Map<K, V> createMap(Map<? extends K,? extends V> map) {
+               switch (indexingType) {
+               case HASH:        return new HashMap<K, V>(map);
+               case LINKED_HASH: return new LinkedHashMap<K, V>(map);
+               case TREE:        return new TreeMap<K, V>(map);
+               default:
+                       throw new IllegalArgumentException(
+                                       "Illegal indexing type: " + indexingType);
+               }
+       }
+}
+
+class SetFactory {
+       private IndexingType indexingType;
+       
+       public SetFactory(IndexingType indexingType) {
+               this.indexingType = indexingType;
+       }
+       
+       public <E> Set<E> createSet() {
+               switch (indexingType) {
+               case HASH:        return new HashSet<E>();
+               case TREE:        return new TreeSet<E>();
+               case LINKED_HASH: return new LinkedHashSet<E>();
+               default:
+                       throw new IllegalArgumentException(
+                                       "Illegal indexing type: " + indexingType);
+               }
+       }
+       
+       public <E> Set<E> createSet(E[] keys) {
+               Set<E> set = createSet();
+               
+               for (E key : keys) {
+                       set.add(key);
+               }
+               
+               return set;
+       }
+       
+       public <E> Set<E> createSet(Collection<? extends E> collection) {
+               switch (indexingType) {
+               case HASH:        return new HashSet<E>(collection);
+               case TREE:        return new TreeSet<E>(collection);
+               case LINKED_HASH: return new LinkedHashSet<E>(collection);
+               default:
+                       throw new IllegalArgumentException(
+                                       "Illegal indexing type: " + indexingType);
+               }
+       }
+}
+
+class TestHelper {
+       private static MapFactory mapFactory = new MapFactory(IndexingType.HASH);
+       private static SetFactory setFactory = new SetFactory(IndexingType.HASH);
+       
+       private static long testCount = 0;
+       private static long failCount = 0;
+
+       public static MapFactory getMapFactory() {
+               return mapFactory;
+       }
+       
+       public static SetFactory getSetFactory() {
+               return setFactory;
+       }
+       
+       public static void clear() {
+               testCount = 0;
+               failCount = 0;
+       }
+
+       public static long getTestCount() {
+               return testCount;
+       }
+
+       public static long getFailCount() {
+               return failCount;
+       }
+
+       public static void printStatistics() {
+               System.out.printf("         passed: %8d\n", testCount - failCount);
+               System.out.printf("         failed: %8d\n", failCount);
+               System.out.printf("         ----------------\n");
+               System.out.printf("         sum:    %8d\n", testCount);
+       }
+
+       public static void log() {
+               System.out.println();
+       }
+
+       public static void log(String msg) {
+               System.out.println(msg);
+       }
+
+       public static void log(String fmt, Object... args) {
+               System.out.printf(fmt + "\n", args);
+       }
+
+       public static boolean ok(boolean test, String msg) {
+               return ok(test, "%s", msg);
+       }
+
+       public static boolean ok(boolean test, String fmt, Object... args) {
+               ++testCount;
+
+               if (test) {
+                       System.out.printf("[  OK  ] " + fmt + "\n", args);
+                       return true;
+               } else {
+                       ++failCount;
+                       System.out.printf("[ FAIL ] " + fmt + "\n", args);
+                       return false;
+               }
+       }
+
+       public static boolean okx(boolean test, String what, String fmt,
+                       String errfmt, Object[] args, Object... errargs) {
+               if (!test)
+                       return ok(test, fmt + ": %s\n         error: " + errfmt, concat(
+                                       concat(args, what), errargs));
+               else
+                       return ok(test, fmt + ": %s", concat(args, what));
+       }
+
+       /* helper methods: */
+       @SuppressWarnings("unchecked")
+       public static <T> T[] concat(T[] firstArray, T... moreElements) {
+               return concat2(firstArray, moreElements);
+       }
+
+       @SuppressWarnings("unchecked")
+       public static <T> T[] concat2(T[] firstArray, T[]... moreArrays) {
+               int length = firstArray.length;
+
+               for (T[] array : moreArrays) {
+                       length += array.length;
+               }
+
+               T[] result = (T[]) Array.newInstance(firstArray.getClass()
+                               .getComponentType(), length);
+
+               System.arraycopy(firstArray, 0, result, 0, firstArray.length);
+
+               int pos = firstArray.length;
+               for (T[] array : moreArrays) {
+                       System.arraycopy(array, 0, result, pos, array.length);
+                       pos += array.length;
+               }
+
+               return result;
+       }
+
+       public static <T> String str(T object) {
+               /* null */
+               if (object == null) {
+                       return "null";
+               }
+               /* array */
+               else if (object.getClass().isArray()) {
+                       StringBuilder buf = new StringBuilder();
+                       int length = Array.getLength(object);
+
+                       buf.append('{');
+
+                       if (length > 0) {
+                               buf.append(str(Array.get(object, 0)));
+
+                               for (int i = 1; i < length; ++i) {
+                                       buf.append(", ");
+                                       buf.append(str(Array.get(object, i)));
+                               }
+                       }
+
+                       buf.append('}');
+
+                       return buf.toString();
+               }
+               /* escape String */
+               else if (object instanceof String) {
+                       String s = object.toString();
+                       StringBuilder buf = new StringBuilder();
+
+                       buf.append('"');
+
+                       for (int i = 0; i < s.length(); ++i) {
+                               char ch = s.charAt(i);
+
+                               switch (ch) {
+                               case '"':
+                                       buf.append("\\\"");
+                                       break;
+                               case '\\':
+                                       buf.append("\\\\");
+                                       break;
+                               case '\b':
+                                       buf.append("\\b");
+                                       break;
+                               case '\f':
+                                       buf.append("\\f");
+                                       break;
+                               case '\t':
+                                       buf.append("\\t");
+                                       break;
+                               case '\n':
+                                       buf.append("\\n");
+                                       break;
+                               case '\r':
+                                       buf.append("\\r");
+                                       break;
+                               default:
+                                       buf.append(ch);
+                               }
+                       }
+
+                       buf.append('"');
+                       return buf.toString();
+               }
+               /* escape Character */
+               else if (object instanceof Character) {
+                       switch ((Character) object) {
+                       case '\'':
+                               return "'\\''";
+                       case '\\':
+                               return "'\\\\'";
+                       case '\b':
+                               return "'\\b'";
+                       case '\f':
+                               return "'\\f'";
+                       case '\t':
+                               return "'\\t'";
+                       case '\n':
+                               return "'\\n'";
+                       case '\r':
+                               return "'\\r'";
+                       default:
+                               return "'" + object + "'";
+                       }
+               }
+               /* Class */
+               else if (object instanceof Class) {
+                       return ((Class<?>) object).getName();
+               }
+
+               return object.toString();
+       }
+       
+       public static <E extends Comparable<? super E>> Collection<E> sorted(
+                       Collection<E> collection) {
+               if (collection instanceof SortedSet) {
+                       return collection;
+               }
+               else {
+                       List<E> reply = new ArrayList<E>(collection);
+                       Collections.sort(reply);
+                       
+                       return reply;
+               }
+       }
+
+       public static <E> Collection<E> sorted(
+                       Collection<E> collection,
+                       Comparator<? super E> comparator) {
+               if (collection instanceof SortedSet) {
+                       return collection;
+               }
+               else {
+                       List<E> reply = new ArrayList<E>(collection);
+                       Collections.sort(reply, comparator);
+                       
+                       return reply;
+               }
+       }
+
+       public static <E extends Comparable<? super E>> E[] sorted(E[] values) {
+               Arrays.sort(values);
+               return values;
+       }
+       
+       public static <E> E[] sorted(
+                       E[] values,
+                       Comparator<? super E> comparator) {
+               Arrays.sort(values, comparator);
+               return values;
+       }
+}
+
+class Entry implements Map.Entry<String, Object> {
+       private String key;
+       private Object val;
+
+       public Entry(String key, Object value) {
+               this.key = key;
+               this.val = value;
+       }
+
+       public String getKey() {
+               return key;
+       }
+
+       public Object getValue() {
+               return val;
+       }
+
+       public Object setValue(Object value) {
+               Object oldval = val;
+               val = value;
+               return oldval;
+       }
+
+       public int hashCode() {
+               return (key != null ? key.hashCode() << 8 : 0)
+                               ^ (val != null ? val.hashCode() : 0);
+       }
+
+       public boolean equals(Object other) {
+               if (other != null && other instanceof Entry) {
+                       Entry otherEntry = (Entry) other;
+
+                       return (key == null ? otherEntry.key == null :
+                               key.equals(otherEntry.key))
+                                       && (val == null ? otherEntry.val == null :
+                                               val.equals(otherEntry.val));
+               }
+
+               return false;
+       }
+}
+
+class AnnotationTester implements Comparable<AnnotationTester> {
+       private Class<? extends Annotation> annotationType;
+
+       private Map<String, Object> values =
+               TestHelper.getMapFactory().<String, Object>createMap();
+
+       public AnnotationTester(Class<? extends Annotation> annotationType,
+                       Map<String, Object> values) {
+               this.annotationType = annotationType;
+               this.values.putAll(values);
+
+               checkValues();
+       }
+
+       public AnnotationTester(Class<? extends Annotation> annotationType) {
+               this.annotationType = annotationType;
+
+               checkValues();
+       }
+
+       public AnnotationTester(Class<? extends Annotation> annotationType,
+                       Map.Entry<String, Object>... values) {
+               this.annotationType = annotationType;
+
+               for (Map.Entry<String, Object> value : values) {
+                       if (this.values.put(value.getKey(), value.getValue()) != null)
+                               throw new IllegalArgumentException(
+                                               "duplicated key: " + TestHelper.str(value.getKey()));
+               }
+
+               checkValues();
+       }
+
+       public Class<? extends Annotation> annotationType() {
+               return annotationType;
+       }
+
+       private void checkValues() {
+               for (String methodName : values.keySet()) {
+                       try {
+                               annotationType.getDeclaredMethod(methodName);
+                       } catch (NoSuchMethodException e) {
+                               throw new IllegalArgumentException(
+                                               "annotation " + annotationType.getName() +
+                                               " has no method of name " + methodName + "()", e);
+                       }
+               }
+
+               for (Method method : annotationType.getDeclaredMethods()) {
+                       Object value = values.get(method.getName());
+                       Class<?> returnType = method.getReturnType();
+                       Class<?> valueType = value.getClass();
+
+                       if (value == null) {
+                               throw new IllegalArgumentException(
+                                               "annotation method of name " + method.getName() +
+                                               "() needs an expected value");
+                       } else if (value instanceof AnnotationTester) {
+                               AnnotationTester tester = (AnnotationTester) value;
+
+                               if (!tester.annotationType().equals(returnType)) {
+                                       throw new IllegalArgumentException(
+                                                       "illegal value type for annotation method " +
+                                                       method.getName() + "()");
+                               }
+                       } else if (!returnType.isInstance(value)) {
+                               if (returnType.isArray()
+                                               && returnType.getComponentType().isAnnotation()) {
+                                       if (!valueType.isArray()
+                                                       || !isSubclassOf(valueType.getComponentType(),
+                                                                       AnnotationTester.class)) {
+                                               throw new IllegalArgumentException(
+                                                               "illegal value type for annotation method " +
+                                                               method.getName() + "()");
+                                       }
+
+                                       for (AnnotationTester tester : (AnnotationTester[]) value) {
+                                               if (!tester.annotationType().equals(
+                                                               returnType.getComponentType())) {
+                                                       throw new IllegalArgumentException(
+                                                                       "illegal value type for annotation method " +
+                                                                       method.getName() + "()");
+                                               }
+                                       }
+                               } else if (!returnType.isPrimitive()
+                                               || !valueType.equals(getBoxingType(returnType))) {
+                                       throw new IllegalArgumentException(
+                                                       "illegal value type for annotation method " +
+                                                       method.getName() + "()");
+                               }
+                       }
+               }
+       }
+
+       public static boolean isSubclassOf(Class<?> subClass, Class<?> superClass) {
+               do {
+                       if (subClass.equals(superClass)) {
+                               return true;
+                       }
+                       subClass = subClass.getSuperclass();
+               } while (subClass != null);
+
+               return false;
+       }
+
+       private static Map<Class<?>, Class<?>> boxingMap =
+               TestHelper.getMapFactory().<Class<?>, Class<?>>createMap();
+
+       static {
+               boxingMap.put(byte.class,   Byte.class);
+               boxingMap.put(char.class,   Character.class);
+               boxingMap.put(short.class,  Short.class);
+               boxingMap.put(long.class,   Long.class);
+               boxingMap.put(int.class,    Integer.class);
+               boxingMap.put(float.class,  Float.class);
+               boxingMap.put(double.class, Double.class);
+       }
+
+       public static Class<?> getBoxingType(Class<?> primitiveType) {
+               Class<?> type = boxingMap.get(primitiveType);
+
+               if (type == null) {
+                       throw new IllegalArgumentException(
+                                       "illegal type for boxing: "     + primitiveType.getName());
+               }
+
+               return type;
+       }
+
+       public int hashCode() {
+               return (annotationType.hashCode() << 8) ^ values.hashCode();
+       }
+
+       public boolean equals(Object other) {
+               if (other != null) {
+                       if (other instanceof AnnotationTester) {
+                               AnnotationTester otherAnnotationTester =
+                                       (AnnotationTester) other;
+
+                               if (!otherAnnotationTester.annotationType.equals(annotationType) ||
+                                               otherAnnotationTester.values.size() != values.size())
+                                       return false;
+
+                               for (Map.Entry<String, Object> entry : values.entrySet()) {
+                                       if (!otherAnnotationTester.values.containsKey(entry.getKey()) ||
+                                                       !otherAnnotationTester.values.get(
+                                                                       entry.getKey()).equals(entry.getValue()))
+                                               return false;
+                               }
+
+                               return true;
+                       } else if (other instanceof Annotation) {
+                               Annotation anno = (Annotation) other;
+                               Method[] annotationFields = anno.annotationType()
+                                               .getDeclaredMethods();
+
+                               if (!annotationType.equals(anno.annotationType())
+                                               || annotationFields.length != values.size())
+                                       return false;
+
+                               for (Method method : annotationFields) {
+                                       if (!values.get(method.getName()).equals(
+                                                       method.getDefaultValue()))
+                                               return false;
+                               }
+
+                               return true;
+                       }
+               }
+               return false;
+       }
+       
+       public String toString() {
+               StringBuilder buf = new StringBuilder();
+               
+               buf.append('@');
+               buf.append(annotationType.getName());
+               buf.append('(');
+               
+               int i = 0;
+               for (Map.Entry<String, Object> entry : values.entrySet()) {
+                       buf.append(entry.getKey());
+                       buf.append('=');
+                       buf.append(TestHelper.str(entry.getValue()));
+                       
+                       ++ i;
+                       if (i < values.size()) {
+                               buf.append(", ");
+                       }
+               }
+               buf.append(')');
+               
+               return buf.toString();
+       }
+
+       private final static Object[] EMPTY_OBJECT_ARRAY = new Object[] {};
+
+       protected boolean ok(boolean test, String what, String errfmt,
+                       Object... errargs) {
+               return TestHelper.okx(test, what, annotationType.getName(), errfmt,
+                               EMPTY_OBJECT_ARRAY, errargs);
+       }
+
+       public boolean test(Annotation annotation) throws SecurityException,
+                       NoSuchMethodException {
+               boolean ok = true;
+               Method[] declaredMedthods = annotation.annotationType()
+                               .getDeclaredMethods();
+
+               TestHelper.log(" * Testing %s", annotationType.getName());
+               
+               ok = ok(annotationType.equals(annotation.annotationType()),
+                               "test annotationType", "expected %s but got %s",
+                               annotationType, annotation.annotationType());
+
+               if (ok) {
+                       ok = ok(declaredMedthods.length == values.size(),
+                                       "test annotation methods count", "expected %d but got %d",
+                                       values.size(), declaredMedthods.length)
+                                       && ok;
+                       
+                       for (String methodName : TestHelper.sorted(values.keySet())) {
+                               Object    expected = values.get(methodName);
+                               Object    got = null;
+                               Exception ex  = null;
+
+                               try {
+                                       got = annotation.getClass().getMethod(methodName).invoke(
+                                                       annotation);
+                               } catch (Exception e) {
+                                       ex = e;
+                               }
+
+                               ok = ok(ex == null,
+                                               "test invocation of the annotation method " +
+                                               methodName + "()",
+                                               "exception occured while invokation: %s",
+                                               ex != null ? ex.getMessage() : "")
+                                               && ok;
+
+                               if (ex != null) {
+                                       ex.printStackTrace();
+                               } else {
+                                       ok = ok(got != null, "test return value of " + methodName +
+                                                       "() != null", "got null!")
+                                                       && ok;
+
+                                       ok = ok(equals(got, expected), "test return value of "
+                                                       + methodName + "()", "expected %s (type: %s) but"
+                                                       + " got %s (type: %s)", TestHelper.str(got), got
+                                                       .getClass().getName(), TestHelper.str(expected),
+                                                       expected.getClass().getName())
+                                                       && ok;
+                               }
+                       }
+               }
+
+               return ok;
+       }
+
+       public static boolean equals(Object a, Object b) {
+               if (a == null) {
+                       return b == null;
+               }
+               else if (a instanceof Annotation && b instanceof AnnotationTester) {
+                       return equals((Annotation) a, (AnnotationTester) b);
+               }
+               else if (b instanceof Annotation && a instanceof AnnotationTester) {
+                       return equals((Annotation) b, (AnnotationTester) a);
+               }
+               else if (a.getClass().isArray()) {
+                       if (!b.getClass().isArray()) {
+                               return false;
+                       }
+
+                       int alen = Array.getLength(a);
+                       int blen = Array.getLength(b);
+
+                       if (alen != blen) {
+                               return false;
+                       }
+
+                       for (int i = 0; i < alen; ++i) {
+                               if (!equals(Array.get(a, i), Array.get(b, i))) {
+                                       return false;
+                               }
+                       }
+
+                       return true;
+               }
+               else {
+                       return a.equals(b);
+               }
+       }
+
+       public static boolean equals(Annotation annoation, AnnotationTester tester) {
+               if (!tester.annotationType().equals(annoation.annotationType())) {
+                       return false;
+               }
+
+               try {
+                       for (Map.Entry<String, Object> bEntry : tester.values.entrySet()) {
+                               Object aValue = annoation.getClass().getMethod(bEntry.getKey())
+                                               .invoke(annoation);
+
+                               if (!equals(bEntry.getValue(), aValue)) {
+                                       return false;
+                               }
+                       }
+               } catch (Exception e) {
+                       // TODO: better error handling?
+                       e.printStackTrace();
+                       return false;
+               }
+
+               return true;
+       }
+
+       public int compareTo(AnnotationTester other) {
+               return annotationType.getName().compareTo(
+                               other.annotationType().getName());
+       }
+}
+
+abstract class AnnotatedElementAnnotationTester<T extends AnnotatedElement>
+               implements Comparable<AnnotatedElementAnnotationTester<? extends AnnotatedElement>> {
+       protected ClassAnnotationTester declaringClass;
+       private T                       element;
+       private String                  name;
+       
+       private Map<Class<? extends Annotation>, AnnotationTester> annotations =
+               TestHelper.getMapFactory().
+               <Class<? extends Annotation>, AnnotationTester>createMap();
+       
+       private Map<Class<? extends Annotation>, AnnotationTester> declaredAnnotations =
+               TestHelper.getMapFactory().
+               <Class<? extends Annotation>, AnnotationTester>createMap();
+
+       protected final static Object[] EMPTY_OBJECT_ARRAY = new Object[] {};
+
+       public AnnotatedElementAnnotationTester(
+                       ClassAnnotationTester clazz,
+                       T                     element,
+                       String                name) {
+               this.declaringClass = clazz;
+               this.element        = element;
+               this.name           = name;
+       }
+       
+       public T annotatedElement() {
+               return element;
+       }
+       
+       public String getName() {
+               return name;
+       }
+       
+       public int compareTo(
+                       AnnotatedElementAnnotationTester<? extends AnnotatedElement> other) {
+               return name.compareTo(other.getName());
+       }
+       
+       private static Comparator<Annotation> annotationComparator =
+               new Comparator<Annotation>() {
+                       public int compare(Annotation o1, Annotation o2) {
+                               return o1.annotationType().getName().compareTo(
+                                               o2.annotationType().getName());
+                       }
+       };
+       
+       protected static Annotation[] sorted(Annotation[] annotations) {
+               return TestHelper.sorted(annotations, annotationComparator);
+       }
+
+       protected boolean ok(
+                       boolean test, String what,
+                       String errfmt, Object... errargs) {
+               return TestHelper.okx(test, what, name, errfmt,
+                               EMPTY_OBJECT_ARRAY, errargs);
+       }
+       
+       protected void logName() {
+               TestHelper.log("-- Testing %s --", getName());
+       }
+       
+       protected void logHeader(String fmt, Object... args) {
+               TestHelper.log("-- " + getName() + ": Testing " + fmt + " --", args);
+       }
+
+       protected void log() {
+               TestHelper.log();
+       }
+
+       public void putInheritedAnnotation(
+                       Class<? extends Annotation> annotationType,
+                       Map.Entry<String, Object>... values) {
+               if (annotations.containsKey(annotationType))
+                       throw new IllegalArgumentException(
+                                       "Annotation already exists: " + annotationType.getName());
+
+               annotations.put(annotationType,
+                               new AnnotationTester(annotationType, values));
+       }
+
+       public void putInheritedAnnotation(
+                       Class<? extends Annotation> annotationType,
+                       Map<String, Object> values) {
+               if (annotations.containsKey(annotationType))
+                       throw new IllegalArgumentException(
+                                       "Annotation already exists: " + annotationType.getName());
+
+               annotations.put(annotationType,
+                               new AnnotationTester(annotationType, values));
+       }
+
+       public void putDeclaredAnnotation(
+                       Class<? extends Annotation> annotationType,
+                       Map.Entry<String, Object>... values) {
+               if (annotations.containsKey(annotationType))
+                       throw new IllegalArgumentException(
+                                       "Annotation already exists: " + annotationType.getName());
+
+               AnnotationTester tester = new AnnotationTester(annotationType, values);
+
+               annotations.put(annotationType, tester);
+               declaredAnnotations.put(annotationType, tester);
+       }
+
+       public void putDeclaredAnnotation(
+                       Class<? extends Annotation> annotationType,
+                       Map<String, Object> values) {
+               if (annotations.containsKey(annotationType))
+                       throw new IllegalArgumentException(
+                                       "Annotation already exists: " + annotationType.getName());
+
+               AnnotationTester tester = new AnnotationTester(annotationType, values);
+
+               annotations.put(annotationType, tester);
+               declaredAnnotations.put(annotationType, tester);
+       }
+
+       public boolean test() throws SecurityException, NoSuchMethodException {
+               boolean ok;
+               
+               logName();
+               
+               ok = testGetDeclaredAnnotations();
+               ok = testGetAnnotations()      && ok;
+               ok = testGetAnnotation()       && ok;
+               ok = testIsAnnotationPresent() && ok;
+
+               return ok;
+       }
+
+
+       private boolean testGetDeclaredAnnotations() throws SecurityException,
+                       NoSuchMethodException {
+               Annotation[] declaredAnnotations = element.getDeclaredAnnotations();
+               boolean ok = true;
+               Set<Class<? extends Annotation>> annoTypes =
+                       TestHelper.getSetFactory().<Class<? extends Annotation>>createSet();
+
+               logHeader("getDeclaredAnnotations()");
+               
+               ok = ok(this.declaredAnnotations.size() == declaredAnnotations.length,
+                               "test declared annotations count", "expected %d but got %d",
+                               this.declaredAnnotations.size(), declaredAnnotations.length)
+                               && ok;
+
+               for (Annotation anno : sorted(declaredAnnotations)) {
+                       AnnotationTester tester = this.annotations.get(
+                                       anno.annotationType());
+
+                       ok = ok(!annoTypes.contains(anno.annotationType()),
+                                       "test unique occurrence of the annotation type " +
+                                       anno.annotationType().getName(),
+                                       "duplicated annotation!") && ok;
+
+                       annoTypes.add(anno.annotationType());
+
+                       ok = ok(tester != null, "test if annotation " +
+                                       anno.annotationType().getName() + " should be there",
+                                       "wrong annotation") && ok;
+
+                       if (tester != null) {
+                               ok = tester.test(anno) && ok;
+                       }
+               }
+
+               return ok;
+       }
+       
+       private boolean testGetAnnotations() throws SecurityException,
+                       NoSuchMethodException {
+               Annotation[] annotations = element.getAnnotations();
+               boolean ok = true;
+               Set<Class<? extends Annotation>> annoTypes =
+                       TestHelper.getSetFactory().<Class<? extends Annotation>>createSet();
+
+               logHeader("getAnnotations()");
+               
+               ok = ok(this.annotations.size() == annotations.length,
+                               "test annotations count", "expected %d but got %d",
+                               this.annotations.size(), annotations.length)
+                               && ok;
+
+               for (Annotation anno : sorted(annotations)) {
+                       AnnotationTester tester = this.annotations.get(anno
+                                       .annotationType());
+
+                       ok = ok(!annoTypes.contains(anno.annotationType()),
+                                       "test unique occurrence of the annotation type " +
+                                       anno.annotationType().getName(),
+                                       "duplicated annotation!")
+                                       && ok;
+
+                       annoTypes.add(anno.annotationType());
+
+                       ok = ok(tester != null, "test if annotation " +
+                                       anno.annotationType().getName() + " should be there",
+                                       "wrong annotation")
+                                       && ok;
+
+                       if (tester != null) {
+                               ok = tester.test(anno) && ok;
+                       }
+               }
+
+               return ok;
+       }
+
+       private boolean testGetAnnotation() throws SecurityException,
+                       NoSuchMethodException {
+               boolean ok = true;
+
+               logHeader("getAnnotation(Class<? extends Annotation>)");
+               
+               for (AnnotationTester tester : TestHelper.sorted(annotations.values())) {
+                       Class<? extends Annotation> annotationType = tester
+                                       .annotationType();
+                       Annotation anno = element.getAnnotation(annotationType);
+
+                       ok = ok(anno != null, "try to get required annotation " +
+                                       annotationType.getName() +
+                                       " using getAnnotation(Class<? extends Annotation>)",
+                                       "annotation dose not exist")
+                                       && ok;
+
+                       if (anno != null) {
+                               ok = tester.test(anno) && ok;
+                       }
+               }
+
+               return ok;
+       }
+
+       private boolean testIsAnnotationPresent() {
+               boolean ok = true;
+
+               logHeader("isAnnotationPresent(Class<? extends Annotation>)");
+               
+               for (AnnotationTester tester : TestHelper.sorted(annotations.values())) {
+                       Class<? extends Annotation> annotationType =
+                               tester.annotationType();
+
+                       ok = ok(element.isAnnotationPresent(annotationType),
+                                       "test if annotation " + annotationType.getName() +
+                                       " is present using isAnnotationPresent()",
+                                       "annotation dose not exist")
+                                       && ok;
+               }
+
+               return ok;
+       }
+}
+
+class FieldAnnotationTester extends AnnotatedElementAnnotationTester<Field> {
+       public FieldAnnotationTester(ClassAnnotationTester clazz, Field field) {
+               super(clazz, field, field.getDeclaringClass().getName() + "." +
+                               field.getName());
+       }
+}
+
+abstract class AbstractMethodAnnotationTester<T extends AnnotatedElement>
+               extends AnnotatedElementAnnotationTester<T> {
+       private Map<Class<? extends Annotation>, AnnotationTester>[] parameterAnnotations;
+
+       @SuppressWarnings("unchecked")
+       public AbstractMethodAnnotationTester(ClassAnnotationTester clazz,
+                       T element, String name, Class<?>[] parameterTypes) {
+               super(clazz, element,
+                               methodName(clazz.annotatedElement(), name, parameterTypes));
+
+               parameterAnnotations = new Map[parameterTypes.length];
+
+               MapFactory mapFactory = TestHelper.getMapFactory();
+               
+               for (int i = 0; i < parameterTypes.length; ++i) {
+                       parameterAnnotations[i] = mapFactory.
+                               <Class<? extends Annotation>, AnnotationTester>createMap();
+               }
+       }
+
+       private static String methodName(Class<?> declaringClass, String name,
+                       Class<?>[] parameterTypes) {
+               StringBuilder buf = new StringBuilder(128);
+
+               buf.append(declaringClass.getName());
+               buf.append('.');
+               buf.append(name);
+               buf.append('(');
+
+               if (parameterTypes.length > 0) {
+                       buf.append(parameterTypes[0].getName());
+
+                       for (int i = 1; i < parameterTypes.length; ++i) {
+                               buf.append(',');
+                               buf.append(parameterTypes[i].getName());
+                       }
+               }
+
+               buf.append(')');
+
+               return buf.toString();
+       }
+
+       abstract protected Annotation[][] getParameterAnnotations();
+
+       public void putParameterAnnotation(int index,
+                       Class<? extends Annotation> annotationType,
+                       Map.Entry<String, Object>... values) {
+               if (parameterAnnotations[index].containsKey(annotationType))
+                       throw new IllegalArgumentException(
+                                       "Annotation already exists: " + annotationType.getName());
+
+               parameterAnnotations[index].put(
+                               annotationType,
+                               new AnnotationTester(annotationType, values));
+       }
+
+       public void putParameterAnnotation(int index,
+                       Class<? extends Annotation> annotationType,
+                       Map<String, Object> values) {
+               if (parameterAnnotations[index].containsKey(annotationType))
+                       throw new IllegalArgumentException(
+                                       "Annotation already exists: " + annotationType.getName());
+
+               parameterAnnotations[index].put(
+                               annotationType,
+                               new AnnotationTester(annotationType, values));
+       }
+
+       public boolean test() throws SecurityException, NoSuchMethodException {
+               boolean ok = super.test();
+
+               ok = testParameterAnnotations() && ok;
+
+               return ok;
+       }
+
+       private boolean testParameterAnnotations() throws SecurityException,
+                       NoSuchMethodException {
+               boolean ok = true;
+               Annotation[][] parameterAnnotations = getParameterAnnotations();
+
+               logHeader("getParameterAnnotations()");
+               
+               ok = ok(
+                               this.parameterAnnotations.length == parameterAnnotations.length,
+                               "test parameter count", "expected %d but got %d",
+                               this.parameterAnnotations.length, parameterAnnotations.length)
+                               && ok;
+
+               if (this.parameterAnnotations.length == parameterAnnotations.length) {
+                       for (int i = 0; i < parameterAnnotations.length; ++i) {
+                               Set<Class<? extends Annotation>> annoTypes =
+                                       TestHelper.getSetFactory().
+                                       <Class<? extends Annotation>>createSet();
+
+                               ok = ok(
+                                               this.parameterAnnotations[i].size() == parameterAnnotations[i].length,
+                                               "test parameter annotations count for parameter " + i,
+                                               "expected %d but got %d",
+                                               Integer.valueOf(this.parameterAnnotations.length),
+                                               Integer.valueOf(parameterAnnotations.length))
+                                               && ok;
+
+                               for (Annotation anno : sorted(parameterAnnotations[i])) {
+                                       AnnotationTester tester =
+                                               this.parameterAnnotations[i].get(anno.annotationType());
+
+                                       ok = ok(!annoTypes.contains(anno.annotationType()),
+                                                       "test unique occurrence of the annotation type " +
+                                                       anno.annotationType().getName(),
+                                                       "duplicated annotation!")
+                                                       && ok;
+
+                                       annoTypes.add(anno.annotationType());
+
+                                       ok = ok(tester != null, "test if annotation of type " +
+                                                       anno.annotationType().getName() +
+                                                       " should be defined for parameter " + i,
+                                                       "no, it shouldn't be!")
+                                                       && ok;
+
+                                       if (tester != null) {
+                                               ok = tester.test(anno) && ok;
+                                       }
+                               }
+                       }
+               }
+
+               return ok;
+       }
+}
+
+class MethodAnnotationTester extends AbstractMethodAnnotationTester<Method> {
+       private Object defaultValue = null;
+
+       public MethodAnnotationTester(ClassAnnotationTester clazz, Method method) {
+               super(clazz, method, method.getName(), method.getParameterTypes());
+       }
+
+       public MethodAnnotationTester(ClassAnnotationTester clazz, Method method,
+                       Object defaultValue) {
+               this(clazz, method);
+               setDefaultValue(defaultValue);
+       }
+
+       public void setDefaultValue(Object value) {
+               if (value != null && !declaringClass.isAnnotation())
+                       throw new IllegalArgumentException(
+                                       "cannot set annotation default value of a method " +
+                                       "of a non-annotation class.");
+
+               defaultValue = value;
+       }
+
+       public Object getDefaultValue() {
+               return defaultValue;
+       }
+
+       public boolean test() throws SecurityException, NoSuchMethodException {
+               boolean ok = testGetDefaultValue();
+
+               return super.test() && ok;
+       }
+
+       private boolean testGetDefaultValue() {
+               boolean ok = true;
+               Object defaultValue = annotatedElement().getDefaultValue();
+               
+               logHeader("getDefaultValue()");
+
+               if (this.defaultValue == null) {
+                       ok = ok(defaultValue == null, "test for annotation " +
+                                       "default value", "there is one, but it should NOT be one!")
+                                       && ok;
+               } else {
+                       ok = ok(defaultValue != null, "test for annotation " +
+                                       "default value", "there is NONE, but it should be one!")
+                                       && ok;
+
+                       ok = ok(AnnotationTester.equals(this.defaultValue, defaultValue),
+                                       "test default value", "expected %s but got %s",
+                                       this.defaultValue, defaultValue)
+                                       && ok;
+               }
+
+               return ok;
+       }
+
+       protected Annotation[][] getParameterAnnotations() {
+               return annotatedElement().getParameterAnnotations();
+       }
+}
+
+class ConstructorAnnotationTester
+               extends AbstractMethodAnnotationTester<Constructor<?>> {
+       public ConstructorAnnotationTester(ClassAnnotationTester clazz,
+                       Constructor<?> constructor) {
+               super(clazz, constructor, constructor.getName(),
+                               constructor.getParameterTypes());
+       }
+
+       protected Annotation[][] getParameterAnnotations() {
+               return annotatedElement().getParameterAnnotations();
+       }
+}
+
+class ClassAnnotationTester extends AnnotatedElementAnnotationTester<Class<?>> {
+       private boolean isAnnotation;
+       
+       private Map<Constructor<?>, ConstructorAnnotationTester> constructors =
+               TestHelper.getMapFactory().
+               <Constructor<?>, ConstructorAnnotationTester>createMap();
+       
+       private Map<Method, MethodAnnotationTester> methods =
+               TestHelper.getMapFactory().
+               <Method, MethodAnnotationTester>createMap();
+       
+       private Map<String, FieldAnnotationTester> fields =
+               TestHelper.getMapFactory().
+               <String, FieldAnnotationTester>createMap();
+
+       public ClassAnnotationTester(Class<?> clazz, boolean isAnnotation) {
+               super(null, clazz, clazz.getName());
+
+               this.isAnnotation = isAnnotation;
+       }
+
+       public ClassAnnotationTester(Class<?> clazz) {
+               this(clazz, false);
+       }
+
+       public boolean isAnnotation() {
+               return isAnnotation;
+       }
+
+       public FieldAnnotationTester addField(String name)
+                       throws SecurityException, NoSuchFieldException {
+               FieldAnnotationTester field = new FieldAnnotationTester(this,
+                               annotatedElement().getField(name));
+
+               if (fields.put(name, field) != null)
+                       throw new IllegalArgumentException("field already defined");
+
+               return field;
+       }
+
+       public MethodAnnotationTester addMethod(String name, Object defalutValue,
+                       Class<?>... parameterTypes) throws SecurityException,
+                       NoSuchMethodException {
+               Method reflMethod = annotatedElement().getMethod(
+                               name, parameterTypes);
+               MethodAnnotationTester method = new MethodAnnotationTester(this,
+                               reflMethod, defalutValue);
+
+               if (methods.put(reflMethod, method) != null)
+                       throw new IllegalArgumentException("method already defined");
+
+               return method;
+       }
+
+       public ConstructorAnnotationTester addConstructor(
+                       Class<?>... parameterTypes) throws SecurityException,
+                       NoSuchMethodException {
+               Constructor<?> reflConstructor =
+                       annotatedElement().getConstructor(parameterTypes);
+               ConstructorAnnotationTester constructor =
+                       new ConstructorAnnotationTester(this, reflConstructor);
+
+               if (constructors.put(reflConstructor, constructor) != null)
+                       throw new IllegalArgumentException("constructor already defined");
+
+               return constructor;
+       }
+       
+       protected void logName() {
+               TestHelper.log("== Testing %s ==", getName());
+       }
+
+       public boolean test() throws SecurityException, NoSuchMethodException {
+               boolean ok = super.test();
+               
+               ok = testIsAnnotation() && ok;
+
+               logHeader("Constructors");
+               for (ConstructorAnnotationTester tester :
+                               TestHelper.sorted(constructors.values())) {
+                       ok = tester.test() && ok;
+               }
+
+               logHeader("Methods");
+               for (MethodAnnotationTester tester :
+                               TestHelper.sorted(methods.values())) {
+                       ok = tester.test() && ok;
+               }
+
+               logHeader("Fields");
+               for (FieldAnnotationTester tester : 
+                               TestHelper.sorted(fields.values())) {
+                       ok = tester.test() && ok;
+               }
+
+               log();
+               return ok;
+       }
+       
+       private boolean testIsAnnotation() {
+               logHeader("isAnnotation()");
+               
+               return TestHelper.okx(
+                               isAnnotation == annotatedElement().isAnnotation(),
+                               "test if the isAnnotation attribute is set properly",
+                               annotatedElement().getName(),
+                               (isAnnotation ? "class should be an annotation, but isn't!"
+                                               : "class should NOT be an annotation, but it is!"),
+                               EMPTY_OBJECT_ARRAY);
+       }
+}
+
+/* ********* the testcases ****************************************************/
+
+/**
+ * Test Annotations onto enums and their values.
+ */
+@AnnotationB(string = "onto a enum")
+enum EnumA {
+       @AnnotationB(string = "onto a enum field")
+       VALUE1,
+       VALUE2,
+       VALUE3
+}
+
+/**
+ * Test Annotations on Annotations and their methods. Test Annotation on itself.
+ */
+@Retention(value = RetentionPolicy.RUNTIME)
+@AnnotationA(
+               integer = 1,
+               string  = "onto itself",
+               classes = {AnnotationA.class, Class.class},
+               enumeration = EnumA.VALUE2)
+@interface AnnotationA {
+       @AnnotationA(
+                       integer = 2,
+                       string  = "onto a method of itself")
+       int        integer();
+       String     string();
+       Class<?>[] classes()     default {EnumA.class, Object[][].class};
+       EnumA      enumeration() default EnumA.VALUE1;
+}
+
+/**
+ * This Annotation will be inherited as Annotation of a derived class.
+ * Inheritance applies only for class annotations, not for methods or fields.
+ */
+@Inherited
+@Retention(value = RetentionPolicy.RUNTIME)
+@interface AnnotationB {
+       String string();
+       Class<?> clazz() default AnnotationB.class;
+}
+
+/**
+ * Test all possible types of enum fields.
+ */
+@Retention(value = RetentionPolicy.RUNTIME)
+@interface AnnotationC {
+       byte               aByte()            default 100;
+       char               aChar()            default 'ß';
+       short              aShort()           default 88;
+       int                aInt()             default Integer.MIN_VALUE;
+       long               aLong()            default Long.MAX_VALUE;
+       float              aFloat()           default 23.42f;
+       double             aDouble()          default 555.0815d;
+       String             aString()          default "ÄÖÜ";
+       EnumA              aEnum()            default EnumA.VALUE2;
+       Class<?>           aClass()           default EnumA.class;
+       SuppressWarnings   aAnnotation()      default @SuppressWarnings("unchecked");
+       byte[]             aByteArray()       default {(byte)255};
+       char[]             aCharArray()       default {'ä', 'ö', 'ü'};
+       short[]            aShortArray()      default {512};
+       int[]              aIntArray()        default {640, 480};
+       long[]             aLongArray()       default {1204l, 2048l};
+       float[]            aFloatArray()      default {0.0f};
+       double[]           aDoubleArray()     default {-2.2d, -3.3d};
+       String[]           aStringArray()     default {""};
+       EnumA[]            aEnumArray()       default EnumA.VALUE1;
+       Class<?>[]         aClassArray()      default void.class;
+       SuppressWarnings[] aAnnotationArray() default {};
+}
+
+/**
+ * This annotation will not be stored into the class file.
+ */
+@interface AnnotationD {
+}
+
+/**
+ * Test annotations onto a class.
+ */
+@AnnotationB(string = "onto a class", clazz = Foo.class)
+@AnnotationA(integer = 3, string = "onto a class")
+class Foo {
+       /**
+        * Test annotations onto a field.
+        */
+       @AnnotationA(integer = 4, string = "onto a field")
+       public int afield;
+
+       /**
+        * Test annotations onto a constructor.
+        */
+       @AnnotationA(integer = 9, string = "onto a constructor")
+       public Foo() {
+       }
+
+       /**
+        * Test annotations onto a method.
+        * 
+        * @param x
+        *            Test annotations onto a parameter.
+        * @return
+        */
+       @AnnotationA(integer = 5, string = "onto a method")
+       public int method(
+                       @AnnotationA(
+                                       integer = 6,
+                                       string  = "onto a parameter")
+                       int x) {
+               return x;
+       }
+
+       /**
+        * Test annotations onto a static method.
+        * 
+        * @param x
+        *            Test annotations onto a parameter.
+        * @return
+        */
+       @AnnotationA(integer = 7, string = "onto a static method")
+       public static int staticMethod(
+                       @AnnotationA(
+                                       integer = 8,
+                                       string  = "onto a parameter of a static method")
+                       int x) {
+               return x;
+       }
+}
+
+/**
+ * Test inheritance of annotations. Test all possible annotation field types as
+ * default values. Test if an annotation without RetentionPolicy.RUNTIME is
+ * really not visible at runtime.
+ */
+@AnnotationC
+@AnnotationD
+class Bar extends Foo {
+       /**
+        * Test that superclass field annotations will not be visible here.
+        */
+       public int afield;
+
+       /**
+        * Test that superclass constructor annotations will not be visible here.
+        */
+       public Bar() {
+       }
+
+       /**
+        * Test that superclass method (and parameter) annotations will not be
+        * visible here.
+        */
+       public int method(int x) {
+               return x;
+       }
+
+       /**
+        * Test that superclass method (and parameter) annotations will not be
+        * visible here.
+        */
+       public static int staticMethod(int x) {
+               return x;
+       }
+}
+
+/**
+ * Test availability of annotations of inherited fields/methods. Test all
+ * possible annotation field types. Test if not overloaded (=inherited)
+ * methods/fields still have their annotations.
+ */
+@AnnotationB(string = "onto a derived class", clazz = Baz.class)
+@AnnotationC(
+               aByte            = 0,
+               aChar            = 'a',
+               aShort           = 1,
+               aInt             = 2,
+               aLong            = 3l,
+               aFloat           = 4.4f,
+               aDouble          = 5.5d,
+               aString          = "a string",
+               aEnum            = EnumA.VALUE3,
+               aClass           = Class.class,
+               aAnnotation      = @SuppressWarnings("unchecked"),
+               aByteArray       = {0, 1, 2, 3},
+               aCharArray       = {'a', 'b', 'c'},
+               aShortArray      = 4,
+               aIntArray        = {5, 6, 7},
+               aLongArray       = {8l, 9l},
+               aFloatArray      = {10.10f, 11.11f, 12.12f},
+               aDoubleArray     = {},
+               aStringArray     = {"a string","another string"},
+               aEnumArray       = {EnumA.VALUE3, EnumA.VALUE3},
+               aClassArray      = {Class.class, Integer.class, Long.class},
+               aAnnotationArray = {
+                       @SuppressWarnings(value = "unchecked"),
+                       @SuppressWarnings(value = {"unused", "deprecation"})})
+class Baz extends Foo {
+}
+
+/* ********* running the testcases ********************************************/
+public class TestAnnotations {
+       @SuppressWarnings("unchecked")
+       public static void main(String[] args) {
+               boolean ok = true;
+               MethodAnnotationTester mtester;
+
+               try {
+                       ClassAnnotationTester classEnumA       =
+                               new ClassAnnotationTester(EnumA.class);
+                       ClassAnnotationTester classAnnotationA =
+                               new ClassAnnotationTester(AnnotationA.class, true);
+                       ClassAnnotationTester classAnnotationB =
+                               new ClassAnnotationTester(AnnotationB.class, true);
+                       ClassAnnotationTester classAnnotationC =
+                               new ClassAnnotationTester(AnnotationC.class, true);
+                       ClassAnnotationTester classAnnotationD =
+                               new ClassAnnotationTester(AnnotationD.class, true);
+                       ClassAnnotationTester classFoo         =
+                               new ClassAnnotationTester(Foo.class);
+                       ClassAnnotationTester classBar         =
+                               new ClassAnnotationTester(Bar.class);
+                       ClassAnnotationTester classBaz         =
+                               new ClassAnnotationTester(Baz.class);
+
+                       /* EnumA */
+                       classEnumA.putDeclaredAnnotation(
+                                       AnnotationB.class,
+                                       new Entry("string", "onto a enum"),
+                                       new Entry("clazz", AnnotationB.class));
+                       classEnumA.addField("VALUE1").putDeclaredAnnotation(
+                                       AnnotationB.class,
+                                       new Entry("string", "onto a enum field"),
+                                       new Entry("clazz", AnnotationB.class)
+                       );
+
+                       /* AnnotationA */
+                       classAnnotationA.putDeclaredAnnotation(
+                                       Retention.class,
+                                       new Entry("value", RetentionPolicy.RUNTIME)
+                       );
+                       classAnnotationA.putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 1),
+                                       new Entry("string",  "onto itself"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       AnnotationA.class, Class.class}),
+                                       new Entry("enumeration", EnumA.VALUE2)
+                       );
+                       classAnnotationA.addMethod("integer", null).putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 2),
+                                       new Entry("string", "onto a method of itself"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class }),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       classAnnotationA.addMethod("classes", 
+                                       new Class<?>[] {EnumA.class, Object[][].class});
+                       classAnnotationA.addMethod("enumeration", EnumA.VALUE1);
+
+                       /* AnnotationB */
+                       classAnnotationB.putDeclaredAnnotation(Inherited.class);
+                       classAnnotationB.putDeclaredAnnotation(
+                                       Retention.class,
+                                       new Entry("value", RetentionPolicy.RUNTIME)
+                       );
+                       classAnnotationB.addMethod("clazz", AnnotationB.class);
+
+                       /* AnnotationC */
+                       classAnnotationC.putDeclaredAnnotation(
+                                       Retention.class,
+                                       new Entry("value", RetentionPolicy.RUNTIME)
+                       );
+
+                       /* Foo */
+                       classFoo.putDeclaredAnnotation(
+                                       AnnotationB.class,
+                                       new Entry("string", "onto a class"),
+                                       new Entry("clazz",  Foo.class)
+                       );
+                       classFoo.putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 3),
+                                       new Entry("string",  "onto a class"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       classFoo.addField("afield").putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 4),
+                                       new Entry("string",  "onto a field"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester = classFoo.addMethod("method", null, int.class);
+                       mtester.putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 5),
+                                       new Entry("string",  "onto a method"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester.putParameterAnnotation(0,
+                                       AnnotationA.class,
+                                       new Entry("integer", 6),
+                                       new Entry("string", "onto a parameter"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester = classFoo.addMethod("staticMethod", null, int.class);
+                       mtester.putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 7),
+                                       new Entry("string", "onto a static method"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class }),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester.putParameterAnnotation(0,
+                                       AnnotationA.class,
+                                       new Entry("integer", 8),
+                                       new Entry("string", "onto a parameter of a static method"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       classFoo.addConstructor().putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 9),
+                                       new Entry("string", "onto a constructor"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+
+                       /* Bar */
+                       classBar.putInheritedAnnotation(
+                                       AnnotationB.class,
+                                       new Entry("string", "onto a class"),
+                                       new Entry("clazz", Foo.class)
+                       );
+                       classBar.putDeclaredAnnotation(
+                                       AnnotationC.class,
+                                       new Entry("aByte",            (byte)100),
+                                       new Entry("aChar",            (char)'ß'),
+                                       new Entry("aShort",           (short)88),
+                                       new Entry("aInt",             Integer.MIN_VALUE),
+                                       new Entry("aLong",            Long.MAX_VALUE),
+                                       new Entry("aFloat",           (float)23.42f),
+                                       new Entry("aDouble",          (double)555.0815d),
+                                       new Entry("aString",          "ÄÖÜ"),
+                                       new Entry("aEnum",            EnumA.VALUE2),
+                                       new Entry("aClass",           EnumA.class),
+                                       new Entry("aAnnotation",      new AnnotationTester(
+                                                       SuppressWarnings.class,
+                                                       new Entry("value", new String[] {"unchecked"}))),
+                                       new Entry("aByteArray",       new byte[]   {(byte) 255}),
+                                       new Entry("aCharArray",       new char[]   {'ä', 'ö', 'ü'}),
+                                       new Entry("aShortArray",      new short[]  {512}),
+                                       new Entry("aIntArray",        new int[]    {640, 480}),
+                                       new Entry("aLongArray",       new long[]   {1204l, 2048l}),
+                                       new Entry("aFloatArray",      new float[]  {0.0f}),
+                                       new Entry("aDoubleArray",     new double[] {-2.2d, -3.3d}),
+                                       new Entry("aStringArray",     new String[] {""}),
+                                       new Entry("aEnumArray",       new EnumA[]  {EnumA.VALUE1}),
+                                       new Entry("aClassArray",      new Class<?>[] {void.class}),
+                                       new Entry("aAnnotationArray", new AnnotationTester[] {})
+                       );
+                       classBar.addField("afield");
+                       classBar.addMethod("method", null, int.class);
+                       classBar.addMethod("staticMethod", null, int.class);
+                       classBar.addConstructor();
+
+                       /* Baz */
+                       classBaz.putDeclaredAnnotation(
+                                       AnnotationB.class,
+                                       new Entry("string", "onto a derived class"),
+                                       new Entry("clazz",  Baz.class)
+                       );
+                       classBaz.putDeclaredAnnotation(
+                                       AnnotationC.class,
+                                       new Entry("aByte",            (byte)0),
+                                       new Entry("aChar",            (char)'a'),
+                                       new Entry("aShort",           (short)1),
+                                       new Entry("aInt",             (int)2),
+                                       new Entry("aLong",            (long)3l),
+                                       new Entry("aFloat",           (float)4.4f),
+                                       new Entry("aDouble",          (double)5.5d),
+                                       new Entry("aString",          "a string"),
+                                       new Entry("aEnum",            EnumA.VALUE3),
+                                       new Entry("aClass",           Class.class),
+                                       new Entry("aAnnotation",      new AnnotationTester(
+                                                       SuppressWarnings.class,
+                                                       new Entry("value",new String[] {"unchecked"}))),
+                                       new Entry("aByteArray",       new byte[]  {0, 1, 2, 3}),
+                                       new Entry("aCharArray",       new char[]  {'a', 'b', 'c'}),
+                                       new Entry("aShortArray",      new short[] {4}),
+                                       new Entry("aIntArray",        new int[]   {5, 6, 7}),
+                                       new Entry("aLongArray",       new long[]  {8l, 9l}), 
+                                       new Entry("aFloatArray",      new float[] {
+                                                       10.10f, 11.11f, 12.12f}),
+                                       new Entry("aDoubleArray",     new double[] {}),
+                                       new Entry("aStringArray",     new String[] {
+                                                       "a string",     "another string"}),
+                                       new Entry("aEnumArray",       new EnumA[] {
+                                                       EnumA.VALUE3, EnumA.VALUE3}),
+                                       new Entry("aClassArray",      new Class<?>[] {
+                                                       Class.class, Integer.class, Long.class}),
+                                       new Entry("aAnnotationArray", new AnnotationTester[] {
+                                                       new AnnotationTester(
+                                                                       SuppressWarnings.class,
+                                                                       new Entry("value", new String[] {
+                                                                                       "unchecked"})),
+                                                       new AnnotationTester(
+                                                                       SuppressWarnings.class,
+                                                                       new Entry("value", new String[] {
+                                                                                       "unused", "deprecation"}))})
+                       );
+                       classBaz.addField("afield").putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 4),
+                                       new Entry("string", "onto a field"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester = classBaz.addMethod("method", null, int.class);
+                       mtester.putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer", 5),
+                                       new Entry("string",  "onto a method"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class }),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester.putParameterAnnotation(0,
+                                       AnnotationA.class,
+                                       new Entry("integer", 6),
+                                       new Entry("string",  "onto a parameter"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class }),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester = classBaz.addMethod("staticMethod", null, int.class);
+                       mtester.putDeclaredAnnotation(
+                                       AnnotationA.class,
+                                       new Entry("integer",     7),
+                                       new Entry("string",      "onto a static method"),
+                                       new Entry("classes",     new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+                       mtester.putParameterAnnotation(0,
+                                       AnnotationA.class,
+                                       new Entry("integer", 8),
+                                       new Entry("string",      "onto a parameter of a static method"),
+                                       new Entry("classes", new Class<?>[] {
+                                                       EnumA.class, Object[][].class}),
+                                       new Entry("enumeration", EnumA.VALUE1)
+                       );
+
+                       ok = classEnumA.test();
+                       ok = classAnnotationA.test() && ok;
+                       ok = classAnnotationB.test() && ok;
+                       ok = classAnnotationC.test() && ok;
+                       ok = classAnnotationD.test() && ok;
+                       ok = classFoo.test() && ok;
+                       ok = classBar.test() && ok;
+                       ok = classBaz.test() && ok;
+               } catch (Exception e) {
+                       ok = TestHelper.ok(false, "exception free execution\n");
+                       e.printStackTrace();
+               }
+               
+               TestHelper.printStatistics();
+
+               if (!ok) {
+                       System.exit(1);
+               }
+       }
+}
\ No newline at end of file
diff --git a/tests/regression/TestAnnotations.output b/tests/regression/TestAnnotations.output
new file mode 100644 (file)
index 0000000..ef4f672
--- /dev/null
@@ -0,0 +1,1518 @@
+== Testing EnumA ==
+-- EnumA: Testing getDeclaredAnnotations() --
+[  OK  ] EnumA: test declared annotations count
+[  OK  ] EnumA: test unique occurrence of the annotation type AnnotationB
+[  OK  ] EnumA: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- EnumA: Testing getAnnotations() --
+[  OK  ] EnumA: test annotations count
+[  OK  ] EnumA: test unique occurrence of the annotation type AnnotationB
+[  OK  ] EnumA: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- EnumA: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] EnumA: try to get required annotation AnnotationB using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- EnumA: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] EnumA: test if annotation AnnotationB is present using isAnnotationPresent()
+-- EnumA: Testing isAnnotation() --
+[  OK  ] EnumA: test if the isAnnotation attribute is set properly
+-- EnumA: Testing Constructors --
+-- EnumA: Testing Methods --
+-- EnumA: Testing Fields --
+-- Testing EnumA.VALUE1 --
+-- EnumA.VALUE1: Testing getDeclaredAnnotations() --
+[  OK  ] EnumA.VALUE1: test declared annotations count
+[  OK  ] EnumA.VALUE1: test unique occurrence of the annotation type AnnotationB
+[  OK  ] EnumA.VALUE1: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- EnumA.VALUE1: Testing getAnnotations() --
+[  OK  ] EnumA.VALUE1: test annotations count
+[  OK  ] EnumA.VALUE1: test unique occurrence of the annotation type AnnotationB
+[  OK  ] EnumA.VALUE1: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- EnumA.VALUE1: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] EnumA.VALUE1: try to get required annotation AnnotationB using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- EnumA.VALUE1: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] EnumA.VALUE1: test if annotation AnnotationB is present using isAnnotationPresent()
+
+== Testing AnnotationA ==
+-- AnnotationA: Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationA: test declared annotations count
+[  OK  ] AnnotationA: test unique occurrence of the annotation type AnnotationA
+[  OK  ] AnnotationA: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+[  OK  ] AnnotationA: test unique occurrence of the annotation type java.lang.annotation.Retention
+[  OK  ] AnnotationA: test if annotation java.lang.annotation.Retention should be there
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationA: Testing getAnnotations() --
+[  OK  ] AnnotationA: test annotations count
+[  OK  ] AnnotationA: test unique occurrence of the annotation type AnnotationA
+[  OK  ] AnnotationA: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+[  OK  ] AnnotationA: test unique occurrence of the annotation type java.lang.annotation.Retention
+[  OK  ] AnnotationA: test if annotation java.lang.annotation.Retention should be there
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationA: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] AnnotationA: try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+[  OK  ] AnnotationA: try to get required annotation java.lang.annotation.Retention using getAnnotation(Class<? extends Annotation>)
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationA: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] AnnotationA: test if annotation AnnotationA is present using isAnnotationPresent()
+[  OK  ] AnnotationA: test if annotation java.lang.annotation.Retention is present using isAnnotationPresent()
+-- AnnotationA: Testing isAnnotation() --
+[  OK  ] AnnotationA: test if the isAnnotation attribute is set properly
+-- AnnotationA: Testing Constructors --
+-- AnnotationA: Testing Methods --
+-- AnnotationA.classes(): Testing getDefaultValue() --
+[  OK  ] AnnotationA.classes(): test for annotation default value
+[  OK  ] AnnotationA.classes(): test default value
+-- Testing AnnotationA.classes() --
+-- AnnotationA.classes(): Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationA.classes(): test declared annotations count
+-- AnnotationA.classes(): Testing getAnnotations() --
+[  OK  ] AnnotationA.classes(): test annotations count
+-- AnnotationA.classes(): Testing getAnnotation(Class<? extends Annotation>) --
+-- AnnotationA.classes(): Testing isAnnotationPresent(Class<? extends Annotation>) --
+-- AnnotationA.classes(): Testing getParameterAnnotations() --
+[  OK  ] AnnotationA.classes(): test parameter count
+-- AnnotationA.enumeration(): Testing getDefaultValue() --
+[  OK  ] AnnotationA.enumeration(): test for annotation default value
+[  OK  ] AnnotationA.enumeration(): test default value
+-- Testing AnnotationA.enumeration() --
+-- AnnotationA.enumeration(): Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationA.enumeration(): test declared annotations count
+-- AnnotationA.enumeration(): Testing getAnnotations() --
+[  OK  ] AnnotationA.enumeration(): test annotations count
+-- AnnotationA.enumeration(): Testing getAnnotation(Class<? extends Annotation>) --
+-- AnnotationA.enumeration(): Testing isAnnotationPresent(Class<? extends Annotation>) --
+-- AnnotationA.enumeration(): Testing getParameterAnnotations() --
+[  OK  ] AnnotationA.enumeration(): test parameter count
+-- AnnotationA.integer(): Testing getDefaultValue() --
+[  OK  ] AnnotationA.integer(): test for annotation default value
+-- Testing AnnotationA.integer() --
+-- AnnotationA.integer(): Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationA.integer(): test declared annotations count
+[  OK  ] AnnotationA.integer(): test unique occurrence of the annotation type AnnotationA
+[  OK  ] AnnotationA.integer(): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- AnnotationA.integer(): Testing getAnnotations() --
+[  OK  ] AnnotationA.integer(): test annotations count
+[  OK  ] AnnotationA.integer(): test unique occurrence of the annotation type AnnotationA
+[  OK  ] AnnotationA.integer(): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- AnnotationA.integer(): Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] AnnotationA.integer(): try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- AnnotationA.integer(): Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] AnnotationA.integer(): test if annotation AnnotationA is present using isAnnotationPresent()
+-- AnnotationA.integer(): Testing getParameterAnnotations() --
+[  OK  ] AnnotationA.integer(): test parameter count
+-- AnnotationA: Testing Fields --
+
+== Testing AnnotationB ==
+-- AnnotationB: Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationB: test declared annotations count
+[  OK  ] AnnotationB: test unique occurrence of the annotation type java.lang.annotation.Inherited
+[  OK  ] AnnotationB: test if annotation java.lang.annotation.Inherited should be there
+ * Testing java.lang.annotation.Inherited
+[  OK  ] java.lang.annotation.Inherited: test annotationType
+[  OK  ] java.lang.annotation.Inherited: test annotation methods count
+[  OK  ] AnnotationB: test unique occurrence of the annotation type java.lang.annotation.Retention
+[  OK  ] AnnotationB: test if annotation java.lang.annotation.Retention should be there
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationB: Testing getAnnotations() --
+[  OK  ] AnnotationB: test annotations count
+[  OK  ] AnnotationB: test unique occurrence of the annotation type java.lang.annotation.Inherited
+[  OK  ] AnnotationB: test if annotation java.lang.annotation.Inherited should be there
+ * Testing java.lang.annotation.Inherited
+[  OK  ] java.lang.annotation.Inherited: test annotationType
+[  OK  ] java.lang.annotation.Inherited: test annotation methods count
+[  OK  ] AnnotationB: test unique occurrence of the annotation type java.lang.annotation.Retention
+[  OK  ] AnnotationB: test if annotation java.lang.annotation.Retention should be there
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationB: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] AnnotationB: try to get required annotation java.lang.annotation.Inherited using getAnnotation(Class<? extends Annotation>)
+ * Testing java.lang.annotation.Inherited
+[  OK  ] java.lang.annotation.Inherited: test annotationType
+[  OK  ] java.lang.annotation.Inherited: test annotation methods count
+[  OK  ] AnnotationB: try to get required annotation java.lang.annotation.Retention using getAnnotation(Class<? extends Annotation>)
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationB: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] AnnotationB: test if annotation java.lang.annotation.Inherited is present using isAnnotationPresent()
+[  OK  ] AnnotationB: test if annotation java.lang.annotation.Retention is present using isAnnotationPresent()
+-- AnnotationB: Testing isAnnotation() --
+[  OK  ] AnnotationB: test if the isAnnotation attribute is set properly
+-- AnnotationB: Testing Constructors --
+-- AnnotationB: Testing Methods --
+-- AnnotationB.clazz(): Testing getDefaultValue() --
+[  OK  ] AnnotationB.clazz(): test for annotation default value
+[  OK  ] AnnotationB.clazz(): test default value
+-- Testing AnnotationB.clazz() --
+-- AnnotationB.clazz(): Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationB.clazz(): test declared annotations count
+-- AnnotationB.clazz(): Testing getAnnotations() --
+[  OK  ] AnnotationB.clazz(): test annotations count
+-- AnnotationB.clazz(): Testing getAnnotation(Class<? extends Annotation>) --
+-- AnnotationB.clazz(): Testing isAnnotationPresent(Class<? extends Annotation>) --
+-- AnnotationB.clazz(): Testing getParameterAnnotations() --
+[  OK  ] AnnotationB.clazz(): test parameter count
+-- AnnotationB: Testing Fields --
+
+== Testing AnnotationC ==
+-- AnnotationC: Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationC: test declared annotations count
+[  OK  ] AnnotationC: test unique occurrence of the annotation type java.lang.annotation.Retention
+[  OK  ] AnnotationC: test if annotation java.lang.annotation.Retention should be there
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationC: Testing getAnnotations() --
+[  OK  ] AnnotationC: test annotations count
+[  OK  ] AnnotationC: test unique occurrence of the annotation type java.lang.annotation.Retention
+[  OK  ] AnnotationC: test if annotation java.lang.annotation.Retention should be there
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationC: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] AnnotationC: try to get required annotation java.lang.annotation.Retention using getAnnotation(Class<? extends Annotation>)
+ * Testing java.lang.annotation.Retention
+[  OK  ] java.lang.annotation.Retention: test annotationType
+[  OK  ] java.lang.annotation.Retention: test annotation methods count
+[  OK  ] java.lang.annotation.Retention: test invocation of the annotation method value()
+[  OK  ] java.lang.annotation.Retention: test return value of value() != null
+[  OK  ] java.lang.annotation.Retention: test return value of value()
+-- AnnotationC: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] AnnotationC: test if annotation java.lang.annotation.Retention is present using isAnnotationPresent()
+-- AnnotationC: Testing isAnnotation() --
+[  OK  ] AnnotationC: test if the isAnnotation attribute is set properly
+-- AnnotationC: Testing Constructors --
+-- AnnotationC: Testing Methods --
+-- AnnotationC: Testing Fields --
+
+== Testing AnnotationD ==
+-- AnnotationD: Testing getDeclaredAnnotations() --
+[  OK  ] AnnotationD: test declared annotations count
+-- AnnotationD: Testing getAnnotations() --
+[  OK  ] AnnotationD: test annotations count
+-- AnnotationD: Testing getAnnotation(Class<? extends Annotation>) --
+-- AnnotationD: Testing isAnnotationPresent(Class<? extends Annotation>) --
+-- AnnotationD: Testing isAnnotation() --
+[  OK  ] AnnotationD: test if the isAnnotation attribute is set properly
+-- AnnotationD: Testing Constructors --
+-- AnnotationD: Testing Methods --
+-- AnnotationD: Testing Fields --
+
+== Testing Foo ==
+-- Foo: Testing getDeclaredAnnotations() --
+[  OK  ] Foo: test declared annotations count
+[  OK  ] Foo: test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+[  OK  ] Foo: test unique occurrence of the annotation type AnnotationB
+[  OK  ] Foo: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- Foo: Testing getAnnotations() --
+[  OK  ] Foo: test annotations count
+[  OK  ] Foo: test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+[  OK  ] Foo: test unique occurrence of the annotation type AnnotationB
+[  OK  ] Foo: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- Foo: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Foo: try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+[  OK  ] Foo: try to get required annotation AnnotationB using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+-- Foo: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Foo: test if annotation AnnotationA is present using isAnnotationPresent()
+[  OK  ] Foo: test if annotation AnnotationB is present using isAnnotationPresent()
+-- Foo: Testing isAnnotation() --
+[  OK  ] Foo: test if the isAnnotation attribute is set properly
+-- Foo: Testing Constructors --
+-- Testing Foo.Foo() --
+-- Foo.Foo(): Testing getDeclaredAnnotations() --
+[  OK  ] Foo.Foo(): test declared annotations count
+[  OK  ] Foo.Foo(): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.Foo(): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.Foo(): Testing getAnnotations() --
+[  OK  ] Foo.Foo(): test annotations count
+[  OK  ] Foo.Foo(): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.Foo(): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.Foo(): Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Foo.Foo(): try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.Foo(): Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Foo.Foo(): test if annotation AnnotationA is present using isAnnotationPresent()
+-- Foo.Foo(): Testing getParameterAnnotations() --
+[  OK  ] Foo.Foo(): test parameter count
+-- Foo: Testing Methods --
+-- Foo.method(int): Testing getDefaultValue() --
+[  OK  ] Foo.method(int): test for annotation default value
+-- Testing Foo.method(int) --
+-- Foo.method(int): Testing getDeclaredAnnotations() --
+[  OK  ] Foo.method(int): test declared annotations count
+[  OK  ] Foo.method(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.method(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.method(int): Testing getAnnotations() --
+[  OK  ] Foo.method(int): test annotations count
+[  OK  ] Foo.method(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.method(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.method(int): Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Foo.method(int): try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.method(int): Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Foo.method(int): test if annotation AnnotationA is present using isAnnotationPresent()
+-- Foo.method(int): Testing getParameterAnnotations() --
+[  OK  ] Foo.method(int): test parameter count
+[  OK  ] Foo.method(int): test parameter annotations count for parameter 0
+[  OK  ] Foo.method(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.method(int): test if annotation of type AnnotationA should be defined for parameter 0
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.staticMethod(int): Testing getDefaultValue() --
+[  OK  ] Foo.staticMethod(int): test for annotation default value
+-- Testing Foo.staticMethod(int) --
+-- Foo.staticMethod(int): Testing getDeclaredAnnotations() --
+[  OK  ] Foo.staticMethod(int): test declared annotations count
+[  OK  ] Foo.staticMethod(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.staticMethod(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.staticMethod(int): Testing getAnnotations() --
+[  OK  ] Foo.staticMethod(int): test annotations count
+[  OK  ] Foo.staticMethod(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.staticMethod(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.staticMethod(int): Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Foo.staticMethod(int): try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.staticMethod(int): Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Foo.staticMethod(int): test if annotation AnnotationA is present using isAnnotationPresent()
+-- Foo.staticMethod(int): Testing getParameterAnnotations() --
+[  OK  ] Foo.staticMethod(int): test parameter count
+[  OK  ] Foo.staticMethod(int): test parameter annotations count for parameter 0
+[  OK  ] Foo.staticMethod(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.staticMethod(int): test if annotation of type AnnotationA should be defined for parameter 0
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo: Testing Fields --
+-- Testing Foo.afield --
+-- Foo.afield: Testing getDeclaredAnnotations() --
+[  OK  ] Foo.afield: test declared annotations count
+[  OK  ] Foo.afield: test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.afield: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.afield: Testing getAnnotations() --
+[  OK  ] Foo.afield: test annotations count
+[  OK  ] Foo.afield: test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.afield: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.afield: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Foo.afield: try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.afield: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Foo.afield: test if annotation AnnotationA is present using isAnnotationPresent()
+
+== Testing Bar ==
+-- Bar: Testing getDeclaredAnnotations() --
+[  OK  ] Bar: test declared annotations count
+[  OK  ] Bar: test unique occurrence of the annotation type AnnotationC
+[  OK  ] Bar: test if annotation AnnotationC should be there
+ * Testing AnnotationC
+[  OK  ] AnnotationC: test annotationType
+[  OK  ] AnnotationC: test annotation methods count
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotation()
+[  OK  ] AnnotationC: test return value of aAnnotation() != null
+[  OK  ] AnnotationC: test return value of aAnnotation()
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotationArray()
+[  OK  ] AnnotationC: test return value of aAnnotationArray() != null
+[  OK  ] AnnotationC: test return value of aAnnotationArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aByte()
+[  OK  ] AnnotationC: test return value of aByte() != null
+[  OK  ] AnnotationC: test return value of aByte()
+[  OK  ] AnnotationC: test invocation of the annotation method aByteArray()
+[  OK  ] AnnotationC: test return value of aByteArray() != null
+[  OK  ] AnnotationC: test return value of aByteArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aChar()
+[  OK  ] AnnotationC: test return value of aChar() != null
+[  OK  ] AnnotationC: test return value of aChar()
+[  OK  ] AnnotationC: test invocation of the annotation method aCharArray()
+[  OK  ] AnnotationC: test return value of aCharArray() != null
+[  OK  ] AnnotationC: test return value of aCharArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aClass()
+[  OK  ] AnnotationC: test return value of aClass() != null
+[  OK  ] AnnotationC: test return value of aClass()
+[  OK  ] AnnotationC: test invocation of the annotation method aClassArray()
+[  OK  ] AnnotationC: test return value of aClassArray() != null
+[  OK  ] AnnotationC: test return value of aClassArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aDouble()
+[  OK  ] AnnotationC: test return value of aDouble() != null
+[  OK  ] AnnotationC: test return value of aDouble()
+[  OK  ] AnnotationC: test invocation of the annotation method aDoubleArray()
+[  OK  ] AnnotationC: test return value of aDoubleArray() != null
+[  OK  ] AnnotationC: test return value of aDoubleArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnum()
+[  OK  ] AnnotationC: test return value of aEnum() != null
+[  OK  ] AnnotationC: test return value of aEnum()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnumArray()
+[  OK  ] AnnotationC: test return value of aEnumArray() != null
+[  OK  ] AnnotationC: test return value of aEnumArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloat()
+[  OK  ] AnnotationC: test return value of aFloat() != null
+[  OK  ] AnnotationC: test return value of aFloat()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloatArray()
+[  OK  ] AnnotationC: test return value of aFloatArray() != null
+[  OK  ] AnnotationC: test return value of aFloatArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aInt()
+[  OK  ] AnnotationC: test return value of aInt() != null
+[  OK  ] AnnotationC: test return value of aInt()
+[  OK  ] AnnotationC: test invocation of the annotation method aIntArray()
+[  OK  ] AnnotationC: test return value of aIntArray() != null
+[  OK  ] AnnotationC: test return value of aIntArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aLong()
+[  OK  ] AnnotationC: test return value of aLong() != null
+[  OK  ] AnnotationC: test return value of aLong()
+[  OK  ] AnnotationC: test invocation of the annotation method aLongArray()
+[  OK  ] AnnotationC: test return value of aLongArray() != null
+[  OK  ] AnnotationC: test return value of aLongArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aShort()
+[  OK  ] AnnotationC: test return value of aShort() != null
+[  OK  ] AnnotationC: test return value of aShort()
+[  OK  ] AnnotationC: test invocation of the annotation method aShortArray()
+[  OK  ] AnnotationC: test return value of aShortArray() != null
+[  OK  ] AnnotationC: test return value of aShortArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aString()
+[  OK  ] AnnotationC: test return value of aString() != null
+[  OK  ] AnnotationC: test return value of aString()
+[  OK  ] AnnotationC: test invocation of the annotation method aStringArray()
+[  OK  ] AnnotationC: test return value of aStringArray() != null
+[  OK  ] AnnotationC: test return value of aStringArray()
+-- Bar: Testing getAnnotations() --
+[  OK  ] Bar: test annotations count
+[  OK  ] Bar: test unique occurrence of the annotation type AnnotationB
+[  OK  ] Bar: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+[  OK  ] Bar: test unique occurrence of the annotation type AnnotationC
+[  OK  ] Bar: test if annotation AnnotationC should be there
+ * Testing AnnotationC
+[  OK  ] AnnotationC: test annotationType
+[  OK  ] AnnotationC: test annotation methods count
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotation()
+[  OK  ] AnnotationC: test return value of aAnnotation() != null
+[  OK  ] AnnotationC: test return value of aAnnotation()
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotationArray()
+[  OK  ] AnnotationC: test return value of aAnnotationArray() != null
+[  OK  ] AnnotationC: test return value of aAnnotationArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aByte()
+[  OK  ] AnnotationC: test return value of aByte() != null
+[  OK  ] AnnotationC: test return value of aByte()
+[  OK  ] AnnotationC: test invocation of the annotation method aByteArray()
+[  OK  ] AnnotationC: test return value of aByteArray() != null
+[  OK  ] AnnotationC: test return value of aByteArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aChar()
+[  OK  ] AnnotationC: test return value of aChar() != null
+[  OK  ] AnnotationC: test return value of aChar()
+[  OK  ] AnnotationC: test invocation of the annotation method aCharArray()
+[  OK  ] AnnotationC: test return value of aCharArray() != null
+[  OK  ] AnnotationC: test return value of aCharArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aClass()
+[  OK  ] AnnotationC: test return value of aClass() != null
+[  OK  ] AnnotationC: test return value of aClass()
+[  OK  ] AnnotationC: test invocation of the annotation method aClassArray()
+[  OK  ] AnnotationC: test return value of aClassArray() != null
+[  OK  ] AnnotationC: test return value of aClassArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aDouble()
+[  OK  ] AnnotationC: test return value of aDouble() != null
+[  OK  ] AnnotationC: test return value of aDouble()
+[  OK  ] AnnotationC: test invocation of the annotation method aDoubleArray()
+[  OK  ] AnnotationC: test return value of aDoubleArray() != null
+[  OK  ] AnnotationC: test return value of aDoubleArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnum()
+[  OK  ] AnnotationC: test return value of aEnum() != null
+[  OK  ] AnnotationC: test return value of aEnum()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnumArray()
+[  OK  ] AnnotationC: test return value of aEnumArray() != null
+[  OK  ] AnnotationC: test return value of aEnumArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloat()
+[  OK  ] AnnotationC: test return value of aFloat() != null
+[  OK  ] AnnotationC: test return value of aFloat()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloatArray()
+[  OK  ] AnnotationC: test return value of aFloatArray() != null
+[  OK  ] AnnotationC: test return value of aFloatArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aInt()
+[  OK  ] AnnotationC: test return value of aInt() != null
+[  OK  ] AnnotationC: test return value of aInt()
+[  OK  ] AnnotationC: test invocation of the annotation method aIntArray()
+[  OK  ] AnnotationC: test return value of aIntArray() != null
+[  OK  ] AnnotationC: test return value of aIntArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aLong()
+[  OK  ] AnnotationC: test return value of aLong() != null
+[  OK  ] AnnotationC: test return value of aLong()
+[  OK  ] AnnotationC: test invocation of the annotation method aLongArray()
+[  OK  ] AnnotationC: test return value of aLongArray() != null
+[  OK  ] AnnotationC: test return value of aLongArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aShort()
+[  OK  ] AnnotationC: test return value of aShort() != null
+[  OK  ] AnnotationC: test return value of aShort()
+[  OK  ] AnnotationC: test invocation of the annotation method aShortArray()
+[  OK  ] AnnotationC: test return value of aShortArray() != null
+[  OK  ] AnnotationC: test return value of aShortArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aString()
+[  OK  ] AnnotationC: test return value of aString() != null
+[  OK  ] AnnotationC: test return value of aString()
+[  OK  ] AnnotationC: test invocation of the annotation method aStringArray()
+[  OK  ] AnnotationC: test return value of aStringArray() != null
+[  OK  ] AnnotationC: test return value of aStringArray()
+-- Bar: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Bar: try to get required annotation AnnotationB using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+[  OK  ] Bar: try to get required annotation AnnotationC using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationC
+[  OK  ] AnnotationC: test annotationType
+[  OK  ] AnnotationC: test annotation methods count
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotation()
+[  OK  ] AnnotationC: test return value of aAnnotation() != null
+[  OK  ] AnnotationC: test return value of aAnnotation()
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotationArray()
+[  OK  ] AnnotationC: test return value of aAnnotationArray() != null
+[  OK  ] AnnotationC: test return value of aAnnotationArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aByte()
+[  OK  ] AnnotationC: test return value of aByte() != null
+[  OK  ] AnnotationC: test return value of aByte()
+[  OK  ] AnnotationC: test invocation of the annotation method aByteArray()
+[  OK  ] AnnotationC: test return value of aByteArray() != null
+[  OK  ] AnnotationC: test return value of aByteArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aChar()
+[  OK  ] AnnotationC: test return value of aChar() != null
+[  OK  ] AnnotationC: test return value of aChar()
+[  OK  ] AnnotationC: test invocation of the annotation method aCharArray()
+[  OK  ] AnnotationC: test return value of aCharArray() != null
+[  OK  ] AnnotationC: test return value of aCharArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aClass()
+[  OK  ] AnnotationC: test return value of aClass() != null
+[  OK  ] AnnotationC: test return value of aClass()
+[  OK  ] AnnotationC: test invocation of the annotation method aClassArray()
+[  OK  ] AnnotationC: test return value of aClassArray() != null
+[  OK  ] AnnotationC: test return value of aClassArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aDouble()
+[  OK  ] AnnotationC: test return value of aDouble() != null
+[  OK  ] AnnotationC: test return value of aDouble()
+[  OK  ] AnnotationC: test invocation of the annotation method aDoubleArray()
+[  OK  ] AnnotationC: test return value of aDoubleArray() != null
+[  OK  ] AnnotationC: test return value of aDoubleArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnum()
+[  OK  ] AnnotationC: test return value of aEnum() != null
+[  OK  ] AnnotationC: test return value of aEnum()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnumArray()
+[  OK  ] AnnotationC: test return value of aEnumArray() != null
+[  OK  ] AnnotationC: test return value of aEnumArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloat()
+[  OK  ] AnnotationC: test return value of aFloat() != null
+[  OK  ] AnnotationC: test return value of aFloat()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloatArray()
+[  OK  ] AnnotationC: test return value of aFloatArray() != null
+[  OK  ] AnnotationC: test return value of aFloatArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aInt()
+[  OK  ] AnnotationC: test return value of aInt() != null
+[  OK  ] AnnotationC: test return value of aInt()
+[  OK  ] AnnotationC: test invocation of the annotation method aIntArray()
+[  OK  ] AnnotationC: test return value of aIntArray() != null
+[  OK  ] AnnotationC: test return value of aIntArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aLong()
+[  OK  ] AnnotationC: test return value of aLong() != null
+[  OK  ] AnnotationC: test return value of aLong()
+[  OK  ] AnnotationC: test invocation of the annotation method aLongArray()
+[  OK  ] AnnotationC: test return value of aLongArray() != null
+[  OK  ] AnnotationC: test return value of aLongArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aShort()
+[  OK  ] AnnotationC: test return value of aShort() != null
+[  OK  ] AnnotationC: test return value of aShort()
+[  OK  ] AnnotationC: test invocation of the annotation method aShortArray()
+[  OK  ] AnnotationC: test return value of aShortArray() != null
+[  OK  ] AnnotationC: test return value of aShortArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aString()
+[  OK  ] AnnotationC: test return value of aString() != null
+[  OK  ] AnnotationC: test return value of aString()
+[  OK  ] AnnotationC: test invocation of the annotation method aStringArray()
+[  OK  ] AnnotationC: test return value of aStringArray() != null
+[  OK  ] AnnotationC: test return value of aStringArray()
+-- Bar: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Bar: test if annotation AnnotationB is present using isAnnotationPresent()
+[  OK  ] Bar: test if annotation AnnotationC is present using isAnnotationPresent()
+-- Bar: Testing isAnnotation() --
+[  OK  ] Bar: test if the isAnnotation attribute is set properly
+-- Bar: Testing Constructors --
+-- Testing Bar.Bar() --
+-- Bar.Bar(): Testing getDeclaredAnnotations() --
+[  OK  ] Bar.Bar(): test declared annotations count
+-- Bar.Bar(): Testing getAnnotations() --
+[  OK  ] Bar.Bar(): test annotations count
+-- Bar.Bar(): Testing getAnnotation(Class<? extends Annotation>) --
+-- Bar.Bar(): Testing isAnnotationPresent(Class<? extends Annotation>) --
+-- Bar.Bar(): Testing getParameterAnnotations() --
+[  OK  ] Bar.Bar(): test parameter count
+-- Bar: Testing Methods --
+-- Bar.method(int): Testing getDefaultValue() --
+[  OK  ] Bar.method(int): test for annotation default value
+-- Testing Bar.method(int) --
+-- Bar.method(int): Testing getDeclaredAnnotations() --
+[  OK  ] Bar.method(int): test declared annotations count
+-- Bar.method(int): Testing getAnnotations() --
+[  OK  ] Bar.method(int): test annotations count
+-- Bar.method(int): Testing getAnnotation(Class<? extends Annotation>) --
+-- Bar.method(int): Testing isAnnotationPresent(Class<? extends Annotation>) --
+-- Bar.method(int): Testing getParameterAnnotations() --
+[  OK  ] Bar.method(int): test parameter count
+[  OK  ] Bar.method(int): test parameter annotations count for parameter 0
+-- Bar.staticMethod(int): Testing getDefaultValue() --
+[  OK  ] Bar.staticMethod(int): test for annotation default value
+-- Testing Bar.staticMethod(int) --
+-- Bar.staticMethod(int): Testing getDeclaredAnnotations() --
+[  OK  ] Bar.staticMethod(int): test declared annotations count
+-- Bar.staticMethod(int): Testing getAnnotations() --
+[  OK  ] Bar.staticMethod(int): test annotations count
+-- Bar.staticMethod(int): Testing getAnnotation(Class<? extends Annotation>) --
+-- Bar.staticMethod(int): Testing isAnnotationPresent(Class<? extends Annotation>) --
+-- Bar.staticMethod(int): Testing getParameterAnnotations() --
+[  OK  ] Bar.staticMethod(int): test parameter count
+[  OK  ] Bar.staticMethod(int): test parameter annotations count for parameter 0
+-- Bar: Testing Fields --
+-- Testing Bar.afield --
+-- Bar.afield: Testing getDeclaredAnnotations() --
+[  OK  ] Bar.afield: test declared annotations count
+-- Bar.afield: Testing getAnnotations() --
+[  OK  ] Bar.afield: test annotations count
+-- Bar.afield: Testing getAnnotation(Class<? extends Annotation>) --
+-- Bar.afield: Testing isAnnotationPresent(Class<? extends Annotation>) --
+
+== Testing Baz ==
+-- Baz: Testing getDeclaredAnnotations() --
+[  OK  ] Baz: test declared annotations count
+[  OK  ] Baz: test unique occurrence of the annotation type AnnotationB
+[  OK  ] Baz: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+[  OK  ] Baz: test unique occurrence of the annotation type AnnotationC
+[  OK  ] Baz: test if annotation AnnotationC should be there
+ * Testing AnnotationC
+[  OK  ] AnnotationC: test annotationType
+[  OK  ] AnnotationC: test annotation methods count
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotation()
+[  OK  ] AnnotationC: test return value of aAnnotation() != null
+[  OK  ] AnnotationC: test return value of aAnnotation()
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotationArray()
+[  OK  ] AnnotationC: test return value of aAnnotationArray() != null
+[  OK  ] AnnotationC: test return value of aAnnotationArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aByte()
+[  OK  ] AnnotationC: test return value of aByte() != null
+[  OK  ] AnnotationC: test return value of aByte()
+[  OK  ] AnnotationC: test invocation of the annotation method aByteArray()
+[  OK  ] AnnotationC: test return value of aByteArray() != null
+[  OK  ] AnnotationC: test return value of aByteArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aChar()
+[  OK  ] AnnotationC: test return value of aChar() != null
+[  OK  ] AnnotationC: test return value of aChar()
+[  OK  ] AnnotationC: test invocation of the annotation method aCharArray()
+[  OK  ] AnnotationC: test return value of aCharArray() != null
+[  OK  ] AnnotationC: test return value of aCharArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aClass()
+[  OK  ] AnnotationC: test return value of aClass() != null
+[  OK  ] AnnotationC: test return value of aClass()
+[  OK  ] AnnotationC: test invocation of the annotation method aClassArray()
+[  OK  ] AnnotationC: test return value of aClassArray() != null
+[  OK  ] AnnotationC: test return value of aClassArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aDouble()
+[  OK  ] AnnotationC: test return value of aDouble() != null
+[  OK  ] AnnotationC: test return value of aDouble()
+[  OK  ] AnnotationC: test invocation of the annotation method aDoubleArray()
+[  OK  ] AnnotationC: test return value of aDoubleArray() != null
+[  OK  ] AnnotationC: test return value of aDoubleArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnum()
+[  OK  ] AnnotationC: test return value of aEnum() != null
+[  OK  ] AnnotationC: test return value of aEnum()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnumArray()
+[  OK  ] AnnotationC: test return value of aEnumArray() != null
+[  OK  ] AnnotationC: test return value of aEnumArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloat()
+[  OK  ] AnnotationC: test return value of aFloat() != null
+[  OK  ] AnnotationC: test return value of aFloat()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloatArray()
+[  OK  ] AnnotationC: test return value of aFloatArray() != null
+[  OK  ] AnnotationC: test return value of aFloatArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aInt()
+[  OK  ] AnnotationC: test return value of aInt() != null
+[  OK  ] AnnotationC: test return value of aInt()
+[  OK  ] AnnotationC: test invocation of the annotation method aIntArray()
+[  OK  ] AnnotationC: test return value of aIntArray() != null
+[  OK  ] AnnotationC: test return value of aIntArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aLong()
+[  OK  ] AnnotationC: test return value of aLong() != null
+[  OK  ] AnnotationC: test return value of aLong()
+[  OK  ] AnnotationC: test invocation of the annotation method aLongArray()
+[  OK  ] AnnotationC: test return value of aLongArray() != null
+[  OK  ] AnnotationC: test return value of aLongArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aShort()
+[  OK  ] AnnotationC: test return value of aShort() != null
+[  OK  ] AnnotationC: test return value of aShort()
+[  OK  ] AnnotationC: test invocation of the annotation method aShortArray()
+[  OK  ] AnnotationC: test return value of aShortArray() != null
+[  OK  ] AnnotationC: test return value of aShortArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aString()
+[  OK  ] AnnotationC: test return value of aString() != null
+[  OK  ] AnnotationC: test return value of aString()
+[  OK  ] AnnotationC: test invocation of the annotation method aStringArray()
+[  OK  ] AnnotationC: test return value of aStringArray() != null
+[  OK  ] AnnotationC: test return value of aStringArray()
+-- Baz: Testing getAnnotations() --
+[  OK  ] Baz: test annotations count
+[  OK  ] Baz: test unique occurrence of the annotation type AnnotationB
+[  OK  ] Baz: test if annotation AnnotationB should be there
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+[  OK  ] Baz: test unique occurrence of the annotation type AnnotationC
+[  OK  ] Baz: test if annotation AnnotationC should be there
+ * Testing AnnotationC
+[  OK  ] AnnotationC: test annotationType
+[  OK  ] AnnotationC: test annotation methods count
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotation()
+[  OK  ] AnnotationC: test return value of aAnnotation() != null
+[  OK  ] AnnotationC: test return value of aAnnotation()
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotationArray()
+[  OK  ] AnnotationC: test return value of aAnnotationArray() != null
+[  OK  ] AnnotationC: test return value of aAnnotationArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aByte()
+[  OK  ] AnnotationC: test return value of aByte() != null
+[  OK  ] AnnotationC: test return value of aByte()
+[  OK  ] AnnotationC: test invocation of the annotation method aByteArray()
+[  OK  ] AnnotationC: test return value of aByteArray() != null
+[  OK  ] AnnotationC: test return value of aByteArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aChar()
+[  OK  ] AnnotationC: test return value of aChar() != null
+[  OK  ] AnnotationC: test return value of aChar()
+[  OK  ] AnnotationC: test invocation of the annotation method aCharArray()
+[  OK  ] AnnotationC: test return value of aCharArray() != null
+[  OK  ] AnnotationC: test return value of aCharArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aClass()
+[  OK  ] AnnotationC: test return value of aClass() != null
+[  OK  ] AnnotationC: test return value of aClass()
+[  OK  ] AnnotationC: test invocation of the annotation method aClassArray()
+[  OK  ] AnnotationC: test return value of aClassArray() != null
+[  OK  ] AnnotationC: test return value of aClassArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aDouble()
+[  OK  ] AnnotationC: test return value of aDouble() != null
+[  OK  ] AnnotationC: test return value of aDouble()
+[  OK  ] AnnotationC: test invocation of the annotation method aDoubleArray()
+[  OK  ] AnnotationC: test return value of aDoubleArray() != null
+[  OK  ] AnnotationC: test return value of aDoubleArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnum()
+[  OK  ] AnnotationC: test return value of aEnum() != null
+[  OK  ] AnnotationC: test return value of aEnum()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnumArray()
+[  OK  ] AnnotationC: test return value of aEnumArray() != null
+[  OK  ] AnnotationC: test return value of aEnumArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloat()
+[  OK  ] AnnotationC: test return value of aFloat() != null
+[  OK  ] AnnotationC: test return value of aFloat()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloatArray()
+[  OK  ] AnnotationC: test return value of aFloatArray() != null
+[  OK  ] AnnotationC: test return value of aFloatArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aInt()
+[  OK  ] AnnotationC: test return value of aInt() != null
+[  OK  ] AnnotationC: test return value of aInt()
+[  OK  ] AnnotationC: test invocation of the annotation method aIntArray()
+[  OK  ] AnnotationC: test return value of aIntArray() != null
+[  OK  ] AnnotationC: test return value of aIntArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aLong()
+[  OK  ] AnnotationC: test return value of aLong() != null
+[  OK  ] AnnotationC: test return value of aLong()
+[  OK  ] AnnotationC: test invocation of the annotation method aLongArray()
+[  OK  ] AnnotationC: test return value of aLongArray() != null
+[  OK  ] AnnotationC: test return value of aLongArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aShort()
+[  OK  ] AnnotationC: test return value of aShort() != null
+[  OK  ] AnnotationC: test return value of aShort()
+[  OK  ] AnnotationC: test invocation of the annotation method aShortArray()
+[  OK  ] AnnotationC: test return value of aShortArray() != null
+[  OK  ] AnnotationC: test return value of aShortArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aString()
+[  OK  ] AnnotationC: test return value of aString() != null
+[  OK  ] AnnotationC: test return value of aString()
+[  OK  ] AnnotationC: test invocation of the annotation method aStringArray()
+[  OK  ] AnnotationC: test return value of aStringArray() != null
+[  OK  ] AnnotationC: test return value of aStringArray()
+-- Baz: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Baz: try to get required annotation AnnotationB using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationB
+[  OK  ] AnnotationB: test annotationType
+[  OK  ] AnnotationB: test annotation methods count
+[  OK  ] AnnotationB: test invocation of the annotation method clazz()
+[  OK  ] AnnotationB: test return value of clazz() != null
+[  OK  ] AnnotationB: test return value of clazz()
+[  OK  ] AnnotationB: test invocation of the annotation method string()
+[  OK  ] AnnotationB: test return value of string() != null
+[  OK  ] AnnotationB: test return value of string()
+[  OK  ] Baz: try to get required annotation AnnotationC using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationC
+[  OK  ] AnnotationC: test annotationType
+[  OK  ] AnnotationC: test annotation methods count
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotation()
+[  OK  ] AnnotationC: test return value of aAnnotation() != null
+[  OK  ] AnnotationC: test return value of aAnnotation()
+[  OK  ] AnnotationC: test invocation of the annotation method aAnnotationArray()
+[  OK  ] AnnotationC: test return value of aAnnotationArray() != null
+[  OK  ] AnnotationC: test return value of aAnnotationArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aByte()
+[  OK  ] AnnotationC: test return value of aByte() != null
+[  OK  ] AnnotationC: test return value of aByte()
+[  OK  ] AnnotationC: test invocation of the annotation method aByteArray()
+[  OK  ] AnnotationC: test return value of aByteArray() != null
+[  OK  ] AnnotationC: test return value of aByteArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aChar()
+[  OK  ] AnnotationC: test return value of aChar() != null
+[  OK  ] AnnotationC: test return value of aChar()
+[  OK  ] AnnotationC: test invocation of the annotation method aCharArray()
+[  OK  ] AnnotationC: test return value of aCharArray() != null
+[  OK  ] AnnotationC: test return value of aCharArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aClass()
+[  OK  ] AnnotationC: test return value of aClass() != null
+[  OK  ] AnnotationC: test return value of aClass()
+[  OK  ] AnnotationC: test invocation of the annotation method aClassArray()
+[  OK  ] AnnotationC: test return value of aClassArray() != null
+[  OK  ] AnnotationC: test return value of aClassArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aDouble()
+[  OK  ] AnnotationC: test return value of aDouble() != null
+[  OK  ] AnnotationC: test return value of aDouble()
+[  OK  ] AnnotationC: test invocation of the annotation method aDoubleArray()
+[  OK  ] AnnotationC: test return value of aDoubleArray() != null
+[  OK  ] AnnotationC: test return value of aDoubleArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnum()
+[  OK  ] AnnotationC: test return value of aEnum() != null
+[  OK  ] AnnotationC: test return value of aEnum()
+[  OK  ] AnnotationC: test invocation of the annotation method aEnumArray()
+[  OK  ] AnnotationC: test return value of aEnumArray() != null
+[  OK  ] AnnotationC: test return value of aEnumArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloat()
+[  OK  ] AnnotationC: test return value of aFloat() != null
+[  OK  ] AnnotationC: test return value of aFloat()
+[  OK  ] AnnotationC: test invocation of the annotation method aFloatArray()
+[  OK  ] AnnotationC: test return value of aFloatArray() != null
+[  OK  ] AnnotationC: test return value of aFloatArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aInt()
+[  OK  ] AnnotationC: test return value of aInt() != null
+[  OK  ] AnnotationC: test return value of aInt()
+[  OK  ] AnnotationC: test invocation of the annotation method aIntArray()
+[  OK  ] AnnotationC: test return value of aIntArray() != null
+[  OK  ] AnnotationC: test return value of aIntArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aLong()
+[  OK  ] AnnotationC: test return value of aLong() != null
+[  OK  ] AnnotationC: test return value of aLong()
+[  OK  ] AnnotationC: test invocation of the annotation method aLongArray()
+[  OK  ] AnnotationC: test return value of aLongArray() != null
+[  OK  ] AnnotationC: test return value of aLongArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aShort()
+[  OK  ] AnnotationC: test return value of aShort() != null
+[  OK  ] AnnotationC: test return value of aShort()
+[  OK  ] AnnotationC: test invocation of the annotation method aShortArray()
+[  OK  ] AnnotationC: test return value of aShortArray() != null
+[  OK  ] AnnotationC: test return value of aShortArray()
+[  OK  ] AnnotationC: test invocation of the annotation method aString()
+[  OK  ] AnnotationC: test return value of aString() != null
+[  OK  ] AnnotationC: test return value of aString()
+[  OK  ] AnnotationC: test invocation of the annotation method aStringArray()
+[  OK  ] AnnotationC: test return value of aStringArray() != null
+[  OK  ] AnnotationC: test return value of aStringArray()
+-- Baz: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Baz: test if annotation AnnotationB is present using isAnnotationPresent()
+[  OK  ] Baz: test if annotation AnnotationC is present using isAnnotationPresent()
+-- Baz: Testing isAnnotation() --
+[  OK  ] Baz: test if the isAnnotation attribute is set properly
+-- Baz: Testing Constructors --
+-- Baz: Testing Methods --
+-- Baz.method(int): Testing getDefaultValue() --
+[  OK  ] Baz.method(int): test for annotation default value
+-- Testing Baz.method(int) --
+-- Baz.method(int): Testing getDeclaredAnnotations() --
+[  OK  ] Baz.method(int): test declared annotations count
+[  OK  ] Baz.method(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Baz.method(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz.method(int): Testing getAnnotations() --
+[  OK  ] Baz.method(int): test annotations count
+[  OK  ] Baz.method(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Baz.method(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz.method(int): Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Baz.method(int): try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz.method(int): Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Baz.method(int): test if annotation AnnotationA is present using isAnnotationPresent()
+-- Baz.method(int): Testing getParameterAnnotations() --
+[  OK  ] Baz.method(int): test parameter count
+[  OK  ] Baz.method(int): test parameter annotations count for parameter 0
+[  OK  ] Baz.method(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Baz.method(int): test if annotation of type AnnotationA should be defined for parameter 0
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz.staticMethod(int): Testing getDefaultValue() --
+[  OK  ] Baz.staticMethod(int): test for annotation default value
+-- Testing Baz.staticMethod(int) --
+-- Baz.staticMethod(int): Testing getDeclaredAnnotations() --
+[  OK  ] Baz.staticMethod(int): test declared annotations count
+[  OK  ] Baz.staticMethod(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Baz.staticMethod(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz.staticMethod(int): Testing getAnnotations() --
+[  OK  ] Baz.staticMethod(int): test annotations count
+[  OK  ] Baz.staticMethod(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Baz.staticMethod(int): test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz.staticMethod(int): Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Baz.staticMethod(int): try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz.staticMethod(int): Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Baz.staticMethod(int): test if annotation AnnotationA is present using isAnnotationPresent()
+-- Baz.staticMethod(int): Testing getParameterAnnotations() --
+[  OK  ] Baz.staticMethod(int): test parameter count
+[  OK  ] Baz.staticMethod(int): test parameter annotations count for parameter 0
+[  OK  ] Baz.staticMethod(int): test unique occurrence of the annotation type AnnotationA
+[  OK  ] Baz.staticMethod(int): test if annotation of type AnnotationA should be defined for parameter 0
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Baz: Testing Fields --
+-- Testing Foo.afield --
+-- Foo.afield: Testing getDeclaredAnnotations() --
+[  OK  ] Foo.afield: test declared annotations count
+[  OK  ] Foo.afield: test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.afield: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.afield: Testing getAnnotations() --
+[  OK  ] Foo.afield: test annotations count
+[  OK  ] Foo.afield: test unique occurrence of the annotation type AnnotationA
+[  OK  ] Foo.afield: test if annotation AnnotationA should be there
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.afield: Testing getAnnotation(Class<? extends Annotation>) --
+[  OK  ] Foo.afield: try to get required annotation AnnotationA using getAnnotation(Class<? extends Annotation>)
+ * Testing AnnotationA
+[  OK  ] AnnotationA: test annotationType
+[  OK  ] AnnotationA: test annotation methods count
+[  OK  ] AnnotationA: test invocation of the annotation method classes()
+[  OK  ] AnnotationA: test return value of classes() != null
+[  OK  ] AnnotationA: test return value of classes()
+[  OK  ] AnnotationA: test invocation of the annotation method enumeration()
+[  OK  ] AnnotationA: test return value of enumeration() != null
+[  OK  ] AnnotationA: test return value of enumeration()
+[  OK  ] AnnotationA: test invocation of the annotation method integer()
+[  OK  ] AnnotationA: test return value of integer() != null
+[  OK  ] AnnotationA: test return value of integer()
+[  OK  ] AnnotationA: test invocation of the annotation method string()
+[  OK  ] AnnotationA: test return value of string() != null
+[  OK  ] AnnotationA: test return value of string()
+-- Foo.afield: Testing isAnnotationPresent(Class<? extends Annotation>) --
+[  OK  ] Foo.afield: test if annotation AnnotationA is present using isAnnotationPresent()
+
+         passed:     1266
+         failed:        0
+         ----------------
+         sum:        1266
index 8c4577073ccd0fd969e668077dbe4364d60a20ad..98712def22d0750c4612ae80952099499070f872 100644 (file)
 ## Contact: cacao@cacaojvm.org
 ##
 ## Authors: Christian Thalinger
-##
-## $Id: Makefile.am 6257 2006-12-28 13:43:06Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 JAVA      = $(top_builddir)/src/cacao/cacao
 
index 47cf231908fecf42dc4dcfaa5cf6eda26bc0f825..b3c27f70f5bd82eb92d3b80da81f715f56458888 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes: Christian Thalinger
 
-   $Id: fptest.java 4357 2006-01-22 23:33:38Z twisti $
-
 */
 
 public class fptest {
index 76e06f4a9772e5f9773e867854c8e88b483df826..ffbba1ce031308c45fc1dd167df300a99f665586 100644 (file)
@@ -26,9 +26,6 @@
 ##
 ## Authors: Christian Thalinger
 ##          Edwin Steiner
-##
-## $Id$
-
 ## Process this file with automake to produce Makefile.in
 
 JAVA      = $(top_builddir)/src/cacao/cacao
old mode 100755 (executable)
new mode 100644 (file)
old mode 100755 (executable)
new mode 100644 (file)
index 47d245daffb2485ebc2675320ee127e3a7deab66..fecc9f4ec291f2781e9057cc215e5c68c267a204 100644 (file)
@@ -27,8 +27,6 @@
    Authors: Reinhard Grafl
             Christian Thalinger
 
-   $Id: jctest.java 6263 2007-01-02 16:20:45Z twisti $
-
 */
 
 public class jctest implements jcinterface {
index ece0e5ba84647d001073ee4c694c7d95a55a3b52..408a13e49105237cb1a0dfea5e5a7a062b71cd18 100644 (file)
 ## Contact: cacao@cacaojvm.org
 ##
 ## Authors: Christian Thalinger
-##
-## $Id: Makefile.am 7596 2007-03-28 21:05:53Z twisti $
 
-## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/src -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR) -I$(top_srcdir)/src/vm/jit/$(ARCH_DIR)/$(OS_DIR) -I$(top_builddir)
 
index bab845ba9a8f6534064a784e6babba23bf427bc5..f765ebabce5411ddc811dd863df11f44643d9ee4 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: checkjni.c 4695 2006-03-28 14:21:14Z twisti $
-
 */
 
 
index d04abacede411579659d50d03358c22d1d183775..543e415a7aae2c141b702f4815571ea6f9c5c24a 100644 (file)
@@ -28,8 +28,6 @@
 
    Changes:
 
-   $Id: checkjni.java 4695 2006-03-28 14:21:14Z twisti $
-
 */
 
 
index 2f26727e15be0943f49bbc378de8e8eb1cdaf00a..3d568f66dafa9fb825abdc49f18843d76225996d 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Thalinger
 
-   $Id: test.c 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index bf8f250610c1391c04592574425fc26fbd30e1fc..0e0a3f00d434eaeb0e0dacf07f6dc496283e58f8 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Christian Thalinger
 
-   $Id: test.java 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index 4d48aa093b3d0f32b16f1ade47003248ddfb7314..d9e8e5ad5d4e9d5fcb178c9d7683e3c1e32ea5d1 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: testarguments.c 8123 2007-06-20 23:50:55Z michi $
-
 */
 
 
index 366fce9b2369baa25ee6059ff7a061f435f88f97..ece180c54e6003fb523cf9a38e868b398c200afb 100644 (file)
@@ -22,8 +22,6 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: testarguments.java 8123 2007-06-20 23:50:55Z michi $
-
 */
 
 
index 47f61a9999a09c3f635828440d8c87ee5e4e3037..2bce8e1f10a09e0c9bf956ff03d689497b958e3e 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Joseph Wenninger
 
-   $Id: testgetobjectclass0.c 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index 4aa0a3cf10fb52392ad238f80b10ed026a35f622..1edbeef518d87043a08ae5d2b05169bb0b49a964 100644 (file)
@@ -26,7 +26,6 @@
 
    Authors: Joseph Wenninger
 
-   $Id: testgetobjectclass0.java 4357 2006-01-22 23:33:38Z twisti $
 
 */
 
index 09360815e8109995b1120f3e2023e634b6caa7ab..91f45fcfeaa1c88eb1a6cd4006fd5a0312f6ae0d 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7433 2007-03-02 19:42:13Z edwin $
 
-## Process this file with automake to produce Makefile.in
 
 SUBDIRS = \
        classes1 \
index 0e5488257d275fad78e82a9fdeec01241c268ce2..1c6ce997a83673d63cf80d698b4461aa02a20bac 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7433 2007-03-02 19:42:13Z edwin $
 
-## Process this file with automake to produce Makefile.in
 
 SOURCE_FILES = \
        $(srcdir)/BarPassFoo.java \
index d1035693cef85a4691175112a7f94d45faa07bff..ce5771797960195a2ae79c8eed0cfed3d018c28c 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7433 2007-03-02 19:42:13Z edwin $
 
-## Process this file with automake to produce Makefile.in
 
 SOURCE_FILES = \
        $(srcdir)/BarPassFoo.java \
index 96ea9e62157aba52e9fe4dbc7c823c216c235e36..5d1624d95a116ce1099ec91dae8e61212b33a8a5 100644 (file)
 ## along with this program; if not, write to the Free Software
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
-##
-## $Id: Makefile.am 7433 2007-03-02 19:42:13Z edwin $
 
-## Process this file with automake to produce Makefile.in
 
 SOURCE_FILES = \
        $(srcdir)/BarPassFoo.java \