[m-rev.] trivial diff: use map.singleton/1 in compiler and deep profiler
Julien Fischer
juliensf at csse.unimelb.edu.au
Thu May 5 16:38:15 AEST 2011
Branches: main
Change places where we create an empty map and the immediately do a det_insert
into it to use the recently added singleton map function.
compiler/add_pragma.m:
compiler/common.m:
compiler/dep_par_conj.m:
compiler/higher_order.m:
compiler/hlds_data.m:
compiler/inst_match.m:
compiler/lco.m:
compiler/modecheck_goal.m:
compiler/modules.m:
compiler/polymorphism.m:
compiler/pred_table.m:
compiler/rbmm.region_resurrection_renaming.m:
compiler/simplify.m:
compiler/stack_layout.m:
compiler/stack_opt.m:
compiler/stm_expand.m:
compiler/switch_util.m:
compiler/term_pass2.m:
compiler/tupling.m:
compiler/type_constraints.m:
compiler/type_ctor_info.m:
compiler/unneeded_code.m:
deep_profiler/autopar_search_callgraph.m:
deep_profiler/html_format.m:
As above.
Julien.
Index: compiler/add_pragma.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pragma.m,v
retrieving revision 1.113
diff -u -r1.113 add_pragma.m
--- compiler/add_pragma.m 5 May 2011 03:58:52 -0000 1.113
+++ compiler/add_pragma.m 5 May 2011 04:38:33 -0000
@@ -1813,7 +1813,7 @@
!.ModuleInfo, ProcId)
->
map.lookup(!.Procs, ProcId, ProcInfo),
- map.det_insert(ProcId, ProcInfo, map.init, !:Procs),
+ !:Procs = map.singleton(ProcId, ProcInfo),
ProcIds = [ProcId],
MaybeProcIds = yes(ProcIds)
;
Index: compiler/common.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/common.m,v
retrieving revision 1.112
diff -u -r1.112 common.m
--- compiler/common.m 3 May 2011 05:12:03 -0000 1.112
+++ compiler/common.m 5 May 2011 04:38:52 -0000
@@ -480,7 +480,7 @@
),
map.det_update(TypeCtor, ConsIdMap, !StructMap)
;
- map.det_insert(ConsId, [Struct], map.init, ConsIdMap),
+ ConsIdMap = map.singleton(ConsId, [Struct]),
map.det_insert(TypeCtor, ConsIdMap, !StructMap)
).
Index: compiler/dep_par_conj.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dep_par_conj.m,v
retrieving revision 1.50
diff -u -r1.50 dep_par_conj.m
--- compiler/dep_par_conj.m 5 May 2011 03:58:53 -0000 1.50
+++ compiler/dep_par_conj.m 5 May 2011 04:39:19 -0000
@@ -2271,7 +2271,7 @@
should_we_push_test(PredProcId, ArgPos, PushOp, IsWorthPushing,
!.SpecInfo)
),
- map.det_insert(ArgPos, IsWorthPushing, map.init, ProcPushMap),
+ ProcPushMap = map.singleton(ArgPos, IsWorthPushing),
map.det_insert(PredProcId, ProcPushMap, Pushability0, Pushability),
!SpecInfo ^ spec_pushability := Pushability
).
Index: compiler/higher_order.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/higher_order.m,v
retrieving revision 1.190
diff -u -r1.190 higher_order.m
--- compiler/higher_order.m 3 May 2011 04:34:54 -0000 1.190
+++ compiler/higher_order.m 5 May 2011 04:55:04 -0000
@@ -3071,9 +3071,8 @@
ClassContext),
pred_info_set_class_context(ClassContext, !NewPredInfo),
- map.init(NewProcs0),
NewPredProcId = proc(_, NewProcId),
- map.det_insert(NewProcId, !.NewProcInfo, NewProcs0, NewProcs),
+ NewProcs = map.singleton(NewProcId, !.NewProcInfo),
pred_info_set_procedures(NewProcs, !NewPredInfo).
:- pred update_var_types(pair(prog_var, mer_type)::in,
Index: compiler/hlds_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_data.m,v
retrieving revision 1.134
diff -u -r1.134 hlds_data.m
--- compiler/hlds_data.m 3 May 2011 04:34:54 -0000 1.134
+++ compiler/hlds_data.m 5 May 2011 04:40:09 -0000
@@ -569,7 +569,7 @@
map.det_insert(TypeCtor, TypeDefn, TypeCtorTable0, TypeCtorTable),
map.det_update(Name, TypeCtorTable, !TypeTable)
;
- map.det_insert(TypeCtor, TypeDefn, map.init, TypeCtorTable),
+ TypeCtorTable = map.singleton(TypeCtor, TypeDefn),
map.det_insert(Name, TypeCtorTable, !TypeTable)
).
@@ -587,7 +587,7 @@
map.set(TypeCtor, TypeDefn, TypeCtorTable0, TypeCtorTable),
map.det_update(Name, TypeCtorTable, !TypeTable)
;
- map.det_insert(TypeCtor, TypeDefn, map.init, TypeCtorTable),
+ TypeCtorTable = map.singleton(TypeCtor, TypeDefn),
map.det_insert(Name, TypeCtorTable, !TypeTable)
).
Index: compiler/inst_match.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_match.m,v
retrieving revision 1.91
diff -u -r1.91 inst_match.m
--- compiler/inst_match.m 3 May 2011 04:34:55 -0000 1.91
+++ compiler/inst_match.m 5 May 2011 04:41:04 -0000
@@ -548,7 +548,7 @@
)
;
!.Info ^ imi_maybe_sub = no,
- map.det_insert(InstVar, InstA, map.init, InstVarSub),
+ InstVarSub = map.singleton(InstVar, InstA),
!Info ^ imi_maybe_sub := yes(InstVarSub)
).
Index: compiler/lco.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lco.m,v
retrieving revision 1.67
diff -u -r1.67 lco.m
--- compiler/lco.m 5 May 2011 03:58:54 -0000 1.67
+++ compiler/lco.m 5 May 2011 04:41:28 -0000
@@ -363,7 +363,7 @@
% We throw away any other procs in the variant predicate, because
% we create a separate predicate for each variant.
- map.det_insert(VariantProcId, VariantProcInfo, map.init, VariantProcs),
+ VariantProcs = map.singleton(VariantProcId, VariantProcInfo),
pred_info_set_procedures(VariantProcs, !VariantPredInfo),
map.det_update(VariantPredId, !.VariantPredInfo, !PredTable),
module_info_set_preds(!.PredTable, !ModuleInfo)
Index: compiler/modecheck_goal.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_goal.m,v
retrieving revision 1.6
diff -u -r1.6 modecheck_goal.m
--- compiler/modecheck_goal.m 5 May 2011 03:58:55 -0000 1.6
+++ compiler/modecheck_goal.m 5 May 2011 04:41:48 -0000
@@ -897,7 +897,7 @@
map.det_insert(CloneVar, TermVarType, VarTypes0, VarTypes),
mode_info_set_varset(VarSet, !ModeInfo),
mode_info_set_var_types(VarTypes, !ModeInfo),
- map.det_insert(TermVar, CloneVar, map.init, Rename),
+ Rename = map.singleton(TermVar, CloneVar),
% By construction, TermVar can appear only in (a) SubGoal0's goal_info,
% and (b) in the last conjunct in SubGoal0's goal_expr; it cannot appear
% in any of the other conjuncts. We could make this code more efficient
Index: compiler/modules.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modules.m,v
retrieving revision 1.465
diff -u -r1.465 modules.m
--- compiler/modules.m 3 May 2011 04:34:56 -0000 1.465
+++ compiler/modules.m 5 May 2011 04:42:31 -0000
@@ -1786,7 +1786,7 @@
get_children(InterfaceItems, PublicChildren),
(
MaybeTimestamp = yes(Timestamp),
- MaybeTimestamps = yes(map.det_insert(map.init, ModuleName,
+ MaybeTimestamps = yes(map.singleton(ModuleName,
module_timestamp(".m", Timestamp, may_be_unqualified)))
;
MaybeTimestamp = no,
Index: compiler/polymorphism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/polymorphism.m,v
retrieving revision 1.359
diff -u -r1.359 polymorphism.m
--- compiler/polymorphism.m 5 May 2011 03:58:55 -0000 1.359
+++ compiler/polymorphism.m 5 May 2011 04:57:32 -0000
@@ -2654,7 +2654,7 @@
TypeClassInfoVar, TypeClassInfoGoal, !Info),
Goals = SuperClassGoals ++
cord.from_list([BaseGoal, TypeClassInfoGoal]),
- map.det_insert(ArgVars, TypeClassInfoVar, map.init, ArgsMap),
+ ArgsMap = map.singleton(ArgVars, TypeClassInfoVar),
Entry = typeclass_info_map_entry(BaseVar, ArgsMap),
map.det_insert(ConstraintArgTypes, Entry,
ClassNameMap0, ClassNameMap),
@@ -2669,10 +2669,9 @@
TypeClassInfoVar, TypeClassInfoGoal, !Info),
Goals = SuperClassGoals ++
cord.from_list([BaseGoal, TypeClassInfoGoal]),
- map.det_insert(ArgVars, TypeClassInfoVar, map.init, ArgsMap),
+ ArgsMap = map.singleton(ArgVars, TypeClassInfoVar),
Entry = typeclass_info_map_entry(BaseVar, ArgsMap),
- map.det_insert(ConstraintArgTypes, Entry,
- map.init, ClassNameMap),
+ ClassNameMap = map.singleton(ConstraintArgTypes, Entry),
map.det_insert(ConstraintClassName, ClassNameMap,
TypeClassInfoMap0, TypeClassInfoMap),
poly_info_set_typeclass_info_map(TypeClassInfoMap, !Info)
@@ -2887,8 +2886,7 @@
map.det_update(TypeCtor, TypeCtorVarMap,
TypeInfoVarMap1, TypeInfoVarMap)
;
- map.det_insert(TypeArgs, TypeInfoVar,
- map.init, TypeCtorVarMap),
+ TypeCtorVarMap = map.singleton(TypeArgs, TypeInfoVar),
map.det_insert(TypeCtor, TypeCtorVarMap,
TypeInfoVarMap1, TypeInfoVarMap)
),
Index: compiler/pred_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pred_table.m,v
retrieving revision 1.17
diff -u -r1.17 pred_table.m
--- compiler/pred_table.m 3 May 2011 04:34:57 -0000 1.17
+++ compiler/pred_table.m 5 May 2011 04:58:10 -0000
@@ -953,8 +953,7 @@
multi_map.set(Arity, PredId, MN_Arities0, MN_Arities),
map.det_update(Module - Name, MN_Arities, !MNA_Index)
;
- map.init(MN_Arities0),
- map.det_insert(Arity, [PredId], MN_Arities0, MN_Arities),
+ MN_Arities = map.singleton(Arity, [PredId]),
map.det_insert(Module - Name, MN_Arities, !MNA_Index)
).
Index: compiler/rbmm.region_resurrection_renaming.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rbmm.region_resurrection_renaming.m,v
retrieving revision 1.10
diff -u -r1.10 rbmm.region_resurrection_renaming.m
--- compiler/rbmm.region_resurrection_renaming.m 3 May 2011 04:34:58 -0000 1.10
+++ compiler/rbmm.region_resurrection_renaming.m 5 May 2011 04:44:09 -0000
@@ -500,7 +500,7 @@
( map.search(!.ResurrectionRenameProc, ProgPoint, RenamingProgPoint0) ->
map.set(RegionName, [Renamed], RenamingProgPoint0, RenamingProgPoint)
;
- map.det_insert(RegionName, [Renamed], map.init, RenamingProgPoint)
+ RenamingProgPoint = map.singleton(RegionName, [Renamed])
),
map.set(ProgPoint, RenamingProgPoint, !ResurrectionRenameProc).
Index: compiler/simplify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.260
diff -u -r1.260 simplify.m
--- compiler/simplify.m 5 May 2011 03:58:56 -0000 1.260
+++ compiler/simplify.m 5 May 2011 04:44:29 -0000
@@ -4104,7 +4104,7 @@
simplify_info_get_var_types(!.Info, VarTypes0),
simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps0),
map.map_values_only(apply_rec_subst_to_type(TSubst), VarTypes0, VarTypes),
- map.det_insert(ToVar, FromVar, map.init, Renaming),
+ Renaming = map.singleton(ToVar, FromVar),
apply_substitutions_to_rtti_varmaps(map.init, TSubst, Renaming,
RttiVarMaps0, RttiVarMaps1),
rtti_var_info_duplicate(FromVar, ToVar, RttiVarMaps1, RttiVarMaps),
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.156
diff -u -r1.156 stack_layout.m
--- compiler/stack_layout.m 3 May 2011 04:34:58 -0000 1.156
+++ compiler/stack_layout.m 5 May 2011 05:22:45 -0000
@@ -499,10 +499,9 @@
)
;
( context_is_valid(Context) ->
- map.init(LabelTable0),
LabelLayout = layout_slot(label_layout_array(LabelVars), Slot),
LineInfo = [LabelLayout - IsReturn],
- map.det_insert(Line, LineInfo, LabelTable0, LabelTable),
+ LabelTable = map.singleton(Line, LineInfo),
map.det_insert(File, LabelTable, !LabelTables)
;
% We don't have a valid context for this label,
Index: compiler/stack_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_opt.m,v
retrieving revision 1.49
diff -u -r1.49 stack_opt.m
--- compiler/stack_opt.m 3 May 2011 04:34:58 -0000 1.49
+++ compiler/stack_opt.m 5 May 2011 04:50:39 -0000
@@ -246,11 +246,11 @@
Counter0 = counter.init(1),
counter.allocate(CurInterval, Counter0, Counter1),
CurIntervalId = interval_id(CurInterval),
- EndMap0 = map.det_insert(map.init, CurIntervalId, anchor_proc_end),
+ EndMap0 = map.singleton(CurIntervalId, anchor_proc_end),
InsertMap0 = map.init,
StartMap0 = map.init,
- SuccMap0 = map.det_insert(map.init, CurIntervalId, []),
- VarsMap0 = map.det_insert(map.init, CurIntervalId, OutputArgs),
+ SuccMap0 = map.singleton(CurIntervalId, []),
+ VarsMap0 = map.singleton(CurIntervalId, OutputArgs),
globals.lookup_int_option(Globals,
optimize_saved_vars_cell_cv_store_cost, CellVarStoreCost),
globals.lookup_int_option(Globals,
Index: compiler/stm_expand.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stm_expand.m,v
retrieving revision 1.17
diff -u -r1.17 stm_expand.m
--- compiler/stm_expand.m 5 May 2011 03:58:56 -0000 1.17
+++ compiler/stm_expand.m 5 May 2011 05:32:07 -0000
@@ -2070,9 +2070,7 @@
varset.new_named_var(Name, ResultVar, NewPredVarSet1, NewPredVarSet),
map.det_insert(ResultVar, ResultType, NewPredVarTypes1, NewPredVarTypes),
-
- VarMapping0 = map.init,
- map.det_insert(ResultVar0, ResultVar, VarMapping0, VarMapping),
+ VarMapping = map.singleton(ResultVar0, ResultVar),
MapLambda = ((pred(X::in, Y::out) is det) :-
( X = ResultVar0 ->
Index: compiler/switch_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/switch_util.m,v
retrieving revision 1.51
diff -u -r1.51 switch_util.m
--- compiler/switch_util.m 3 May 2011 04:34:59 -0000 1.51
+++ compiler/switch_util.m 5 May 2011 05:25:27 -0000
@@ -1184,8 +1184,7 @@
( map.search(!.PtagCaseMap, Primary, _Group) ->
unexpected(this_file, "unshared tag is shared")
;
- map.init(StagGoalMap0),
- map.det_insert(-1, CaseRep, StagGoalMap0, StagGoalMap),
+ StagGoalMap = map.singleton(-1, CaseRep),
map.det_insert(Primary, ptag_case(sectag_none, StagGoalMap),
!PtagCaseMap)
)
@@ -1199,8 +1198,7 @@
map.det_update(Primary, ptag_case(sectag_remote, StagGoalMap),
!PtagCaseMap)
;
- map.init(StagGoalMap0),
- map.det_insert(Secondary, CaseRep, StagGoalMap0, StagGoalMap),
+ StagGoalMap = map.singleton(Secondary, CaseRep),
map.det_insert(Primary, ptag_case(sectag_remote, StagGoalMap),
!PtagCaseMap)
)
@@ -1214,8 +1212,7 @@
map.det_update(Primary, ptag_case(sectag_local, StagGoalMap),
!PtagCaseMap)
;
- map.init(StagGoalMap0),
- map.det_insert(Secondary, CaseRep, StagGoalMap0, StagGoalMap),
+ StagGoalMap = map.singleton(Secondary, CaseRep),
map.det_insert(Primary, ptag_case(sectag_local, StagGoalMap),
!PtagCaseMap)
)
Index: compiler/term_pass2.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_pass2.m,v
retrieving revision 1.36
diff -u -r1.36 term_pass2.m
--- compiler/term_pass2.m 3 May 2011 14:22:14 -0000 1.36
+++ compiler/term_pass2.m 5 May 2011 05:27:01 -0000
@@ -240,11 +240,9 @@
proc_info_get_argmodes(ProcInfo, ArgModes),
init_rec_input_suppliers_add_single_arg(ArgModes, ArgNum,
Module, TrialPPIdRecSuppliers),
- map.init(RecSupplierMap0),
- map.det_insert(TrialPPId, TrialPPIdRecSuppliers,
- RecSupplierMap0, RecSupplierMap1),
+ RecSupplierMap0 = map.singleton(TrialPPId, TrialPPIdRecSuppliers),
init_rec_input_suppliers_single_arg_others(RestSCC, Module,
- RecSupplierMap1, RecSupplierMap).
+ RecSupplierMap0, RecSupplierMap).
:- pred init_rec_input_suppliers_add_single_arg(list(mer_mode)::in, int::in,
module_info::in, list(bool)::out) is semidet.
@@ -514,9 +512,7 @@
),
map.det_update(PPId, NeighbourMap, CallWeights0, CallWeights1)
;
- map.init(NeighbourMap0),
- map.det_insert(CallPPId, Context - GammaConst,
- NeighbourMap0, NeighbourMap),
+ NeighbourMap = map.singleton(CallPPId, Context - GammaConst),
map.det_insert(PPId, NeighbourMap, CallWeights0, CallWeights1)
),
!:CallInfo = call_weight_info(InfCalls0, CallWeights1)
Index: compiler/tupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tupling.m,v
retrieving revision 1.58
diff -u -r1.58 tupling.m
--- compiler/tupling.m 5 May 2011 03:58:57 -0000 1.58
+++ compiler/tupling.m 5 May 2011 04:49:10 -0000
@@ -460,7 +460,7 @@
map.lookup(VarTypes, HeadVar, Type),
not is_introduced_type_info_type(Type),
varset.search_name(VarSet, HeadVar, Name),
- map.det_insert(PredProcId, HeadVar, map.init, Origins).
+ Origins = map.singleton(PredProcId, HeadVar).
:- pred common_candidate_headvars_of_procs(module_info::in,
list(pred_proc_id)::in, candidate_headvars::out) is det.
@@ -1541,10 +1541,10 @@
Counter0 = counter.init(1),
counter.allocate(CurInterval, Counter0, Counter),
CurIntervalId = interval_id(CurInterval),
- EndMap = map.det_insert(map.init, CurIntervalId, anchor_proc_end),
+ EndMap = map.singleton(CurIntervalId, anchor_proc_end),
StartMap = map.init,
- SuccMap = map.det_insert(map.init, CurIntervalId, []),
- VarsMap = map.det_insert(map.init, CurIntervalId, OutputArgs),
+ SuccMap = map.singleton(CurIntervalId, []),
+ VarsMap = map.singleton(CurIntervalId, OutputArgs),
IntParams = interval_params(ModuleInfo, VarTypes, no),
IntervalInfo0 = interval_info(IntParams, set.init,
OutputArgs, map.init, map.init, map.init,
Index: compiler/type_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_constraints.m,v
retrieving revision 1.15
diff -u -r1.15 type_constraints.m
--- compiler/type_constraints.m 5 May 2011 03:58:57 -0000 1.15
+++ compiler/type_constraints.m 5 May 2011 04:48:03 -0000
@@ -914,7 +914,7 @@
unify_equal_tvars(TCInfo, Replaced, Replacement, Target,
!ReplacementMap, !DomainMap) :-
TCInfo = tconstr_info(VarMap, _, ConstraintMap, VarConstraints, _, _),
- map.det_insert(Target, Replacement, map.init, Renaming),
+ Renaming = map.singleton(Target, Replacement),
(
map.search(!.DomainMap, Target, tdomain_any),
map.search(VarConstraints, Target, ConstraintIds)
Index: compiler/type_ctor_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_ctor_info.m,v
retrieving revision 1.104
diff -u -r1.104 type_ctor_info.m
--- compiler/type_ctor_info.m 3 May 2011 04:34:59 -0000 1.104
+++ compiler/type_ctor_info.m 5 May 2011 05:27:39 -0000
@@ -1019,8 +1019,7 @@
SectagTable = sectag_table(Locn0, NumSharers0 + 1, SectagMap),
map.det_update(Ptag, SectagTable, !PtagTable)
;
- SectagMap0 = map.init,
- map.det_insert(Sectag, DuFunctor, SectagMap0, SectagMap),
+ SectagMap = map.singleton(Sectag, DuFunctor),
SectagTable = sectag_table(SectagLocn, 1, SectagMap),
map.det_insert(Ptag, SectagTable, !PtagTable)
)
@@ -1040,7 +1039,7 @@
map.det_insert(Arity, DuFunctor, NameMap0, NameMap),
map.det_update(Name, NameMap, !NameTable)
;
- map.det_insert(Arity, DuFunctor, map.init, NameMap),
+ NameMap = map.singleton(Arity, DuFunctor),
map.det_insert(Name, NameMap, !NameTable)
).
@@ -1062,7 +1061,7 @@
map.det_insert(Arity, MaybeResFunctor, NameMap0, NameMap),
map.det_update(Name, NameMap, !NameTable)
;
- NameMap = map.det_insert(map.init, Arity, MaybeResFunctor),
+ NameMap = map.singleton(Arity, MaybeResFunctor),
map.det_insert(Name, NameMap, !NameTable)
).
Index: compiler/unneeded_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unneeded_code.m,v
retrieving revision 1.60
diff -u -r1.60 unneeded_code.m
--- compiler/unneeded_code.m 3 May 2011 04:34:59 -0000 1.60
+++ compiler/unneeded_code.m 5 May 2011 05:28:36 -0000
@@ -940,9 +940,8 @@
BranchPoint, BranchNum, CurrentId, !WhereNeededMap) :-
(
BranchWhere0 = everywhere,
- map.init(Empty),
set.singleton_set(BranchNumSet, BranchNum),
- map.det_insert(BranchPoint, BranchNumSet, Empty, BranchMap),
+ BranchMap = map.singleton(BranchPoint, BranchNumSet),
BranchWhere = branches(BranchMap)
;
BranchWhere0 = branches(_),
Index: deep_profiler/autopar_search_callgraph.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/autopar_search_callgraph.m,v
retrieving revision 1.4
diff -u -r1.4 autopar_search_callgraph.m
--- deep_profiler/autopar_search_callgraph.m 3 May 2011 04:35:00 -0000 1.4
+++ deep_profiler/autopar_search_callgraph.m 5 May 2011 05:34:30 -0000
@@ -626,8 +626,7 @@
merge_pushes_for_proc(Pushes, MergedPushes),
CandidateProc = candidate_par_conjunctions_proc(
VarTable, MergedPushes, Candidates0),
- map.det_insert(ProcLabel, CandidateProc,
- map.init, Candidates)
+ Candidates = map.singleton(ProcLabel, CandidateProc)
)
;
SeenDuplicateInstantiation = seen_duplicate_instantiation,
Index: deep_profiler/html_format.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/html_format.m,v
retrieving revision 1.38
diff -u -r1.38 html_format.m
--- deep_profiler/html_format.m 3 May 2011 04:35:00 -0000 1.38
+++ deep_profiler/html_format.m 5 May 2011 05:35:03 -0000
@@ -432,8 +432,7 @@
map.set(StyleElement, Colour, StyleElementMap0, StyleElementMap),
map.det_update(StyleControl, StyleElementMap, !StyleControlMap)
;
- map.init(StyleElementMap0),
- map.set(StyleElement, Colour, StyleElementMap0, StyleElementMap),
+ StyleElementMap = map.singleton(StyleElement, Colour),
map.det_insert(StyleControl, StyleElementMap, !StyleControlMap)
),
!:HeaderGroupNumber = !.HeaderGroupNumber + 1.
--------------------------------------------------------------------------
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