diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-22 00:52:30 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-22 00:52:30 +0000 |
commit | 7e7c835cab2577ea0e7e7e42ce11362e2eb1752c (patch) | |
tree | a877417b0b3f685c894a76459939bd13797420ef /gcc/java/boehm.c | |
parent | 5506172a3e8251423efbb5d90c991cec569c294c (diff) | |
download | gcc-7e7c835cab2577ea0e7e7e42ce11362e2eb1752c.tar.gz |
* 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
Diffstat (limited to 'gcc/java/boehm.c')
-rw-r--r-- | gcc/java/boehm.c | 23 |
1 files changed, 12 insertions, 11 deletions
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; |