[m-rev.] diff: more --highlevel-data in IL
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Apr 24 23:43:23 AEST 2001
On 24-Apr-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> +:- pred generate_other_decls(mlds__defn, list(ilasm__decl),
> + il_info, il_info).
> +:- mode generate_other_decls(in, out, in, out) is det.
> +generate_other_decls(MLDSDefn, Decls) -->
> + ModuleName =^ module_name,
> + { ClassName = mlds_module_name_to_class_name(ModuleName) },
> + { MLDSDefn = mlds__defn(EntityName, _Context, _DeclFlags, Entity) },
> + { term__type_to_term(MLDSDefn, MLDSDefnTerm) },
> + ( { EntityName = type(TypeName, _Arity) },
> + { FullClassName = append_class_name(ClassName, [TypeName]) },
> (
> - Entity = mlds__class(ClassDefn)
> + { Entity = mlds__class(ClassDefn) }
> ->
> - ClassDefn = mlds__class_defn(_ClassType, _Imports,
> - Inherits, _Implements, Defns),
> - Extends = mlds_inherits_to_ilds_inherits(Inherits),
> - list__map(defn_to_class_decl, Defns, ILDefns),
> - make_constructor(FullClassName, ClassDefn,
> - ConstructorILDefn),
> - % XXX we assume public here
> - Decls = [comment_term(MLDSDefnTerm),
> + { ClassDefn = mlds__class_defn(_ClassType, _Imports,
> + Inherits, _Implements, Defns) },
> + DataRep =^ il_data_rep,
> + { Extends = mlds_inherits_to_ilds_inherits(DataRep,
> + Inherits) },
> + list__map_foldl(defn_to_class_decl, Defns, ILDefns),
> + { make_constructor(DataRep, FullClassName, ClassDefn,
> + ConstructorILDefn) },
> + { Decls = [comment_term(MLDSDefnTerm),
> class([public], TypeName,
The "XXX" comment there should stay.
Apart from that, this change looks fine.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| 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