cacao.git
18 years ago* NEWS: Some news.
twisti [Mon, 22 May 2006 09:07:15 +0000 (09:07 +0000)]
* NEWS: Some news.

18 years ago* src/vm/vm.c (vm_abort): New method.
twisti [Mon, 22 May 2006 09:06:44 +0000 (09:06 +0000)]
* 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.

18 years ago* src/threads/native/lock.h, src/threads/native/lock.c: Tasuki lock
edwin [Thu, 18 May 2006 14:33:32 +0000 (14:33 +0000)]
* 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.

18 years ago* src/vm/properties.c (properties_get): Search the list backwards to
twisti [Thu, 18 May 2006 14:06:58 +0000 (14:06 +0000)]
* src/vm/properties.c (properties_get): Search the list backwards to
get the newest entry.

18 years ago* src/vm/vm.c (version): Print default and runtime classpath
twisti [Thu, 18 May 2006 12:50:32 +0000 (12:50 +0000)]
* src/vm/vm.c (version): Print default and runtime classpath
variables.
(vm_create): Add a default java.endorsed.dirs property.

18 years ago* configure.ac: Don't export BOOTCLASSPATH, that makes problems.
twisti [Wed, 17 May 2006 22:06:38 +0000 (22:06 +0000)]
* configure.ac: Don't export BOOTCLASSPATH, that makes problems.

18 years ago* src/vm/jit/powerpc/codegen.c (createnativestub): Fixed bug and
twisti [Wed, 17 May 2006 12:10:25 +0000 (12:10 +0000)]
* 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.

18 years ago* src/vm/jit/powerpc/codegen.c (codegen): Bugfix: use REG_ITMP3 in
twisti [Tue, 16 May 2006 13:08:30 +0000 (13:08 +0000)]
* 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.

18 years ago* src/threads/native/lock.c: Fixed comment formatting.
edwin [Tue, 16 May 2006 01:49:29 +0000 (01:49 +0000)]
* src/threads/native/lock.c: Fixed comment formatting.

18 years ago* src/vm/jit/i386/machine-instr.h (compare_and_swap): Fixed comment.
edwin [Mon, 15 May 2006 23:37:14 +0000 (23:37 +0000)]
* src/vm/jit/i386/machine-instr.h (compare_and_swap): Fixed comment.

18 years ago* configure.ac: Export BOOTCLASSPATH for javac check.
twisti [Mon, 15 May 2006 23:31:56 +0000 (23:31 +0000)]
* 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.

18 years ago* src/vm/jit/inline/inline_debug.c: Renamed to src/vm/jit/inline/inline_debug.inc.
edwin [Mon, 15 May 2006 23:22:48 +0000 (23:22 +0000)]
* 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.

--HG--
rename : src/vm/jit/inline/inline_debug.c => src/vm/jit/inline/inline_debug.inc

18 years ago* src/threads/native/lock.c (lock_record_remove_waiter): Made static.
edwin [Mon, 15 May 2006 21:48:44 +0000 (21:48 +0000)]
* src/threads/native/lock.c (lock_record_remove_waiter): Made static.
(lock_monitor_wait): Likewise.

18 years ago* src/threads/native/lock.h, src/threads/native/lock.c
edwin [Mon, 15 May 2006 21:32:09 +0000 (21:32 +0000)]
* 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.

18 years ago* configure.ac (src/threads/green/Makefile): Removed from AC_CONFIG_FILES.
edwin [Mon, 15 May 2006 18:24:24 +0000 (18:24 +0000)]
* configure.ac (src/threads/green/Makefile): Removed from AC_CONFIG_FILES.

18 years ago* src/threads/native/lock.h (lock_record_pool_header_t): Documented.
edwin [Mon, 15 May 2006 15:06:06 +0000 (15:06 +0000)]
* src/threads/native/lock.h (lock_record_pool_header_t): Documented.
(lock_record_pool_t): Documented.

* src/threads/native/lock.c: Minor whitespace cleanup.

18 years ago* THIRDPARTY: Removed green threads stuff.
twisti [Mon, 15 May 2006 14:40:22 +0000 (14:40 +0000)]
* THIRDPARTY: Removed green threads stuff.

18 years ago* src/vm/jit/alpha/asmpart.S (asm_perform_threadswitch)
twisti [Mon, 15 May 2006 14:39:05 +0000 (14:39 +0000)]
* 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.

18 years ago* src/vm/hashtable.h,
twisti [Mon, 15 May 2006 14:24:36 +0000 (14:24 +0000)]
* 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.

18 years ago* src/vm/jit/asmpart.h (calljava_xhandler2): Not required anymore.
twisti [Mon, 15 May 2006 13:13:22 +0000 (13:13 +0000)]
* src/vm/jit/asmpart.h (calljava_xhandler2): Not required anymore.

18 years ago* src/threads/native/threads.c (sem_init, sem_post, sem_wait)
twisti [Mon, 15 May 2006 12:23:13 +0000 (12:23 +0000)]
* 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.

18 years ago* src/threads/native/lock.c (THIN_UNLOCKED): Abstracted out the thin
edwin [Mon, 15 May 2006 12:14:27 +0000 (12:14 +0000)]
* 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).

18 years ago* src/threads/native/lock.c: Added reference to thin lock paper and
edwin [Mon, 15 May 2006 11:34:44 +0000 (11:34 +0000)]
* src/threads/native/lock.c: Added reference to thin lock paper and
explained the lockword format.

18 years ago* src/threads/native/lock.c: Thin lock implementation.
edwin [Sun, 14 May 2006 22:41:34 +0000 (22:41 +0000)]
* 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.

18 years ago* src/threads/native/lock.c (lock_record_free_pools): Assert that
edwin [Sun, 14 May 2006 22:36:35 +0000 (22:36 +0000)]
* 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.

18 years ago* src/threads/native/threads.c (threads_table_init): New function.
edwin [Sun, 14 May 2006 15:34:51 +0000 (15:34 +0000)]
* 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.

18 years ago* src/threads/native/threads.h, src/threads/native/threads.c
edwin [Sun, 14 May 2006 14:02:51 +0000 (14:02 +0000)]
* 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.

18 years ago* src/threads/native/lock.c, src/threads/native/lock.h: Rewritten
edwin [Sun, 14 May 2006 12:22:25 +0000 (12:22 +0000)]
* 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.

18 years ago* src/threads/native/threads.c (threads_calc_absolute_time): Optimize
edwin [Sun, 14 May 2006 12:15:12 +0000 (12:15 +0000)]
* 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.

18 years ago* src/threads/native/lock.c (lock_init_thread_lock_record_pool):
edwin [Sat, 13 May 2006 23:25:20 +0000 (23:25 +0000)]
* 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.

18 years ago* src/threads/native/threads.c, src/threads/native/threads.c: Further
edwin [Sat, 13 May 2006 23:10:21 +0000 (23:10 +0000)]
* 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.

18 years ago* src/threads/native/threads.c: The Big Thread Cleanup. No functional changes,
edwin [Fri, 12 May 2006 16:49:50 +0000 (16:49 +0000)]
* 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).

18 years ago* src/vm/jit/emit.h: Replaced __POWERPC__ #ifdef with
twisti [Fri, 12 May 2006 14:32:53 +0000 (14:32 +0000)]
* src/vm/jit/emit.h: Replaced __POWERPC__ #ifdef with
SIZEOF_VOID_P == 4.

18 years ago* src/native/vm/VMClassLoader.c (nativeGetResources): Bugfix: utf_new
twisti [Thu, 11 May 2006 14:02:37 +0000 (14:02 +0000)]
* src/native/vm/VMClassLoader.c (nativeGetResources): Bugfix: utf_new
should be utfname.

18 years ago* src/vm/jit/mips/codegen.c: Changed mcodeptr from u4* to u1*.
twisti [Thu, 11 May 2006 13:43:55 +0000 (13:43 +0000)]
* src/vm/jit/mips/codegen.c: Changed mcodeptr from u4* to u1*.
* src/vm/jit/mips/codegen.h: Likewise.

18 years ago* src/vm/jit/mips/asmpart.S (asm_call_jit_compiler): Use new
twisti [Thu, 11 May 2006 13:09:53 +0000 (13:09 +0000)]
* src/vm/jit/mips/asmpart.S (asm_call_jit_compiler): Use new
jit_asm_compile method.

18 years ago* src/threads/native/threads.c (monitorExit): Added an assert to
edwin [Thu, 11 May 2006 12:48:43 +0000 (12:48 +0000)]
* src/threads/native/threads.c (monitorExit): Added an assert to
check that no existing waiter is overwritten by the suspicious
assignment.

18 years ago* src/lib/vm/reference/java/lang/VMClassLoader.java
edwin [Thu, 11 May 2006 12:36:30 +0000 (12:36 +0000)]
* 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.

18 years ago* src/native/jni.c (DeleteGlobalRef): Bugfix: handle the removal of
twisti [Thu, 11 May 2006 12:18:55 +0000 (12:18 +0000)]
* src/native/jni.c (DeleteGlobalRef): Bugfix: handle the removal of
the first entry in the chain properly.

18 years ago* src/vm/hashtable.c (threads/native/threads.h): Added.
twisti [Thu, 11 May 2006 09:18:28 +0000 (09:18 +0000)]
* 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.

18 years ago* src/vm/jit/alpha/codegen.c: Changed mcodeptr from u4* to u1*.
twisti [Wed, 10 May 2006 16:14:28 +0000 (16:14 +0000)]
* src/vm/jit/alpha/codegen.c: Changed mcodeptr from u4* to u1*.
* src/vm/jit/alpha/codegen.h: Likewise.

18 years ago* src/vm/jit/codegen-common.h (codegendata): Use an u1* mcodeptr for
twisti [Wed, 10 May 2006 15:51:46 +0000 (15:51 +0000)]
* 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.

18 years ago* src/vm/jit/inline/inline.c (inline_write_exception_handlers):
edwin [Wed, 10 May 2006 15:09:49 +0000 (15:09 +0000)]
* src/vm/jit/inline/inline.c (inline_write_exception_handlers):
Correct cast for abused instruction->target.

18 years ago* src/vm/jit/alpha/asmpart.S (asm_call_jit_compiler): Use new
twisti [Wed, 10 May 2006 13:12:06 +0000 (13:12 +0000)]
* src/vm/jit/alpha/asmpart.S (asm_call_jit_compiler): Use new
jit_asm_compile method.

18 years ago* configure.ac (AC_CONFIG_FILES): Added src/scripts/keytool.
twisti [Mon, 8 May 2006 11:09:18 +0000 (11:09 +0000)]
* 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.

18 years ago* src/vm/jit/powerpc/asmpart.S (asm_vm_call_method): Handle argument
twisti [Mon, 8 May 2006 11:05:48 +0000 (11:05 +0000)]
* src/vm/jit/powerpc/asmpart.S (asm_vm_call_method): Handle argument
passing properly for SysV ABIs. Darwin is left to do.

18 years ago* tests/regression/native/testarguments.java: Added new test.
twisti [Mon, 8 May 2006 11:03:57 +0000 (11:03 +0000)]
* tests/regression/native/testarguments.java: Added new test.
* tests/regression/native/testarguments.c: Likewise.
* tests/regression/native/testarguments.output: Likewise.

18 years ago* src/vm/vm.c (vm_create): make agentlib/agentpath work
motse [Sat, 6 May 2006 18:29:55 +0000 (18:29 +0000)]
* 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

18 years ago* src/native/vm/VMRuntime.c
edwin [Sat, 6 May 2006 14:13:04 +0000 (14:13 +0000)]
* src/native/vm/VMRuntime.c
(Java_java_lang_VMRuntime_mapLibraryName): Use new utf_ functions.
(Changes): Added my name.
(vim boilerplate): Added.

18 years ago* src/native/vm/VMClassLoader.c
edwin [Sat, 6 May 2006 10:10:00 +0000 (10:10 +0000)]
* 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.

18 years ago* src/vm/classcache.c (classcache_merge_class_entries):
edwin [Sat, 6 May 2006 00:16:11 +0000 (00:16 +0000)]
* src/vm/classcache.c (classcache_merge_class_entries):
Use utf_cat_classname.
(classcache_store): Likewise.
(classcache_store_defined): Likewise.

18 years ago* src/native/vm/VMClassLoader.c
edwin [Sat, 6 May 2006 00:11:18 +0000 (00:11 +0000)]
* 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.

18 years ago* src/vm/utf8.h: Moved #include "config.h" up front.
edwin [Fri, 5 May 2006 19:31:39 +0000 (19:31 +0000)]
* src/vm/utf8.h: Moved #include "config.h" up front.

18 years ago* src/toolbox/logging.c (Changes): Added my name.
edwin [Fri, 5 May 2006 19:22:57 +0000 (19:22 +0000)]
* src/toolbox/logging.c (Changes): Added my name.
(vim boilerplate): Added.

18 years ago* src/toolbox/logging.c (log_message_utf): Use new utf_ functions.
edwin [Fri, 5 May 2006 19:21:42 +0000 (19:21 +0000)]
* src/toolbox/logging.c (log_message_utf): Use new utf_ functions.
(log_message_class_message_class): Likewise.
(log_message_method): Likewise.

18 years ago* src/vm/builtin.c (builtin_throw_exception): Use new utf_ functions.
edwin [Fri, 5 May 2006 19:13:41 +0000 (19:13 +0000)]
* src/vm/builtin.c (builtin_throw_exception): Use new utf_ functions.
(builtin_trace_exception): Likewise.
(builtin_trace_args): Likewise.
(builtin_displaymethodstop): Likewise.

18 years ago* src/vm/suck.c (suck_start): Use new utf_ functions.
edwin [Fri, 5 May 2006 18:58:00 +0000 (18:58 +0000)]
* src/vm/suck.c (suck_start): Use new utf_ functions.

18 years ago* src/vm/utf8.h, src/vm/utf8.c: Fixed header.
edwin [Fri, 5 May 2006 18:49:01 +0000 (18:49 +0000)]
* src/vm/utf8.h, src/vm/utf8.c: Fixed header.

18 years ago* src/vm/loader.c (load_class_from_classbuffer): Use new
edwin [Fri, 5 May 2006 18:14:27 +0000 (18:14 +0000)]
* src/vm/loader.c (load_class_from_classbuffer): Use new
utf_ functions.

18 years ago* src/vm/resolve.c (resolve_class_from_name): Use new utf_ functions.
edwin [Fri, 5 May 2006 18:08:17 +0000 (18:08 +0000)]
* 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.

18 years ago* src/vm/utf8.h, src/vm/utf8.c: The Big utf_* Renaming.
edwin [Fri, 5 May 2006 17:34:49 +0000 (17:34 +0000)]
* 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.

18 years ago* src/vm/exceptions.c (new_exception): Documented.
edwin [Fri, 5 May 2006 17:09:48 +0000 (17:09 +0000)]
* 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.

18 years ago* src/vm/utf8.c, src/vm/utf8.h (utf_copy): New function.
edwin [Fri, 5 May 2006 16:51:15 +0000 (16:51 +0000)]
* 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.

18 years ago* src/vm/string.c, src/vm/stringlocal.h, src/vm/utf8.c, src/vm/utf8.h
edwin [Fri, 5 May 2006 15:26:04 +0000 (15:26 +0000)]
* src/vm/string.c, src/vm/stringlocal.h, src/vm/utf8.c, src/vm/utf8.h
(Changes): Added my name.
(vim boilerplate): Added.

18 years ago* src/vm/string.c, src/vm/stringlocal.h
edwin [Fri, 5 May 2006 15:14:18 +0000 (15:14 +0000)]
* 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.

18 years ago* src/vm/string.c, src/vm/stringlocal.h (java_string_new_char):
edwin [Fri, 5 May 2006 14:36:18 +0000 (14:36 +0000)]
* 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.

18 years ago* src/vm/utf8.c, src/vm/utf8.h (utf_bytes): New function.
edwin [Fri, 5 May 2006 13:56:35 +0000 (13:56 +0000)]
* 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.

18 years ago* src/vm/utf8.c, src/vm/utf8.h (utf_strlen): Renamed to
edwin [Fri, 5 May 2006 13:48:25 +0000 (13:48 +0000)]
* 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.

18 years ago* src/threads/native/threads.c (wakeWaiters): Renamed
edwin [Wed, 3 May 2006 23:04:30 +0000 (23:04 +0000)]
* src/threads/native/threads.c (wakeWaiters): Renamed
to threads_wake_waiters. Documented.

18 years ago* src/threads/native/threads.c (handleWaiter): Renamed arguments.
edwin [Wed, 3 May 2006 22:58:01 +0000 (22:58 +0000)]
* src/threads/native/threads.c (handleWaiter): Renamed arguments.
Commented.
(monitorEnter): Documented.
(notifyOneOrAll): Cleaned up.

18 years ago* src/threads/native/threads.c (setPriority): Renamed to
edwin [Wed, 3 May 2006 22:46:39 +0000 (22:46 +0000)]
* 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.

18 years ago* src/vm/jit/stack.c (stack_analyse): Check for val.a == NULL on
twisti [Tue, 2 May 2006 16:16:04 +0000 (16:16 +0000)]
* 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.

18 years ago* src/threads/native/threads.c: Cleanup and documentation.
edwin [Mon, 1 May 2006 23:14:42 +0000 (23:14 +0000)]
* src/threads/native/threads.c: Cleanup and documentation.

18 years ago* src/threads/native/threads.h (threads_sem_init): New function.
edwin [Mon, 1 May 2006 21:40:38 +0000 (21:40 +0000)]
* 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.

18 years ago* src/threads/native/threads.c (threads_sem_wait): New function.
edwin [Mon, 1 May 2006 12:40:18 +0000 (12:40 +0000)]
* 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.

18 years ago* configure.ac (AC_CONFIG_FILES): Added src/scripts/jarsigner.
twisti [Sun, 30 Apr 2006 17:18:02 +0000 (17:18 +0000)]
* 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.

18 years ago* src/vm/resolve.c (resolve_method_verifier_checks)
edwin [Sun, 30 Apr 2006 16:17:44 +0000 (16:17 +0000)]
* 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.

18 years ago* src/vm/jit/loop/tracing.c (tracing): Adapted to new format of INVOKE
edwin [Sun, 30 Apr 2006 15:58:53 +0000 (15:58 +0000)]
* 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.

18 years ago* src/vm/jit/parse.c (parse): Added a comment.
edwin [Fri, 28 Apr 2006 12:25:27 +0000 (12:25 +0000)]
* src/vm/jit/parse.c (parse): Added a comment.

18 years ago* src/vm/jit/stack.c (stack_analyse): We need to split AASTORECONST
twisti [Fri, 28 Apr 2006 12:24:40 +0000 (12:24 +0000)]
* 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.

18 years ago* src/vm/jit/stack.c (stack_analyse): Check for
twisti [Fri, 28 Apr 2006 11:50:06 +0000 (11:50 +0000)]
* 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.

18 years ago* tests/regression/codepatching/test.java: Added new test.
twisti [Fri, 28 Apr 2006 11:37:33 +0000 (11:37 +0000)]
* 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.

18 years ago* src/vm/resolve.c (resolve_method_lazy): Turn INVOKEVIRTUAL into
edwin [Fri, 28 Apr 2006 11:24:39 +0000 (11:24 +0000)]
* src/vm/resolve.c (resolve_method_lazy): Turn INVOKEVIRTUAL into
INVOKESPECIAL for monomorphic calls.

18 years ago* src/vm/jit/intrp/asmpart.c (intrp_asm_vm_call_method_int): Fix build
edwin [Fri, 28 Apr 2006 00:46:39 +0000 (00:46 +0000)]
* src/vm/jit/intrp/asmpart.c (intrp_asm_vm_call_method_int): Fix build
errors. TWISTI, please review these changes.

18 years ago* regression/codepatching/test.java: Added test for AASTORECONST
edwin [Fri, 28 Apr 2006 00:31:10 +0000 (00:31 +0000)]
* 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.

18 years ago* src/vm/jit/stacktrace.h (STACKFRAMEINFO): Added parenthesis.
twisti [Thu, 27 Apr 2006 23:03:37 +0000 (23:03 +0000)]
* 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.

18 years ago* src/vm/jit/x86_64/emit.c: Changed x86_64 function prefix to
twisti [Thu, 27 Apr 2006 12:33:20 +0000 (12:33 +0000)]
* 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.

18 years ago* src/native/vm/VMSystemProperties.c (preInit): Append "/jre" to
twisti [Thu, 27 Apr 2006 11:05:03 +0000 (11:05 +0000)]
* 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.

18 years ago* src/vm/jit/powerpc/darwin/md-asm.h (jit_asm_compile): Renamed from
twisti [Thu, 27 Apr 2006 10:32:27 +0000 (10:32 +0000)]
* src/vm/jit/powerpc/darwin/md-asm.h (jit_asm_compile): Renamed from
jit_compile.
* src/vm/jit/powerpc/asmpart.S: Likewise.

18 years ago* src/vm/jit/stacktrace.c (stacktrace_getClassContext): Reverted the
edwin [Wed, 26 Apr 2006 15:44:07 +0000 (15:44 +0000)]
* 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.

18 years ago* src/vm/jit/i386/Makefile.am (libarch_la_SOURCES): Removed
twisti [Wed, 26 Apr 2006 14:09:15 +0000 (14:09 +0000)]
* 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.

18 years ago* src/vm/jit/i386/md-emit.h: Moved from src/vm/jit/i386/emitfuncs.h.
twisti [Wed, 26 Apr 2006 11:02:51 +0000 (11:02 +0000)]
* src/vm/jit/i386/md-emit.h: Moved from src/vm/jit/i386/emitfuncs.h.

--HG--
rename : src/vm/jit/i386/emitfuncs.h => src/vm/jit/i386/md-emit.h

18 years ago* src/vm/jit/i386/emit.c: Moved from src/vm/jit/i386/emitfuncs.c.
twisti [Wed, 26 Apr 2006 11:02:20 +0000 (11:02 +0000)]
* src/vm/jit/i386/emit.c: Moved from src/vm/jit/i386/emitfuncs.c.

--HG--
rename : src/vm/jit/i386/emitfuncs.c => src/vm/jit/i386/emit.c

18 years ago* configure.ac (AC_CONFIG_FILES): Added src/scripts/rmic.
twisti [Wed, 26 Apr 2006 09:02:39 +0000 (09:02 +0000)]
* 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.

18 years ago* m4/ac_prog_javac.m4: Default to ecj.
twisti [Wed, 26 Apr 2006 08:57:01 +0000 (08:57 +0000)]
* 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).

18 years ago* src/vm/jit/disass-common.c (disass_printf): Avoid compiler warning.
edwin [Tue, 25 Apr 2006 18:02:15 +0000 (18:02 +0000)]
* src/vm/jit/disass-common.c (disass_printf): Avoid compiler warning.

* src/vm/jit/profile/profile.c (profile_printstats): Avoid compiler warnings.

18 years ago* src/vm/jit/i386/disass.c (disassinstr): Avoid compiler warning.
edwin [Tue, 25 Apr 2006 17:57:56 +0000 (17:57 +0000)]
* src/vm/jit/i386/disass.c (disassinstr): Avoid compiler warning.

18 years ago* src/vm/jit/stack.c (stack_show_icmd): Removed unused variable `um`.
edwin [Tue, 25 Apr 2006 17:53:54 +0000 (17:53 +0000)]
* src/vm/jit/stack.c (stack_show_icmd): Removed unused variable `um`.

18 years ago* src/vm/loader.c (load_method): Simplify initialization of methodinfo by
edwin [Tue, 25 Apr 2006 17:48:18 +0000 (17:48 +0000)]
* 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.

18 years ago* src/mm/memory.h (MZERO): Added macro MZERO for convenient memory cleaning.
edwin [Tue, 25 Apr 2006 17:45:02 +0000 (17:45 +0000)]
* src/mm/memory.h (MZERO): Added macro MZERO for convenient memory cleaning.