[m-dev.] diff: fix shadow warnings
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed Oct 25 20:45:41 AEDT 2000
compiler/rtti_out.m:
Declare type_ctor_infos before registering them only with
--split-c-files.
compiler/llds_out.m:
Pass the value of --split-c-files to rtti_out.m.
Zoltan.
cvs diff: Diffing .
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/llds_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/llds_out.m,v
retrieving revision 1.159
diff -u -b -r1.159 llds_out.m
--- compiler/llds_out.m 2000/10/13 04:04:55 1.159
+++ compiler/llds_out.m 2000/10/21 02:27:34
@@ -595,7 +595,7 @@
io__write_string("\t\treturn;\n"),
io__write_string("\t}\n"),
io__write_string("\tdone = TRUE;\n"),
- output_type_tables_init_list(Datas),
+ output_type_tables_init_list(Datas, SplitFiles),
io__write_string("}\n\n"),
io__write_string("void "),
@@ -694,18 +694,18 @@
% Output code to register each type_ctor_info defined in this module.
:- pred output_type_tables_init_list(list(comp_gen_c_data)::in,
- io__state::di, io__state::uo) is det.
+ bool::in, io__state::di, io__state::uo) is det.
-output_type_tables_init_list([]) --> [].
-output_type_tables_init_list([Data | Datas]) -->
+output_type_tables_init_list([], _) --> [].
+output_type_tables_init_list([Data | Datas], SplitFiles) -->
(
{ Data = rtti_data(RttiData) }
->
- rtti_out__register_rtti_data_if_nec(RttiData)
+ rtti_out__register_rtti_data_if_nec(RttiData, SplitFiles)
;
[]
),
- output_type_tables_init_list(Datas).
+ output_type_tables_init_list(Datas, SplitFiles).
% Output declarations for each module layout defined in this module
% (there should only be one, of course).
Index: compiler/rtti_out.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rtti_out.m,v
retrieving revision 1.15
diff -u -b -r1.15 rtti_out.m
--- compiler/rtti_out.m 2000/10/16 02:56:34 1.15
+++ compiler/rtti_out.m 2000/10/21 02:26:38
@@ -47,9 +47,11 @@
% Output C code (e.g. a call to MR_register_type_ctor_info())
% to register the rtti_data in the type tables, if it represents a data
- % structure that should be so registered.
+ % structure that should be so registered. The bool should be the value
+ % of the --split-c-files option; it governs whether the rtti_data is
+ % declared in the generated code or not.
:- pred rtti_out__register_rtti_data_if_nec(rtti_data::in,
- io__state::di, io__state::uo) is det.
+ bool::in, io__state::di, io__state::uo) is det.
% Output the C name of the rtti_data specified by the given
% rtti_type_id and rtti_name.
@@ -682,17 +684,27 @@
[]
).
-rtti_out__register_rtti_data_if_nec(Data) -->
+rtti_out__register_rtti_data_if_nec(Data, SplitFiles) -->
(
{ Data = type_ctor_info(RttiTypeId,
_,_,_,_,_,_,_,_,_,_,_,_) }
->
+ (
+ { SplitFiles = yes },
io__write_string("\t{\n\t"),
- output_rtti_addr_storage_type_name(RttiTypeId, type_ctor_info,
- no),
- io__write_string(";\n\tMR_register_type_ctor_info(\n\t\t&"),
+ output_rtti_addr_storage_type_name(RttiTypeId,
+ type_ctor_info, no),
+ io__write_string(
+ ";\n\tMR_register_type_ctor_info(\n\t\t&"),
output_rtti_addr(RttiTypeId, type_ctor_info),
io__write_string(");\n\t}\n")
+ ;
+ { SplitFiles = no },
+ io__write_string(
+ "\tMR_register_type_ctor_info(\n\t\t&"),
+ output_rtti_addr(RttiTypeId, type_ctor_info),
+ io__write_string(");\n")
+ )
;
{ Data = base_typeclass_info(_ClassId, _InstanceString,
_BaseTypeClassInfo) }
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing trax
cvs diff: Diffing trial
cvs diff: Diffing util
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list