[m-rev.] diff: MLDS back-end: fix an XXX
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Jul 13 11:30:59 AEST 2001
I'll commit this once I've tested it a bit more.
Estimated hours taken: 0.5
Branches: main
compiler/ml_code_util.m:
Fix an XXX: give label functions "local" access.
compiler/ml_unify_gen.m:
Give wrapper functions access "private".
Extra code is needed here to set this
now that label functions have "local" access.
Workspace: /home/mars/fjh/ws2/mercury
Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.42
diff -u -d -r1.42 ml_code_util.m
--- compiler/ml_code_util.m 2001/07/12 15:44:52 1.42
+++ compiler/ml_code_util.m 2001/07/12 22:36:47
@@ -932,8 +932,7 @@
%
:- func ml_gen_label_func_decl_flags = mlds__decl_flags.
ml_gen_label_func_decl_flags = MLDS_DeclFlags :-
- Access = private, % XXX if we're using nested functions,
- % this should be `local' rather than `private'
+ Access = local,
PerInstance = per_instance,
Virtuality = non_virtual,
Finality = overridable,
Index: compiler/ml_unify_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_unify_gen.m,v
retrieving revision 1.38
diff -u -d -r1.38 ml_unify_gen.m
--- compiler/ml_unify_gen.m 2001/07/11 10:20:11 1.38
+++ compiler/ml_unify_gen.m 2001/07/13 00:10:31
@@ -757,9 +757,10 @@
ml_gen_wrapper_func(FuncLabel, FuncParams, Context, Statement, Func) -->
ml_gen_label_func(FuncLabel, FuncParams, Context, Statement, Func0),
- { Func0 = mlds__defn(Name, Ctxt, DeclFlags, Defn) },
- { Func = mlds__defn(Name, Ctxt, set_per_instance(DeclFlags, one_copy),
- Defn) }.
+ { Func0 = mlds__defn(Name, Ctxt, DeclFlags0, Defn) },
+ { DeclFlags1 = set_per_instance(DeclFlags0, one_copy) },
+ { DeclFlags = set_access(DeclFlags1, private) },
+ { Func = mlds__defn(Name, Ctxt, DeclFlags, Defn) }.
:- func ml_gen_wrapper_head_var_names(int, int) = list(mlds__var_name).
ml_gen_wrapper_head_var_names(Num, Max) = Names :-
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | 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