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

Tyson Dowd trd at cs.mu.OZ.AU
Wed Sep 26 22:25:01 AEST 2001


On 26-Sep-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 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.

Good idea, I've done it.

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