[m-rev.] diff: decl_set_insert
Zoltan Somogyi
zs at cs.mu.OZ.AU
Sat Apr 19 15:46:34 AEST 2003
compiler/llds_out.m:
Change the order of the arguments of decl_set_insert, to make it
possible to user state variable notation for decl_sets.
compiler/layout_out.m:
compiler/rtti_out.m:
Conform to the above change.
Zoltan.
cvs diff: Diffing .
cvs diff: Diffing analysis
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/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/layout_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/layout_out.m,v
retrieving revision 1.22
diff -u -b -r1.22 layout_out.m
--- compiler/layout_out.m 10 Apr 2003 05:32:05 -0000 1.22
+++ compiler/layout_out.m 18 Apr 2003 15:10:45 -0000
@@ -141,8 +141,8 @@
{ DeclSet = DeclSet0 }
;
output_layout_name_decl(LayoutName),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(LayoutName)),
- DeclSet) }
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }
).
output_maybe_layout_data_decl(LayoutData, DeclSet0, DeclSet) -->
@@ -192,8 +192,8 @@
;
output_layout_name_storage_type_name(LayoutName, no),
io__write_string(";\n"),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(LayoutName)),
- DeclSet) }
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }
).
% This code should be kept in sync with output_layout_name/3 below.
@@ -520,8 +520,8 @@
io__write_int(-1)
),
io__write_string("\n};\n"),
- { decl_set_insert(DeclSet4, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet4, DeclSet) }.
:- func trace_port_to_string(trace_port) = string.
@@ -581,8 +581,9 @@
output_layout_exec_trace_group(ProcLabel, ExecTrace),
output_proc_layout_data_defn_end
),
- { decl_set_insert(DeclSet4, data_addr(
- layout_addr(proc_layout(ProcLabel, Kind))), DeclSet) }.
+ { decl_set_insert(data_addr(
+ layout_addr(proc_layout(ProcLabel, Kind))),
+ DeclSet4, DeclSet) }.
:- func maybe_proc_layout_and_exec_trace_kind(maybe_proc_id_and_exec_trace,
proc_label) = proc_layout_kind.
@@ -829,8 +830,9 @@
list__foldl(output_number_in_vector, HeadVarNums)
),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(
- layout_addr(proc_layout_head_var_nums(ProcLabel))), DeclSet) }.
+ { decl_set_insert(data_addr(
+ layout_addr(proc_layout_head_var_nums(ProcLabel))),
+ DeclSet0, DeclSet) }.
:- pred output_proc_layout_var_names(proc_label::in, list(int)::in, int::in,
decl_set::in, decl_set::out, io__state::di, io__state::uo) is det.
@@ -852,8 +854,9 @@
list__foldl(output_number_in_vector, VarNames)
),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(
- layout_addr(proc_layout_var_names(ProcLabel))), DeclSet) }.
+ { decl_set_insert(data_addr(
+ layout_addr(proc_layout_var_names(ProcLabel))),
+ DeclSet0, DeclSet) }.
:- pred output_layout_no_exec_trace_group(io__state::di, io__state::uo) is det.
@@ -885,8 +888,8 @@
io__write_string(",\n\t"),
quote_and_write_string(GoalPath),
io__write_string("\n};\n"),
- { decl_set_insert(DeclSet0,
- data_addr(layout_addr(LayoutName)), DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }.
:- pred output_proc_id(proc_label::in, io__state::di, io__state::uo) is det.
@@ -983,8 +986,8 @@
io__write_string(",\n\t"),
io__write_int(SuppressedEvents),
io__write_string("\n};\n"),
- { decl_set_insert(DeclSet4, data_addr(layout_addr(ModuleLayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(ModuleLayoutName)),
+ DeclSet4, DeclSet) }.
:- pred output_module_layout_proc_vector_defn(module_name::in,
list(layout_name)::in, layout_name::out, decl_set::in, decl_set::out,
@@ -1007,8 +1010,8 @@
ProcLayoutNames)
),
io__write_string("};\n"),
- { decl_set_insert(DeclSet1, data_addr(layout_addr(VectorName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(VectorName)),
+ DeclSet1, DeclSet) }.
%-----------------------------------------------------------------------------%
@@ -1027,8 +1030,8 @@
io__write_string(" = {"),
output_module_string_table_chars(0, StringTableSize - 1, StringTable),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(TableName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(TableName)),
+ DeclSet0, DeclSet) }.
:- pred output_module_string_table_chars(int::in, int::in, string_with_0s::in,
io__state::di, io__state::uo) is det.
@@ -1073,8 +1076,8 @@
list__foldl(output_layout_name_in_vector("&"), FileLayoutNames)
),
io__write_string("};\n"),
- { decl_set_insert(DeclSet1, data_addr(layout_addr(VectorName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(VectorName)),
+ DeclSet1, DeclSet) }.
:- pred output_file_layout_data_defns(module_name::in, int::in,
list(file_layout_data)::in, list(layout_name)::out,
@@ -1118,8 +1121,8 @@
io__write_string(",\n\t"),
output_layout_name(LabelVectorName),
io__write_string("\n};\n"),
- { decl_set_insert(DeclSet3, data_addr(layout_addr(FileLayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(FileLayoutName)),
+ DeclSet3, DeclSet) }.
:- pred output_file_layout_line_number_vector_defn(module_name::in, int::in,
list(int)::in, layout_name::out, decl_set::in, decl_set::out,
@@ -1139,8 +1142,8 @@
list__foldl(output_number_in_vector, LineNumbers)
),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }.
:- pred output_file_layout_label_layout_vector_defn(module_name::in, int::in,
list(data_addr)::in, layout_name::out, decl_set::in, decl_set::out,
@@ -1162,8 +1165,8 @@
LabelAddrs)
),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }.
%-----------------------------------------------------------------------------%
@@ -1245,8 +1248,8 @@
io__write_string("\t0,\n"),
io__write_string("#endif\n"),
io__write_string("\tNULL\n};\n"),
- { decl_set_insert(DeclSet2, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet2, DeclSet) }.
:- pred output_call_site_static_array(rtti_proc_label::in,
list(call_site_static_data)::in, decl_set::in, decl_set::out,
@@ -1259,8 +1262,8 @@
io__write_string(" = {\n"),
list__foldl2(output_call_site_static, CallSites, 0, _),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }.
:- pred output_call_site_static(call_site_static_data::in, int::in, int::out,
io__state::di, io__state::uo) is det.
@@ -1353,8 +1356,8 @@
io__write_string(",\n\t(const MR_Type_Param_Locns *) "),
output_rval(TypeParamsRval),
io__write_string("\n};\n"),
- { decl_set_insert(DeclSet2, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet2, DeclSet) }.
:- pred output_table_gen(rtti_proc_label::in, int::in, int::in,
list(table_trie_step)::in, rval::in, rval::in,
@@ -1383,8 +1386,8 @@
io__write_string(",\n\t(const MR_Type_Param_Locns *)\n\t\t"),
output_rval(TypeParamsRval),
io__write_string("\n};\n"),
- { decl_set_insert(DeclSet3, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet3, DeclSet) }.
:- pred output_table_gen_steps_table(rtti_proc_label::in,
list(table_trie_step)::in, list(maybe(int))::out,
@@ -1398,8 +1401,8 @@
io__write_string(" = {\n"),
output_table_gen_steps(Steps, MaybeEnumParams),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }.
:- pred output_table_gen_steps(list(table_trie_step)::in,
list(maybe(int))::out, io__state::di, io__state::uo) is det.
@@ -1452,8 +1455,8 @@
io__write_string(" = {\n"),
output_table_gen_enum_params(MaybeEnumParams),
io__write_string("};\n"),
- { decl_set_insert(DeclSet0, data_addr(layout_addr(LayoutName)),
- DeclSet) }.
+ { decl_set_insert(data_addr(layout_addr(LayoutName)),
+ DeclSet0, DeclSet) }.
:- pred output_table_gen_enum_params(list(maybe(int))::in,
io__state::di, io__state::uo) is det.
Index: compiler/llds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out.m,v
retrieving revision 1.208
diff -u -b -r1.208 llds_out.m
--- compiler/llds_out.m 18 Mar 2003 02:43:37 -0000 1.208
+++ compiler/llds_out.m 18 Apr 2003 15:09:15 -0000
@@ -156,7 +156,7 @@
:- pred decl_set_init(decl_set::out) is det.
-:- pred decl_set_insert(decl_set::in, decl_id::in, decl_set::out) is det.
+:- pred decl_set_insert(decl_id::in, decl_set::in, decl_set::out) is det.
:- pred decl_set_is_member(decl_id::in, decl_set::in) is semidet.
@@ -212,7 +212,7 @@
decl_set_init(DeclSet) :-
map__init(DeclSet).
-decl_set_insert(DeclSet0, DeclId, DeclSet) :-
+decl_set_insert(DeclId, DeclSet0, DeclSet) :-
map__set(DeclSet0, DeclId, unit, DeclSet).
decl_set_is_member(DeclId, DeclSet) :-
@@ -814,7 +814,7 @@
{ DeclId = data_addr(data_addr(ModuleName, VarName)) },
output_const_term_decl(ArgVals, ArgTypes, DeclId, ExportedFromFile,
yes, yes, no, "", "", 0, _),
- { decl_set_insert(DeclSet0, DeclId, DeclSet) }.
+ { decl_set_insert(DeclId, DeclSet0, DeclSet) }.
output_c_data_type_def(rtti_data(RttiData), DeclSet0, DeclSet) -->
output_rtti_data_decl(RttiData, DeclSet0, DeclSet).
output_c_data_type_def(layout_data(LayoutData), DeclSet0, DeclSet) -->
@@ -871,7 +871,7 @@
output_tabling_pointer_var_name(ProcLabel),
io__write_string(" = { 0 };\n"),
{ DataAddr = data_addr(ModuleName, tabling_pointer(ProcLabel)) },
- { decl_set_insert(DeclSet0, data_addr(DataAddr), DeclSet) }.
+ { decl_set_insert(data_addr(DataAddr), DeclSet0, DeclSet) }.
:- pred output_comp_gen_c_data_list(list(comp_gen_c_data)::in,
decl_set::in, decl_set::out, io__state::di, io__state::uo) is det.
@@ -920,7 +920,7 @@
{ DeclId = data_addr(data_addr(ModuleName, VarName)) },
output_const_term_decl(ArgVals, ArgTypes, DeclId, ExportedFromFile,
no, yes, yes, "", "", 0, _),
- { decl_set_insert(DeclSet1, DeclId, DeclSet) }.
+ { decl_set_insert(DeclId, DeclSet1, DeclSet) }.
output_comp_gen_c_data(rtti_data(RttiData), DeclSet0, DeclSet) -->
output_rtti_data_defn(RttiData, DeclSet0, DeclSet).
output_comp_gen_c_data(layout_data(LayoutData), DeclSet0, DeclSet) -->
@@ -1049,7 +1049,7 @@
{ Label = local(_, _) },
io__write_string("MR_declare_label(")
),
- { decl_set_insert(DeclSet1, code_addr(label(Label)), DeclSet) },
+ { decl_set_insert(code_addr(label(Label)), DeclSet1, DeclSet) },
output_label(Label),
io__write_string(");\n").
@@ -1352,8 +1352,8 @@
io__write_string(StructFields)
),
io__write_string("\n};\n"),
- { decl_set_insert(DeclSet0, pragma_c_struct(StructName),
- DeclSet1) }
+ { decl_set_insert(pragma_c_struct(StructName),
+ DeclSet0, DeclSet1) }
;
{ DeclSet1 = DeclSet0 }
),
@@ -2136,8 +2136,8 @@
{ N = N0 },
{ DeclSet = DeclSet0 }
;
- { decl_set_insert(DeclSet0, FloatLabel,
- DeclSet) },
+ { decl_set_insert(FloatLabel,
+ DeclSet0, DeclSet) },
{ FloatString = c_util__make_float_literal(
FloatVal) },
output_indent(FirstIndent, LaterIndent, N0),
@@ -2186,7 +2186,7 @@
{ N = N2 },
{ DeclSet = DeclSet2 }
;
- { decl_set_insert(DeclSet2, FloatLabel, DeclSet) },
+ { decl_set_insert(FloatLabel, DeclSet2, DeclSet) },
output_indent(FirstIndent, LaterIndent, N2),
{ N = N2 + 1 },
io__write_string("static const "),
@@ -2223,7 +2223,7 @@
{ N = N0 },
{ DeclSet = DeclSet0 }
;
- { decl_set_insert(DeclSet0, CreateLabel, DeclSet1) },
+ { decl_set_insert(CreateLabel, DeclSet0, DeclSet1) },
output_cons_arg_decls(ArgVals, FirstIndent, LaterIndent,
N0, N1, DeclSet1, DeclSet),
output_const_term_decl(ArgVals, CreateArgTypes, CreateLabel,
@@ -2770,7 +2770,7 @@
{ N = N0 },
{ DeclSet = DeclSet0 }
;
- { decl_set_insert(DeclSet0, code_addr(CodeAddress), DeclSet) },
+ { decl_set_insert(code_addr(CodeAddress), DeclSet0, DeclSet) },
need_code_addr_decls(CodeAddress, NeedDecl),
( { NeedDecl = yes } ->
output_indent(FirstIndent, LaterIndent, N0),
@@ -2892,7 +2892,7 @@
{ N = N0 },
{ DeclSet = DeclSet0 }
;
- { decl_set_insert(DeclSet0, data_addr(DataAddr), DeclSet) },
+ { decl_set_insert(data_addr(DataAddr), DeclSet0, DeclSet) },
output_data_addr_decls_2(DataAddr,
FirstIndent, LaterIndent, N0, N)
).
Index: compiler/rtti_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti_out.m,v
retrieving revision 1.34
diff -u -b -r1.34 rtti_out.m
--- compiler/rtti_out.m 16 Mar 2003 08:01:30 -0000 1.34
+++ compiler/rtti_out.m 18 Apr 2003 15:10:52 -0000
@@ -969,7 +969,7 @@
output_rtti_addr_storage_type_name(RttiTypeCtor, RttiName, no),
io__write_string(";\n"),
{ DataAddr = rtti_addr(RttiTypeCtor, RttiName) },
- { decl_set_insert(DeclSet0, data_addr(DataAddr), DeclSet) }.
+ { decl_set_insert(data_addr(DataAddr), DeclSet0, DeclSet) }.
:- pred output_generic_rtti_data_defn_start(rtti_type_ctor::in, rtti_name::in,
decl_set::in, decl_set::out, io__state::di, io__state::uo) is det.
@@ -979,7 +979,7 @@
io__write_string("\n"),
output_rtti_addr_storage_type_name(RttiTypeCtor, RttiName, yes),
{ DataAddr = rtti_addr(RttiTypeCtor, RttiName) },
- { decl_set_insert(DeclSet0, data_addr(DataAddr), DeclSet) }.
+ { decl_set_insert(data_addr(DataAddr), DeclSet0, DeclSet) }.
output_rtti_addr_storage_type_name(RttiTypeCtor, RttiName, BeingDefined) -->
output_rtti_name_storage_type_name(
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
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/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
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/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
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/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
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 extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
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/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
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/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
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 util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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