[m-dev.] new version of `store.m'

Tyson Richard DOWD trd at cs.mu.oz.au
Mon Sep 29 16:18:34 AEST 1997


Fergus Henderson wrote:
> Hi,
> 
> Anyone want to review this?
> Comments on the new store.m are particularly welcome.
> 
> library/store.m:
> 	Complete rewrite.  Renamed everything in the existing interface,
> 	added lots to the interface, and implemented it efficiently.
> 	This file now contains preliminary support for my idea of
> 	"declaring an imperative data structure".
> 
> 	Missing:
> 		- a ref_construct pred
> 		- a way to use functors rather than
> 		  ref_functor & ref_arg_ref or ref_construct
> 		  (this would be a language extensions --
> 		  it would require compiler support)
> 
> library/std_util.m:
> 	Factor out the code for argument/2 into a C function ML_arg()
> 	so that it can also be used in store__arg_ref.
> 	Change ML_expand so that it takes a pointer to the term to expand,
> 	so that it can be used for store__arg_ref on no_tag types.
> 
> 	Add arg/2 and det_arg/2: similar to argument/2 and det_argument/2,
> 	except they take any argument type and fail if the type doesn't
> 	match, rather than returning a univ.  (Hmm... is this a good idea?)
> 
> library/tags.h:
> 	Add strip_tag() macro (used in var.m and store.m).
> 

The definition of some_store_type doesn't generate Unify, Index or
Compare predicates, nor base_type_{layout/functors}.

Ditto for mutvar/2, ref/2 and store/1.

I guess we haven't had any link errors because nobody has written any
code that uses stores.

-- 
       Tyson Dowd           #          Another great idea from the 
                            #            people who brought you
      trd at .cs.mu.oz.au      #               Beer Milkshakes!
http://www.cs.mu.oz.au/~trd #	         Confidence --- Red Dwarf



More information about the developers mailing list