cacao.git
17 years ago* tests/regression/jasmin/test_verify_fail_handler_bad_local.j: new
edwin [Wed, 11 Oct 2006 10:17:03 +0000 (10:17 +0000)]
* tests/regression/jasmin/test_verify_fail_handler_bad_local.j: new
test.

* tests/regression/jasmin/Makefile.am: Added new test.

17 years ago* tests/regression/jasmin/test_verify_fail_jsr_recursion_terminates.j:
edwin [Tue, 10 Oct 2006 21:16:17 +0000 (21:16 +0000)]
* 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.

17 years ago* tests/regression/jasmin/test_verify_fail_jsr_recursion_terminates.j:
edwin [Tue, 10 Oct 2006 20:45:20 +0000 (20:45 +0000)]
* tests/regression/jasmin/test_verify_fail_jsr_recursion_terminates.j:
New test.

* tests/regression/jasmin/Makefile.am: Added new test.

17 years ago* tests/regression/jasmin/test_verify_fail_jsr_recursion.j: New test.
edwin [Tue, 10 Oct 2006 20:31:30 +0000 (20:31 +0000)]
* tests/regression/jasmin/test_verify_fail_jsr_recursion.j: New test.

* tests/regression/jasmin/Makefile.am: Added new test.

17 years ago* src/vm/resolve.c, src/vm/resolve.h (constrain_unresolved_method):
edwin [Tue, 10 Oct 2006 00:29:26 +0000 (00:29 +0000)]
* 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.

17 years ago* src/vm/resolve.c (resolve_method_type_checks): Split up into
edwin [Mon, 9 Oct 2006 23:53:42 +0000 (23:53 +0000)]
* 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.

17 years ago* src/vm/resolve.c (resolve_method_verifier_checks): Removed unused
edwin [Mon, 9 Oct 2006 23:21:37 +0000 (23:21 +0000)]
* src/vm/resolve.c (resolve_method_verifier_checks): Removed unused
variable. Removed unclear assertion.

17 years ago* src/vm/resolve.c (resolve_method_verifier_checks): Removed unused
edwin [Mon, 9 Oct 2006 23:17:56 +0000 (23:17 +0000)]
* 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.

17 years ago* src/vm/resolve.c (resolve_method_verifier_checks): Factored out
edwin [Mon, 9 Oct 2006 23:06:39 +0000 (23:06 +0000)]
* 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.

17 years ago* src/vm/resolve.c (resolve_method_verifier_checks): Factored out
edwin [Mon, 9 Oct 2006 22:19:22 +0000 (22:19 +0000)]
* 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.

17 years ago* src/vm/resolve.c (resolve_method_lazy): Removed dependence on
edwin [Mon, 9 Oct 2006 17:08:38 +0000 (17:08 +0000)]
* 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.

17 years ago* src/vm/resolve.c (resolve_field_verifier_checks): Removed dependence
edwin [Mon, 9 Oct 2006 15:42:02 +0000 (15:42 +0000)]
* 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.

17 years ago* test/regression/jasmin/test_verify_ok_jsr_subroutine_loops_to_start.j:
edwin [Sun, 8 Oct 2006 22:49:42 +0000 (22:49 +0000)]
* 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.

17 years ago* src/vm/jit/stack.c: Verify that subroutines are not merged.
edwin [Sun, 8 Oct 2006 11:39:41 +0000 (11:39 +0000)]
* 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.

17 years ago* src/vm/jit/show.c (show_basicblock): Removed extra newline.
edwin [Sun, 8 Oct 2006 10:51:32 +0000 (10:51 +0000)]
* src/vm/jit/show.c (show_basicblock): Removed extra newline.

17 years ago* tests/regression/jasmin/test_verify_fail_jsr_merge_subroutines_via_stack.j:
edwin [Sun, 8 Oct 2006 00:07:48 +0000 (00:07 +0000)]
* tests/regression/jasmin/test_verify_fail_jsr_merge_subroutines_via_stack.j:
New test.

* tests/regression/jasmin/Makefile.am: Added new test.

17 years ago* src/vm/jit/cfg.c (cfg_build): Fixed a bug causing infinite loops.
edwin [Sat, 7 Oct 2006 23:56:43 +0000 (23:56 +0000)]
* 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.

17 years ago* tests/regression/jasmin/test_verify_fail_jsr_polymorphic_pop.j:
edwin [Sat, 7 Oct 2006 23:02:53 +0000 (23:02 +0000)]
* 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.

17 years ago* tests/regression/jasmin/test_verify_fail_jsr_called_with_different_stackdepths.j:
edwin [Sat, 7 Oct 2006 22:34:25 +0000 (22:34 +0000)]
* tests/regression/jasmin/test_verify_fail_jsr_called_with_different_stackdepths.j:
New test.
* tests/regression/jasmin/Makefile.am: Added new test.

17 years ago* src/vm/jit/stack.c (GET_NEW_VAR): Fixed macro argument.
edwin [Sat, 7 Oct 2006 12:54:14 +0000 (12:54 +0000)]
* 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.

17 years ago* src/vm/jit/allocator/simplereg.c: Implemented REG_INDEX for
edwin [Sat, 7 Oct 2006 10:22:00 +0000 (10:22 +0000)]
* src/vm/jit/allocator/simplereg.c: Implemented REG_INDEX for
architectures with address register file.

17 years ago* src/vm/jit/allocator/simplereg.c
edwin [Sat, 7 Oct 2006 09:44:30 +0000 (09:44 +0000)]
* src/vm/jit/allocator/simplereg.c
(simplereg_allocate_locals_leafmethod): Fixed declaration after code.

17 years ago* src/vm/jit/allocator/simplereg.c (simplereg_allocate_interface):
edwin [Sat, 7 Oct 2006 00:06:49 +0000 (00:06 +0000)]
* src/vm/jit/allocator/simplereg.c (simplereg_allocate_interface):
Copy all flags except SAVEDVAR when reusing an interface slot.

17 years ago* src/vm/jit/allocator/simplereg.c: Cleaned up memory slot allocation.
edwin [Fri, 6 Oct 2006 23:58:35 +0000 (23:58 +0000)]
* src/vm/jit/allocator/simplereg.c: Cleaned up memory slot allocation.

17 years ago* src/vm/jit/allocator/simplereg.c (simplereg_allocate_interfaces): Fixed
edwin [Fri, 6 Oct 2006 23:41:02 +0000 (23:41 +0000)]
* src/vm/jit/allocator/simplereg.c (simplereg_allocate_interfaces): Fixed
indentation.

17 years ago* src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
edwin [Fri, 6 Oct 2006 23:03:55 +0000 (23:03 +0000)]
* src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
Minor cleanup, use SIMPLEREG_REG_INDEX.

17 years ago* src/vm/jit/allocator/simplereg.c: Reuse interface registers in blocks
edwin [Fri, 6 Oct 2006 22:37:13 +0000 (22:37 +0000)]
* 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.

17 years ago* src/vm/jit/stack.c (stack_analyse): Do not set argintreguse to
edwin [Fri, 6 Oct 2006 21:30:48 +0000 (21:30 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/Makefile.am (Changes): Added my name.
edwin [Fri, 6 Oct 2006 20:11:03 +0000 (20:11 +0000)]
* src/vm/jit/intrp/Makefile.am (Changes): Added my name.

17 years ago* src/vm/jit/show.h (show_variable): Made global.
edwin [Fri, 6 Oct 2006 20:09:28 +0000 (20:09 +0000)]
* 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.

17 years ago* src/threads/native/threads.c (threads_attach_current_thread): Rename
edwin [Thu, 5 Oct 2006 20:30:12 +0000 (20:30 +0000)]
* src/threads/native/threads.c (threads_attach_current_thread): Rename
left-over `t` to `thread` in interpreter code.

17 years ago* src/vm/jit/codegen-common.c: Include vm/jit/intrp/intrp.h to prevent
edwin [Thu, 5 Oct 2006 20:21:04 +0000 (20:21 +0000)]
* src/vm/jit/codegen-common.c: Include vm/jit/intrp/intrp.h to prevent
a warning.

17 years ago* src/vm/jit/intrp/intrp.h: Added missing prototypes.
edwin [Thu, 5 Oct 2006 20:18:41 +0000 (20:18 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/intrp.h: Cleaned up. Defined missing prototypes.
edwin [Thu, 5 Oct 2006 20:04:38 +0000 (20:04 +0000)]
* src/vm/jit/intrp/intrp.h: Cleaned up. Defined missing prototypes.

* src/vm/jit/intrp/java.vmg: Defined "afi" type prefix.

17 years ago* src/vm/jit/intrp/peephole.c: Include interpreter files using < >
edwin [Thu, 5 Oct 2006 19:36:21 +0000 (19:36 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/engine.c (Changes): Added my name.
edwin [Thu, 5 Oct 2006 17:52:03 +0000 (17:52 +0000)]
* src/vm/jit/intrp/engine.c (Changes): Added my name.
(vim boilerplate): Added.

17 years ago* src/native/jni.c (jni_attach_current_thread): New help function.
twisti [Thu, 5 Oct 2006 17:28:13 +0000 (17:28 +0000)]
* 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.

17 years ago* src/vm/utf8.c (utf_removeThread, utf_java_lang_Thread__V): Added.
twisti [Thu, 5 Oct 2006 17:23:48 +0000 (17:23 +0000)]
* 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.

17 years ago* src/vm/vm.c (vm_create): Turn off the verifier for -Xint.
edwin [Thu, 5 Oct 2006 16:28:37 +0000 (16:28 +0000)]
* src/vm/vm.c (vm_create): Turn off the verifier for -Xint.

17 years ago* src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Style fix.
edwin [Thu, 5 Oct 2006 16:18:10 +0000 (16:18 +0000)]
* src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Style fix.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Save synchronized object in
edwin [Thu, 5 Oct 2006 16:12:16 +0000 (16:12 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Reserve an extra stackslot in
edwin [Thu, 5 Oct 2006 15:43:38 +0000 (15:43 +0000)]
* src/vm/jit/intrp/codegen.c (codegen): Reserve an extra stackslot in
synchronized methods.
(intrp_createcompilerstub): Likewise.
(intrp_createnativestub): Use stackframesize for clarity.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Separate stackframesize from
edwin [Thu, 5 Oct 2006 15:33:42 +0000 (15:33 +0000)]
* 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.

17 years ago* src/native/jni.c (jni_init_localref_table): New function.
twisti [Thu, 5 Oct 2006 14:13:06 +0000 (14:13 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/java.vmg (TRACECALL): Implemented for 32-bit
edwin [Thu, 5 Oct 2006 12:23:23 +0000 (12:23 +0000)]
* src/vm/jit/intrp/java.vmg (TRACECALL): Implemented for 32-bit
architectures.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Fix off-by-one error in len
edwin [Thu, 5 Oct 2006 10:50:39 +0000 (10:50 +0000)]
* src/vm/jit/intrp/codegen.c (codegen): Fix off-by-one error in len
tests of optimizations.

17 years ago* src/vm/jit/show.c (show_icmd): Show constant operand of IFxx, and
edwin [Thu, 5 Oct 2006 10:41:28 +0000 (10:41 +0000)]
* src/vm/jit/show.c (show_icmd): Show constant operand of IFxx, and
IF_Lxx.

17 years ago* src/vm/jit/show.c (show_basicblock): Fixed deadcode check.
edwin [Thu, 5 Oct 2006 10:39:09 +0000 (10:39 +0000)]
* src/vm/jit/show.c (show_basicblock): Fixed deadcode check.

* src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Clear
global_sp.

17 years ago* src/vm/jit/powerpc/emit.c (emit_verbosecall_enter): Darwin build
twisti [Thu, 5 Oct 2006 09:04:12 +0000 (09:04 +0000)]
* src/vm/jit/powerpc/emit.c (emit_verbosecall_enter): Darwin build
fixes.

17 years ago* src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Fixed for
edwin [Thu, 5 Oct 2006 00:21:12 +0000 (00:21 +0000)]
* src/vm/jit/intrp/asmpart.c (intrp_asm_handle_exception): Fixed for
catch-all handlers.

17 years ago* src/vm/jit/show.c (show_method): Adapted to interpreter.
edwin [Thu, 5 Oct 2006 00:06:23 +0000 (00:06 +0000)]
* 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.

17 years ago* tests/regression/jctest.java: Also test division/remainder with
edwin [Wed, 4 Oct 2006 23:08:33 +0000 (23:08 +0000)]
* tests/regression/jctest.java: Also test division/remainder with
constant divisor 1.

* tests/regression/jctest.output: Updated test output.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Don't ?DIVPOW2 with value 1.
edwin [Wed, 4 Oct 2006 23:05:15 +0000 (23:05 +0000)]
* src/vm/jit/intrp/codegen.c (codegen): Don't ?DIVPOW2 with value 1.
The optimization produces the wrong result in this case.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Implemented IDIVPOW2 and
edwin [Wed, 4 Oct 2006 22:53:51 +0000 (22:53 +0000)]
* src/vm/jit/intrp/codegen.c (codegen): Implemented IDIVPOW2 and
LDIVPOW2 optimizations.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Implemented IREMPOW2 and
edwin [Wed, 4 Oct 2006 22:39:44 +0000 (22:39 +0000)]
* src/vm/jit/intrp/codegen.c (codegen): Implemented IREMPOW2 and
LREMPOW2 optimizations.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Implement optimization of comparisons.
edwin [Wed, 4 Oct 2006 22:12:02 +0000 (22:12 +0000)]
* src/vm/jit/intrp/codegen.c (codegen): Implement optimization of comparisons.

17 years ago* src/vm/jit/allocator/simplereg.c (reg_free_temp_func): Fixed indices
edwin [Wed, 4 Oct 2006 20:44:03 +0000 (20:44 +0000)]
* src/vm/jit/allocator/simplereg.c (reg_free_temp_func): Fixed indices
into regcopycount array.
(allocate_scratch_registers): Likewise.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): #if 0-ed optimized ICMDs that
edwin [Wed, 4 Oct 2006 20:02:37 +0000 (20:02 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Removed unoptimized *CONST
edwin [Wed, 4 Oct 2006 19:47:01 +0000 (19:47 +0000)]
* 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.

17 years ago* src/vm/jit/stack.c: Removed interpreter-specific code.
edwin [Wed, 4 Oct 2006 19:38:28 +0000 (19:38 +0000)]
* src/vm/jit/stack.c: Removed interpreter-specific code.

17 years ago* src/threads/native/lock.c (lock_monitor_exit): Check for NULL object.
edwin [Wed, 4 Oct 2006 18:44:28 +0000 (18:44 +0000)]
* 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.

17 years ago* tests/regression/jasmin/test_nullpointerexception_monitorexit.j:
edwin [Wed, 4 Oct 2006 18:39:49 +0000 (18:39 +0000)]
* tests/regression/jasmin/test_nullpointerexception_monitorexit.j:
Fixed test case, so it passes if the exception is thrown.

17 years ago* tests/regression/jasmin/test_nullpointerexception_monitorexit.j:
edwin [Wed, 4 Oct 2006 18:35:37 +0000 (18:35 +0000)]
* tests/regression/jasmin/test_nullpointerexception_monitorexit.j:
New test.

* tests/regression/jasmin/Makefile.am: Added
test_nullpointerexception_monitorexit.j.

17 years ago* tests/regression/jasmin/Makefile.am: Properly quote variables.
edwin [Wed, 4 Oct 2006 18:25:52 +0000 (18:25 +0000)]
* tests/regression/jasmin/Makefile.am: Properly quote variables.

17 years ago* src/vm/jit/intrp/engine.c (THROW_CLASSCASTEXCEPTION): Really throw a
edwin [Wed, 4 Oct 2006 18:23:19 +0000 (18:23 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/java.vmg (LOOKUPSWITCH): No point in using >= 0 on
edwin [Wed, 4 Oct 2006 16:42:41 +0000 (16:42 +0000)]
* src/vm/jit/intrp/java.vmg (LOOKUPSWITCH): No point in using >= 0 on
an unsigned variable.

17 years ago* src/vm/jit/intrp/codegen.c (nativecall): Store return valud of
edwin [Wed, 4 Oct 2006 16:01:53 +0000 (16:01 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Convert JavaPCs to block indices.
edwin [Wed, 4 Oct 2006 15:14:19 +0000 (15:14 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/md.c (intrp_md_init): Set vm_out to stderr.
twisti [Wed, 4 Oct 2006 15:04:52 +0000 (15:04 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/dynamic-super.c (superreuse_insert): Use
edwin [Wed, 4 Oct 2006 14:50:21 +0000 (14:50 +0000)]
* src/vm/jit/intrp/dynamic-super.c (superreuse_insert): Use
lock_monitor_ functions.
(patchersuper_rewrite): Likewise.
(hashtable_patchersupers_insert): Likewise.

17 years ago* src/vm/jit/intrp/codegen.c (codegen): Restored ICMD_RET to really
edwin [Wed, 4 Oct 2006 14:31:01 +0000 (14:31 +0000)]
* 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.

17 years ago* src/vm/jit/intrp/java.vmg (builtin_monitorenter): Changed to
edwin [Wed, 4 Oct 2006 14:20:36 +0000 (14:20 +0000)]
* src/vm/jit/intrp/java.vmg (builtin_monitorenter): Changed to
lock_monitor_enter.
(builtin_monitorexit): Changed to lock_monitor_exit.

17 years ago* src/vm/jit/intrp/codegen.c: Made it compile again.
edwin [Wed, 4 Oct 2006 13:40:54 +0000 (13:40 +0000)]
* src/vm/jit/intrp/codegen.c: Made it compile again.

17 years ago* src/vm/jit/intrp/codegen.c: New instruction format fixes.
twisti [Wed, 4 Oct 2006 13:35:25 +0000 (13:35 +0000)]
* src/vm/jit/intrp/codegen.c: New instruction format fixes.

17 years ago* configure.ac (AC_CONFIG_FILES): Removed src/scripts/rmic and
twisti [Wed, 4 Oct 2006 12:09:26 +0000 (12:09 +0000)]
* configure.ac (AC_CONFIG_FILES): Removed src/scripts/rmic and
src/scripts/rmiregistry.
* src/scripts/Makefile.am (bin_SCRIPTS): Removed trailing \.

17 years ago* src/scripts/rmic.in: Removed.
twisti [Wed, 4 Oct 2006 10:37:09 +0000 (10:37 +0000)]
* 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.

17 years ago* configure.ac (--with-jre-layout): Added.
twisti [Wed, 4 Oct 2006 10:10:01 +0000 (10:10 +0000)]
* 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.

17 years ago* src/vm/jit/jit.h (jitdata): Renamed c_debug_nr to c_block_nr. (Still
edwin [Tue, 3 Oct 2006 21:19:05 +0000 (21:19 +0000)]
* 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.

17 years ago* src/vm/jit/powerpc/codegen.c: Removed new_ prefix from variable and
edwin [Tue, 3 Oct 2006 20:57:15 +0000 (20:57 +0000)]
* 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.

17 years ago* src/vm/resolve.c: Removed new_ prefix from function names.
edwin [Tue, 3 Oct 2006 20:44:46 +0000 (20:44 +0000)]
* 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.

17 years ago* src/vm/jit/allocator/simplereg.c: Warning fixed.
edwin [Tue, 3 Oct 2006 20:27:47 +0000 (20:27 +0000)]
* src/vm/jit/allocator/simplereg.c: Warning fixed.

17 years ago* src/vm/jit/i386/codegen.c (codegen): Use varindex as in other
edwin [Tue, 3 Oct 2006 20:26:10 +0000 (20:26 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Use varindex as in other
codegens.

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Removed obsolete stack depth
edwin [Tue, 3 Oct 2006 20:22:28 +0000 (20:22 +0000)]
* src/vm/jit/stack.c (new_stack_analyse): Removed obsolete stack depth
checking code.

* src/vm/jit/stack.h (CHECK_STACK_DEPTH): Removed macro.

17 years ago* src/vm/jit/powerpc64/codegen.c (codegen): Unified IINC and
edwin [Tue, 3 Oct 2006 19:11:19 +0000 (19:11 +0000)]
* src/vm/jit/powerpc64/codegen.c (codegen): Unified IINC and
IADDCONST.

17 years ago* src/vm/jit/powerpc/codegen.c (codegen): Unify IINC and IADDCONST.
edwin [Tue, 3 Oct 2006 18:50:52 +0000 (18:50 +0000)]
* src/vm/jit/powerpc/codegen.c (codegen): Unify IINC and IADDCONST.

17 years ago* src/vm/jit/allocator/simplereg.c (reg_make_statistics): Bugfix.
edwin [Tue, 3 Oct 2006 18:34:40 +0000 (18:34 +0000)]
* src/vm/jit/allocator/simplereg.c (reg_make_statistics): Bugfix.

17 years ago* src/native/vm/gnu_classpath_VMSystemProperties.c (preInit): We don't
twisti [Tue, 3 Oct 2006 18:21:55 +0000 (18:21 +0000)]
* 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.

17 years ago* src/vm/jit/allocator/simplereg.c (reg_make_statistics): Make it
edwin [Tue, 3 Oct 2006 18:09:26 +0000 (18:09 +0000)]
* src/vm/jit/allocator/simplereg.c (reg_make_statistics): Make it
compile again.

17 years ago* tests/regression/jasmin/test_iinc.j: New test.
edwin [Tue, 3 Oct 2006 17:24:02 +0000 (17:24 +0000)]
* tests/regression/jasmin/test_iinc.j: New test.

* tests/regression/jasmin/Makefile.am: Added test_iinc.j

--HG--
branch : unified_variables

17 years agoMerged r5640 from trunk:
edwin [Tue, 3 Oct 2006 16:42:34 +0000 (16:42 +0000)]
Merged r5640 from trunk:

* src/vm/jit/x86_64/Makefile.am (libarch_la_SOURCES): Renamed
md-emit.h to emit.h.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/powerpc/codegen.c: Implemented ICMD_JSR like ICMD_GOTO.
edwin [Tue, 3 Oct 2006 16:32:15 +0000 (16:32 +0000)]
* 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.

--HG--
branch : unified_variables

17 years agoMerged r5636, r5637, and r5638 from trunk:
edwin [Mon, 2 Oct 2006 19:24:56 +0000 (19:24 +0000)]
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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/alpha/md-abi.c (md_return_alloc): Activated return value stackslot regis...
christian [Mon, 2 Oct 2006 16:36:54 +0000 (16:36 +0000)]
* src/vm/jit/alpha/md-abi.c (md_return_alloc): Activated return value stackslot registers precolouring again.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/powerpc/netbsd/md-abi.c: Blindly ported to
edwin [Mon, 2 Oct 2006 14:18:04 +0000 (14:18 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/powerpc/codegen.c: Changed OUTVAR to INOUT.
edwin [Mon, 2 Oct 2006 13:59:13 +0000 (13:59 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/alpha/codegen.h: Removed M_COPY.
edwin [Mon, 2 Oct 2006 13:43:15 +0000 (13:43 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/powerpc/codegen.c (codegen): Unified LOAD/STORE and
edwin [Mon, 2 Oct 2006 13:26:39 +0000 (13:26 +0000)]
* src/vm/jit/powerpc/codegen.c (codegen): Unified LOAD/STORE and
COPY/MOVE instructions.

* src/vm/jit/powerpc/codegen.h (M_COPY): Removed.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/powerpc/linux/md-abi.c (md_param_alloc): Cleaned up
edwin [Mon, 2 Oct 2006 13:16:20 +0000 (13:16 +0000)]
* 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.

--HG--
branch : unified_variables

17 years agoMerged r5626 from trunk:
edwin [Mon, 2 Oct 2006 12:10:45 +0000 (12:10 +0000)]
Merged r5626 from trunk:

* src/vm/jit/replace.c (replace_create_replacement_points): Return true.

--HG--
branch : unified_variables

17 years agoMerged r5624 from trunk:
edwin [Mon, 2 Oct 2006 11:55:57 +0000 (11:55 +0000)]
Merged r5624 from trunk:

* src/vm/jit/mips/asmpart.S (asm_vm_call_method): Remove argument
stack frame in normal path.

--HG--
branch : unified_variables