[m-rev.] for review: avoid passing type infos to C code

Tyson Dowd trd at cs.mu.OZ.AU
Mon Jul 9 21:02:57 AEST 2001


On 09-Jul-2001, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> Hi,
> 
> Tyson might be best to review this one. Perhaps there are ramifications for
> other backends?
> 
> ------------------------------------------------------------------------------
> 
> Estimated hours taken: 8
> 
> mercury/compiler/polymorphism.m:
> 	Do not pass a type-info to C code that does not use the variable. 
> 	To check if the C code uses the variable, we simply check for the
> 	occurence of the variable name in the string that represents the C 
> 	code. This is potentially unsafe if the user decides to do something
> 	horrible with the preprocessor, but I don't think this needs to be
> 	specially documented --- AFAIK there is no user-visible documentation
> 	about passing type-infos to and from C anyway.

As you say, it's undocumented so I don't see any big problem right here.

There may be ramifications for the other backends, but I don't think
blocking this change would be a good solution for these backends, so I'm
happy for you to commit this.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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