cacao.git
17 years ago* src/vm/jit/ppc/emit.c (emit_load): Changed to new variable
christian [Fri, 15 Sep 2006 17:05:58 +0000 (17:05 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/Makefile.am: Added new test.
edwin [Fri, 15 Sep 2006 16:55:46 +0000 (16:55 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (MOVE_TO_TEMP): New macro.
edwin [Fri, 15 Sep 2006 16:44:37 +0000 (16:44 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_dup_x1_interface_slots.j: New test.
edwin [Fri, 15 Sep 2006 16:39:34 +0000 (16:39 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/alpha/emit.c (emit_load): Changed to new variable
christian [Fri, 15 Sep 2006 16:31:47 +0000 (16:31 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Add a third move at the
edwin [Fri, 15 Sep 2006 15:52:02 +0000 (15:52 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/Makefile.am: Added/renamed tests.
edwin [Fri, 15 Sep 2006 15:44:26 +0000 (15:44 +0000)]
* tests/regression/jasmin/Makefile.am: Added/renamed tests.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/verify/typecheck.c: Cleanup and documentation.
edwin [Fri, 15 Sep 2006 14:43:22 +0000 (14:43 +0000)]
* src/vm/jit/verify/typecheck.c: Cleanup and documentation.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/verify/typecheck.c (typestate_reach): Removed check
edwin [Fri, 15 Sep 2006 14:18:19 +0000 (14:18 +0000)]
* 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.

--HG--
branch : unified_variables
rename : tests/regression/jasmin/test_verify_fail_backward_with_new_in_local.j => tests/regression/jasmin/test_verify_unspecced_ok_backward_with_new_in_local.j

17 years ago* tests/regression/jasmin/runtest: Use [ \t] instead of \s in the
edwin [Fri, 15 Sep 2006 13:08:41 +0000 (13:08 +0000)]
* tests/regression/jasmin/runtest: Use [ \t] instead of \s in the
regex for sed, as this seems to be more portable.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/verify/typecheck.c (typecheck_reset_flags): Mark unreached
edwin [Fri, 15 Sep 2006 13:03:22 +0000 (13:03 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/resolve.c (new_resolve_field_lazy): Check jd->flags instead
edwin [Fri, 15 Sep 2006 12:51:12 +0000 (12:51 +0000)]
* src/vm/resolve.c (new_resolve_field_lazy): Check jd->flags instead
of opt_verify.
(new_resolve_method_lazy): Likewise.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Stackslot flags have to be set for SAVEDVAR...
christian [Fri, 15 Sep 2006 12:48:24 +0000 (12:48 +0000)]
* src/vm/jit/stack.c (new_stack_analyse): Stackslot flags have to be set for SAVEDVARs, too.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/verify/typecheck.c (verify_basic_block): Fix check for
edwin [Fri, 15 Sep 2006 11:02:50 +0000 (11:02 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/x86_64/emit.c (emit_load): Changed to new variable
christian [Fri, 15 Sep 2006 09:19:11 +0000 (09:19 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* configure.ac: Generate tests/regression/jasmin/Makefile.
edwin [Thu, 14 Sep 2006 22:51:12 +0000 (22:51 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/verify/typecheck.c (verify_basic_block): Change
edwin [Thu, 14 Sep 2006 22:49:37 +0000 (22:49 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_fail_retaddr_as_object.j:
edwin [Thu, 14 Sep 2006 21:29:31 +0000 (21:29 +0000)]
* tests/regression/jasmin/test_verify_fail_retaddr_as_object.j:
New test.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_fail_backward_with_new_in_local.j:
edwin [Thu, 14 Sep 2006 21:23:47 +0000 (21:23 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_fail_long_local.j:
edwin [Thu, 14 Sep 2006 20:55:04 +0000 (20:55 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/verify/typecheck.c (typecheck_invalidate_locals):
edwin [Thu, 14 Sep 2006 20:36:33 +0000 (20:36 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/reg.h (varinfo): Added typeinfo member.
edwin [Thu, 14 Sep 2006 18:56:49 +0000 (18:56 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/resolve.c (resolve_class_from_name): RESOLVE_VERBOSE changes.
edwin [Thu, 14 Sep 2006 18:55:03 +0000 (18:55 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (new_show_method): Only show allocation of locals
edwin [Thu, 14 Sep 2006 18:45:20 +0000 (18:45 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (stack_create_invars): Add extra locals needed
edwin [Thu, 14 Sep 2006 18:44:10 +0000 (18:44 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/parse.c (new_parse): Commented calculation of varcount
edwin [Thu, 14 Sep 2006 18:40:21 +0000 (18:40 +0000)]
* src/vm/jit/parse.c (new_parse): Commented calculation of varcount
and added added extra variables that will be needed by the verifier.

--HG--
branch : unified_variables

17 years ago* src/vm/global.h (VERIFIER_EXTRA_LOCALS): New constant.
edwin [Thu, 14 Sep 2006 18:36:20 +0000 (18:36 +0000)]
* src/vm/global.h (VERIFIER_EXTRA_LOCALS): New constant.
(VERIFIER_EXTRA_VARS): Likewise.

--HG--
branch : unified_variables

17 years ago* src/vm/class.c (class_classref_or_classinfo_print): New function.
edwin [Thu, 14 Sep 2006 18:20:28 +0000 (18:20 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/jit.h (VAROP): New macro for accessing variable operands.
edwin [Thu, 14 Sep 2006 18:16:06 +0000 (18:16 +0000)]
* src/vm/jit/jit.h (VAROP): New macro for accessing variable operands.
(VAR): New macro for getting a variable from a varindex.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_fail_load_wrong_type.j:
edwin [Thu, 14 Sep 2006 16:46:47 +0000 (16:46 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/powerpc/codegen.c (codegen): Replaced catchtype.cls with
edwin [Wed, 13 Sep 2006 00:21:40 +0000 (00:21 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (codegen): Use emit_copy for LOAD/STORE
edwin [Wed, 13 Sep 2006 00:03:45 +0000 (00:03 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_swap_locals.j: New test.
edwin [Tue, 12 Sep 2006 23:35:48 +0000 (23:35 +0000)]
* tests/regression/jasmin/test_swap_locals.j: New test.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_swap_interface_slots.j: New test.
edwin [Tue, 12 Sep 2006 23:31:49 +0000 (23:31 +0000)]
* tests/regression/jasmin/test_swap_interface_slots.j: New test.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_many_monitors.j: New test. (This test
edwin [Tue, 12 Sep 2006 23:18:58 +0000 (23:18 +0000)]
* tests/regression/jasmin/test_many_monitors.j: New test. (This test
case used to fail with old-instruction-format cacao.)

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (codegen): Corrected handling of taking
christian [Tue, 12 Sep 2006 22:32:07 +0000 (22:32 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Corrected handling of taking
arguments out of stack frame. Some changes to adapt SSA to unified
variables.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/parse.c (parse_check_instructions): Renamed to
edwin [Tue, 12 Sep 2006 21:34:03 +0000 (21:34 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Fixed test for existing
edwin [Tue, 12 Sep 2006 21:23:56 +0000 (21:23 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j:
edwin [Tue, 12 Sep 2006 00:21:01 +0000 (00:21 +0000)]
* 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.

--HG--
branch : unified_variables
rename : tests/regression/jasmin/test_verify_ok_jsr_exceptions.j => tests/regression/jasmin/test_verify_fail_jsr_exceptions.j
rename : tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j => tests/regression/jasmin/test_verify_fail_jsr_handler_in_sub.j

17 years ago* src/vm/jit/stack.c (stack_reanalyse_block): Removed unused
edwin [Mon, 11 Sep 2006 23:32:45 +0000 (23:32 +0000)]
* src/vm/jit/stack.c (stack_reanalyse_block): Removed unused
variable.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c: Added JSR elimination by block specialization.
edwin [Mon, 11 Sep 2006 23:24:46 +0000 (23:24 +0000)]
* src/vm/jit/stack.c: Added JSR elimination by block specialization.

* src/vm/jit/i386/codegen.c (codegen): Treat ICMD_RET as a GOTO.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/runtest: Add --color option.
edwin [Mon, 11 Sep 2006 23:17:48 +0000 (23:17 +0000)]
* tests/regression/jasmin/runtest: Add --color option.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub2.j: Added
edwin [Mon, 11 Sep 2006 22:17:57 +0000 (22:17 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_ok_jsr_handler_in_sub.j:
edwin [Mon, 11 Sep 2006 14:59:52 +0000 (14:59 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_dup2.j: Fix stackdepth.
edwin [Mon, 11 Sep 2006 14:57:42 +0000 (14:57 +0000)]
* tests/regression/jasmin/test_dup2.j: Fix stackdepth.
* tests/regression/jasmin/test_load_store_conflict.j: Likewise.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/runtest: Only show PASS if status is ok.
edwin [Mon, 11 Sep 2006 14:55:42 +0000 (14:55 +0000)]
* tests/regression/jasmin/runtest: Only show PASS if status is ok.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
edwin [Mon, 11 Sep 2006 14:54:01 +0000 (14:54 +0000)]
* src/vm/jit/allocator/simplereg.c (new_allocate_scratch_registers):
Zero destination of ICMD_JSR to avoid problems when showing the IR.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.h (show_jit_type_letters): New variable.
edwin [Mon, 11 Sep 2006 14:52:07 +0000 (14:52 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/toolbox/logging.h (log_text): Fixed for strings containing %.
edwin [Mon, 11 Sep 2006 14:45:13 +0000 (14:45 +0000)]
* src/toolbox/logging.h (log_text): Fixed for strings containing %.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/reg.h (varinfo): Put regoff inside a union (vv) so it
edwin [Mon, 11 Sep 2006 14:37:06 +0000 (14:37 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/global.h (TYPE_RET): New constant.
edwin [Mon, 11 Sep 2006 00:33:32 +0000 (00:33 +0000)]
* src/vm/global.h (TYPE_RET): New constant.

* src/vm/exceptions.c (exceptions_throw_verifyerror_for_stack):
Display TYPE_RET correctly.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/jit.h (basicblock): Added fields `inlocals` and
edwin [Mon, 11 Sep 2006 00:30:21 +0000 (00:30 +0000)]
* src/vm/jit/jit.h (basicblock): Added fields `inlocals` and
`original` (for JSR elimination).

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/test_verify_fail_aload_retaddress.j: New
edwin [Mon, 11 Sep 2006 00:03:16 +0000 (00:03 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/runtest: Return correct exit code.
edwin [Sun, 10 Sep 2006 13:51:16 +0000 (13:51 +0000)]
* tests/regression/jasmin/runtest: Return correct exit code.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/runtest: Delete temporary files.
edwin [Sun, 10 Sep 2006 13:45:56 +0000 (13:45 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* tests/regression/jasmin/runtest: Added harness code for expecting errors.
edwin [Sun, 10 Sep 2006 13:43:02 +0000 (13:43 +0000)]
* tests/regression/jasmin/runtest: Added harness code for expecting errors.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (codegen): Corrected handling of taking
christian [Sun, 10 Sep 2006 11:35:08 +0000 (11:35 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Corrected handling of taking
arguments out of stack frame.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (DUP_SLOT): Removed code for direct coalescing.
edwin [Sun, 10 Sep 2006 11:20:40 +0000 (11:20 +0000)]
* src/vm/jit/stack.c (DUP_SLOT): Removed code for direct coalescing.
(DUP coalescing will be done in simplereg, probably.)

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (new_show_method): Use class_print and
edwin [Sun, 10 Sep 2006 09:11:35 +0000 (09:11 +0000)]
* src/vm/jit/show.c (new_show_method): Use class_print and
class_classref_print for showing the catch type.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c: Fixed macro backslashes.
edwin [Sat, 9 Sep 2006 22:33:32 +0000 (22:33 +0000)]
* src/vm/jit/stack.c: Fixed macro backslashes.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (new_show_method): Show hexadecimal offsets in
edwin [Sat, 9 Sep 2006 22:05:06 +0000 (22:05 +0000)]
* src/vm/jit/show.c (new_show_method): Show hexadecimal offsets in
stack slot table.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Reset the sd.new pointer at
edwin [Sat, 9 Sep 2006 21:58:35 +0000 (21:58 +0000)]
* src/vm/jit/stack.c (new_stack_analyse): Reset the sd.new pointer at
the beginning of each basic block.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Made control-flow easier
edwin [Sat, 9 Sep 2006 21:50:54 +0000 (21:50 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Combined calls to
edwin [Sat, 9 Sep 2006 21:41:45 +0000 (21:41 +0000)]
* src/vm/jit/stack.c (new_stack_analyse): Combined calls to
stack_create_instack.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/jit.h (basicblock): Removed members instack and
edwin [Sat, 9 Sep 2006 21:33:48 +0000 (21:33 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.h (COPYCURSTACK): Do not create invars here.
edwin [Sat, 9 Sep 2006 20:05:35 +0000 (20:05 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/jit.h (basicblock): Added fields varstart and varcount.
edwin [Sat, 9 Sep 2006 19:37:19 +0000 (19:37 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/exceptions.c (exceptions_handle_exception): Added comment on
edwin [Sat, 9 Sep 2006 19:25:24 +0000 (19:25 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.h (CURKIND): Removed macro.
edwin [Sat, 9 Sep 2006 14:49:25 +0000 (14:49 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.h (Changes): Added my name.
edwin [Sat, 9 Sep 2006 14:45:55 +0000 (14:45 +0000)]
* src/vm/jit/stack.h (Changes): Added my name.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.h (REQUIRE_1, REQUIRE_2, REQUIRE_3, REQUIRE_4):
edwin [Sat, 9 Sep 2006 14:41:03 +0000 (14:41 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (IS_TEMPVAR): Fix bug spotted
edwin [Fri, 8 Sep 2006 23:59:52 +0000 (23:59 +0000)]
* src/vm/jit/stack.c (IS_TEMPVAR): Fix bug spotted
(and produced ;) by c_u.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Added some assertion.
edwin [Fri, 8 Sep 2006 20:54:05 +0000 (20:54 +0000)]
* src/vm/jit/stack.c (new_stack_analyse): Added some assertion.
When we do a STORE coalescing, the stackslot must have a creator.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Unified last_dup_boundary
edwin [Fri, 8 Sep 2006 20:50:13 +0000 (20:50 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.h (COPYCURSTACK): Use GET_NEW_VAR.
edwin [Fri, 8 Sep 2006 20:41:20 +0000 (20:41 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/jit.h (stackelement): Added creator field.
edwin [Fri, 8 Sep 2006 19:48:27 +0000 (19:48 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/codegen-common.h: Removed the NEW_VAR define.
edwin [Fri, 8 Sep 2006 18:14:50 +0000 (18:14 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (new_show_icmd): Removed code for DUPs.
edwin [Fri, 8 Sep 2006 18:12:18 +0000 (18:12 +0000)]
* src/vm/jit/show.c (new_show_icmd): Removed code for DUPs.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/verify/typecheck.c: Removed code for DUPs.
edwin [Fri, 8 Sep 2006 17:59:51 +0000 (17:59 +0000)]
* src/vm/jit/verify/typecheck.c: Removed code for DUPs.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (codegen): Removed code for DUPs.
edwin [Fri, 8 Sep 2006 17:57:03 +0000 (17:57 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Removed code for DUPs.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (*LOAD, *STORE): Normalized the source ==
edwin [Fri, 8 Sep 2006 17:50:45 +0000 (17:50 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (codegen): Fix LSTORE: The source == dest
edwin [Fri, 8 Sep 2006 17:37:26 +0000 (17:37 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Fix LSTORE: The source == dest
test was broken.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (new_show_method): Fix display of local table.
edwin [Fri, 8 Sep 2006 16:41:15 +0000 (16:41 +0000)]
* src/vm/jit/show.c (new_show_method): Fix display of local table.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (new_stack_analyse): Fix ICMD_RET: The variable
edwin [Fri, 8 Sep 2006 16:26:59 +0000 (16:26 +0000)]
* src/vm/jit/stack.c (new_stack_analyse): Fix ICMD_RET: The variable
index has to be mapped.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (DUP_SLOT): Turn off coalescing.
edwin [Fri, 8 Sep 2006 16:07:48 +0000 (16:07 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.h (M_FLTMOVE): Only assert(0) if move would
edwin [Fri, 8 Sep 2006 16:02:40 +0000 (16:02 +0000)]
* src/vm/jit/i386/codegen.h (M_FLTMOVE): Only assert(0) if move would
have to be performed.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (show_variable): Check for invalid flags.
edwin [Fri, 8 Sep 2006 14:17:41 +0000 (14:17 +0000)]
* src/vm/jit/show.c (show_variable): Check for invalid flags.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (codegen): Removed a debug print.
edwin [Fri, 8 Sep 2006 14:16:29 +0000 (14:16 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Removed a debug print.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (DST_LOCALVAR): _Really_ turn off coalescing
edwin [Fri, 8 Sep 2006 14:15:39 +0000 (14:15 +0000)]
* src/vm/jit/stack.c (DST_LOCALVAR): _Really_ turn off coalescing
temporarily.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/allocator/simplereg.c (interface_regalloc): Changed
edwin [Fri, 8 Sep 2006 12:19:49 +0000 (12:19 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/jit.h (LOCAL_UNUSED): Changed (in comment) to UNUSED.
edwin [Fri, 8 Sep 2006 12:17:29 +0000 (12:17 +0000)]
* src/vm/jit/jit.h (LOCAL_UNUSED): Changed (in comment) to UNUSED.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/stack.c (stackdata_t): New struct for keeping internal
edwin [Fri, 8 Sep 2006 12:16:23 +0000 (12:16 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/parse.h: Removed old code.
edwin [Fri, 8 Sep 2006 12:10:39 +0000 (12:10 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (new_show_method): Show isleafmethod.
edwin [Fri, 8 Sep 2006 12:07:57 +0000 (12:07 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (new_show_method): Only show local table if there
edwin [Fri, 8 Sep 2006 01:05:58 +0000 (01:05 +0000)]
* src/vm/jit/show.c (new_show_method): Only show local table if there
are locals.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/show.c (jit_type): Made types uppercase.
edwin [Thu, 7 Sep 2006 23:17:28 +0000 (23:17 +0000)]
* 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.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/allocator/simplereg.c (reg_new_temp_func): Removed old
edwin [Thu, 7 Sep 2006 22:44:07 +0000 (22:44 +0000)]
* src/vm/jit/allocator/simplereg.c (reg_new_temp_func): Removed old
version.
(reg_free_temp_func): Likewise.
(allocate_scratch_registers): Likewise.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/allocator/simplereg.c (reg_alloc_dup): Removed.
edwin [Thu, 7 Sep 2006 22:39:39 +0000 (22:39 +0000)]
* src/vm/jit/allocator/simplereg.c (reg_alloc_dup): Removed.
(new_reg_mark_copy): Likewise.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/i386/codegen.c (ICMD_COPY): Added.
edwin [Thu, 7 Sep 2006 14:41:18 +0000 (14:41 +0000)]
* src/vm/jit/i386/codegen.c (ICMD_COPY): Added.
(ICMD_MOVE): Likewise.

--HG--
branch : unified_variables

17 years ago* src/vm/jit/reg.h (varinfo): New field copycount.
edwin [Thu, 7 Sep 2006 14:38:51 +0000 (14:38 +0000)]
* src/vm/jit/reg.h (varinfo): New field copycount.
* src/vm/jit/parse.c (new_parse): Zero jd->var array.

--HG--
branch : unified_variables