[m-rev.] for review: new required_feature_set feature

Peter Wang novalazy at gmail.com
Tue Jan 29 12:40:25 AEDT 2008


On 2008-01-24, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> 
>  Estimated hours taken: 1
>  Branches: main
> 
>  Support a new feature in required_feature_set pragmas that specifies that a
>  module should be compiled with conservative garbage collection enabled.
>  This feature is only checked when using the C backends, the other backends
>  ignore it.
> 
>  compiler/prog_data.m:
>  	Add the new feature.
> 
>  compiler/prog_io_pragma.m:
>  	Parse the new feature.
> 
>  compiler/add_pragma.m:
>  	If a conservative_gc feature is present check that
>  	conservative GC is implied by the current options
>  	and emit an error message if it is not.  Do nothing
>  	in the case where `--garbage-collection automatic'
>  	because that implies the use of one of the non-C
>  	backends.
> 
>  compiler/mercury_to_mercury.m:
>  	Conform to the above change.
> 
>  doc/reference_manual.texi:
>  	Document the new feature.
> 
>  Julien.
> 

>  Index: doc/reference_manual.texi
>  ===================================================================
>  RCS file: 
>  /home/mercury/mercury1/repository/mercury/doc/reference_manual.texi,v
>  retrieving revision 1.418
>  diff -u -r1.418 reference_manual.texi
>  --- doc/reference_manual.texi	24 Jan 2008 04:29:36 -0000	1.418
>  +++ doc/reference_manual.texi	24 Jan 2008 11:39:04 -0000
>  @@ -10540,9 +10540,15 @@
>   feature.
> 
>   @item @samp{strict_sequential}
>  -This feature specifes that a semantics that is equivalent to the strict
>  +This feature specifies that a semantics that is equivalent to the strict
>   sequential operational semantics must be used.
> 
>  + at item @samp{conservative_gc}
>  +This feature specifies that a module requires conservative garbage
>  +collection.
>  +This feature is only check when using the C backends, it is ignored
>  +by the non-C backends. +

only checked

That sentence should be two.

Maybe the description should also explain the implications of
conservative GC such that you might want the check.  e.g. you can assume
Mercury objects won't move, you can stash addresses in structures
allocated with certain macros, etc.

Peter

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list