diff: hlds_out.m: improve class_method_call output
Fergus Henderson
fjh at cs.mu.OZ.AU
Thu Mar 18 05:17:10 AEDT 1999
Estimated hours taken: 0.25
compiler/hlds_out.m:
Improve the way we print out type class method calls:
- fix a missing newline bug
- print out the method number
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.213
diff -u -r1.213 hlds_out.m
--- hlds_out.m 1999/02/12 03:46:54 1.213
+++ hlds_out.m 1999/03/17 18:01:03
@@ -1139,19 +1139,27 @@
io__write_string(Follow),
io__write_string("\n").
-hlds_out__write_goal_2(class_method_call(TCInfoVar, _, ArgVars, _, _, _),
+hlds_out__write_goal_2(
+ class_method_call(TCInfoVar, MethodNum, ArgVars, _, _, _),
_ModuleInfo, VarSet, AppendVarnums, Indent, Follow, _) -->
% XXX we should print more info here too
globals__io_lookup_string_option(dump_hlds_options, Verbose),
hlds_out__write_indent(Indent),
( { string__contains_char(Verbose, 'l') } ->
- io__write_string("% class method call"),
+ io__write_string("% class method call\n"),
hlds_out__write_indent(Indent)
;
[]
),
- hlds_out__write_functor(term__atom("class_method_call"),
- [TCInfoVar|ArgVars], VarSet, AppendVarnums),
+ { term__context_init(Context) },
+ { Functor = term__atom("class_method_call") },
+ { TCInfoTerm = term__variable(TCInfoVar) },
+ { MethodNumTerm = term__functor(term__integer(MethodNum), [],
+ Context) },
+ { term__var_list_to_term_list(ArgVars, ArgTerms) },
+ { Term = term__functor(Functor, [TCInfoTerm, MethodNumTerm | ArgTerms],
+ Context) },
+ mercury_output_term(Term, VarSet, AppendVarnums),
io__write_string(Follow),
io__write_string("\n").
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list