diff options
author | Andrew Haley <aph@redhat.com> | 2006-04-24 15:33:16 +0000 |
---|---|---|
committer | Andrew Haley <aph@gcc.gnu.org> | 2006-04-24 15:33:16 +0000 |
commit | 621ae65dcd01b01cbf1b4723d55653c8c1c7855b (patch) | |
tree | 843ad6f8c55847b78d8168eb919c303e362e94d6 /gcc/java/decl.c | |
parent | 5204d06d82d16eb89d871797cf4ff082f4fa9526 (diff) | |
download | gcc-621ae65dcd01b01cbf1b4723d55653c8c1c7855b.zip gcc-621ae65dcd01b01cbf1b4723d55653c8c1c7855b.tar.gz gcc-621ae65dcd01b01cbf1b4723d55653c8c1c7855b.tar.bz2 |
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
Diffstat (limited to 'gcc/java/decl.c')
-rw-r--r-- | gcc/java/decl.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/java/decl.c b/gcc/java/decl.c index 06da90b..a16c49b 100644 --- a/gcc/java/decl.c +++ b/gcc/java/decl.c @@ -123,6 +123,12 @@ static GTY(()) tree pending_local_decls; /* The decl for "_Jv_ResolvePoolEntry". */ tree soft_resolvepoolentry_node; +/* The decl for the .constants field of an instance of Class. */ +tree constants_field_decl_node; + +/* The decl for the .data field of an instance of Class. */ +tree constants_data_field_decl_node; + #if defined(DEBUG_JAVA_BINDING_LEVELS) int binding_depth = 0; int is_class_level = 0; @@ -883,6 +889,7 @@ java_init_decl_processing (void) PUSH_FIELD (constants_type_node, field, "size", unsigned_int_type_node); PUSH_FIELD (constants_type_node, field, "tags", ptr_type_node); PUSH_FIELD (constants_type_node, field, "data", ptr_type_node); + constants_data_field_decl_node = field; FINISH_RECORD (constants_type_node); build_decl (TYPE_DECL, get_identifier ("constants"), constants_type_node); @@ -924,6 +931,7 @@ java_init_decl_processing (void) PUSH_FIELD (class_type_node, field, "accflags", access_flags_type_node); PUSH_FIELD (class_type_node, field, "superclass", class_ptr_type); PUSH_FIELD (class_type_node, field, "constants", constants_type_node); + constants_field_decl_node = field; PUSH_FIELD (class_type_node, field, "methods", method_ptr_type_node); PUSH_FIELD (class_type_node, field, "method_count", short_type_node); PUSH_FIELD (class_type_node, field, "vtable_method_count", short_type_node); |