[m-rev.] diff: --no-line-numbers and IL

Peter Ross peter.ross at miscrit.be
Tue Mar 12 03:10:51 AEDT 2002


Hi,


===================================================================


Estimated hours taken: 0.25
Branches: main

compiler/ilasm.m:
	Respect the --no-line-numbers option when compiling to IL.

Index: ilasm.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ilasm.m,v
retrieving revision 1.32
diff -u -r1.32 ilasm.m
--- ilasm.m	24 Jan 2002 06:43:34 -0000	1.32
+++ ilasm.m	11 Mar 2002 16:09:50 -0000
@@ -1034,11 +1034,16 @@
 	io__write_string(" (try block)").
 
 output_instr(context(File, Line), I, I) -->
-	io__write_string("\n\t.line "),
-	io__write_int(Line),
-	io__write_string(" '"),
-	io__write_string(File),
-	io__write_string("'").
+	io_lookup_bool_option(line_numbers, LineNumbers),
+	( { LineNumbers = yes } ->
+		io__write_string("\n\t.line "),
+		io__write_int(Line),
+		io__write_string(" '"),
+		io__write_string(File),
+		io__write_string("'")
+	;
+		[]
+	).
 
 output_instr(call(MethodRef), Info0, Info) --> 
 	io__write_string("call\t"),

--------------------------------------------------------------------------
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