lang.c (java_init): Handle flag_indirect_classes.
commit621ae65dcd01b01cbf1b4723d55653c8c1c7855b
authorAndrew Haley <aph@redhat.com>
Mon, 24 Apr 2006 15:33:16 +0000 (24 15:33 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Mon, 24 Apr 2006 15:33:16 +0000 (24 15:33 +0000)
tree843ad6f8c55847b78d8168eb919c303e362e94d6
parent5204d06d82d16eb89d871797cf4ff082f4fa9526
lang.c (java_init): Handle flag_indirect_classes.

2006-04-21  Andrew Haley  <aph@redhat.com>

        * lang.c (java_init): Handle flag_indirect_classes.
        * jvgenmain.c: Use "class$$" instead of "class$".
        * mangle.c (java_mangle_decl): Accept RECORD_TYPEs sw well as
        DECLs.
        (mangle_class_field): Special case "class$$" as well as "class$".
        * constants.c (build_ref_from_constant_pool): If
        flag_indirect_classes, generate a ref into the heap.
        * decl.c (constants_field_decl_node,
        constants_data_field_decl_node): New.
        * class.c (build_static_class_ref): New.
        (build_classdollar_field): Factor out from build_class_ref().
        (make_field_value): Handle static fields in heap.
        (make_class_data): Make sure we get a static ref to class.
        Make class initializer const if flag_indirect_classes.
        (register_class): Build a class_ref for initialization if
        flag_indirect_classes.
        (emit_indirect_register_classes): New.

2006-04-21  Andrew Haley  <aph@redhat.com>

        * include/execution.h (struct _Jv_CompiledEngine): Define for
        compiled classes.
        * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Call
        _Jv_RegisterLibForGc.
        (_Jv_RegisterClasses_Counted): Likewise.
        (_Jv_NewClassFromInitializer): New.
        (_Jv_RegisterNewClasses): New.
        * sources.am: Regenerate.
        * boehm.cc (_Jv_GC_has_static_roots): new.
        (_Jv_InitGC): Call GC_register_has_static_roots_callback.
        (filename_node, find_file, _Jv_print_gc_store, new_node,
        _Jv_GC_has_static_roots, _Jv_RegisterLibForGc): New.
        * scripts/makemake.tcl: Add -fno-indirect-classes.
        * Makefile.in: Regenerate.
        * link.cc (resolve_pool_entry): Allocate constant pool.
        Allocate fields.

From-SVN: r113224
19 files changed:
gcc/java/ChangeLog
gcc/java/class.c
gcc/java/constants.c
gcc/java/decl.c
gcc/java/java-tree.h
gcc/java/jvgenmain.c
gcc/java/lang.c
gcc/java/lang.opt
gcc/java/mangle.c
libjava/ChangeLog
libjava/Makefile.in
libjava/boehm.cc
libjava/include/boehm-gc.h
libjava/include/execution.h
libjava/java/lang/Class.h
libjava/java/lang/natClassLoader.cc
libjava/link.cc
libjava/scripts/makemake.tcl
libjava/sources.am