Make the none.gc.memprof grade work with MSVC again.

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.
This commit is contained in:
Julien Fischer
2011-10-20 06:37:35 +00:00
parent e3cf6633a2
commit a60beb42e7
31 changed files with 112 additions and 6 deletions

View File

@@ -1,7 +1,7 @@
%---------------------------------------------------------------------------%
% vim: ft=mercury ts=4 sw=4 et
%---------------------------------------------------------------------------%
% Copyright (C) 2005-2007, 2010 The University of Melbourne.
% Copyright (C) 2005-2007, 2010-2011 The University of Melbourne.
% This file may only be copied under the terms of the GNU Library General
% Public License - see the file COPYING.LIB in the Mercury distribution.
% vim: ft=mercury ts=4 sw=4 et wm=0 tw=0
@@ -192,11 +192,10 @@ list_file(OutStrm, ErrStrm, FileName, FirstLine, LastLine, MarkLine, Path,
:- 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 @@ find_and_open_file([Dir | Path], FileName, Result, !IO) :-
:- 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 @@ find_and_open_file([Dir | Path], FileName, Result, !IO) :-
}
}
}
IO = IO0;
").
%-----------------------------------------------------------------------------%

View File

@@ -375,9 +375,10 @@ output_layout_array_decls(Info, PseudoTypeInfos, HLDSVarNums,
;
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,

View File

@@ -25,6 +25,8 @@ mdprof_server
mdprof_dump
mdprof_feedback
mdprof_procrep
mdprof_create_feedback
mdprof_report_feedback
Mercury
Mercury.modules
.deep.tags

View File

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

View File

@@ -9,3 +9,4 @@
*.mih
all_solutions calculator cat committed_choice eliza hello ultra_sub sort
calculator2 e expand_terms interpreter
Mercury

View File

@@ -13,3 +13,7 @@ UNEXPECTED_FAILED_TESTS
mdbrc
mdbrc.in
runtests.errs
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -3,3 +3,7 @@ FAILED_TESTS
NOMAKE_DIRS
.mgnuc_opts
.mgnuc_copts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -10,3 +10,5 @@ Prof.MemoryWords Prof.MemoryCells
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl

View File

@@ -31,3 +31,7 @@ dice.passes
runtests.errs
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -6,3 +6,7 @@ CLEAN
dice.pass
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -20,3 +20,7 @@ base_string_to_integer
*.d
*.mih
*.mh
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -26,3 +26,7 @@ disj
INTRODUCED.diff
.mgnuc_opts
.mgnuc_copts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -1,2 +1,6 @@
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -125,3 +125,7 @@ runtests.errs
FAILED_TESTS
NOMAKE_DIRS
Mercury.modules
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -1,3 +1,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -7,3 +7,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -26,3 +26,7 @@ FAILED_TESTS
.mgnuc_copts
.mgnuc_opts
runtests.errs
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -23,3 +23,7 @@ FAILED_TESTS
Mercury
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -16,3 +16,7 @@ FAILED_TESTS
runtests.errs
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -4,3 +4,7 @@
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -1,2 +1,6 @@
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -14,3 +14,7 @@ undead_proc.h
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -2,3 +2,7 @@ CLEAN
*.err
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -11,3 +11,7 @@ CLEAN
.mgnuc_copts
.mgnuc_opts
table_foreign_enum
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -63,3 +63,7 @@ vangelder
CLEAN
.mgnuc_copts
.mgnuc_opts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -1,2 +1,6 @@
.mgnuc_opts
.mgnuc_copts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -21,3 +21,7 @@ CLEAN
.mgnuc_copts
FAILED_TESTS
runtests.errs
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords

View File

@@ -5,3 +5,7 @@ CLEAN
.allres
.mgnuc_opts
.mgnuc_copts
Prof.CallPair
Prof.Decl
Prof.MemoryCells
Prof.MemoryWords