[m-rev.] diff: make none.gc.memprof work with MSVC
Julien Fischer
juliensf at csse.unimelb.edu.au
Thu Oct 20 17:35:55 AEDT 2011
Branches: main, 11.07
Make the none.gc.memprof grade work with MSVC again.
Avoid more warnings when compiling with MSVC.
compiler/layout_out.m:
Avoid an incomplete type in the declaration of the alloc_sites
array. (Similar changes need to be made for the layout structures
related to debugging and deep profiling - I am in the process of
testing the former, the latter doesn't currently work on Windows
any way.)
browser/listing.m:
Use don't-care variables in some foreign_procs.
This avoids warnings about assignments from uninitialized
variables with MSVC.
*/.cvsignore:
Update cvsignore entries.
Ignore files generated by mprof.
Julien.
Index: browser/listing.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/browser/listing.m,v
retrieving revision 1.15
diff -u -r1.15 listing.m
--- browser/listing.m 19 Jan 2011 06:33:30 -0000 1.15
+++ browser/listing.m 20 Oct 2011 04:48:42 -0000
@@ -192,11 +192,10 @@
:- pred write_to_c_file(c_file_ptr::in, string::in, io::di, io::uo) is det.
:- pragma foreign_proc("C",
- write_to_c_file(ErrStrm::in, Str::in, IO0::di, IO::uo),
+ write_to_c_file(ErrStrm::in, Str::in, _IO0::di, _IO::uo),
[promise_pure, thread_safe, will_not_call_mercury],
"
fputs(Str, (FILE *)ErrStrm);
- IO = IO0;
").
%-----------------------------------------------------------------------------%
@@ -279,7 +278,7 @@
:- pragma foreign_proc("C",
print_lines_in_range_c(InStrm::in, OutStrm::in, ThisLine::in, FirstLine::in,
- LastLine::in, MarkLine::in, IO0::di, IO::uo),
+ LastLine::in, MarkLine::in, _IO0::di, _IO::uo),
[promise_pure, thread_safe, will_not_call_mercury],
"
if (FirstLine <= ThisLine && ThisLine <= LastLine) {
@@ -303,7 +302,6 @@
}
}
}
- IO = IO0;
").
%-----------------------------------------------------------------------------%
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.124
diff -u -r1.124 layout_out.m
--- compiler/layout_out.m 17 Oct 2011 04:31:29 -0000 1.124
+++ compiler/layout_out.m 20 Oct 2011 05:02:17 -0000
@@ -375,9 +375,10 @@
;
AllocSites = [_ | _],
AllocSiteArrayName = alloc_site_array,
+ list.length(AllocSites, NumAllocSites),
output_layout_array_name_storage_type_name(MangledModuleName,
AllocSiteArrayName, not_being_defined, !IO),
- io.write_string("[];\n", !IO)
+ io.format("[%d];\n", [i(NumAllocSites)], !IO)
).
output_layout_array_defns(Info, PseudoTypeInfos, HLDSVarNums,
Index: deep_profiler/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/.cvsignore,v
retrieving revision 1.17
diff -u -r1.17 .cvsignore
--- deep_profiler/.cvsignore 3 May 2011 07:37:09 -0000 1.17
+++ deep_profiler/.cvsignore 20 Oct 2011 06:22:20 -0000
@@ -25,6 +25,8 @@
mdprof_dump
mdprof_feedback
mdprof_procrep
+mdprof_create_feedback
+mdprof_report_feedback
Mercury
Mercury.modules
.deep.tags
Index: doc/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/.cvsignore,v
retrieving revision 1.9
diff -u -r1.9 .cvsignore
--- doc/.cvsignore 10 Jan 2007 14:23:37 -0000 1.9
+++ doc/.cvsignore 20 Oct 2011 04:47:37 -0000
@@ -9,3 +9,5 @@
library-menu.texi library-chapters.texi
mercury.html mercury.info
mdb_doc mdb_command_list mdb_command_test.inp
+Prof.MemoryCells
+Prof.MemoryWords
Index: samples/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/samples/.cvsignore,v
retrieving revision 1.5
diff -u -r1.5 .cvsignore
--- samples/.cvsignore 4 Mar 2008 04:41:05 -0000 1.5
+++ samples/.cvsignore 20 Oct 2011 05:01:10 -0000
@@ -9,3 +9,4 @@
*.mih
all_solutions calculator cat committed_choice eliza hello ultra_sub sort
calculator2 e expand_terms interpreter
+Mercury
Index: tests/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/.cvsignore,v
retrieving revision 1.5
diff -u -r1.5 .cvsignore
--- tests/.cvsignore 3 May 2011 07:38:18 -0000 1.5
+++ tests/.cvsignore 20 Oct 2011 04:49:54 -0000
@@ -13,3 +13,7 @@
mdbrc
mdbrc.in
runtests.errs
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/analysis/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/analysis/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- tests/analysis/.cvsignore 30 Jul 2010 13:30:25 -0000 1.2
+++ tests/analysis/.cvsignore 20 Oct 2011 04:50:17 -0000
@@ -3,3 +3,7 @@
NOMAKE_DIRS
.mgnuc_opts
.mgnuc_copts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/benchmarks/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/benchmarks/.cvsignore,v
retrieving revision 1.5
diff -u -r1.5 .cvsignore
--- tests/benchmarks/.cvsignore 25 Jul 2007 06:40:14 -0000 1.5
+++ tests/benchmarks/.cvsignore 20 Oct 2011 04:51:02 -0000
@@ -10,3 +10,5 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
Index: tests/debugger/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/.cvsignore,v
retrieving revision 1.5
diff -u -r1.5 .cvsignore
--- tests/debugger/.cvsignore 5 Nov 2007 11:29:04 -0000 1.5
+++ tests/debugger/.cvsignore 20 Oct 2011 04:51:42 -0000
@@ -31,3 +31,7 @@
runtests.errs
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/debugger/declarative/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/debugger/declarative/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- tests/debugger/declarative/.cvsignore 25 Jul 2007 06:40:14 -0000 1.2
+++ tests/debugger/declarative/.cvsignore 20 Oct 2011 04:51:58 -0000
@@ -6,3 +6,7 @@
dice.pass
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/dppd/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/dppd/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/dppd/.cvsignore 25 Jul 2007 06:40:15 -0000 1.1
+++ tests/dppd/.cvsignore 20 Oct 2011 04:52:31 -0000
@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/general/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/general/.cvsignore,v
retrieving revision 1.19
diff -u -r1.19 .cvsignore
--- tests/general/.cvsignore 11 Feb 2008 14:55:24 -0000 1.19
+++ tests/general/.cvsignore 20 Oct 2011 04:52:54 -0000
@@ -20,3 +20,7 @@
*.d
*.mih
*.mh
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/general/accumulator/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/general/accumulator/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- tests/general/accumulator/.cvsignore 25 Jul 2007 06:40:16 -0000 1.2
+++ tests/general/accumulator/.cvsignore 20 Oct 2011 06:23:02 -0000
@@ -26,3 +26,7 @@
INTRODUCED.diff
.mgnuc_opts
.mgnuc_copts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/general/string_format/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/general/string_format/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/general/string_format/.cvsignore 25 Jul 2007 06:40:16 -0000 1.1
+++ tests/general/string_format/.cvsignore 20 Oct 2011 06:23:23 -0000
@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/grade_subdirs/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/grade_subdirs/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/grade_subdirs/.cvsignore 25 Jul 2007 06:40:17 -0000 1.1
+++ tests/grade_subdirs/.cvsignore 20 Oct 2011 04:53:15 -0000
@@ -1,2 +1,6 @@
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/hard_coded/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/.cvsignore,v
retrieving revision 1.32
diff -u -r1.32 .cvsignore
--- tests/hard_coded/.cvsignore 19 Oct 2007 05:18:28 -0000 1.32
+++ tests/hard_coded/.cvsignore 20 Oct 2011 06:07:21 -0000
@@ -125,3 +125,7 @@
FAILED_TESTS
NOMAKE_DIRS
Mercury.modules
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/hard_coded/exceptions/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/exceptions/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/hard_coded/exceptions/.cvsignore 25 Jul 2007 06:40:18 -0000 1.1
+++ tests/hard_coded/exceptions/.cvsignore 20 Oct 2011 06:06:55 -0000
@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/hard_coded/purity/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/purity/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/hard_coded/purity/.cvsignore 25 Jul 2007 06:40:18 -0000 1.1
+++ tests/hard_coded/purity/.cvsignore 20 Oct 2011 06:07:23 -0000
@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/hard_coded/sub-modules/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/sub-modules/.cvsignore,v
retrieving revision 1.3
diff -u -r1.3 .cvsignore
--- tests/hard_coded/sub-modules/.cvsignore 25 Jul 2007 06:40:19 -0000 1.3
+++ tests/hard_coded/sub-modules/.cvsignore 20 Oct 2011 06:09:14 -0000
@@ -7,3 +7,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/hard_coded/typeclasses/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/hard_coded/typeclasses/.cvsignore,v
retrieving revision 1.3
diff -u -r1.3 .cvsignore
--- tests/hard_coded/typeclasses/.cvsignore 25 Jul 2007 06:40:19 -0000 1.3
+++ tests/hard_coded/typeclasses/.cvsignore 20 Oct 2011 06:09:34 -0000
@@ -26,3 +26,7 @@
.mgnuc_copts
.mgnuc_opts
runtests.errs
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/invalid/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/.cvsignore,v
retrieving revision 1.6
diff -u -r1.6 .cvsignore
--- tests/invalid/.cvsignore 4 Sep 2007 05:15:55 -0000 1.6
+++ tests/invalid/.cvsignore 20 Oct 2011 06:20:46 -0000
@@ -23,3 +23,7 @@
Mercury
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/invalid/purity/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/invalid/purity/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- tests/invalid/purity/.cvsignore 25 Jul 2007 06:40:20 -0000 1.2
+++ tests/invalid/purity/.cvsignore 20 Oct 2011 06:21:01 -0000
@@ -16,3 +16,7 @@
runtests.errs
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/misc_tests/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/misc_tests/.cvsignore,v
retrieving revision 1.3
diff -u -r1.3 .cvsignore
--- tests/misc_tests/.cvsignore 25 Jul 2007 06:40:20 -0000 1.3
+++ tests/misc_tests/.cvsignore 20 Oct 2011 06:20:15 -0000
@@ -4,3 +4,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/mmc_make/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/mmc_make/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/mmc_make/.cvsignore 25 Jul 2007 06:40:20 -0000 1.1
+++ tests/mmc_make/.cvsignore 20 Oct 2011 06:21:33 -0000
@@ -1,2 +1,6 @@
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/par_conj/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/par_conj/.cvsignore,v
retrieving revision 1.2
diff -u -r1.2 .cvsignore
--- tests/par_conj/.cvsignore 25 Jul 2007 06:40:20 -0000 1.2
+++ tests/par_conj/.cvsignore 20 Oct 2011 06:19:55 -0000
@@ -14,3 +14,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/recompilation/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/recompilation/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/recompilation/.cvsignore 23 Jul 2007 02:10:57 -0000 1.1
+++ tests/recompilation/.cvsignore 20 Oct 2011 06:11:05 -0000
@@ -2,3 +2,7 @@
*.err
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/tabling/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/tabling/.cvsignore,v
retrieving revision 1.5
diff -u -r1.5 .cvsignore
--- tests/tabling/.cvsignore 27 Feb 2008 08:35:18 -0000 1.5
+++ tests/tabling/.cvsignore 20 Oct 2011 06:10:07 -0000
@@ -11,3 +11,7 @@
.mgnuc_copts
.mgnuc_opts
table_foreign_enum
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/term/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/term/.cvsignore,v
retrieving revision 1.5
diff -u -r1.5 .cvsignore
--- tests/term/.cvsignore 25 Jul 2007 06:40:21 -0000 1.5
+++ tests/term/.cvsignore 20 Oct 2011 06:10:32 -0000
@@ -63,3 +63,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/trailing/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/trailing/.cvsignore,v
retrieving revision 1.1
diff -u -r1.1 .cvsignore
--- tests/trailing/.cvsignore 23 Jul 2007 02:09:08 -0000 1.1
+++ tests/trailing/.cvsignore 20 Oct 2011 06:11:21 -0000
@@ -1,2 +1,6 @@
.mgnuc_opts
.mgnuc_copts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/valid/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/valid/.cvsignore,v
retrieving revision 1.5
diff -u -r1.5 .cvsignore
--- tests/valid/.cvsignore 25 Jul 2007 06:40:21 -0000 1.5
+++ tests/valid/.cvsignore 20 Oct 2011 06:19:23 -0000
@@ -21,3 +21,7 @@
.mgnuc_copts
FAILED_TESTS
runtests.errs
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
Index: tests/warnings/.cvsignore
===================================================================
RCS file: /home/mercury/mercury1/repository/tests/warnings/.cvsignore,v
retrieving revision 1.3
diff -u -r1.3 .cvsignore
--- tests/warnings/.cvsignore 20 Jul 2007 07:43:57 -0000 1.3
+++ tests/warnings/.cvsignore 20 Oct 2011 04:49:32 -0000
@@ -5,3 +5,7 @@
.allres
.mgnuc_opts
.mgnuc_copts
+Prof.CallPair
+Prof.Decl
+Prof.MemoryCells
+Prof.MemoryWords
--------------------------------------------------------------------------
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