[m-rev.] for review: add --force-disable-ssdebug option

Peter Wang novalazy at gmail.com
Thu Dec 6 15:02:41 AEDT 2007


Estimated hours taken: 0.1
Branches: main

Add an option `--force-disable-ssdebug' which will be used to disable the ssdb
transformation even in `.ssdebug' grades.

Previously we were using `--no-ssdb' but this doesn't work when installing
libraries with `mmc --make'.  The presence of `--no-ssdb' removes the
`.ssdebug' component from the grade string, e.g.
	mmc --make --grade hlc.ssdebug.gc --no-ssdb libfoo.install
is equivalent to:
	mmc --make --grade hlc.gc libfoo.install

compiler/mercury_compile.m:
compiler/options.m:
	As above.


Once it bootstraps I will change occurrences of --no-ssdb from the
*_FLAGS  and configure.in to --force-disable-ssdebug.


Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.457
diff -u -r1.457 mercury_compile.m
--- compiler/mercury_compile.m	5 Dec 2007 05:38:53 -0000	1.457
+++ compiler/mercury_compile.m	6 Dec 2007 03:49:16 -0000
@@ -3193,8 +3193,12 @@
 
 maybe_ssdb(Verbose, Stats, !HLDS, !IO) :-
     globals.io_lookup_bool_option(source_to_source_debug, SSDB, !IO),
+    globals.io_lookup_bool_option(force_disable_ssdebug, ForceDisableSSDB,
+        !IO),
     (
         SSDB = yes,
+        ForceDisableSSDB = no
+    ->
         maybe_write_string(Verbose,
             "% Apply debugging source to source transformation ...\n", !IO),
         process_all_nonimported_procs(
@@ -3205,7 +3209,7 @@
         % XXX Must be remove to manage the determinsim by hand
         determinism_pass(!HLDS, _Specs)
     ;
-        SSDB = no
+        true
     ).
 
 :- pred maybe_analyse_trail_usage(bool::in, bool::in,
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.605
diff -u -r1.605 options.m
--- compiler/options.m	26 Nov 2007 05:13:20 -0000	1.605
+++ compiler/options.m	6 Dec 2007 03:49:17 -0000
@@ -213,6 +213,7 @@
             % grade.
 
     ;       stack_trace_higher_order
+    ;       force_disable_ssdebug
     ;       generate_bytecode
     ;       line_numbers
     ;       auto_comments
@@ -1046,6 +1047,7 @@
     force_disable_tracing               -   bool(no),
     delay_death                         -   bool(yes),
     stack_trace_higher_order            -   bool(no),
+    force_disable_ssdebug               -   bool(no),
     generate_bytecode                   -   bool(no),
     line_numbers                        -   bool(yes),
     auto_comments                       -   bool(no),
@@ -1840,6 +1842,7 @@
 long_option("force-disable-tracing",    force_disable_tracing).
 long_option("delay-death",          delay_death).
 long_option("stack-trace-higher-order", stack_trace_higher_order).
+long_option("force-disable-ssdebug",    force_disable_ssdebug).
 long_option("generate-bytecode",    generate_bytecode).
 long_option("line-numbers",         line_numbers).
 long_option("auto-comments",        auto_comments).
@@ -3426,6 +3429,9 @@
         "\tEnable stack traces through predicates and functions with",
         "\thigher-order arguments, even if stack tracing is not",
         "\tsupported in general.",
+%       This is a developer-only option:
+%       "--force-disable-ssdebug",
+%       "\tDisable ssdebug transformation even in ssdebug grades.",
 %       "--tabling-via-extra-args",
 %       "\tGenerate output via extra_args in foreign_procs.",
 %       "--allow-table-reset",

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list