[m-rev.] diff: deconstruct with exist. vars on .NET backend

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Sep 26 12:36:08 AEST 2001


On 25-Sep-2001, Tyson Dowd <trd at miscrit.be> wrote:
> +++ library/rtti_implementation.m	25 Sep 2001 09:37:15 -0000
> @@ -751,22 +751,25 @@
>  get_arg(Term, Index, SecTagLocn, FunctorDesc, TypeInfo) = (Arg) :-
>  	ArgTypes = FunctorDesc ^ functor_arg_types,
>  	PseudoTypeInfo = get_pti_from_arg_types(ArgTypes, Index),
> +	get_type_and_extra_args(TypeInfo, PseudoTypeInfo, Term,
> +		FunctorDesc, ExtraArgs, ArgTypeInfo),
>  	( SecTagLocn = none ->
> -		TagOffset = 0
> +		TagOffset = ExtraArgs
>  	;
> -		TagOffset = 1
> +		TagOffset = ExtraArgs + 1
>  	),

The offset of the tag should never be anything other than 0 or 1.
Perhaps the TagOffset variable should be renamed.
Or even better, leave that if-then-else as it was and
define a new variable called say RealArgsOffset or something
like that, defined by RealArgsOffset = TagOffset + ExtraArgs.

-- 
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