cacao.git
17 years ago* src/vm/jit/inline/inline.c (emit_inlining_prolog): Do not emit
edwin [Mon, 27 Nov 2006 15:03:54 +0000 (15:03 +0000)]
* src/vm/jit/inline/inline.c (emit_inlining_prolog): Do not emit
CHECKNULL in prolog for <init> methods.

17 years ago* src/vm/jit/inline/inline.c (emit_inlining_prolog): Emit INLINE_BODY
edwin [Mon, 27 Nov 2006 15:02:59 +0000 (15:02 +0000)]
* src/vm/jit/inline/inline.c (emit_inlining_prolog): Emit INLINE_BODY
instructions at end of prolog.

17 years ago* src/vm/jit/icmdtable.inc (INLINE_GOTO): Removed.
edwin [Mon, 27 Nov 2006 14:58:43 +0000 (14:58 +0000)]
* src/vm/jit/icmdtable.inc (INLINE_GOTO): Removed.
(INLINE_BODY): Added. This instruction will mark the start of the
inlined method body after the prolog.

* src/vm/jit/jit.h: Likewise.

* src/vm/jit/show.c (show_icmd): Likewise.

* src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
Likewise.

* src/vm/jit/i386/codegen.c (codegen): Likewise.

* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.

17 years ago* src/vm/jit/i386/emit.c (emit_memabs): Removed.
edwin [Mon, 27 Nov 2006 14:48:33 +0000 (14:48 +0000)]
* src/vm/jit/i386/emit.c (emit_memabs): Removed.
(emit_alu_imm_memabs): Use emit_mem.

17 years ago* src/vm/jit/stack.c (stack_reanalyse_block): Removed bogus cases
edwin [Mon, 27 Nov 2006 14:39:58 +0000 (14:39 +0000)]
* src/vm/jit/stack.c (stack_reanalyse_block): Removed bogus cases
for INLINE_ instructions. They cannot occur here.
(stack_analyse): Likewise.

17 years ago* src/mm/gc-common.h: Added prototype for heap_init_objectheader.
michi [Mon, 27 Nov 2006 14:37:57 +0000 (14:37 +0000)]
* src/mm/gc-common.h: Added prototype for heap_init_objectheader.
* src/vm/builtin.c (builtin_clone): Object header gets initiated after cloning.

17 years ago* src/vm/jit/jit.c (jit_invalidate_code): Do not trap non-trappable
edwin [Mon, 27 Nov 2006 14:35:26 +0000 (14:35 +0000)]
* src/vm/jit/jit.c (jit_invalidate_code): Do not trap non-trappable
replacement points.
(jit_request_optimization): New function.
(jit_get_current_code): New function.

* src/vm/jit/jit.h (jit_request_optimization): Added prototype.
(jit_get_current_code): Likewise.

* src/vm/jit/replace.h (RPLPOINT_FLAG_NOTRAP): New flag.

* src/vm/jit/replace.c (replace_replacement_point_println): Prepared
for new flag.

17 years ago* src/vm/jit/jit.c (jit_invalidate_code): Do not activate RETURN
edwin [Mon, 27 Nov 2006 14:27:55 +0000 (14:27 +0000)]
* src/vm/jit/jit.c (jit_invalidate_code): Do not activate RETURN
rplpoints when invalidating code (they cannot be mapped to inlined
versions of the code).

17 years ago* src/vm/jit/replace.c (replace_create_replacement_points): Some fixes
edwin [Mon, 27 Nov 2006 14:26:29 +0000 (14:26 +0000)]
* src/vm/jit/replace.c (replace_create_replacement_points): Some fixes
for inlining.

17 years ago* src/vm/jit/replace.c (replace_find_replacement_point): Match parent
edwin [Mon, 27 Nov 2006 14:24:26 +0000 (14:24 +0000)]
* src/vm/jit/replace.c (replace_find_replacement_point): Match parent
of replacement point.
(replace_me): Keep parent of rplpoint around.

17 years ago* src/vm/jit/i386/emit.c (emit_memabs): New function.
edwin [Mon, 27 Nov 2006 14:20:57 +0000 (14:20 +0000)]
* src/vm/jit/i386/emit.c (emit_memabs): New function.
(emit_alu_imm_memabs): New function.

* src/vm/jit/i386/emit.h (emit_alu_imm_memabs): Added prototype.

* src/vm/jit/i386/codegen.h (M_ISUB_IMM_MEMABS): New macro.

17 years ago* src/mm/cacao-gc/gc.h: Added.
michi [Sat, 25 Nov 2006 16:32:52 +0000 (16:32 +0000)]
* src/mm/cacao-gc/gc.h: Added.
* src/mm/cacao-gc/gc.c: Debugging with gc_call. Added some development breaks.
Added gc_get_heap_size, gc_get_free_bytes, gc_get_total_bytes and
gc_get_max_heap_size.

17 years ago* src/vm/jit/x86_64/codegen.c (codegen): Use new dseg_add_* functions,
twisti [Wed, 22 Nov 2006 21:19:38 +0000 (21:19 +0000)]
* src/vm/jit/x86_64/codegen.c (codegen): Use new dseg_add_* functions,
replaced codegen_addreference with codegen_add_branch_ref.
(createnativestub): Likewise.
* src/vm/jit/x86_64/emit.c (emit_patcher_stubs): Likewise.

17 years ago* src/vm/jit/stacktrace.c (linenumbertable_entry): Removed.
twisti [Wed, 22 Nov 2006 20:24:55 +0000 (20:24 +0000)]
* src/vm/jit/stacktrace.c (linenumbertable_entry): Removed.
(stacktrace_add_method_intern): Removed.
(stacktrace_add_method): Call dseg_get_linenumber_from_pc.

* src/vm/jit/dseg.c (vm/jit/methodheader.h): Added.
(dseg_get_linenumber_from_pc_intern): New function.
(dseg_get_linenumber_from_pc): Likewise.

* src/vm/jit/dseg.h (linenumbertable_entry): Added.
(dseg_get_linenumber_from_pc): Likewise.

* src/vm/jit/show.c (show_method): Renamed u1ptr to pc.
(show_basicblock): Use dseg_get_linenumber_from_pc to diplay line
number in disassembly.

17 years ago* src/mm/gc-common.h [DISABLE_GC] (nogc_init, nogc_realloc): Removed.
twisti [Wed, 22 Nov 2006 19:00:18 +0000 (19:00 +0000)]
* src/mm/gc-common.h [DISABLE_GC] (nogc_init, nogc_realloc): Removed.

17 years ago* src/vm/jit/x86_64/codegen.c (codegen): Do not generate code for ASTORE
edwin [Wed, 22 Nov 2006 18:22:14 +0000 (18:22 +0000)]
* src/vm/jit/x86_64/codegen.c (codegen): Do not generate code for ASTORE
storing a returnAddress, as 1) the store is dead, and 2) the dest.
variable has no valid allocation.

17 years ago* src/vm/jit/sparc64/codegen.c (codegen): Do not generate code for ASTORE
edwin [Wed, 22 Nov 2006 18:20:58 +0000 (18:20 +0000)]
* src/vm/jit/sparc64/codegen.c (codegen): Do not generate code for ASTORE
storing a returnAddress, as 1) the store is dead, and 2) the dest.
variable has no valid allocation.

17 years ago* src/vm/jit/powerpc64/codegen.c (codegen): Do not generate code for ASTORE
edwin [Wed, 22 Nov 2006 18:18:09 +0000 (18:18 +0000)]
* src/vm/jit/powerpc64/codegen.c (codegen): Do not generate code for ASTORE
storing a returnAddress, as 1) the store is dead, and 2) the dest.
variable has no valid allocation.

17 years ago* src/vm/jit/mips/codegen.c (codegen): Do not generate code for ASTORE
edwin [Wed, 22 Nov 2006 18:16:15 +0000 (18:16 +0000)]
* src/vm/jit/mips/codegen.c (codegen): Do not generate code for ASTORE
storing a returnAddress, as 1) the store is dead, and 2) the dest.
variable has no valid allocation.

17 years ago* src/vm/jit/i386/codegen.c (codegen): Do not generate code for ASTORE
edwin [Wed, 22 Nov 2006 18:12:29 +0000 (18:12 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Do not generate code for ASTORE
storing a returnAddress, as 1) the store is dead, and 2) the dest.
variable has no valid allocation.

17 years ago* src/vm/jit/powerpc/codegen.c (codegen): Do not generate code for ASTORE
edwin [Wed, 22 Nov 2006 18:09:14 +0000 (18:09 +0000)]
* src/vm/jit/powerpc/codegen.c (codegen): Do not generate code for ASTORE
storing a returnAddress, as 1) the store is dead, and 2) the dest.
variable has no valid allocation.

17 years ago* src/vm/jit/alpha/codegen.c (codegen): Do not generate code for ASTORE
edwin [Wed, 22 Nov 2006 18:03:12 +0000 (18:03 +0000)]
* src/vm/jit/alpha/codegen.c (codegen): Do not generate code for ASTORE
storing a returnAddress, as 1) the store is dead, and 2) the dest.
variable has no valid allocation.

17 years ago* configure.ac: Added *kfreebsd*-gnu.
twisti [Wed, 22 Nov 2006 11:05:06 +0000 (11:05 +0000)]
* configure.ac: Added *kfreebsd*-gnu.
* src/vm/suck.c (scandir_filter) [_DIRENT_HAVE_D_NAMLEN]: Bugfix.

17 years ago* src/vm/jit/i386/codegen.c (codegen): Use new dseg_add_* functions.
twisti [Wed, 22 Nov 2006 10:50:07 +0000 (10:50 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Use new dseg_add_* functions.
(createnativestub): Likewise.
* src/vm/jit/i386/emit.c (emit_patcher_stubs): Likewise.

17 years ago* native.c (native_class_getname): New function.
twisti [Tue, 21 Nov 2006 23:21:18 +0000 (23:21 +0000)]
* native.c (native_class_getname): New function.
* native.h (native_class_getname): Added.
* vm/java_lang_VMClass.c (getName): Use native_class_getname.

17 years ago* src/vm/builtin.c [DISABLE_GC] (builtin_idiv): Added.
twisti [Tue, 21 Nov 2006 21:02:30 +0000 (21:02 +0000)]
* src/vm/builtin.c [DISABLE_GC] (builtin_idiv): Added.
(builtin_f2i): Likewise.
(builtin_d2i): Likewise.

* src/vm/vm.c (vm_create): Removed nogc_init call.
* src/cacaoh/cacaoh.c (main): Likewise.

* src/mm/nogc.c (nogc_realloc): Removed.
(nogc_init): Renamed to gc_init.
(gc_init): Removed.
(gc_get_total_bytes): Added.

* src/mm/memory.h [DISABLE_GC] (NEW, FREE, MNEW, MFREE, MREALLOC):
Removed.

17 years ago* src/vm/loader.c (load_class_from_classbuffer) [ENABLE_GC_CACAO]: Fieldinfos
michi [Tue, 21 Nov 2006 16:56:56 +0000 (16:56 +0000)]
* src/vm/loader.c (load_class_from_classbuffer) [ENABLE_GC_CACAO]: Fieldinfos
are no longer placed onto the heap.

* src/vm/class.c (class_free) [ENABLE_GC_CACAO]: Fieldinfos are freed.

17 years ago* src/vm/jit/powerpc64/codegen.c (codegen): Replace dseg_add*
tbfg [Mon, 20 Nov 2006 18:57:08 +0000 (18:57 +0000)]
* src/vm/jit/powerpc64/codegen.c (codegen): Replace dseg_add*
by dseg_add_* functions.

* src/vm/jit/powerpc64/emit.c: Likewise.

17 years ago* src/vm/jit/dseg.h (dseg_adds4, dseg_adds8, dseg_addfloat)
twisti [Mon, 20 Nov 2006 16:18:19 +0000 (16:18 +0000)]
* src/vm/jit/dseg.h (dseg_adds4, dseg_adds8, dseg_addfloat)
(dseg_adddouble, dseg_addaddress, dseg_addtarget): Removed.

* src/vm/jit/alpha/codegen.c (codegen): Removed remaining old-dseg_add
calls.
* src/vm/jit/alpha/emit.c (emit_iconst): Replaced dseg_adds4 with
dseg_add_s4.
(emit_lconst): Replaced dseg_adds8 with dseg_add_s8.

17 years ago* src/vm/global.h: Added hdrflags to java_objectheader for exact Cacao-GC.
michi [Mon, 20 Nov 2006 14:18:12 +0000 (14:18 +0000)]
* src/vm/global.h: Added hdrflags to java_objectheader for exact Cacao-GC.
* src/threads/native/lock.c: Now uses hdrflags to store the FLC bit.

17 years ago* src/mm/cacao-gc/Makefile.am: Added mark.c
michi [Sun, 19 Nov 2006 18:25:45 +0000 (18:25 +0000)]
* src/mm/cacao-gc/Makefile.am: Added mark.c
* src/mm/cacao-gc/mark.c: Added

17 years ago* src/vm/jit/replace.c: Only recompile if necessary. Count
edwin [Sun, 19 Nov 2006 15:40:22 +0000 (15:40 +0000)]
* src/vm/jit/replace.c: Only recompile if necessary. Count
re-compilations.

17 years ago* src/vm/jit/replace.c: Added statistics code.
edwin [Sun, 19 Nov 2006 15:39:34 +0000 (15:39 +0000)]
* src/vm/jit/replace.c: Added statistics code.

17 years ago* src/vm/jit/replace.c (replace_me): Only turn off replacement
edwin [Sun, 19 Nov 2006 15:36:03 +0000 (15:36 +0000)]
* src/vm/jit/replace.c (replace_me): Only turn off replacement
points for self-replacement. Warn in this case.

17 years ago* src/vm/jit/replace.c (replace_write_executionstate): Take
edwin [Sun, 19 Nov 2006 15:33:28 +0000 (15:33 +0000)]
* src/vm/jit/replace.c (replace_write_executionstate): Take
synchronization slots from next frame for inline points.

17 years ago* src/vm/jit/replace.c: Handle and match returnAddress variables on
edwin [Sun, 19 Nov 2006 15:28:54 +0000 (15:28 +0000)]
* src/vm/jit/replace.c: Handle and match returnAddress variables on
the java stack.

17 years ago* src/vm/jit/stack.c (stack_analyse): Keep TYPE_RET for variables
edwin [Sun, 19 Nov 2006 15:22:53 +0000 (15:22 +0000)]
* src/vm/jit/stack.c (stack_analyse): Keep TYPE_RET for variables
of returnAddress type. Do not create interfaces for this type.
Mark block variables of TYPE_RET as PREALLOC to avoid subsequent
allocation.

* src/vm/jit/icmdtable.inc (ASTORE): Added TYPE_RET (R--) variant.
(JSR): Changed destination type to TYPE_RET (R).

* src/vm/jit/verify/icmds.c (ICMD_RET): Check local for type
TYPE_RET.

* src/vm/jit/verify/typeinfo.h (TYPE_IS_RETURNADDRESS): Check type
for TYPE_RET.

* src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.

17 years ago* src/vm/jit/jit.c (jit_invalidate_code): Activate replacement points
edwin [Sun, 19 Nov 2006 15:10:02 +0000 (15:10 +0000)]
* src/vm/jit/jit.c (jit_invalidate_code): Activate replacement points
in reverse order. This avoid creating invalid code when rplpoints
within a block overlap each other. It is not a complete solution for
overlapping replacement points, however.

17 years ago* src/vm/jit/inline/inline.c (translate_javalocals): Adapted to
edwin [Sun, 19 Nov 2006 15:08:45 +0000 (15:08 +0000)]
* src/vm/jit/inline/inline.c (translate_javalocals): Adapted to
returnAddress variables in javalocals.
(inline_clone_instruction): Likewise.

17 years ago* src/vm/jit/stack.c (stack_mark_reached): Fix: Do not compare basic
edwin [Sun, 19 Nov 2006 15:04:27 +0000 (15:04 +0000)]
* src/vm/jit/stack.c (stack_mark_reached): Fix: Do not compare basic
block addresses. Compare numbers instead.
(stack_mark_reached_from_outvars): Likewise.

17 years ago* src/vm/jit/jit.h (INS_FLAG_CLASS): Comment that this flag is also
edwin [Sun, 19 Nov 2006 15:03:11 +0000 (15:03 +0000)]
* src/vm/jit/jit.h (INS_FLAG_CLASS): Comment that this flag is also
used for PUTFIELDCONST and PUTSTATICCONST.

* src/vm/jit/verify/icmds.c (ICMD_PUTFIELDCONST, ICMD_PUTSTATICCONST):
Honor the INS_FLAG_CLASS flag and set the right type.

* src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.

17 years ago* src/vm/jit/stack.c (stack_analyse): Show state after last ICMD in
edwin [Sun, 19 Nov 2006 14:56:32 +0000 (14:56 +0000)]
* src/vm/jit/stack.c (stack_analyse): Show state after last ICMD in
block.
(stack_verbose_show_block): Use show_javalocals_array.
(stack_verbose_show_state): Likewise. Accept iptr == NULL.

17 years ago* src/vm/jit/replace.c (replace_source_frame_println): Fixed printing
edwin [Sun, 19 Nov 2006 14:51:08 +0000 (14:51 +0000)]
* src/vm/jit/replace.c (replace_source_frame_println): Fixed printing
of source stack.

17 years ago* src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
edwin [Sun, 19 Nov 2006 14:50:08 +0000 (14:50 +0000)]
* src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
Do not clear vv.regoff for ICMD_JSR (we need vv.retaddr later).

17 years ago* src/vm/properties.c (properties_add): Use unsynced functions of
twisti [Sat, 18 Nov 2006 22:16:32 +0000 (22:16 +0000)]
* src/vm/properties.c (properties_add): Use unsynced functions of
list.
(properties_get): Likewise.

17 years ago* src/vm/properties.c (properties_add): Replace entry if it already
twisti [Fri, 17 Nov 2006 15:47:28 +0000 (15:47 +0000)]
* src/vm/properties.c (properties_add): Replace entry if it already
exists.

17 years ago* src/vm/builtin.c (native/native.h)
twisti [Thu, 16 Nov 2006 22:14:10 +0000 (22:14 +0000)]
* src/vm/builtin.c (native/native.h)
(native/include/java_lang_Cloneable.h)
(native/include/java_lang_Object.h)
(native/include/java_lang_VMObject.h): Removed.
(builtin_clone_array): Renamed to builtin_clone, reimplemented.

* src/vm/builtin.h (builtin_clone_array): Renamed to builtin_clone.
(BUILTIN_clone): Defined.

* src/vm/loader.c (load_newly_created_array): Use BUILTIN_clone.

* src/native/vm/java_lang_VMObject.c (clone): Removed implementation
and call builtin_clone.

17 years ago* src/vm/class.h (classinfo): Typedef added.
twisti [Thu, 16 Nov 2006 19:45:15 +0000 (19:45 +0000)]
* src/vm/class.h (classinfo): Typedef added.
* src/vm/descriptor.h (typedesc): Likewise.
(methoddesc): Likewise.
* src/vm/field.h (fieldinfo): Likewise.
* src/vm/method.h (methodinfo): Likewise.

* src/vm/references.h (config.h, vm/types.h, vm/class.h)
(vm/descriptor.h, vm/field.h, vm/method.h): Likewise.
(classinfo, methodinfo, fieldinfo, typedesc, methoddesc): Removed.
(constant_classref, classref_or_classinfo, parseddesc): Moved.

17 years ago* src/vm/vm.c (vm_createjvm): New function.
twisti [Thu, 16 Nov 2006 15:56:44 +0000 (15:56 +0000)]
* src/vm/vm.c (vm_createjvm): New function.
* src/vm/vm.h (vm_createjvm): Added.

* src/cacao/cacao.c (main): Resolve and call vm_createjvm instead of
JNI_CreateJavaVM.

* src/native/jni.c (jni_init_localref_table): Made non-static.
(JNI_CreateJavaVM): Moved implementation into vm_createjvm.
* src/native/jni.h (jni_init_localref_table): Added.

17 years ago* src/vm/jit/stack.c (stack_analyse): Fix: Reset deadcode when
edwin [Thu, 16 Nov 2006 00:02:00 +0000 (00:02 +0000)]
* src/vm/jit/stack.c (stack_analyse): Fix: Reset deadcode when
re-analysing a block.

17 years ago* src/vm/jit/verify/generate.pl: Prepared for LOAD instructions with
edwin [Wed, 15 Nov 2006 23:45:52 +0000 (23:45 +0000)]
* src/vm/jit/verify/generate.pl: Prepared for LOAD instructions with
multiple variants (will be needed for ASTORE).

17 years ago* src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
edwin [Wed, 15 Nov 2006 23:44:01 +0000 (23:44 +0000)]
* src/vm/jit/allocator/simplereg.c (simplereg_allocate_temporaries):
Ignore TYPE_RET interface variables. (Preparation.)

* src/vm/jit/show.c (show_allocation): Prepared for TYPE_RET variables.
(show_variable_intern): Likewise.

* src/vm/jit/verify/typecheck.c (STORE_LOCAL): Made the macro safer.
(STORE_LOCAL_2_WORD): Likewise.

* src/vm/jit/verify/typeinfo.c (typeinfo_print_type): Prepared for
TYPE_RET variables.

* src/vm/jit/replace.c (replace_source_frame_println): Prepared for
void stackslots.

17 years ago* src/vm/jit/jit.c (jit_recompile): Set verbosecall flag.
edwin [Wed, 15 Nov 2006 23:37:14 +0000 (23:37 +0000)]
* src/vm/jit/jit.c (jit_recompile): Set verbosecall flag.

17 years ago* src/vm/jit/replace.c (replace_create_replacement_points): Fix: Only
edwin [Wed, 15 Nov 2006 23:36:36 +0000 (23:36 +0000)]
* src/vm/jit/replace.c (replace_create_replacement_points): Fix: Only
put a replacement point at a back branch target if the block does not
contain any other replacement point.

(replace_read_executionstate): Better debugging helpers.
(replace_me): Likewise.

* src/vm/jit/replace.h (sourceframe_t): Added a field for debugging.

17 years ago* src/vm/jit/stack.c (stack_reanalyse_block): Encode returnAddresses
edwin [Wed, 15 Nov 2006 23:33:48 +0000 (23:33 +0000)]
* src/vm/jit/stack.c (stack_reanalyse_block): Encode returnAddresses
in the javalocals array.
(stack_analyse): Likewise.

* src/vm/jit/replace.c (replace_create_replacement_point): Store
returnAddresses in replacement points.
(replace_create_replacement_points): Encode returnAddresses in
javalocals.
(replace_read_executionstate): Ignore returnAddresses.
(replace_write_executionstate): Likewise.
(replace_find_replacement_point): Match returnAddresses.

17 years ago* src/vm/jit/show.h (show_javalocals_array): New function.
edwin [Wed, 15 Nov 2006 23:30:16 +0000 (23:30 +0000)]
* src/vm/jit/show.h (show_javalocals_array): New function.

* src/vm/jit/show.c (show_javalocals_array): New function.
(show_icmd): Prepared for showing returnAddresses.

* src/vm/jit/replace.c (replace_replacement_point_println): Prepared
for showing constant returnAddresses.

* src/vm/jit/replace.h (rplalloc): Made type unsigned, so it will be
able to hold TYPE_RET (8).

* src/vm/jit/jit.h (s2_operand_t): Added field `retaddrnr` that will
be used by ASTORE with returnAddresses.

17 years ago* src/vm/jit/inline/inline.c (inline_inline_intern): Removed some
edwin [Wed, 15 Nov 2006 23:24:46 +0000 (23:24 +0000)]
* src/vm/jit/inline/inline.c (inline_inline_intern): Removed some
unused code.

17 years ago* src/vm/jit/i386/codegen.c (codegen): Fix: Put RETURN replacement
edwin [Wed, 15 Nov 2006 23:23:59 +0000 (23:23 +0000)]
* src/vm/jit/i386/codegen.c (codegen): Fix: Put RETURN replacement
points before the emit_load. This code needs cleaning up.

17 years ago* src/vm/jit/replace.c: Partial implementation of synchronization
edwin [Wed, 15 Nov 2006 23:21:26 +0000 (23:21 +0000)]
* src/vm/jit/replace.c: Partial implementation of synchronization
slot translation. Translating synchronized INLINE <-> CALL needs more
work.

17 years ago* src/vm/jit/replace.c (replace_find_replacement_poin): Fix: Compare
edwin [Wed, 15 Nov 2006 23:19:07 +0000 (23:19 +0000)]
* src/vm/jit/replace.c (replace_find_replacement_poin): Fix: Compare
both id and method when searching a replacement point.
(replace_executionstate_println): Prettier printing.

* src/vm/jit/replace.h (replace_pop_activation_record): Removed
prototype.

17 years ago* src/vm/jit/inline/inline.c (inline_instruction): New function.
edwin [Wed, 15 Nov 2006 23:17:07 +0000 (23:17 +0000)]
* src/vm/jit/inline/inline.c (inline_instruction): New function.
Factored code out of other functions generation instructions.

17 years ago* src/vm/jit/jit.h (insinfo_inline): Added field `paramcount`.
edwin [Wed, 15 Nov 2006 23:15:13 +0000 (23:15 +0000)]
* src/vm/jit/jit.h (insinfo_inline): Added field `paramcount`.

* src/vm/jit/inline/inline.c (inline_generate_sync_builtin): New
function. Generate explicit MONITORENTER/EXIT instructions.
(emit_inlining_prolog): Moved INLINE_START to the beginning of the
prolog. Explicit synchronization.
(emit_inlining_epilog): Explicit synchronization.
(rewrite_method): Use epilog_instructioncount.
(inline_analyse_callee): Explicit synchronization.

* src/vm/jit/i386/codegen.c (ICMD_INLINE_START): Removed implicit
synchronization.
(ICMD_INLINE_END): Likewise.

* src/vm/jit/replace.c (replace_create_replacement_point): Handle
parameters for top frames.
(replace_create_replacement_points): Likewise.
(replace_read_executionstate): Likewise.
(replace_write_executionstate): Likewise.
(replace_me): Likewise.

17 years ago* src/vm/jit/replace.h (RPLALLOC_STACK, RPLALLOC_PARAM, RPLALLOC_SYNC):
edwin [Wed, 15 Nov 2006 23:08:21 +0000 (23:08 +0000)]
* src/vm/jit/replace.h (RPLALLOC_STACK, RPLALLOC_PARAM, RPLALLOC_SYNC):
New constants.

* src/vm/jit/replace.c (replace_push_activation_record): Fix: Decrement
SP _before_ writing the return address.
(replace_me): More logging.
(replace_replacement_point_println): More logging.
(replace_executionstate_println): Prettier printing.

17 years ago* src/vm/jit/code.h (codeinfo): Added field `invalid`. (Should become
edwin [Wed, 15 Nov 2006 23:02:21 +0000 (23:02 +0000)]
* src/vm/jit/code.h (codeinfo): Added field `invalid`. (Should become
a flag, later.)
* src/vm/jit/jit.c (jit_recompile): Fixed for first compilation. Do not
refuse to recompile.

17 years ago* src/vm/jit/inline/inline.c (inline_inline_intern): Do not inline
edwin [Wed, 15 Nov 2006 22:59:31 +0000 (22:59 +0000)]
* src/vm/jit/inline/inline.c (inline_inline_intern): Do not inline
abstract methods (need to search for single implementation).

17 years ago* src/vm/jit/replace.c (replace_me): Small cleanup.
edwin [Wed, 15 Nov 2006 22:47:31 +0000 (22:47 +0000)]
* src/vm/jit/replace.c (replace_me): Small cleanup.

17 years ago* src/vm/jit/inline/inline.c (create_body_block): Do not translate
edwin [Wed, 15 Nov 2006 22:47:03 +0000 (22:47 +0000)]
* src/vm/jit/inline/inline.c (create_body_block): Do not translate
javalocals for dead code.
(inline_inline_intern): Fixed flag check.

17 years ago* src/vm/method.c (method_printflags): Print MONOMORPHIC and
edwin [Wed, 15 Nov 2006 22:46:10 +0000 (22:46 +0000)]
* src/vm/method.c (method_printflags): Print MONOMORPHIC and
IMPLEMENTED flags.

17 years ago* src/vm/properties.c (properties_init) [ENABLE_JAVASE]: Allocate the
twisti [Wed, 15 Nov 2006 18:26:40 +0000 (18:26 +0000)]
* src/vm/properties.c (properties_init) [ENABLE_JAVASE]: Allocate the
utsname structure on the heap.

17 years ago* src/vm/properties.c (properties_init) [ENABLE_JAVASE]: Don't free
twisti [Wed, 15 Nov 2006 18:09:28 +0000 (18:09 +0000)]
* src/vm/properties.c (properties_init) [ENABLE_JAVASE]: Don't free
memory, we need it later.

17 years ago* src/cacaoh/headers.c (cacao_prefix, classpath_libdir, _Jv_classpath)
twisti [Wed, 15 Nov 2006 18:01:17 +0000 (18:01 +0000)]
* src/cacaoh/headers.c (cacao_prefix, classpath_libdir, _Jv_classpath)
(_Jv_java_library_path): Added.

17 years ago* src/vm/properties.c (properties_init): Also fill the internal
twisti [Wed, 15 Nov 2006 17:58:25 +0000 (17:58 +0000)]
* src/vm/properties.c (properties_init): Also fill the internal
property table.
(properties_postinit): Re-set some properties that may have changed.
(properties_system_add): Removed.
[ENABLE_JAVASE] (properties_system_add_all): Rewritten.

* src/vm/properties.h (properties_postinit): Changed signature.
(properties_system_add): Removed.
[ENABLE_JAVASE] (properties_system_add_all): Added.

* src/native/vm/gnu_classpath_VMSystemProperties.c (preInit): Moved
implementation to properties.

* src/vm/vm.c (vm_create): Call properties_postinit.

17 years ago* src/vm/vm.c (vm_create): Don't initialize java/lang/System
twisti [Wed, 15 Nov 2006 17:46:01 +0000 (17:46 +0000)]
* src/vm/vm.c (vm_create): Don't initialize java/lang/System
explicitely.

17 years ago* configure.ac (--enable-java): Added.
twisti [Wed, 15 Nov 2006 16:25:22 +0000 (16:25 +0000)]
* configure.ac (--enable-java): Added.

17 years ago* src/vm/jit/parse.c (parse): Added missing semi-colon.
twisti [Wed, 15 Nov 2006 15:52:29 +0000 (15:52 +0000)]
* src/vm/jit/parse.c (parse): Added missing semi-colon.

17 years ago* src/vm/jit/icmdtable.inc (CHECKNULL_POP): Removed.
edwin [Wed, 15 Nov 2006 15:47:32 +0000 (15:47 +0000)]
* src/vm/jit/icmdtable.inc (CHECKNULL_POP): Removed.

* src/vm/jit/verify/typecheck-stackbased-gen.inc: Regenerated.
* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.

17 years ago* src/vm/jit/jit.h (ICMD_CHECKNULL_POP): Removed.
twisti [Wed, 15 Nov 2006 15:42:04 +0000 (15:42 +0000)]
* src/vm/jit/jit.h (ICMD_CHECKNULL_POP): Removed.
* src/vm/jit/parse.c: Likewise.
* src/vm/jit/show.c: Likewise.

17 years agoReverted patch 5890.
twisti [Wed, 15 Nov 2006 15:30:36 +0000 (15:30 +0000)]
Reverted patch 5890.

* src/vm/jit/jit.h: Reverted.

* src/vm/jit/alpha/codegen.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/sparc64/codegen.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.
* src/vm/jit/intrp/codegen.c: Likewise.

* src/vm/jit/show.c: Likewise.
* src/vm/jit/stack.c: Likewise.
* src/vm/jit/allocator/simplereg.c: Likewise.
* src/vm/jit/verify/typecheck-stackbased-gen.inc: Likewise.
* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.

17 years ago* src/vm/jit/powerpc64/linux/md-abi.c (md_param_alloc): Fixed
tbfg [Wed, 15 Nov 2006 13:44:48 +0000 (13:44 +0000)]
* src/vm/jit/powerpc64/linux/md-abi.c (md_param_alloc): Fixed
preallocation.

* src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method): Fixed
argument handling.

17 years ago* src/vm/jit/jit.h (ICMD_CHECKNULL): Renamed to ICMD_CHECKNULL_POP.
twisti [Wed, 15 Nov 2006 12:25:13 +0000 (12:25 +0000)]
* src/vm/jit/jit.h (ICMD_CHECKNULL): Renamed to ICMD_CHECKNULL_POP.

* src/vm/jit/alpha/codegen.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/sparc64/codegen.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.
* src/vm/jit/intrp/codegen.c: Likewise.

* src/vm/jit/stack.c: Likewise.
* src/vm/jit/show.c: Likewise.

* src/vm/jit/allocator/simplereg.c: Likewise.

* src/vm/jit/verify/typecheck-stackbased-gen.inc (ICMD_CHECKNULL):
Removed.
* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Likewise.

17 years ago* src/jit/verify/typecheck-stackbased.c (mm/memory.h): Added.
twisti [Tue, 14 Nov 2006 21:56:17 +0000 (21:56 +0000)]
* src/jit/verify/typecheck-stackbased.c (mm/memory.h): Added.
* src/jit/powerpc/emit.c (mm/memory.h): Likewise.
* src/signal.c (mm/memory.h): Likewise.

17 years ago* src/vm/jit/powerpc64/linux/md-abi.c (md_param_alloc): Began
tbfg [Mon, 13 Nov 2006 21:43:41 +0000 (21:43 +0000)]
* src/vm/jit/powerpc64/linux/md-abi.c (md_param_alloc): Began
fixing ABI issues. It is not correct now, but fptest runs now.
Remaining issues in java<->native mainly stack offsets.

* src/vm/jit/powerpc64/emit.c (emit_load): Removed M_ILD case.
(emit_store): Removed M_FST case. There is no M_FST expect for
accessing c structs, internally everything is done using M_DLD
and M_DST, M_FST would convert the values.

* src/vm/jit/powerpc64/codegen.c (codegen): Removed all M_FST and
M_FLD.

* src/vm/jit/powerpc64/asmpart.S (asm_vm_call_method): Fixed
argument passing on stack.

17 years ago* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.
edwin [Sun, 12 Nov 2006 15:42:07 +0000 (15:42 +0000)]
* src/vm/jit/verify/typecheck-variablesbased-gen.inc: Regenerated.

17 years ago* src/vm/jit/icmdtable.inc: Activate INLINE_START and INLINE_END.
edwin [Sun, 12 Nov 2006 15:41:32 +0000 (15:41 +0000)]
* src/vm/jit/icmdtable.inc: Activate INLINE_START and INLINE_END.

17 years ago* src/vm/linker.c (inline_debug_log): Added variable reference.
edwin [Sun, 12 Nov 2006 15:33:16 +0000 (15:33 +0000)]
* src/vm/linker.c (inline_debug_log): Added variable reference.
(linker_overwrite_method): Factored out overwriting into this function,
update method flags and check assumptions when overwriting.
(link_class_intern): Use linker_overwrite_method. Invalidate code of
methods that makes broken assumptions.

* src/vm/method.c (inline_debug_log): Only use for ENABLE_INLINING.
(method_add_to_worklist): Allocate items with NEW.

17 years ago* src/vm/method.h (method_assumption): New struct.
edwin [Sun, 12 Nov 2006 15:14:19 +0000 (15:14 +0000)]
* src/vm/method.h (method_assumption): New struct.
(method_worklist): New struct.
(methodinfo): Added fields `overwrites` and `assumptions`.
(method_add_assumption_monomorphic): Added prototype.
(method_break_assumption_monomorphic): Likewise.

* src/vm/method.c (inline_debug_log): Added variable reference.
(method_add_to_worklist): New function.
(method_add_assumption_monomorphic): Likewise.
(method_break_assumption_monomorphic): Likewise.

17 years ago* src/cacaoh/headers.c (inline_debug_log): Added dummy variable.
edwin [Sun, 12 Nov 2006 15:01:14 +0000 (15:01 +0000)]
* src/cacaoh/headers.c (inline_debug_log): Added dummy variable.

17 years ago* src/vm/loader.c (load_method): Set ACC_METHOD_MONOMORPHIC and
edwin [Sun, 12 Nov 2006 15:00:41 +0000 (15:00 +0000)]
* src/vm/loader.c (load_method): Set ACC_METHOD_MONOMORPHIC and
ACC_METHOD_IMPLEMENTED flags.

17 years ago* src/vm/jit/replace.c (replace_me): Recompile replacement methods.
edwin [Sun, 12 Nov 2006 13:55:50 +0000 (13:55 +0000)]
* src/vm/jit/replace.c (replace_me): Recompile replacement methods.

17 years ago* src/vm/jit/replace.c (replace_create_replacement_point): Use the
edwin [Sun, 12 Nov 2006 13:54:02 +0000 (13:54 +0000)]
* src/vm/jit/replace.c (replace_create_replacement_point): Use the
ICMD id as id for replacement points.
(replace_replacement_point_println): Print the rplpoint id.

17 years ago* src/vm/jit/replace.c (replace_source_frame_println): Print position
edwin [Sun, 12 Nov 2006 13:52:50 +0000 (13:52 +0000)]
* src/vm/jit/replace.c (replace_source_frame_println): Print position
id.

17 years ago* src/vm/jit/replace.c (replace_pop_activation_record): Subtract one
edwin [Sun, 12 Nov 2006 13:52:04 +0000 (13:52 +0000)]
* src/vm/jit/replace.c (replace_pop_activation_record): Subtract one
from the return address so we don't hit the following replacement
point.

17 years ago* src/vm/jit/replace.c (replace_write_executionstate): Added some
edwin [Sun, 12 Nov 2006 13:51:21 +0000 (13:51 +0000)]
* src/vm/jit/replace.c (replace_write_executionstate): Added some
asserts.

17 years ago* src/vm/jit/replace.c: Cleaned up debugging prints.
edwin [Sun, 12 Nov 2006 13:50:36 +0000 (13:50 +0000)]
* src/vm/jit/replace.c: Cleaned up debugging prints.

17 years ago* src/vm/jit/replace.c (replace_create_replacement_points): Handle
edwin [Sun, 12 Nov 2006 13:47:45 +0000 (13:47 +0000)]
* src/vm/jit/replace.c (replace_create_replacement_points): Handle
javaindex == UNUSED.

17 years ago* src/vm/jit/jit.h, src/vm/jit/jit.c (jit_invalidate_code):
edwin [Sun, 12 Nov 2006 13:46:44 +0000 (13:46 +0000)]
* src/vm/jit/jit.h, src/vm/jit/jit.c (jit_invalidate_code):
New function.

17 years ago* src/vm/jit/jit.c (jit_recompile): Some cleanups.
edwin [Sun, 12 Nov 2006 13:40:39 +0000 (13:40 +0000)]
* src/vm/jit/jit.c (jit_recompile): Some cleanups.

17 years ago* src/vm/jit/i386/md.c (md_patch_replacement_point): Deactivated
edwin [Sun, 12 Nov 2006 13:39:50 +0000 (13:39 +0000)]
* src/vm/jit/i386/md.c (md_patch_replacement_point): Deactivated
debugging print.

17 years ago* src/cacaoh/headers.c (jit_invalidate_code): Added stub.
edwin [Sun, 12 Nov 2006 13:39:12 +0000 (13:39 +0000)]
* src/cacaoh/headers.c (jit_invalidate_code): Added stub.

17 years ago* src/vm/jit/inline/inline.c (emit_inlining_prolog): Set javaindex
edwin [Sun, 12 Nov 2006 13:38:34 +0000 (13:38 +0000)]
* src/vm/jit/inline/inline.c (emit_inlining_prolog): Set javaindex
UNUSED for generated STOREs. Include local variables in stackvars
for insinfo_inline. Copy instruction id to INLINE_START.
(inline_clone_instruction): Check for javaindex == UNUSED.
(rewrite_method): Set javaindex UNUSED for generated STOREs.
(inline_inline_intern): Removed some testing code.