[m-rev.] diff: -d47+

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Mar 31 19:26:59 AEST 2003


compiler/mercury_compile.m:
	Allow arguments of the form -d47+, which dumps not just stage 47
	but all following stages as well.

doc/user_guide.texi:
	Document the new functionality.

Zoltan.

Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.282
diff -u -b -r1.282 mercury_compile.m
--- compiler/mercury_compile.m	18 Mar 2003 02:43:37 -0000	1.282
+++ compiler/mercury_compile.m	27 Mar 2003 08:53:43 -0000
@@ -3986,12 +3986,23 @@
 	(
 		list__member(StageNum, DumpStages)
 	;
+		string__append("0", StrippedStageNum, StageNum),
+		list__member(StrippedStageNum, DumpStages)
+	;
 		list__member(StageName, DumpStages)
 	;
 		list__member("all", DumpStages)
 	;
+		list__member(DumpStage, DumpStages),
+		string__append(From, "+", DumpStage),
+		string__to_int(From, FromInt),
+		(
 		string__append("0", StrippedStageNum, StageNum),
-		list__member(StrippedStageNum, DumpStages)
+			string__to_int(StrippedStageNum, StageInt)
+		;
+			string__to_int(StageNum, StageInt)
+		),
+		StageInt >= FromInt
 	).
 
 :- pred mercury_compile__dump_hlds(string, module_info, io__state, io__state).
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.361
diff -u -b -r1.361 user_guide.texi
--- doc/user_guide.texi	18 Mar 2003 16:37:41 -0000	1.361
+++ doc/user_guide.texi	27 Mar 2003 08:55:33 -0000
@@ -4660,6 +4660,8 @@
 the specified stage number or stage name to
 @file{@var{module}.hlds_dump. at var{num}- at var{name}}.
 Stage numbers range from 1 to 99; not all stage numbers are valid.
+If a stage number is followed by a plus sign,
+all stages after the given stage will be dumped as well.
 The special stage name @samp{all} causes the dumping of all stages.
 Multiple dump options accumulate.
 
--------------------------------------------------------------------------
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