[m-rev.] Re: fix another RTTI bug with reserved addresses

Fergus Henderson fjh at cs.mu.OZ.AU
Sun Oct 27 15:16:24 AEDT 2002


On 27-Oct-2002, Fergus Henderson <fjh at cs.mu.oz.au> wrote:
> Fix a bug introduced in Zoltan's recent RTTI changes that caused a
> compiler abort when compiling types with a single constant functor,
> e.g. std_util__unit, in grade `il' with `--num-reserved-addresses 1'.
> 
> compiler/rtti.m:
> 	In type_ctor_details_num_ptags, handle the case where a type
> 	has *all* of its functors represented using reserved addresses.

And another one ;-)

Estimated hours taken: 0.5
Branches: main

Fix another bug introduced in Zoltan's recent RTTI changes that caused a
compiler abort when compiling types with a single constant functor,
e.g. std_util__unit, in grade `il' with `--num-reserved-addresses 1'.

compiler/rtti_to_mlds.m:
	In gen_du_ptag_ordered_table, handle the case where a type
	has *all* of its functors represented using reserved addresses,
	i.e. in which the du_ptag_ordered_table is empty.

Workspace: /home/ceres/fjh/ws-ceres2/mercury
Index: compiler/rtti_to_mlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rtti_to_mlds.m,v
retrieving revision 1.34
diff -u -d -r1.34 rtti_to_mlds.m
--- compiler/rtti_to_mlds.m	26 Oct 2002 15:41:12 -0000	1.34
+++ compiler/rtti_to_mlds.m	27 Oct 2002 04:09:08 -0000
@@ -637,6 +637,9 @@
 	; PtagList = [0 - _ | _] ->
 		PtagInitPrefix = [],
 		FirstPtag = 0
+	; PtagList = [] ->
+		PtagInitPrefix = [],
+		FirstPtag = 0
 	;
 		error("gen_du_ptag_ordered_table: bad ptag list")
 	),
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list