From 7e7c835cab2577ea0e7e7e42ce11362e2eb1752c Mon Sep 17 00:00:00 2001 From: rth Date: Sat, 22 Dec 2001 00:52:30 +0000 Subject: [PATCH] * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into .. (get_boehm_type_descriptor): ... here. Arrange for the TREE_TYPE to get set properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48261 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/java/ChangeLog | 26 ++++++++++++++++---------- gcc/java/boehm.c | 23 ++++++++++++----------- 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 6c0a6d706f0..a1773a33a2a 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,5 +1,11 @@ 2001-12-21 Richard Henderson + * boehm.c (PROCEDURE_OBJECT_DESCRIPTOR): Merge into .. + (get_boehm_type_descriptor): ... here. Arrange for the + TREE_TYPE to get set properly. + +2001-12-21 Richard Henderson + * class.c (compile_resource_file): Set TREE_PUBLIC on the constructor only if the target requires collect2. @@ -774,7 +780,7 @@ Tue Oct 23 14:02:17 2001 Richard Kenner 2001-08-28 Per Bothner * jcf-write.c (generate_bytecode_insns): For increments and - decrements just recurse to push constant. Improvement on Mark's patch. + decrements just recurse to push constant. Improvement on Mark's patch. 2001-08-28 Mark Mitchell @@ -981,7 +987,7 @@ Tue Oct 23 14:02:17 2001 Richard Kenner 2001-08-06 Richard Henderson - * class.c (emit_register_classes): Pass a symbol_ref and priority + * class.c (emit_register_classes): Pass a symbol_ref and priority to assemble_constructor. 2001-08-02 Alexandre Petit-Bianco @@ -993,8 +999,8 @@ Tue Oct 23 14:02:17 2001 Richard Kenner 2001-08-01 Jeff Sturm - * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): - Use ggc_add_tree_root to register roots. + * java-tree.h (BUILD_FILENAME_IDENTIFIER_NODE): + Use ggc_add_tree_root to register roots. 2001-07-31 Alexandre Petit-Bianco @@ -1252,7 +1258,7 @@ Tue Oct 23 14:02:17 2001 Richard Kenner 2001-05-18 Per Bothner * jvspec.c (lang_specific_pre_link): Re-arrange the linker - command line so the jvgenmain-generated main program comes first. + command line so the jvgenmain-generated main program comes first. 2001-05-15 Tom Tromey @@ -1287,7 +1293,7 @@ Tue Oct 23 14:02:17 2001 Richard Kenner 2001-05-03 Mo DeJong - * lex.c (java_new_lexer): Call iconv_close on temp handle used to + * lex.c (java_new_lexer): Call iconv_close on temp handle used to check for byte swap. 2000-05-02 Jeff Sturm @@ -1744,8 +1750,8 @@ Tue Oct 23 14:02:17 2001 Richard Kenner 2001-03-19 Andrew Haley - * class.c (build_static_field_ref): Call make_decl_rtl() after - setting the DECL_EXTERNAL flag. + * class.c (build_static_field_ref): Call make_decl_rtl() after + setting the DECL_EXTERNAL flag. 2001-03-17 Per Bothner @@ -1918,7 +1924,7 @@ Fri Feb 23 15:28:39 2001 Richard Kenner * Make-lang.in (jvspec.o): Modify rule to match that of cp/g++spec.o. 2001-02-14 Tom Tromey - Alexandre Petit-Bianco + Alexandre Petit-Bianco Fix for PR java/1261. * typeck.c (build_java_array_type): Add public `clone' method to @@ -2545,7 +2551,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner * gen-table.pl: new file. 2000-11-20 Tom Tromey - Alexandre Petit-Bianco + Alexandre Petit-Bianco * parse.y (java_complete_lhs): Only allow compound assignment of reference type if type is String. diff --git a/gcc/java/boehm.c b/gcc/java/boehm.c index e92b4402b38..3eb20434d26 100644 --- a/gcc/java/boehm.c +++ b/gcc/java/boehm.c @@ -43,14 +43,6 @@ static void set_bit PARAMS ((unsigned HOST_WIDE_INT *, unsigned HOST_WIDE_INT *, unsigned int)); -/* Compute a procedure-based object descriptor. We know that our - `kind' is 0, and `env' is likewise 0, so we have a simple - computation. From the GC sources: - (((((env) << LOG_MAX_MARK_PROCS) | (proc_index)) << DS_TAG_BITS) \ - | DS_PROC) - Here DS_PROC == 2. */ -#define PROCEDURE_OBJECT_DESCRIPTOR build_int_2 (2, 0) - /* Treat two HOST_WIDE_INT's as a contiguous bitmap, with bit 0 being the least significant. This function sets bit N in the bitmap. */ static void @@ -167,7 +159,7 @@ get_boehm_type_descriptor (tree type) /* If we have a type of unknown size, use a proc. */ if (int_size_in_bytes (type) == -1) - return PROCEDURE_OBJECT_DESCRIPTOR; + goto procedure_object_descriptor; bit = POINTER_SIZE / BITS_PER_UNIT; /* The size of this node has to be known. And, we only support 32 @@ -187,7 +179,7 @@ get_boehm_type_descriptor (tree type) ubit = (unsigned int) bit; if (type == class_type_node) - return PROCEDURE_OBJECT_DESCRIPTOR; + goto procedure_object_descriptor; field = TYPE_FIELDS (type); mark_reference_fields (field, &low, &high, ubit, @@ -227,7 +219,16 @@ get_boehm_type_descriptor (tree type) value = build_int_2 (low, high); } else - value = PROCEDURE_OBJECT_DESCRIPTOR; + { + /* Compute a procedure-based object descriptor. We know that our + `kind' is 0, and `env' is likewise 0, so we have a simple + computation. From the GC sources: + (((((env) << LOG_MAX_MARK_PROCS) | (proc_index)) << DS_TAG_BITS) \ + | DS_PROC) + Here DS_PROC == 2. */ + procedure_object_descriptor: + value = build_int_2 (2, 0); + } TREE_TYPE (value) = type_for_mode (ptr_mode, 1); return value; -- 2.11.4.GIT