[m-dev.] diff: use pretty printer in mdb
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed May 24 09:21:36 AEST 2000
On 24-May-2000, Mark Anthony BROWN <dougl at cs.mu.OZ.AU> wrote:
> Fergus pointed out that my solution overflows the det stack when formatting
> very large terms (eg. dumping the MLDS).
Ralph, here's how to run that test case:
1. apply the patch below
2. build the compiler
3. run `mmc --mlds-dump all -H -v' on some sample program(s),
e.g. tests/benchmarks/poly.m, with MERCURY_COMPILER set to
point to the compiler you built in step 2.
This requires having a very recent (>= May 21) version of the Mercury
compiler installed. You might want to do that anyway, so that you
can try out the MLDS back-end on your compression benchmark.
(But downloading and installing a new version may still be a bit of
trouble, so I'd be happy for you to go ahead and commit your change
without running this test.)
Cheers,
Fergus.
Index: mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.163
diff -u -d -u -r1.163 mercury_compile.m
--- mercury_compile.m 2000/05/16 21:23:26 1.163
+++ mercury_compile.m 2000/05/23 23:11:05
@@ -26,7 +26,7 @@
% library modules
:- import_module int, list, map, set, std_util, dir, require, string, bool.
-:- import_module library, getopt, set_bbbtree, term, varset.
+:- import_module library, getopt, pprint, set_bbbtree, term, varset.
:- import_module gc.
%
@@ -2828,10 +2828,8 @@
maybe_flush_output(Verbose),
io__tell(DumpFile, Res),
( { Res = ok } ->
- % XXX the following doesn't work, due to performance bugs
- % in pprint:
- % pprint__write(80, pprint__to_doc(MLDS)),
- io__print(MLDS), io__nl,
+ pprint__write(80, pprint__to_doc(MLDS)),
+ io__nl,
io__told,
maybe_write_string(Verbose, " done.\n"),
maybe_report_stats(Stats)
--
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.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list