[m-rev.] diff: rename get predicates
Zoltan Somogyi
zs at cs.mu.OZ.AU
Fri Sep 30 18:07:14 AEST 2005
tools/subst:
A simple tool for performing substitutions on the source files of the
compiler.
compiler/*.m:
Change the names of the get predicates operating on module_infos to
include "get" in the name, for uniformity. This was done mostly by
the following sed script, with some manual cleanup afterwards to reduce
excessive line lengths.
s/module_info_types/module_info_get_type_table/
s/module_info_set_types/module_info_set_type_table/
s/module_info_insts/module_info_get_inst_table/
s/module_info_set_insts/module_info_set_inst_table/
s/module_info_modes/module_info_get_mode_table/
s/module_info_set_modes/module_info_set_mode_table/
s/module_info_ctors/module_info_get_cons_table/
s/module_info_set_ctors/module_info_set_cons_table/
s/module_info_classes/module_info_get_class_table/
s/module_info_set_classes/module_info_set_class_table/
s/module_info_instances/module_info_get_instance_table/
s/module_info_set_instances/module_info_set_instance_table/
s/module_info_superclasses/module_info_get_superclass_table/
s/module_info_set_superclasses/module_info_set_superclass_table/
s/module_info_assertion_table/module_info_get_assertion_table/
s/module_info_exclusive_table/module_info_get_exclusive_table/
s/module_info_ctor_field_table/module_info_get_ctor_field_table/
s/module_info_name/module_info_get_name/
s/module_info_globals/module_info_get_globals/
s/module_info_contains_foreign_types/module_info_get_contains_foreign_types/
s/module_info_num_errors/module_info_get_num_errors/
s/module_info_type_ctor_gen_infos/module_info_get_type_ctor_gen_infos/
s/module_info_stratified_preds/module_info_get_stratified_preds/
s/module_info_unused_arg_info/module_info_get_unused_arg_info/
s/module_info_exception_info/module_info_get_exception_info/
s/module_info_type_spec_info/module_info_get_type_spec_info/
s/module_info_no_tag_types/module_info_get_no_tag_types/
s/module_info_analysis_info/module_info_get_analysis_info/
s/module_info_aditi_top_down_procs/module_info_get_aditi_top_down_procs/
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/add_class.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_class.m,v
retrieving revision 1.4
diff -u -b -r1.4 add_class.m
--- compiler/add_class.m 12 Sep 2005 05:24:01 -0000 1.4
+++ compiler/add_class.m 27 Sep 2005 06:39:25 -0000
@@ -69,8 +69,8 @@
module_add_class_defn(Constraints, FunDeps, Name, Vars, Interface, VarSet,
Context, Status, !ModuleInfo, !IO) :-
- module_info_classes(!.ModuleInfo, Classes0),
- module_info_superclasses(!.ModuleInfo, SuperClasses0),
+ module_info_get_class_table(!.ModuleInfo, Classes0),
+ module_info_get_superclass_table(!.ModuleInfo, SuperClasses0),
list__length(Vars, ClassArity),
ClassId = class_id(Name, ClassArity),
Status = item_status(ImportStatus0, _),
@@ -177,20 +177,20 @@
Ancestors, Vars, Kinds, ClassInterface, ClassMethods, VarSet,
Context),
map__set(Classes0, ClassId, Defn, Classes),
- module_info_set_classes(Classes, !ModuleInfo),
+ module_info_set_class_table(Classes, !ModuleInfo),
(
IsNewDefn = yes,
update_superclass_table(ClassId, Vars, VarSet, Constraints,
SuperClasses0, SuperClasses),
- module_info_set_superclasses(SuperClasses, !ModuleInfo),
+ module_info_set_superclass_table(SuperClasses, !ModuleInfo),
% When we find the class declaration, make an
% entry for the instances.
- module_info_instances(!.ModuleInfo, Instances0),
+ module_info_get_instance_table(!.ModuleInfo, Instances0),
map__det_insert(Instances0, ClassId, [], Instances),
- module_info_set_instances(Instances, !ModuleInfo)
+ module_info_set_instance_table(Instances, !ModuleInfo)
;
IsNewDefn = no
)
@@ -397,8 +397,8 @@
module_add_instance_defn(InstanceModuleName, Constraints, ClassName,
Types, Body0, VarSet, Status, Context, !ModuleInfo, !IO) :-
- module_info_classes(!.ModuleInfo, Classes),
- module_info_instances(!.ModuleInfo, Instances0),
+ module_info_get_class_table(!.ModuleInfo, Classes),
+ module_info_get_instance_table(!.ModuleInfo, Instances0),
list__length(Types, ClassArity),
ClassId = class_id(ClassName, ClassArity),
Body = expand_bang_state_var_args_in_instance_method_heads(Body0),
@@ -413,7 +413,7 @@
ClassId, !IO),
map__det_update(Instances0, ClassId,
[NewInstanceDefn | InstanceDefns], Instances),
- module_info_set_instances(Instances, !ModuleInfo)
+ module_info_set_instance_table(Instances, !ModuleInfo)
;
undefined_type_class_error(ClassName, ClassArity, Context,
"instance declaration", !IO)
Index: compiler/add_clause.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_clause.m,v
retrieving revision 1.8
diff -u -b -r1.8 add_clause.m
--- compiler/add_clause.m 14 Sep 2005 05:26:36 -0000 1.8
+++ compiler/add_clause.m 27 Sep 2005 06:39:25 -0000
@@ -109,7 +109,7 @@
% Lookup the pred declaration in the predicate table.
% (If it's not there, call maybe_undefined_pred_error
% and insert an implicit declaration for the predicate.)
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
list__length(Args, Arity0),
Arity = Arity0 + ArityAdjustment,
some [!PredInfo, !PredicateTable] (
Index: compiler/add_mode.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_mode.m,v
retrieving revision 1.2
diff -u -b -r1.2 add_mode.m
--- compiler/add_mode.m 30 Aug 2005 04:11:46 -0000 1.2
+++ compiler/add_mode.m 27 Sep 2005 06:39:25 -0000
@@ -46,12 +46,12 @@
%
% Add the definition of this inst to the HLDS inst table.
%
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_user_insts(InstTable0, Insts0),
insts_add(VarSet, Name, Args, InstDefn, Cond, Context, Status,
Insts0, Insts, !IO),
inst_table_set_user_insts(Insts, InstTable0, InstTable),
- module_info_set_insts(InstTable, !ModuleInfo),
+ module_info_set_inst_table(InstTable, !ModuleInfo),
%
% check if the inst is infinitely recursive (at the top level)
%
@@ -125,10 +125,10 @@
module_add_mode_defn(VarSet, Name, Params, ModeDefn, Cond, Context,
item_status(Status, _NeedQual), !ModuleInfo, InvalidMode, !IO) :-
- module_info_modes(!.ModuleInfo, Modes0),
+ module_info_get_mode_table(!.ModuleInfo, Modes0),
modes_add(VarSet, Name, Params, ModeDefn, Cond, Context, Status,
Modes0, Modes, InvalidMode, !IO),
- module_info_set_modes(Modes, !ModuleInfo).
+ module_info_set_mode_table(Modes, !ModuleInfo).
:- pred modes_add(inst_varset::in, sym_name::in, list(inst_var)::in,
mode_defn::in, condition::in, prog_context::in, import_status::in,
Index: compiler/add_pragma.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pragma.m,v
retrieving revision 1.10
diff -u -b -r1.10 add_pragma.m
--- compiler/add_pragma.m 29 Sep 2005 06:33:05 -0000 1.10
+++ compiler/add_pragma.m 30 Sep 2005 06:31:46 -0000
@@ -426,7 +426,7 @@
add_pragma_reserve_tag(TypeName, TypeArity, PragmaStatus, Context, !ModuleInfo,
!IO) :-
TypeCtor = TypeName - TypeArity,
- module_info_types(!.ModuleInfo, Types0),
+ module_info_get_type_table(!.ModuleInfo, Types0),
TypeStr = error_util__describe_sym_name_and_arity(TypeName / TypeArity),
ErrorPieces1 = [
words("In"),
@@ -485,14 +485,14 @@
% and recompute the constructor tags.
%
ReservedTag = yes,
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
assign_constructor_tags(Body, TypeCtor, ReservedTag, Globals,
CtorTags, IsEnum),
TypeBody = du_type(Body, CtorTags, IsEnum, MaybeUserEqComp,
ReservedTag, IsForeign),
hlds_data__set_type_defn_body(TypeBody, TypeDefn0, TypeDefn),
map__set(Types0, TypeCtor, TypeDefn, Types),
- module_info_set_types(Types, !ModuleInfo)
+ module_info_set_type_table(Types, !ModuleInfo)
;
write_error_pieces(Context, 0, ErrorPieces1, !IO),
ErrorPieces2 = [
@@ -528,7 +528,7 @@
predicate_table_search_pf_sym_arity(Preds, is_fully_qualified,
PredOrFunc, SymName, Arity, [PredId])
->
- module_info_unused_arg_info(!.ModuleInfo, UnusedArgInfo0),
+ module_info_get_unused_arg_info(!.ModuleInfo, UnusedArgInfo0),
% convert the mode number to a proc_id
proc_id_to_int(ProcId, ModeNum),
map__set(UnusedArgInfo0, proc(PredId, ProcId), UnusedArgs,
@@ -554,7 +554,7 @@
predicate_table_search_pf_sym_arity(Preds, is_fully_qualified,
PredOrFunc, SymName, Arity, [PredId])
->
- module_info_exception_info(!.ModuleInfo, ExceptionsInfo0),
+ module_info_get_exception_info(!.ModuleInfo, ExceptionsInfo0),
% convert the mode number to a proc_id
proc_id_to_int(ProcId, ModeNum),
map__set(ExceptionsInfo0, proc(PredId, ProcId), ThrowStatus,
@@ -706,7 +706,7 @@
%
% Record the type specialisation in the module_info.
%
- module_info_type_spec_info(!.ModuleInfo, TypeSpecInfo0),
+ module_info_get_type_spec_info(!.ModuleInfo, TypeSpecInfo0),
TypeSpecInfo0 = type_spec_info(ProcsToSpec0,
ForceVersions0, SpecMap0, PragmaMap0),
list__map((pred(ProcId::in, PredProcId::out) is det :-
@@ -1142,7 +1142,7 @@
module_add_pragma_import(PredName, PredOrFunc, Modes, Attributes, C_Function,
Status, Context, !ModuleInfo, !QualInfo, !IO) :-
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
list__length(Modes, Arity),
globals__io_lookup_bool_option(very_verbose, VeryVerbose, !IO),
@@ -1270,7 +1270,7 @@
;
Attributes = Attributes0
),
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
PragmaForeignLanguage = foreign_language(Attributes),
list__length(PVars, Arity),
% print out a progress message
@@ -1418,7 +1418,7 @@
->
PredIds = PredIds0
;
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
string__format("`:- pragma %s' declaration",
[s(EvalMethodStr)], Message1),
preds_add_implicit_report_error(ModuleName, PredOrFunc, PredName,
@@ -1434,7 +1434,7 @@
->
PredIds = PredIds0
;
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
string__format("`:- pragma %s' declaration",
[s(EvalMethodStr)], Message1),
preds_add_implicit_report_error(ModuleName, predicate, PredName,
@@ -1527,7 +1527,7 @@
;
% Do we have to make sure the tabled preds are stratified?
( eval_method_needs_stratification(EvalMethod) = yes ->
- module_info_stratified_preds(!.ModuleInfo, StratPredIds0),
+ module_info_get_stratified_preds(!.ModuleInfo, StratPredIds0),
set__insert(StratPredIds0, PredId, StratPredIds),
module_info_set_stratified_preds(StratPredIds, !ModuleInfo)
;
Index: compiler/add_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pred.m,v
retrieving revision 1.5
diff -u -b -r1.5 add_pred.m
--- compiler/add_pred.m 14 Sep 2005 05:26:36 -0000 1.5
+++ compiler/add_pred.m 27 Sep 2005 06:39:26 -0000
@@ -150,7 +150,7 @@
;
Status = ItemStatus
),
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
list__length(Types, Arity),
(
PredName = unqualified(_PName),
@@ -301,7 +301,7 @@
% predicate; it is presumed to be local, and its type
% will be inferred automatically.
- module_info_name(!.ModuleInfo, ModuleName0),
+ module_info_get_name(!.ModuleInfo, ModuleName0),
sym_name_get_module_name(PredName, ModuleName0, ModuleName),
list__length(Modes, Arity),
module_info_get_predicate_table(!.ModuleInfo, PredicateTable0),
@@ -421,7 +421,7 @@
% Existential types must be declared, they won't be inferred.
ExistQVars = [],
init_markers(Markers0),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_string_option(Globals, aditi_user, Owner),
pred_info_init(ModuleName, PredName, Arity, PredOrFunc, Context,
Origin, Status, none, Markers0, Types, TVarSet, ExistQVars,
Index: compiler/add_special_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_special_pred.m,v
retrieving revision 1.2
diff -u -b -r1.2 add_special_pred.m
--- compiler/add_special_pred.m 29 Aug 2005 08:44:13 -0000 1.2
+++ compiler/add_special_pred.m 27 Sep 2005 06:39:26 -0000
@@ -123,7 +123,7 @@
Ctors = Body ^ du_type_ctors,
Body ^ du_type_is_enum = no,
Body ^ du_type_usereq = no,
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_int_option(Globals, compare_specialization,
CompareSpec),
list__length(Ctors, CtorCount),
@@ -183,7 +183,7 @@
add_special_pred(SpecialPredId, TVarSet, Type, TypeCtor, TypeBody, Context,
Status0, !ModuleInfo) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, special_preds, GenSpecialPreds),
(
GenSpecialPreds = yes,
@@ -315,7 +315,7 @@
add_special_pred_decl(SpecialPredId, TVarSet, Type, TypeCtor, TypeBody,
Context, Status0, !ModuleInfo) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, special_preds, GenSpecialPreds),
( GenSpecialPreds = yes ->
do_add_special_pred_decl_for_real(SpecialPredId,
@@ -330,7 +330,7 @@
do_add_special_pred_decl_for_real(SpecialPredId, TVarSet, Type, TypeCtor,
Context, Status0, !ModuleInfo) :-
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
special_pred_interface(SpecialPredId, Type, ArgTypes, ArgModes, Det),
Name = special_pred_name(SpecialPredId, TypeCtor),
( SpecialPredId = (initialise) ->
@@ -351,7 +351,7 @@
% XXX this context might not be empty
ClassContext = constraints([], []),
ExistQVars = [],
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_string_option(Globals, aditi_user, Owner),
pred_info_init(ModuleName, PredName, Arity, predicate, Context,
Origin, Status, none, Markers, ArgTypes, TVarSet, ExistQVars,
Index: compiler/add_type.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_type.m,v
retrieving revision 1.4
diff -u -b -r1.4 add_type.m
--- compiler/add_type.m 14 Sep 2005 05:26:36 -0000 1.4
+++ compiler/add_type.m 27 Sep 2005 06:39:26 -0000
@@ -77,7 +77,7 @@
list__length(Args, Arity),
TypeCtor = Name - Arity,
convert_type_defn(TypeDefn, TypeCtor, Globals, Body0),
- module_info_types(!.ModuleInfo, Types0),
+ module_info_get_type_table(!.ModuleInfo, Types0),
(
(
Body0 = abstract_type(_)
@@ -193,7 +193,7 @@
Body_2, Status, OrigInExportedEqv, OrigNeedQual,
OrigContext, T3),
map__det_update(Types0, TypeCtor, T3, Types),
- module_info_set_types(Types, !ModuleInfo)
+ module_info_set_type_table(Types, !ModuleInfo)
)
;
merge_foreign_type_bodies(Target, MakeOptInt, Body, Body_2,
@@ -203,7 +203,7 @@
hlds_data__set_type_defn(TVarSet_2, Params_2, KindMap_2,
NewBody, Status, OrigInExportedEqv, NeedQual, Context, T3),
map__det_update(Types0, TypeCtor, T3, Types),
- module_info_set_types(Types, !ModuleInfo)
+ module_info_set_type_table(Types, !ModuleInfo)
;
module_info_incr_errors(!ModuleInfo),
Pieces = [words("In definition of type"),
@@ -228,7 +228,7 @@
)
;
map__set(Types0, TypeCtor, T, Types),
- module_info_set_types(Types, !ModuleInfo),
+ module_info_set_type_table(Types, !ModuleInfo),
(
% XXX we can't handle abstract exported
% polymorphic equivalence types with monomorphic
@@ -334,15 +334,15 @@
(
ConsList = Body ^ du_type_ctors,
ReservedTag = Body ^ du_type_reserved_tag,
- module_info_ctors(!.ModuleInfo, Ctors0),
+ module_info_get_cons_table(!.ModuleInfo, Ctors0),
module_info_get_partial_qualifier_info(!.ModuleInfo, PQInfo),
check_for_errors(
(pred(M0::in, M::out, IO0::di, IO::uo) is det :-
- module_info_ctor_field_table(M0, CtorFields0),
+ module_info_get_ctor_field_table(M0, CtorFields0),
ctors_add(ConsList, TypeCtor, TVarSet, NeedQual, PQInfo,
Context, Status, CtorFields0, CtorFields, Ctors0, Ctors,
IO0, IO),
- module_info_set_ctors(Ctors, M0, M1),
+ module_info_set_cons_table(Ctors, M0, M1),
module_info_set_ctor_field_table(CtorFields, M1, M)
), NewFoundError, !ModuleInfo, !IO),
@@ -352,7 +352,7 @@
Name, CtorArgType, _)
->
NoTagType = no_tag_type(Args, Name, CtorArgType),
- module_info_no_tag_types(!.ModuleInfo, NoTagTypes0),
+ module_info_get_no_tag_types(!.ModuleInfo, NoTagTypes0),
map__set(NoTagTypes0, TypeCtor, NoTagType, NoTagTypes),
module_info_set_no_tag_types(NoTagTypes, !ModuleInfo)
;
@@ -405,7 +405,7 @@
check_foreign_type(TypeCtor, ForeignTypeBody, Context, FoundError, !ModuleInfo,
!IO) :-
TypeCtor = Name - Arity,
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
generating_code(GeneratingCode, !IO),
globals__get_target(Globals, Target),
( have_foreign_type_for_backend(Target, ForeignTypeBody, yes) ->
Index: compiler/assertion.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/assertion.m,v
retrieving revision 1.39
diff -u -b -r1.39 assertion.m
--- compiler/assertion.m 26 Sep 2005 05:48:07 -0000 1.39
+++ compiler/assertion.m 27 Sep 2005 06:39:26 -0000
@@ -454,7 +454,7 @@
%-----------------------------------------------------------------------------%
assertion__goal(AssertId, Module, Goal) :-
- module_info_assertion_table(Module, AssertTable),
+ module_info_get_assertion_table(Module, AssertTable),
assertion_table_lookup(AssertTable, AssertId, PredId),
module_info_pred_info(Module, PredId, PredInfo),
pred_info_clauses_info(PredInfo, ClausesInfo),
@@ -800,7 +800,7 @@
clauses_info_vartypes(ClausesInfo, VarTypes),
map__lookup(VarTypes, Var, Type),
( type_to_ctor_and_args(Type, TypeCtor, _) ->
- module_info_types(!.Module, Types),
+ module_info_get_type_table(!.Module, Types),
map__lookup(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_status(TypeDefn, TypeStatus),
( is_defined_in_implementation_section(TypeStatus) = yes ->
@@ -864,7 +864,7 @@
write_assertion_interface_error(Context, Type, !Module, !IO) :-
module_info_incr_errors(!Module),
- module_info_name(!.Module, ModuleName),
+ module_info_get_name(!.Module, ModuleName),
ModuleStr = describe_sym_name(ModuleName),
write_error_pieces(Context, 0,
[words("In interface for module"), fixed(ModuleStr ++ ":")], !IO),
Index: compiler/base_typeclass_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/base_typeclass_info.m,v
retrieving revision 1.37
diff -u -b -r1.37 base_typeclass_info.m
--- compiler/base_typeclass_info.m 19 Sep 2005 04:28:57 -0000 1.37
+++ compiler/base_typeclass_info.m 27 Sep 2005 06:39:26 -0000
@@ -58,8 +58,8 @@
%---------------------------------------------------------------------------%
generate_rtti(ModuleInfo, RttiDataList) :-
- module_info_name(ModuleInfo, ModuleName),
- module_info_instances(ModuleInfo, InstanceTable),
+ module_info_get_name(ModuleInfo, ModuleName),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
map__to_assoc_list(InstanceTable, AllInstances),
gen_infos_for_classes(AllInstances, ModuleName, ModuleInfo,
[], RttiDataList).
@@ -149,7 +149,7 @@
int::out, int::out) is det.
gen_superclass_count(ClassId, ModuleInfo, NumSuperClasses, ClassArity) :-
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
map__lookup(ClassTable, ClassId, ClassDefn),
list__length(ClassDefn ^ class_supers, NumSuperClasses),
list__length(ClassDefn ^ class_vars, ClassArity).
Index: compiler/call_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/call_gen.m,v
retrieving revision 1.166
diff -u -b -r1.166 call_gen.m
--- compiler/call_gen.m 13 Sep 2005 04:55:58 -0000 1.166
+++ compiler/call_gen.m 27 Sep 2005 06:39:27 -0000
@@ -180,7 +180,7 @@
code_info__get_module_info(!.CI, ModuleInfo),
arg_info__compute_in_and_out_vars(ModuleInfo, Args, Modes, Types,
InVars, OutVars),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
call_gen__generic_call_info(Globals, GenericCall, length(InVars),
CodeAddr, SpecifierArgInfos, FirstImmInput, HoCallVariant),
determinism_to_code_model(Det, CodeModel),
Index: compiler/check_typeclass.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/check_typeclass.m,v
retrieving revision 1.78
diff -u -b -r1.78 check_typeclass.m
--- compiler/check_typeclass.m 14 Sep 2005 05:26:36 -0000 1.78
+++ compiler/check_typeclass.m 27 Sep 2005 06:39:27 -0000
@@ -154,8 +154,8 @@
check_typeclass__check_instance_decls(!QualInfo, !ModuleInfo, FoundError,
!IO) :-
- module_info_classes(!.ModuleInfo, ClassTable),
- module_info_instances(!.ModuleInfo, InstanceTable0),
+ module_info_get_class_table(!.ModuleInfo, ClassTable),
+ module_info_get_instance_table(!.ModuleInfo, InstanceTable0),
map__to_assoc_list(InstanceTable0, InstanceList0),
list__map_foldl2(check_one_class(ClassTable), InstanceList0,
InstanceList, check_tc_info([], !.ModuleInfo, !.QualInfo),
@@ -163,7 +163,7 @@
(
Errors = [],
map__from_assoc_list(InstanceList, InstanceTable),
- module_info_set_instances(InstanceTable, !ModuleInfo),
+ module_info_set_instance_table(InstanceTable, !ModuleInfo),
FoundError = no
;
Errors = [_ | _],
@@ -765,7 +765,7 @@
;
Markers = Markers1
),
- module_info_globals(ModuleInfo0, Globals),
+ module_info_get_globals(ModuleInfo0, Globals),
globals__lookup_string_option(Globals, aditi_user, User),
( status_is_imported(Status0, yes) ->
@@ -880,9 +880,9 @@
% Calculate the bindings
map__from_corresponding_lists(ClassVars, InstanceTypes, TypeSubst),
- module_info_classes(ModuleInfo, ClassTable),
- module_info_instances(ModuleInfo, InstanceTable),
- module_info_superclasses(ModuleInfo, SuperClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
+ module_info_get_superclass_table(ModuleInfo, SuperClassTable),
% Build a suitable constraint context for checking the
% instance. To do this, we assume any constraints on the
@@ -966,7 +966,7 @@
module_info::in, module_info::out, bool::out, io::di, io::uo) is det.
check_for_missing_concrete_instances(!ModuleInfo, FoundError, !IO) :-
- module_info_instances(!.ModuleInfo, InstanceTable),
+ module_info_get_instance_table(!.ModuleInfo, InstanceTable),
%
% Grab all the abstract instance declarations in the interface
% of this module and all the concrete instances defined in the
@@ -1108,7 +1108,7 @@
io::di, io::uo) is det.
check_for_cyclic_classes(!ModuleInfo, Errors, !IO) :-
- module_info_classes(!.ModuleInfo, ClassTable0),
+ module_info_get_class_table(!.ModuleInfo, ClassTable0),
ClassIds = map__keys(ClassTable0),
foldl3(find_cycles([]), ClassIds, ClassTable0, ClassTable, set.init, _,
[], Cycles),
@@ -1120,7 +1120,7 @@
Errors = yes,
foldl(report_cyclic_classes(ClassTable), Cycles, !IO)
),
- module_info_set_classes(ClassTable, !ModuleInfo).
+ module_info_set_class_table(ClassTable, !ModuleInfo).
:- type class_path == list(class_id).
@@ -1276,7 +1276,7 @@
bool::out, io::di, io::uo) is det.
check_functional_dependencies(!ModuleInfo, FoundError, !IO) :-
- module_info_instances(!.ModuleInfo, InstanceTable),
+ module_info_get_instance_table(!.ModuleInfo, InstanceTable),
map.keys(InstanceTable, ClassIds),
list.foldl3(check_fundeps_class, ClassIds, !ModuleInfo, no, FoundError,
!IO).
@@ -1285,9 +1285,9 @@
bool::in, bool::out, io::di, io::uo) is det.
check_fundeps_class(ClassId, !ModuleInfo, !FoundError, !IO) :-
- module_info_classes(!.ModuleInfo, ClassTable),
+ module_info_get_class_table(!.ModuleInfo, ClassTable),
map.lookup(ClassTable, ClassId, ClassDefn),
- module_info_instances(!.ModuleInfo, InstanceTable),
+ module_info_get_instance_table(!.ModuleInfo, InstanceTable),
map.lookup(InstanceTable, ClassId, InstanceDefns),
FunDeps = ClassDefn ^ class_fundeps,
check_range_restrictedness(ClassId, InstanceDefns, FunDeps,
@@ -1484,7 +1484,7 @@
module_info_predids(!.ModuleInfo, PredIds),
list.foldl3(check_pred_constraints, PredIds, !ModuleInfo,
no, FoundError0, !IO),
- module_info_types(!.ModuleInfo, TypeTable),
+ module_info_get_type_table(!.ModuleInfo, TypeTable),
map.keys(TypeTable, TypeCtors),
list.foldl3(check_ctor_constraints(TypeTable), TypeCtors, !ModuleInfo,
FoundError0, FoundError, !IO).
@@ -1577,7 +1577,7 @@
module_info::in, list(tvar)::out) is det.
get_unbound_tvars(TVars, Constraints, ModuleInfo, UnboundTVars) :-
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
InducedFunDeps = induced_fundeps(ClassTable, Constraints),
FunDepsClosure = fundeps_closure(InducedFunDeps, list_to_set(TVars)),
solutions(constrained_var_not_in_closure(Constraints, FunDepsClosure),
Index: compiler/code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_gen.m,v
retrieving revision 1.140
diff -u -b -r1.140 code_gen.m
--- compiler/code_gen.m 13 Sep 2005 04:55:59 -0000 1.140
+++ compiler/code_gen.m 27 Sep 2005 06:39:27 -0000
@@ -169,7 +169,7 @@
->
Predicates = []
;
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, very_verbose, VeryVerbose),
(
VeryVerbose = yes,
@@ -251,7 +251,7 @@
map__init(FollowVarsMap),
FollowVars = abs_follow_vars(FollowVarsMap, 1)
),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
continuation_info__basic_stack_layout_for_proc(PredInfo, Globals,
BasicStackLayout, ForceProcId),
SaveSuccip = BasicStackLayout,
@@ -414,7 +414,7 @@
module_info::in, module_info::out) is det.
maybe_set_trace_level(PredInfo, !ModuleInfo) :-
- module_info_globals(!.ModuleInfo, Globals0),
+ module_info_get_globals(!.ModuleInfo, Globals0),
(
PredModule = pred_info_module(PredInfo),
PredName = pred_info_name(PredInfo),
@@ -485,7 +485,7 @@
HasTablingPointer = eval_method_has_per_proc_tabling_pointer(EvalMethod),
(
HasTablingPointer = yes,
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Var = tabling_pointer_var(ModuleName, ProcLabel),
global_data_add_new_proc_var(proc(PredId, ProcId), Var, !GlobalData)
;
Index: compiler/code_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_info.m,v
retrieving revision 1.305
diff -u -b -r1.305 code_info.m
--- compiler/code_info.m 13 Sep 2005 08:25:27 -0000 1.305
+++ compiler/code_info.m 27 Sep 2005 06:39:28 -0000
@@ -829,7 +829,7 @@
;
error("unknown type in code_info__lookup_type_defn")
),
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__lookup(TypeTable, TypeCtor, TypeDefn).
code_info__cons_id_to_tag(CI, Var, ConsId) = ConsTag :-
Index: compiler/complexity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/complexity.m,v
retrieving revision 1.4
diff -u -b -r1.4 complexity.m
--- compiler/complexity.m 30 Aug 2005 04:11:46 -0000 1.4
+++ compiler/complexity.m 27 Sep 2005 06:39:29 -0000
@@ -133,7 +133,7 @@
%-----------------------------------------------------------------------------%
complexity_proc_name(ModuleInfo, PredId, ProcId) = FullName :-
- module_info_name(ModuleInfo, ModuleSymName),
+ module_info_get_name(ModuleInfo, ModuleSymName),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
PredName = pred_info_name(PredInfo),
QualifiedName = qualified(ModuleSymName, PredName),
Index: compiler/constraint.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/constraint.m,v
retrieving revision 1.62
diff -u -b -r1.62 constraint.m
--- compiler/constraint.m 30 Aug 2005 04:11:47 -0000 1.62
+++ compiler/constraint.m 27 Sep 2005 06:39:29 -0000
@@ -490,7 +490,7 @@
% can loop or throw an exception if `--fully-strict' is set.
%
\+ goal_cannot_loop_or_throw(ModuleInfo, Goal),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, fully_strict, yes)
->
filter_dependent_constraints(NonLocals,
Index: compiler/continuation_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/continuation_info.m,v
retrieving revision 1.61
diff -u -b -r1.61 continuation_info.m
--- compiler/continuation_info.m 12 Sep 2005 05:24:03 -0000 1.61
+++ compiler/continuation_info.m 27 Sep 2005 06:39:29 -0000
@@ -385,7 +385,7 @@
ModuleInfo, !ContInfo) :-
PredProcId = proc(PredId, _),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
continuation_info__basic_stack_layout_for_proc(PredInfo, Globals,
Layout, _),
(
Index: compiler/dead_proc_elim.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dead_proc_elim.m,v
retrieving revision 1.101
diff -u -b -r1.101 dead_proc_elim.m
--- compiler/dead_proc_elim.m 30 Aug 2005 04:11:47 -0000 1.101
+++ compiler/dead_proc_elim.m 27 Sep 2005 06:39:29 -0000
@@ -142,11 +142,11 @@
module_info_get_pragma_exported_procs(ModuleInfo, PragmaExports),
dead_proc_elim__initialize_pragma_exports(PragmaExports,
!Queue, !Needed),
- module_info_type_ctor_gen_infos(ModuleInfo, TypeCtorGenInfos),
+ module_info_get_type_ctor_gen_infos(ModuleInfo, TypeCtorGenInfos),
dead_proc_elim__initialize_base_gen_infos(TypeCtorGenInfos,
!Queue, !Needed),
- module_info_classes(ModuleInfo, Classes),
- module_info_instances(ModuleInfo, Instances),
+ module_info_get_class_table(ModuleInfo, Classes),
+ module_info_get_instance_table(ModuleInfo, Instances),
dead_proc_elim__initialize_class_methods(Classes, Instances,
!Queue, !Needed).
@@ -311,7 +311,7 @@
dead_proc_elim__examine_base_gen_info(ModuleName, TypeName, Arity, ModuleInfo,
!Queue, !Needed) :-
- module_info_type_ctor_gen_infos(ModuleInfo, TypeCtorGenInfos),
+ module_info_get_type_ctor_gen_infos(ModuleInfo, TypeCtorGenInfos),
(
dead_proc_elim__find_base_gen_info(ModuleName, TypeName,
Arity, TypeCtorGenInfos, Refs)
@@ -504,7 +504,7 @@
ElimInfo = elimination_info(!:Needed, !:ModuleInfo, PredTable, Changed),
module_info_set_preds(PredTable, !ModuleInfo),
- module_info_type_ctor_gen_infos(!.ModuleInfo, TypeCtorGenInfos0),
+ module_info_get_type_ctor_gen_infos(!.ModuleInfo, TypeCtorGenInfos0),
dead_proc_elim__eliminate_base_gen_infos(TypeCtorGenInfos0, !.Needed,
TypeCtorGenInfos),
module_info_set_type_ctor_gen_infos(TypeCtorGenInfos, !ModuleInfo),
@@ -706,8 +706,8 @@
% examined because they contain calls to the actual method
% implementations.
%
- module_info_instances(!.ModuleInfo, Instances),
- module_info_classes(!.ModuleInfo, Classes),
+ module_info_get_instance_table(!.ModuleInfo, Instances),
+ module_info_get_class_table(!.ModuleInfo, Classes),
dead_proc_elim__initialize_class_methods(Classes, Instances,
Queue0, _, Needed1, Needed),
map__keys(Needed, Entities),
@@ -731,7 +731,7 @@
% make_hlds.m to force type specialization are also not needed.
% Here we add in those which are needed.
%
- module_info_type_spec_info(!.ModuleInfo,
+ module_info_get_type_spec_info(!.ModuleInfo,
type_spec_info(TypeSpecProcs0, TypeSpecForcePreds0,
SpecMap0, PragmaMap0)),
set__to_sorted_list(NeededPreds2, NeededPredList2),
@@ -795,7 +795,7 @@
% `:- external' or `:- pragma base_relation' declaration.
% magic.m will change the import_status to `exported' when it
% generates the interface procedure for a base relation.
- module_info_name(ModuleInfo, PredModule)
+ module_info_get_name(ModuleInfo, PredModule)
;
% Don't eliminate <foo>_init_any/1 predicates; modes.m may
% insert calls to them to initialize variables from inst `free'
Index: compiler/deep_profiling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deep_profiling.m,v
retrieving revision 1.36
diff -u -b -r1.36 deep_profiling.m
--- compiler/deep_profiling.m 13 Sep 2005 04:56:00 -0000 1.36
+++ compiler/deep_profiling.m 27 Sep 2005 06:39:29 -0000
@@ -64,7 +64,7 @@
:- import_module varset.
apply_deep_profiling_transformation(!ModuleInfo) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, deep_profile_tail_recursion,
TailRecursion),
(
@@ -536,7 +536,7 @@
svmap__set(TopCSD, CPointerType, !VarTypes),
svmap__set(MiddleCSD, CPointerType, !VarTypes),
svmap__set(ProcStaticVar, CPointerType, !VarTypes),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, use_activation_counts,
UseActivationCounts),
(
@@ -630,7 +630,7 @@
svmap__set(TopCSD, CPointerType, !VarTypes),
svmap__set(MiddleCSD, CPointerType, !VarTypes),
svmap__set(ProcStaticVar, CPointerType, !VarTypes),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, use_activation_counts,
UseActivationCounts),
(
@@ -739,7 +739,7 @@
svmap__set(TopCSD, CPointerType, !VarTypes),
svmap__set(MiddleCSD, CPointerType, !VarTypes),
svmap__set(ProcStaticVar, CPointerType, !VarTypes),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, use_activation_counts,
UseActivationCounts),
(
@@ -1199,7 +1199,7 @@
unexpected(this_file, "deep_profiling__wrap_call: aditi_builtin")
),
goal_info_get_code_model(GoalInfo0, GoalCodeModel),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals,
use_zeroing_for_ho_cycles, UseZeroing),
( UseZeroing = yes ->
Index: compiler/deforest.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deforest.m,v
retrieving revision 1.51
diff -u -b -r1.51 deforest.m
--- compiler/deforest.m 12 Sep 2005 05:24:04 -0000 1.51
+++ compiler/deforest.m 27 Sep 2005 06:39:30 -0000
@@ -137,13 +137,13 @@
% inference on the specialized versions after constraint propagation,
% because some nondet predicates will have become semidet.
list__foldl(reset_inferred_proc_determinism, Versions, !ModuleInfo),
- module_info_num_errors(!.ModuleInfo, Errors5),
+ module_info_get_num_errors(!.ModuleInfo, Errors5),
disable_det_warnings(OptionsToRestore, !IO),
determinism_pass(!ModuleInfo, !IO),
restore_det_warnings(OptionsToRestore, !IO),
- module_info_num_errors(!.ModuleInfo, Errors),
+ module_info_get_num_errors(!.ModuleInfo, Errors),
require(unify(Errors5, Errors),
"determinism errors after deforestation")
;
@@ -1669,7 +1669,7 @@
Goal2 = GoalExpr - GoalInfo,
pd_info_get_module_info(!.PDInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
simplify__find_simplifications(no, Globals, Simplifications0),
% Be a bit more aggressive with common structure elimination.
@@ -1900,7 +1900,7 @@
pd_debug__message("Running simplify\n", [], !IO),
pd_info_get_module_info(!.PDInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
simplify__find_simplifications(no, Globals, Simplifications),
pd_util__simplify_goal(Simplifications, Goal3, Goal4, !PDInfo),
Index: compiler/det_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_util.m,v
retrieving revision 1.30
diff -u -b -r1.30 det_util.m
--- compiler/det_util.m 13 Sep 2005 04:56:01 -0000 1.30
+++ compiler/det_util.m 27 Sep 2005 06:39:30 -0000
@@ -140,7 +140,7 @@
proc_info_vartypes(ProcInfo, VarTypes),
map__lookup(VarTypes, Var, Type),
( type_to_ctor_and_args(Type, TypeCtor, _) ->
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__search(TypeTable, TypeCtor, TypeDefn)
;
unexpected(this_file, "det_lookup_var_type")
Index: compiler/equiv_type_hlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/equiv_type_hlds.m,v
retrieving revision 1.19
diff -u -b -r1.19 equiv_type_hlds.m
--- compiler/equiv_type_hlds.m 22 Sep 2005 06:15:24 -0000 1.19
+++ compiler/equiv_type_hlds.m 27 Sep 2005 06:39:31 -0000
@@ -53,23 +53,23 @@
:- import_module varset.
replace_in_hlds(!ModuleInfo) :-
- module_info_types(!.ModuleInfo, Types0),
+ module_info_get_type_table(!.ModuleInfo, Types0),
map__foldl2(add_type_to_eqv_map, Types0, map__init, EqvMap,
set__init, EqvExportTypes),
set__fold(mark_eqv_exported_types, EqvExportTypes, Types0, Types1),
module_info_get_maybe_recompilation_info(!.ModuleInfo, MaybeRecompInfo0),
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
map__map_foldl(replace_in_type_defn(ModuleName, EqvMap), Types1, Types,
MaybeRecompInfo0, MaybeRecompInfo),
- module_info_set_types(Types, !ModuleInfo),
+ module_info_set_type_table(Types, !ModuleInfo),
module_info_set_maybe_recompilation_info(MaybeRecompInfo, !ModuleInfo),
InstCache0 = map__init,
- module_info_insts(!.ModuleInfo, Insts0),
+ module_info_get_inst_table(!.ModuleInfo, Insts0),
replace_in_inst_table(EqvMap, Insts0, Insts, InstCache0, InstCache1),
- module_info_set_insts(Insts, !ModuleInfo),
+ module_info_set_inst_table(Insts, !ModuleInfo),
module_info_predids(!.ModuleInfo, PredIds),
list__foldl2(replace_in_pred(EqvMap), PredIds, !ModuleInfo, InstCache1, _).
@@ -277,7 +277,7 @@
replace_in_pred(EqvMap, PredId, !ModuleInfo, !Cache) :-
some [!PredInfo, !EquivTypeInfo] (
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
module_info_pred_info(!.ModuleInfo, PredId, !:PredInfo),
module_info_get_maybe_recompilation_info(!.ModuleInfo, MaybeRecompInfo0),
@@ -734,7 +734,7 @@
).
replace_in_goal_expr(EqvMap, Goal0 @ unify(Var, _, _, _, _), Goal,
Changed, !Info) :-
- module_info_types(!.Info ^ module_info, Types),
+ module_info_get_type_table(!.Info ^ module_info, Types),
proc_info_vartypes(!.Info ^ proc_info, VarTypes),
proc_info_rtti_varmaps(!.Info ^ proc_info, RttiVarMaps),
map__lookup(VarTypes, Var, VarType),
Index: compiler/exception_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/exception_analysis.m,v
retrieving revision 1.11
diff -u -b -r1.11 exception_analysis.m
--- compiler/exception_analysis.m 12 Aug 2005 05:14:09 -0000 1.11
+++ compiler/exception_analysis.m 27 Sep 2005 11:17:48 -0000
@@ -177,7 +177,7 @@
%
% Update the exception info. with information about this SCC.
%
- module_info_exception_info(!.ModuleInfo, ExceptionInfo0),
+ module_info_get_exception_info(!.ModuleInfo, ExceptionInfo0),
Update = (pred(PPId::in, Info0::in, Info::out) is det :-
Info = Info0 ^ elem(PPId) := Status
),
@@ -465,7 +465,7 @@
list(pred_proc_id)::out) is semidet.
get_conditional_closures(ModuleInfo, Closures, Conditionals) :-
- module_info_exception_info(ModuleInfo, ExceptionInfo),
+ module_info_get_exception_info(ModuleInfo, ExceptionInfo),
set.fold(get_conditional_closure(ExceptionInfo), Closures,
[], Conditionals).
@@ -513,7 +513,7 @@
proc_result::out) is det.
check_nonrecursive_call(ModuleInfo, VarTypes, PPId, Args, !Result) :-
- module_info_exception_info(ModuleInfo, ExceptionInfo),
+ module_info_get_exception_info(ModuleInfo, ExceptionInfo),
( map.search(ExceptionInfo, PPId, CalleeExceptionStatus) ->
(
CalleeExceptionStatus = will_not_throw
@@ -711,10 +711,11 @@
% Stuff for intermodule optimization.
%
-:- pred exception_analysis.make_opt_int(module_info::in, io::di, io::uo) is det.
+:- pred exception_analysis.make_opt_int(module_info::in, io::di, io::uo)
+ is det.
exception_analysis.make_opt_int(ModuleInfo, !IO) :-
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
module_name_to_file_name(ModuleName, ".opt.tmp", no, OptFileName, !IO),
globals.io_lookup_bool_option(verbose, Verbose, !IO),
maybe_write_string(Verbose,
@@ -726,7 +727,7 @@
(
OptFileRes = ok(OptFile),
io.set_output_stream(OptFile, OldStream, !IO),
- module_info_exception_info(ModuleInfo, ExceptionInfo),
+ module_info_get_exception_info(ModuleInfo, ExceptionInfo),
module_info_predids(ModuleInfo, PredIds),
list.foldl(write_pragma_exceptions(ModuleInfo, ExceptionInfo),
PredIds, !IO),
@@ -750,7 +751,7 @@
; ImportStatus = opt_exported
),
not is_unify_or_compare_pred(PredInfo),
- module_info_type_spec_info(ModuleInfo, TypeSpecInfo),
+ module_info_get_type_spec_info(ModuleInfo, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, TypeSpecForcePreds, _, _),
not set.member(PredId, TypeSpecForcePreds),
%
Index: compiler/export.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/export.m,v
retrieving revision 1.88
diff -u -b -r1.88 export.m
--- compiler/export.m 12 Sep 2005 05:24:05 -0000 1.88
+++ compiler/export.m 27 Sep 2005 06:39:31 -0000
@@ -111,7 +111,7 @@
ForeignDecls = list__reverse(RevForeignDecls),
module_info_get_pragma_exported_procs(HLDS, ExportedProcs),
- module_info_globals(HLDS, Globals),
+ module_info_get_globals(HLDS, Globals),
export__get_foreign_export_decls_2(Preds, ExportedProcs, Globals,
HLDS, C_ExportDecls),
@@ -254,7 +254,7 @@
export__to_c(_Preds, [], _Module, []).
export__to_c(Preds, [E | ExportedProcs], Module, ExportedProcsCode) :-
E = pragma_exported_proc(PredId, ProcId, C_Function, _Ctxt),
- module_info_globals(Module, Globals),
+ module_info_get_globals(Module, Globals),
get_export_info(Preds, PredId, ProcId, Globals, Module, DeclareString,
C_RetType, MaybeDeclareRetval, MaybeFail, MaybeSucceed,
ArgInfoTypes),
Index: compiler/fact_table.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/fact_table.m,v
retrieving revision 1.64
diff -u -b -r1.64 fact_table.m
--- compiler/fact_table.m 22 Sep 2005 06:29:26 -0000 1.64
+++ compiler/fact_table.m 27 Sep 2005 06:39:31 -0000
@@ -213,7 +213,7 @@
see_input_handle_error(yes(Context), FileName, SeeResult, !IO),
(
SeeResult = ok,
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
fact_table_file_name(ModuleName, FileName, ".c", yes,
OutputFileName, !IO),
open_output_handle_error(yes(Context), OutputFileName,
Index: compiler/follow_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/follow_code.m,v
retrieving revision 1.73
diff -u -b -r1.73 follow_code.m
--- compiler/follow_code.m 24 Mar 2005 05:34:01 -0000 1.73
+++ compiler/follow_code.m 27 Sep 2005 06:39:32 -0000
@@ -52,7 +52,7 @@
move_follow_code_in_proc(_PredId, _ProcId, _PredInfo, !ProcInfo,
!ModuleInfo) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, follow_code, FollowCode),
globals__lookup_bool_option(Globals, prev_code, PrevCode),
Flags = FollowCode - PrevCode,
Index: compiler/follow_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/follow_vars.m,v
retrieving revision 1.74
diff -u -b -r1.74 follow_vars.m
--- compiler/follow_vars.m 30 Aug 2005 04:11:50 -0000 1.74
+++ compiler/follow_vars.m 27 Sep 2005 06:39:32 -0000
@@ -236,7 +236,7 @@
assoc_list__from_corresponding_lists(Args, ArgInfos, ArgsInfos),
arg_info__partition_args(ArgsInfos, InVarInfos, _),
assoc_list__keys(InVarInfos, InVars),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
call_gen__generic_call_info(Globals, GenericCall,
length(InVars), _, SpecifierArgInfos, FirstInput, _),
find_follow_vars_from_arginfo(SpecifierArgInfos,
Index: compiler/foreign.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/foreign.m,v
retrieving revision 1.49
diff -u -b -r1.49 foreign.m
--- compiler/foreign.m 12 Sep 2005 05:24:05 -0000 1.49
+++ compiler/foreign.m 27 Sep 2005 06:39:32 -0000
@@ -547,7 +547,7 @@
non_foreign_type(Type) = mercury(Type).
to_exported_type(ModuleInfo, Type) = ExportType :-
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
(
type_to_ctor_and_args(Type, TypeCtor, _),
map__search(Types, TypeCtor, TypeDefn)
@@ -574,7 +574,7 @@
foreign_type_body_to_exported_type(ModuleInfo, ForeignTypeBody, Name,
MaybeUserEqComp, Assertions) :-
ForeignTypeBody = foreign_type_body(MaybeIL, MaybeC, MaybeJava),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
(
Target = c,
Index: compiler/goal_form.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/goal_form.m,v
retrieving revision 1.17
diff -u -b -r1.17 goal_form.m
--- compiler/goal_form.m 13 Sep 2005 04:56:01 -0000 1.17
+++ compiler/goal_form.m 27 Sep 2005 06:39:32 -0000
@@ -255,7 +255,7 @@
goal_cannot_loop_expr(MaybeModuleInfo, Goal) :-
Goal = call(PredId, ProcId, _, _, _, _),
MaybeModuleInfo = yes(ModuleInfo),
- module_info_exception_info(ModuleInfo, ExceptionInfo),
+ module_info_get_exception_info(ModuleInfo, ExceptionInfo),
map.search(ExceptionInfo, proc(PredId, ProcId), will_not_throw).
goal_cannot_throw_expr(_, unify(_, _, _, Uni, _)) :-
% Complicated unifies are _non_builtin_
Index: compiler/higher_order.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/higher_order.m,v
retrieving revision 1.138
diff -u -b -r1.138 higher_order.m
--- compiler/higher_order.m 22 Sep 2005 06:15:24 -0000 1.138
+++ compiler/higher_order.m 27 Sep 2005 06:39:34 -0000
@@ -106,7 +106,7 @@
!.ModuleInfo, GoalSizes0, Params, counter.init(1)),
module_info_predids(!.ModuleInfo, PredIds0),
- module_info_type_spec_info(!.ModuleInfo, TypeSpecInfo),
+ module_info_get_type_spec_info(!.ModuleInfo, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, UserSpecPreds, _, _),
%
% Make sure the user requested specializations are processed first,
@@ -839,7 +839,7 @@
constant(BaseConsId, _)),
BaseConsId = base_typeclass_info_const(_, ClassId, Instance, _),
MaybeMethod = yes(Method),
- module_info_instances(ModuleInfo, Instances),
+ module_info_get_instance_table(ModuleInfo, Instances),
map.lookup(Instances, ClassId, InstanceList),
list.index1_det(InstanceList, Instance, InstanceDefn),
InstanceDefn = hlds_instance_defn(_, _, _,
@@ -885,7 +885,7 @@
typeclass_info_var(ClassConstraint)),
ClassConstraint = constraint(ClassName, ClassArgs),
list.length(ClassArgs, ClassArity),
- module_info_instances(ModuleInfo, InstanceTable),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
map.lookup(InstanceTable, class_id(ClassName, ClassArity), Instances),
pred_info_typevarset(CallerPredInfo0, TVarSet0),
find_matching_instance_method(Instances, Method, ClassArgs,
@@ -1081,7 +1081,7 @@
),
module_info_pred_proc_info(ModuleInfo0, CalledPred, CalledProc,
CalleePredInfo, CalleeProcInfo),
- module_info_globals(ModuleInfo0, Globals),
+ module_info_get_globals(ModuleInfo0, Globals),
globals.lookup_bool_option(Globals, special_preds, HaveSpecialPreds),
(
% Look for calls to unify/2 and compare/3 that can be specialized.
@@ -1099,7 +1099,7 @@
;
(
pred_info_is_imported(CalleePredInfo),
- module_info_type_spec_info(ModuleInfo0, TypeSpecInfo),
+ module_info_get_type_spec_info(ModuleInfo0, TypeSpecInfo),
TypeSpecInfo = type_spec_info(TypeSpecProcs, _, _, _),
\+ set.member(proc(CalledPred, CalledProc), TypeSpecProcs)
;
@@ -1275,7 +1275,7 @@
[], HigherOrderArgs0),
proc(CallerPredId, _) = !.Info ^ pred_proc_id,
- module_info_type_spec_info(ModuleInfo0, TypeSpecInfo),
+ module_info_get_type_spec_info(ModuleInfo0, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, ForceVersions, _, _),
IsUserSpecProc = ( set.member(CallerPredId, ForceVersions) -> yes ; no ),
(
@@ -1451,7 +1451,7 @@
CalleeUnivConstraint0 = constraint(ClassName, ConstraintArgs0),
list.length(ConstraintArgs0, ClassArity),
CalleeUnivConstraint = constraint(_, ConstraintArgs),
- module_info_instances(ModuleInfo, InstanceTable),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
map.search(InstanceTable, class_id(ClassName, ClassArity), Instances),
list.member(Instance, Instances),
instance_matches(ConstraintArgs, Instance, _, _, TVarSet, _),
@@ -1866,7 +1866,7 @@
map.search(PredVars, BaseTypeClassInfoVar,
constant(base_typeclass_info_const(_, ClassId, InstanceNum, _), _))
->
- module_info_instances(ModuleInfo, Instances),
+ module_info_get_instance_table(ModuleInfo, Instances),
map.lookup(Instances, ClassId, InstanceDefns),
list.index1_det(InstanceDefns, InstanceNum, InstanceDefn),
InstanceDefn = hlds_instance_defn(_,_,_,Constraints,_,_,_,_,_),
Index: compiler/hlds_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_code_util.m,v
retrieving revision 1.18
diff -u -b -r1.18 hlds_code_util.m
--- compiler/hlds_code_util.m 12 Sep 2005 05:24:07 -0000 1.18
+++ compiler/hlds_code_util.m 27 Sep 2005 06:39:34 -0000
@@ -59,7 +59,7 @@
%-----------------------------------------------------------------------------%
are_equivalence_types_expanded(ModuleInfo) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_data, HighLevelData),
HighLevelData = yes,
globals__get_target(Globals, Target),
@@ -114,7 +114,7 @@
),
% Given the type_ctor, lookup up the constructor tag
% table for that type
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__lookup(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
(
Index: compiler/hlds_module.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_module.m,v
retrieving revision 1.119
diff -u -b -r1.119 hlds_module.m
--- compiler/hlds_module.m 29 Sep 2005 06:33:05 -0000 1.119
+++ compiler/hlds_module.m 30 Sep 2005 06:39:18 -0000
@@ -107,14 +107,16 @@
% versions.
:- type type_spec_info
---> type_spec_info(
- set(pred_proc_id),
+ user_req_procs :: set(pred_proc_id),
% Procedures for which there are
% user-requested type specializations.
- set(pred_id),
- % Set of procedures which need to be
+
+ must_process_preds :: set(pred_id),
+ % Set of predicates which need to be
% processed by higher_order.m to
% produce those specialized versions.
- multi_map(pred_id, pred_id),
+
+ user_to_process_map :: multi_map(pred_id, pred_id),
% Map from predicates for which the
% user requested a type specialization
% to the list of predicates which must
@@ -124,7 +126,8 @@
% dead_proc_elim.m to avoid creating
% versions unnecessarily for versions
% in imported modules.
- multi_map(pred_id, pragma_type)
+
+ pragma_map :: multi_map(pred_id, pragma_type)
% Type spec pragmas to be placed in
% the `.opt' file if a predicate
% becomes exported.
@@ -214,56 +217,57 @@
:- pred module_info_set_partial_qualifier_info(partial_qualifier_info::in,
module_info::in, module_info::out) is det.
-:- pred module_info_types(module_info::in, type_table::out) is det.
+:- pred module_info_get_type_table(module_info::in, type_table::out) is det.
-:- pred module_info_set_types(type_table::in,
+:- pred module_info_set_type_table(type_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_insts(module_info::in, inst_table::out) is det.
+:- pred module_info_get_inst_table(module_info::in, inst_table::out) is det.
-:- pred module_info_set_insts(inst_table::in,
+:- pred module_info_set_inst_table(inst_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_modes(module_info::in, mode_table::out) is det.
+:- pred module_info_get_mode_table(module_info::in, mode_table::out) is det.
-:- pred module_info_set_modes(mode_table::in,
+:- pred module_info_set_mode_table(mode_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_ctors(module_info::in, cons_table::out) is det.
+:- pred module_info_get_cons_table(module_info::in, cons_table::out) is det.
-:- pred module_info_set_ctors(cons_table::in,
+:- pred module_info_set_cons_table(cons_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_classes(module_info::in, class_table::out) is det.
+:- pred module_info_get_class_table(module_info::in, class_table::out) is det.
-:- pred module_info_set_classes(class_table::in,
+:- pred module_info_set_class_table(class_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_instances(module_info::in, instance_table::out) is det.
+:- pred module_info_get_instance_table(module_info::in, instance_table::out)
+ is det.
-:- pred module_info_set_instances(instance_table::in,
+:- pred module_info_set_instance_table(instance_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_superclasses(module_info::in, superclass_table::out)
- is det.
+:- pred module_info_get_superclass_table(module_info::in,
+ superclass_table::out) is det.
-:- pred module_info_set_superclasses(superclass_table::in,
+:- pred module_info_set_superclass_table(superclass_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_assertion_table(module_info::in, assertion_table::out)
+:- pred module_info_get_assertion_table(module_info::in, assertion_table::out)
is det.
:- pred module_info_set_assertion_table(assertion_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_exclusive_table(module_info::in, exclusive_table::out)
+:- pred module_info_get_exclusive_table(module_info::in, exclusive_table::out)
is det.
:- pred module_info_set_exclusive_table(exclusive_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_ctor_field_table(module_info::in, ctor_field_table::out)
- is det.
+:- pred module_info_get_ctor_field_table(module_info::in,
+ ctor_field_table::out) is det.
:- pred module_info_set_ctor_field_table(ctor_field_table::in,
module_info::in, module_info::out) is det.
@@ -301,9 +305,9 @@
%-----------------------------------------------------------------------------%
-:- pred module_info_name(module_info::in, module_name::out) is det.
+:- pred module_info_get_name(module_info::in, module_name::out) is det.
-:- pred module_info_globals(module_info::in, globals::out) is det.
+:- pred module_info_get_globals(module_info::in, globals::out) is det.
:- pred module_info_set_globals(globals::in,
module_info::in, module_info::out) is det.
@@ -352,12 +356,12 @@
:- pred module_info_get_maybe_dependency_info(module_info::in,
maybe(dependency_info)::out) is det.
-:- pred module_info_num_errors(module_info::in, int::out) is det.
+:- pred module_info_get_num_errors(module_info::in, int::out) is det.
-:- pred module_info_unused_arg_info(module_info::in, unused_arg_info::out)
+:- pred module_info_get_unused_arg_info(module_info::in, unused_arg_info::out)
is det.
-:- pred module_info_exception_info(module_info::in, exception_info::out)
+:- pred module_info_get_exception_info(module_info::in, exception_info::out)
is det.
:- pred module_info_set_proc_requests(proc_requests::in,
@@ -378,13 +382,13 @@
:- pred module_info_set_pragma_exported_procs(list(pragma_exported_proc)::in,
module_info::in, module_info::out) is det.
-:- pred module_info_type_ctor_gen_infos(module_info::in,
+:- pred module_info_get_type_ctor_gen_infos(module_info::in,
list(type_ctor_gen_info)::out) is det.
:- pred module_info_set_type_ctor_gen_infos(list(type_ctor_gen_info)::in,
module_info::in, module_info::out) is det.
-:- pred module_info_stratified_preds(module_info::in, set(pred_id)::out)
+:- pred module_info_get_stratified_preds(module_info::in, set(pred_id)::out)
is det.
:- pred module_info_set_stratified_preds(set(pred_id)::in,
@@ -396,19 +400,20 @@
:- pred module_info_set_do_aditi_compilation(module_info::in, module_info::out)
is det.
-:- pred module_info_type_spec_info(module_info::in, type_spec_info::out)
+:- pred module_info_get_type_spec_info(module_info::in, type_spec_info::out)
is det.
:- pred module_info_set_type_spec_info(type_spec_info::in,
module_info::in, module_info::out) is det.
-:- pred module_info_no_tag_types(module_info::in, no_tag_type_table::out)
+:- pred module_info_get_no_tag_types(module_info::in, no_tag_type_table::out)
is det.
:- pred module_info_set_no_tag_types(no_tag_type_table::in,
module_info::in, module_info::out) is det.
-:- pred module_info_analysis_info(module_info::in, analysis_info::out) is det.
+:- pred module_info_get_analysis_info(module_info::in, analysis_info::out)
+ is det.
:- pred module_info_set_analysis_info(analysis_info::in,
module_info::in, module_info::out) is det.
@@ -426,7 +431,7 @@
:- pred module_info_set_complexity_proc_infos(list(complexity_proc_info)::in,
module_info::in, module_info::out) is det.
-:- pred module_info_aditi_top_down_procs(module_info::in,
+:- pred module_info_get_aditi_top_down_procs(module_info::in,
list(aditi_top_down_proc)::out) is det.
:- pred module_info_set_aditi_top_down_procs(module_info::in,
@@ -589,7 +594,7 @@
module_info::in, module_info::out) is det.
:- type module_info
- ---> module(
+ ---> module_info(
sub_info :: module_sub_info,
predicate_table :: predicate_table,
proc_requests :: proc_requests,
@@ -609,7 +614,7 @@
).
:- type module_sub_info
- ---> module_sub(
+ ---> module_sub_info(
module_name :: module_name,
globals :: globals,
contains_foreign_type :: bool,
@@ -731,13 +736,13 @@
map__init(FieldNameTable),
map__init(NoTagTypes),
- ModuleSubInfo = module_sub(Name, Globals, no, [], [], [], [], no, 0,
+ ModuleSubInfo = module_sub_info(Name, Globals, no, [], [], [], [], no, 0,
[], [], StratPreds, UnusedArgInfo, ExceptionInfo,
map.init, counter__init(1), ImportedModules,
IndirectlyImportedModules, no_aditi_compilation, TypeSpecInfo,
NoTagTypes, no, [], init_analysis_info(mmc),
[], counter__init(1), [], []),
- ModuleInfo = module(ModuleSubInfo, PredicateTable, Requests,
+ ModuleInfo = module_info(ModuleSubInfo, PredicateTable, Requests,
UnifyPredMap, QualifierInfo, Types, Insts, Modes, Ctors,
ClassTable, SuperClassTable, InstanceTable, AssertionTable,
ExclusiveTable, FieldNameTable, RecompInfo).
@@ -750,16 +755,16 @@
module_info_get_proc_requests(MI, MI ^ proc_requests).
module_info_get_special_pred_map(MI, MI ^ special_pred_map).
module_info_get_partial_qualifier_info(MI, MI ^ partial_qualifier_info).
-module_info_types(MI, MI ^ type_table).
-module_info_insts(MI, MI ^ inst_table).
-module_info_modes(MI, MI ^ mode_table).
-module_info_ctors(MI, MI ^ cons_table).
-module_info_classes(MI, MI ^ class_table).
-module_info_instances(MI, MI ^ instance_table).
-module_info_superclasses(MI, MI ^ superclass_table).
-module_info_assertion_table(MI, MI ^ assertion_table).
-module_info_exclusive_table(MI, MI ^ exclusive_table).
-module_info_ctor_field_table(MI, MI ^ ctor_field_table).
+module_info_get_type_table(MI, MI ^ type_table).
+module_info_get_inst_table(MI, MI ^ inst_table).
+module_info_get_mode_table(MI, MI ^ mode_table).
+module_info_get_cons_table(MI, MI ^ cons_table).
+module_info_get_class_table(MI, MI ^ class_table).
+module_info_get_instance_table(MI, MI ^ instance_table).
+module_info_get_superclass_table(MI, MI ^ superclass_table).
+module_info_get_assertion_table(MI, MI ^ assertion_table).
+module_info_get_exclusive_table(MI, MI ^ exclusive_table).
+module_info_get_ctor_field_table(MI, MI ^ ctor_field_table).
module_info_get_maybe_recompilation_info(MI, MI ^ maybe_recompilation_info).
%-----------------------------------------------------------------------------%
@@ -771,13 +776,13 @@
module_info_set_special_pred_map(SPM, MI, MI ^ special_pred_map := SPM).
module_info_set_partial_qualifier_info(PQ, MI,
MI ^ partial_qualifier_info := PQ).
-module_info_set_types(T, MI, MI ^ type_table := T).
-module_info_set_insts(I, MI, MI ^ inst_table := I).
-module_info_set_modes(M, MI, MI ^ mode_table := M).
-module_info_set_ctors(C, MI, MI ^ cons_table := C).
-module_info_set_classes(C, MI, MI ^ class_table := C).
-module_info_set_instances(I, MI, MI ^ instance_table := I).
-module_info_set_superclasses(S, MI, MI ^ superclass_table := S).
+module_info_set_type_table(T, MI, MI ^ type_table := T).
+module_info_set_inst_table(I, MI, MI ^ inst_table := I).
+module_info_set_mode_table(M, MI, MI ^ mode_table := M).
+module_info_set_cons_table(C, MI, MI ^ cons_table := C).
+module_info_set_class_table(C, MI, MI ^ class_table := C).
+module_info_set_instance_table(I, MI, MI ^ instance_table := I).
+module_info_set_superclass_table(S, MI, MI ^ superclass_table := S).
module_info_set_assertion_table(A, MI, MI ^ assertion_table := A).
module_info_set_exclusive_table(PXT, MI, MI ^ exclusive_table := PXT).
module_info_set_ctor_field_table(CF, MI, MI ^ ctor_field_table := CF).
@@ -789,8 +794,8 @@
% Various predicates which access the module_sub_info data structure
% via the module_info structure.
-module_info_name(MI, MI ^ sub_info ^ module_name).
-module_info_globals(MI, MI ^ sub_info ^ globals).
+module_info_get_name(MI, MI ^ sub_info ^ module_name).
+module_info_get_globals(MI, MI ^ sub_info ^ globals).
module_info_contains_foreign_type(MI) :-
MI ^ sub_info ^ contains_foreign_type = yes.
module_info_get_foreign_decl(MI, MI ^ sub_info ^ foreign_decl_info).
@@ -799,13 +804,13 @@
MI ^ sub_info ^ foreign_import_module_info).
module_info_get_maybe_dependency_info(MI,
MI ^ sub_info ^ maybe_dependency_info).
-module_info_num_errors(MI, MI ^ sub_info ^ num_errors).
+module_info_get_num_errors(MI, MI ^ sub_info ^ num_errors).
module_info_get_pragma_exported_procs(MI,
MI ^ sub_info ^ pragma_exported_procs).
-module_info_type_ctor_gen_infos(MI, MI ^ sub_info ^ type_ctor_gen_infos).
-module_info_stratified_preds(MI, MI ^ sub_info ^ must_be_stratified_preds).
-module_info_unused_arg_info(MI, MI ^ sub_info ^ unused_arg_info).
-module_info_exception_info(MI, MI ^ sub_info ^ exception_info).
+module_info_get_type_ctor_gen_infos(MI, MI ^ sub_info ^ type_ctor_gen_infos).
+module_info_get_stratified_preds(MI, MI ^ sub_info ^ must_be_stratified_preds).
+module_info_get_unused_arg_info(MI, MI ^ sub_info ^ unused_arg_info).
+module_info_get_exception_info(MI, MI ^ sub_info ^ exception_info).
module_info_get_lambdas_per_context(MI, MI ^ sub_info ^ lambdas_per_context).
module_info_get_model_non_pragma_counter(MI,
MI ^ sub_info ^ model_non_pragma_counter).
@@ -815,14 +820,14 @@
MI ^ sub_info ^ indirectly_imported_module_specifiers).
module_info_get_do_aditi_compilation(MI,
MI ^ sub_info ^ do_aditi_compilation).
-module_info_type_spec_info(MI, MI ^ sub_info ^ type_spec_info).
-module_info_no_tag_types(MI, MI ^ sub_info ^ no_tag_type_table).
-module_info_analysis_info(MI, MI ^ sub_info ^ analysis_info).
+module_info_get_type_spec_info(MI, MI ^ sub_info ^ type_spec_info).
+module_info_get_no_tag_types(MI, MI ^ sub_info ^ no_tag_type_table).
+module_info_get_analysis_info(MI, MI ^ sub_info ^ analysis_info).
module_info_get_maybe_complexity_proc_map(MI,
MI ^ sub_info ^ maybe_complexity_proc_map).
module_info_get_complexity_proc_infos(MI,
MI ^ sub_info ^ complexity_proc_infos).
-module_info_aditi_top_down_procs(MI, MI ^ sub_info ^ aditi_top_down_procs).
+module_info_get_aditi_top_down_procs(MI, MI ^ sub_info ^ aditi_top_down_procs).
module_info_next_aditi_top_down_proc(MI0, Proc, MI) :-
Counter0 = MI0 ^ sub_info ^ aditi_proc_counter,
@@ -837,7 +842,7 @@
module_info_new_user_init_pred(SymName, CName, MI0, MI) :-
InitPredCNames0 = MI0 ^ sub_info ^ user_init_pred_c_names,
UserInitPredNo = list__length(InitPredCNames0),
- module_info_name(MI0, ModuleSymName),
+ module_info_get_name(MI0, ModuleSymName),
ModuleName = prog_foreign__sym_name_mangle(ModuleSymName),
CName = string.format("%s__user_init_pred_%d",
[s(ModuleName), i(UserInitPredNo)]),
@@ -849,7 +854,7 @@
( assoc_list__search(InitPredCNames, SymName, CName0) ->
CName = CName0
;
- module_info_name(MI, ModuleSymName),
+ module_info_get_name(MI, ModuleSymName),
ModuleName = sym_name_to_string(ModuleSymName),
unexpected(ModuleName,
"lookup failure in module_info_user_init_pred_c_name")
@@ -862,7 +867,7 @@
module_info_new_user_final_pred(SymName, CName, MI0, MI) :-
FinalPredCNames0 = MI0 ^ sub_info ^ user_final_pred_c_names,
UserFinalPredNo = list.length(FinalPredCNames0),
- module_info_name(MI0, ModuleSymName),
+ module_info_get_name(MI0, ModuleSymName),
ModuleName = prog_foreign.sym_name_mangle(ModuleSymName),
CName = string.format("%s__user_final_pred_%d",
[s(ModuleName), i(UserFinalPredNo)]),
@@ -874,7 +879,7 @@
( assoc_list__search(FinalPredCNames, SymName, CName0) ->
CName = CName0
;
- module_info_name(MI, ModuleSymName),
+ module_info_get_name(MI, ModuleSymName),
ModuleName = sym_name_to_string(ModuleSymName),
unexpected(ModuleName,
"lookup failure in module_info_user_final_pred_c_name")
@@ -1015,20 +1020,20 @@
module_info_set_pred_info(PredId, PredInfo, !MI).
module_info_typeids(MI, TypeCtors) :-
- module_info_types(MI, Types),
+ module_info_get_type_table(MI, Types),
map__keys(Types, TypeCtors).
module_info_instids(MI, InstIds) :-
- module_info_insts(MI, InstTable),
+ module_info_get_inst_table(MI, InstTable),
inst_table_get_user_insts(InstTable, UserInstTable),
user_inst_table_get_inst_ids(UserInstTable, InstIds).
module_info_modeids(MI, ModeIds) :-
- module_info_modes(MI, Modes),
+ module_info_get_mode_table(MI, Modes),
mode_table_get_mode_ids(Modes, ModeIds).
module_info_consids(MI, ConsIds) :-
- module_info_ctors(MI, Ctors),
+ module_info_get_cons_table(MI, Ctors),
map__keys(Ctors, ConsIds).
module_info_dependency_info(MI, DepInfo) :-
@@ -1060,7 +1065,7 @@
module_info_set_maybe_dependency_info(no, !MI).
module_info_incr_errors(!MI) :-
- module_info_num_errors(!.MI, Errs0),
+ module_info_get_num_errors(!.MI, Errs0),
Errs = Errs0 + 1,
module_info_set_num_errors(Errs, !MI).
@@ -1089,26 +1094,26 @@
predicate_table_optimize(Preds0, Preds),
module_info_set_predicate_table(Preds, !ModuleInfo),
- module_info_types(!.ModuleInfo, Types0),
+ module_info_get_type_table(!.ModuleInfo, Types0),
map__optimize(Types0, Types),
- module_info_set_types(Types, !ModuleInfo),
+ module_info_set_type_table(Types, !ModuleInfo),
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_user_insts(InstTable0, Insts0),
user_inst_table_optimize(Insts0, Insts),
inst_table_set_user_insts(Insts, InstTable0, InstTable),
- module_info_set_insts(InstTable, !ModuleInfo),
+ module_info_set_inst_table(InstTable, !ModuleInfo),
- module_info_modes(!.ModuleInfo, Modes0),
+ module_info_get_mode_table(!.ModuleInfo, Modes0),
mode_table_optimize(Modes0, Modes),
- module_info_set_modes(Modes, !ModuleInfo),
+ module_info_set_mode_table(Modes, !ModuleInfo),
- module_info_ctors(!.ModuleInfo, Ctors0),
+ module_info_get_cons_table(!.ModuleInfo, Ctors0),
map__optimize(Ctors0, Ctors),
- module_info_set_ctors(Ctors, !ModuleInfo).
+ module_info_set_cons_table(Ctors, !ModuleInfo).
visible_module(VisibleModule, ModuleInfo) :-
- module_info_name(ModuleInfo, ThisModule),
+ module_info_get_name(ModuleInfo, ThisModule),
module_info_get_imported_module_specifiers(ModuleInfo, ImportedModules),
(
VisibleModule = ThisModule
@@ -1120,7 +1125,7 @@
).
module_info_get_all_deps(ModuleInfo, AllImports) :-
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Parents = get_ancestors(ModuleName),
module_info_get_imported_module_specifiers(ModuleInfo, DirectImports),
module_info_get_indirectly_imported_module_specifiers(ModuleInfo,
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.368
diff -u -b -r1.368 hlds_out.m
--- compiler/hlds_out.m 13 Sep 2005 04:56:04 -0000 1.368
+++ compiler/hlds_out.m 27 Sep 2005 06:39:35 -0000
@@ -737,12 +737,12 @@
hlds_out__write_hlds(Indent, Module, !IO) :-
module_info_get_imported_module_specifiers(Module, Imports),
module_info_preds(Module, PredTable),
- module_info_types(Module, TypeTable),
- module_info_insts(Module, InstTable),
- module_info_modes(Module, ModeTable),
- module_info_classes(Module, ClassTable),
- module_info_superclasses(Module, SuperClassTable),
- module_info_instances(Module, InstanceTable),
+ module_info_get_type_table(Module, TypeTable),
+ module_info_get_inst_table(Module, InstTable),
+ module_info_get_mode_table(Module, ModeTable),
+ module_info_get_class_table(Module, ClassTable),
+ module_info_get_superclass_table(Module, SuperClassTable),
+ module_info_get_instance_table(Module, InstanceTable),
hlds_out__write_header(Indent, Module, !IO),
globals__io_lookup_string_option(dump_hlds_options, Verbose, !IO),
( string__contains_char(Verbose, 'I') ->
@@ -779,7 +779,7 @@
hlds_out__write_header(Indent, Module, !IO) :-
hlds_out__write_indent(Indent, !IO),
io__write_string("% vim: ts=2 sw=2\n\n", !IO),
- module_info_name(Module, Name),
+ module_info_get_name(Module, Name),
hlds_out__write_indent(Indent, !IO),
io__write_string(":- module ", !IO),
prog_out__write_sym_name(Name, !IO),
@@ -799,7 +799,7 @@
is det.
hlds_out__write_footer(Indent, Module, !IO) :-
- module_info_name(Module, Name),
+ module_info_get_name(Module, Name),
hlds_out__write_indent(Indent, !IO),
io__write_string(":- end_module ", !IO),
prog_out__write_sym_name(Name, !IO),
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.180
diff -u -b -r1.180 hlds_pred.m
--- compiler/hlds_pred.m 19 Sep 2005 07:26:24 -0000 1.180
+++ compiler/hlds_pred.m 27 Sep 2005 06:39:35 -0000
@@ -1967,7 +1967,7 @@
% arguments need to be passed in, not just the ones that are used.
% Similarly if the address of a procedure of this predicate is taken,
% so that we can copy the closure.
- module_info_globals(ModuleInfo0, Globals),
+ module_info_get_globals(ModuleInfo0, Globals),
ExportStatus = local,
non_special_interface_should_use_typeinfo_liveness(ExportStatus,
IsAddressTaken, Globals, TypeInfoLiveness),
@@ -1990,7 +1990,7 @@
compute_arg_types_modes(ArgVars, VarTypes0, InstMap0, InstMap,
ArgTypes, ArgModes),
- module_info_name(ModuleInfo0, ModuleName),
+ module_info_get_name(ModuleInfo0, ModuleName),
SymName = qualified(ModuleName, PredName),
% Remove unneeded variables from the vartypes and varset.
@@ -2215,7 +2215,7 @@
;
pred_info_get_origin(PredInfo, special_pred(SpecialPred)),
SpecialPred = SpecialId - TypeCtor,
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
% If the search fails, then TypeCtor must be a builtin type
% constructor, such as the tuple constructor.
map__search(TypeTable, TypeCtor, TypeDefn),
@@ -3604,7 +3604,7 @@
AccessType = get,
FieldName = FuncName
),
- module_info_ctor_field_table(ModuleInfo, CtorFieldTable),
+ module_info_get_ctor_field_table(ModuleInfo, CtorFieldTable),
map__contains(CtorFieldTable, FieldName).
pred_info_is_field_access_function(ModuleInfo, PredInfo) :-
@@ -3658,7 +3658,7 @@
ModuleName = pred_info_module(PredInfo),
PredName = pred_info_name(PredInfo),
Arity = pred_info_orig_arity(PredInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, allow_inlining, AllowInlining),
globals__lookup_bool_option(Globals, inline_builtins, InlineBuiltins),
(
Index: compiler/inlining.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inlining.m,v
retrieving revision 1.127
diff -u -b -r1.127 inlining.m
--- compiler/inlining.m 12 Sep 2005 08:41:56 -0000 1.127
+++ compiler/inlining.m 27 Sep 2005 06:39:36 -0000
@@ -870,7 +870,7 @@
inlining__can_inline_proc(PredId, ProcId, BuiltinState, InlinePromisedPure,
CallingPredMarkers, ModuleInfo) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_code, HighLevelCode),
inlining__can_inline_proc_2(PredId, ProcId, BuiltinState,
HighLevelCode, InlinePromisedPure,
@@ -935,7 +935,7 @@
% Only inline foreign_code if it is appropriate for
% the target language.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
(
(
Index: compiler/inst_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inst_util.m,v
retrieving revision 1.39
diff -u -b -r1.39 inst_util.m
--- compiler/inst_util.m 28 Sep 2005 07:32:10 -0000 1.39
+++ compiler/inst_util.m 28 Sep 2005 07:39:01 -0000
@@ -155,7 +155,7 @@
!ModuleInfo) :-
% Check whether this pair of insts is already in the unify_insts table.
ThisInstPair = unify_inst(Live, InstA, InstB, UnifyIsReal),
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_unify_insts(InstTable0, UnifyInsts0),
( map__search(UnifyInsts0, ThisInstPair, Result) ->
( Result = known(UnifyInst, UnifyDet) ->
@@ -174,7 +174,7 @@
% Insert ThisInstPair into the table with value `unknown'.
svmap__det_insert(ThisInstPair, unknown, UnifyInsts0, UnifyInsts1),
inst_table_set_unify_insts(UnifyInsts1, InstTable0, InstTable1),
- module_info_set_insts(InstTable1, !ModuleInfo),
+ module_info_set_inst_table(InstTable1, !ModuleInfo),
% Unify the insts.
inst_expand(!.ModuleInfo, InstA, InstA2),
inst_expand(!.ModuleInfo, InstB, InstB2),
@@ -190,12 +190,12 @@
),
% Now update the value associated with ThisInstPair.
- module_info_insts(!.ModuleInfo, InstTable2),
+ module_info_get_inst_table(!.ModuleInfo, InstTable2),
inst_table_get_unify_insts(InstTable2, UnifyInsts2),
map__det_update(UnifyInsts2, ThisInstPair, known(Inst1, Det),
UnifyInsts),
inst_table_set_unify_insts(UnifyInsts, InstTable2, InstTable),
- module_info_set_insts(InstTable, !ModuleInfo)
+ module_info_set_inst_table(InstTable, !ModuleInfo)
),
% Avoid expanding recursive insts.
( inst_contains_instname(Inst1, !.ModuleInfo, ThisInstPair) ->
@@ -891,7 +891,7 @@
make_ground_inst(defined_inst(InstName), IsLive, Uniq, Real, Inst, Det,
!ModuleInfo) :-
% Check whether the inst name is already in the ground_inst table.
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_ground_insts(InstTable0, GroundInsts0),
GroundInstKey = ground_inst(InstName, IsLive, Uniq, Real),
(
@@ -914,7 +914,7 @@
GroundInsts0, GroundInsts1),
inst_table_set_ground_insts(GroundInsts1,
InstTable0, InstTable1),
- module_info_set_insts(InstTable1, !ModuleInfo),
+ module_info_set_inst_table(InstTable1, !ModuleInfo),
% Expand the inst name, and invoke ourself recursively on its
% expansion.
@@ -925,12 +925,12 @@
% Now that we have determined the resulting Inst, store the appropriate
% value `known(GroundInst, Det)' in the ground_inst table.
- module_info_insts(!.ModuleInfo, InstTable2),
+ module_info_get_inst_table(!.ModuleInfo, InstTable2),
inst_table_get_ground_insts(InstTable2, GroundInsts2),
svmap__det_update(GroundInstKey, known(GroundInst, Det),
GroundInsts2, GroundInsts),
inst_table_set_ground_insts(GroundInsts, InstTable2, InstTable),
- module_info_set_insts(InstTable, !ModuleInfo)
+ module_info_set_inst_table(InstTable, !ModuleInfo)
),
% Avoid expanding recursive insts.
( inst_contains_instname(GroundInst, !.ModuleInfo, GroundInstKey) ->
@@ -1000,7 +1000,7 @@
!ModuleInfo) :-
% check whether the inst name is already in the
% any_inst table
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_any_insts(InstTable0, AnyInsts0),
AnyInstKey = any_inst(InstName, IsLive, Uniq, Real),
(
@@ -1021,7 +1021,7 @@
% for the moment.
svmap__det_insert(AnyInstKey, unknown, AnyInsts0, AnyInsts1),
inst_table_set_any_insts(AnyInsts1, InstTable0, InstTable1),
- module_info_set_insts(InstTable1, !ModuleInfo),
+ module_info_set_inst_table(InstTable1, !ModuleInfo),
% Expand the inst name, and invoke ourself recursively on its
% expansion.
@@ -1032,12 +1032,12 @@
% Now that we have determined the resulting Inst, store the appropriate
% value `known(AnyInst, Det)' in the any_inst table.
- module_info_insts(!.ModuleInfo, InstTable2),
+ module_info_get_inst_table(!.ModuleInfo, InstTable2),
inst_table_get_any_insts(InstTable2, AnyInsts2),
svmap__det_update(AnyInstKey, known(AnyInst, Det),
AnyInsts2, AnyInsts),
inst_table_set_any_insts(AnyInsts, InstTable2, InstTable),
- module_info_set_insts(InstTable, !ModuleInfo)
+ module_info_set_inst_table(InstTable, !ModuleInfo)
),
% Avoid expanding recursive insts.
( inst_contains_instname(AnyInst, !.ModuleInfo, AnyInstKey) ->
@@ -1150,7 +1150,7 @@
error("make_shared_inst(abstract_inst)").
make_shared_inst(defined_inst(InstName), Inst, !ModuleInfo) :-
% Check whether the inst name is already in the shared_inst table.
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_shared_insts(InstTable0, SharedInsts0),
( map__search(SharedInsts0, InstName, Result) ->
( Result = known(SharedInst0) ->
@@ -1163,7 +1163,7 @@
% for the moment.
svmap__det_insert(InstName, unknown, SharedInsts0, SharedInsts1),
inst_table_set_shared_insts(SharedInsts1, InstTable0, InstTable1),
- module_info_set_insts(InstTable1, !ModuleInfo),
+ module_info_set_inst_table(InstTable1, !ModuleInfo),
% Expand the inst name, and invoke ourself recursively on its
% expansion.
@@ -1173,13 +1173,13 @@
% Now that we have determined the resulting Inst, store the appropriate
% value `known(SharedInst)' in the shared_inst table.
- module_info_insts(!.ModuleInfo, InstTable2),
+ module_info_get_inst_table(!.ModuleInfo, InstTable2),
inst_table_get_shared_insts(InstTable2, SharedInsts2),
svmap__det_update(InstName, known(SharedInst),
SharedInsts2, SharedInsts),
inst_table_set_shared_insts(SharedInsts,
InstTable2, InstTable),
- module_info_set_insts(InstTable, !ModuleInfo)
+ module_info_set_inst_table(InstTable, !ModuleInfo)
),
% Avoid expanding recursive insts.
( inst_contains_instname(SharedInst, !.ModuleInfo, InstName) ->
@@ -1240,7 +1240,7 @@
error("make_mostly_uniq_inst(abstract_inst)").
make_mostly_uniq_inst(defined_inst(InstName), Inst, !ModuleInfo) :-
% Check whether the inst name is already in the mostly_uniq_inst table.
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_mostly_uniq_insts(InstTable0, NondetLiveInsts0),
( map__search(NondetLiveInsts0, InstName, Result) ->
( Result = known(NondetLiveInst0) ->
@@ -1254,7 +1254,7 @@
map__det_insert(NondetLiveInsts0, InstName, unknown, NondetLiveInsts1),
inst_table_set_mostly_uniq_insts(NondetLiveInsts1,
InstTable0, InstTable1),
- module_info_set_insts(InstTable1, !ModuleInfo),
+ module_info_set_inst_table(InstTable1, !ModuleInfo),
% Expand the inst name, and invoke ourself recursively on its
% expansion.
@@ -1264,13 +1264,13 @@
% Now that we have determined the resulting Inst, store the appropriate
% value `known(NondetLiveInst)' in the mostly_uniq_inst table.
- module_info_insts(!.ModuleInfo, InstTable2),
+ module_info_get_inst_table(!.ModuleInfo, InstTable2),
inst_table_get_mostly_uniq_insts(InstTable2, NondetLiveInsts2),
svmap__det_update(InstName, known(NondetLiveInst),
NondetLiveInsts2, NondetLiveInsts),
inst_table_set_mostly_uniq_insts(NondetLiveInsts,
InstTable2, InstTable),
- module_info_set_insts(InstTable, !ModuleInfo)
+ module_info_set_inst_table(InstTable, !ModuleInfo)
),
% avoid expanding recursive insts
( inst_contains_instname(NondetLiveInst, !.ModuleInfo, InstName) ->
@@ -1321,7 +1321,7 @@
inst_merge(InstA, InstB, MaybeType, Inst, !ModuleInfo) :-
% Check whether this pair of insts is already in the merge_insts table.
- module_info_insts(!.ModuleInfo, InstTable0),
+ module_info_get_inst_table(!.ModuleInfo, InstTable0),
inst_table_get_merge_insts(InstTable0, MergeInstTable0),
ThisInstPair = InstA - InstB,
( map__search(MergeInstTable0, ThisInstPair, Result) ->
@@ -1335,18 +1335,18 @@
map__det_insert(MergeInstTable0, ThisInstPair, unknown,
MergeInstTable1),
inst_table_set_merge_insts(MergeInstTable1, InstTable0, InstTable1),
- module_info_set_insts(InstTable1, !ModuleInfo),
+ module_info_set_inst_table(InstTable1, !ModuleInfo),
% Merge the insts.
inst_merge_2(InstA, InstB, MaybeType, Inst0, !ModuleInfo),
% Now update the value associated with ThisInstPair.
- module_info_insts(!.ModuleInfo, InstTable2),
+ module_info_get_inst_table(!.ModuleInfo, InstTable2),
inst_table_get_merge_insts(InstTable2, MergeInstTable2),
map__det_update(MergeInstTable2, ThisInstPair, known(Inst0),
MergeInstTable3),
inst_table_set_merge_insts(MergeInstTable3, InstTable2, InstTable3),
- module_info_set_insts(InstTable3, !ModuleInfo)
+ module_info_set_inst_table(InstTable3, !ModuleInfo)
),
% Avoid expanding recursive insts.
( inst_contains_instname(Inst0, !.ModuleInfo, merge_inst(InstA, InstB)) ->
Index: compiler/intermod.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/intermod.m,v
retrieving revision 1.177
diff -u -b -r1.177 intermod.m
--- compiler/intermod.m 12 Sep 2005 08:41:56 -0000 1.177
+++ compiler/intermod.m 27 Sep 2005 11:32:30 -0000
@@ -55,27 +55,26 @@
% they must be called after unused_args.m appends its information
% to the .opt.tmp file.
%
-:- pred intermod__write_optfile(module_info::in, module_info::out,
- io::di, io::uo) is det.
+:- pred write_optfile(module_info::in, module_info::out, io::di, io::uo)
+ is det.
% Add the items from the .opt files of imported modules to
% the items for this module.
%
-:- pred intermod__grab_optfiles(module_imports::in, module_imports::out,
- bool::out, io::di, io::uo) is det.
+:- pred grab_optfiles(module_imports::in, module_imports::out, bool::out,
+ io::di, io::uo) is det.
% Make sure that local preds which have been exported in the .opt
% file get an exported(_) label.
%
-:- pred intermod__adjust_pred_import_status(module_info::in, module_info::out,
+:- pred adjust_pred_import_status(module_info::in, module_info::out,
io::di, io::uo) is det.
:- type opt_file_type
---> opt
; trans_opt.
- % intermod__update_error_status(OptFileType, FileName, Error, Messages,
- % !Status)
+ % update_error_status(OptFileType, FileName, Error, Messages, !Status):
%
% Work out whether any fatal errors have occurred while reading
% `.opt' files, updating Status0 if there were fatal errors.
@@ -87,9 +86,8 @@
%
% This is also used by trans_opt.m for reading `.trans_opt' files.
%
-:- pred intermod__update_error_status(opt_file_type::in, string::in,
- module_error::in, message_list::in, bool::in, bool::out, io::di, io::uo)
- is det.
+:- pred update_error_status(opt_file_type::in, string::in, module_error::in,
+ message_list::in, bool::in, bool::out, io::di, io::uo) is det.
%-----------------------------------------------------------------------------%
%-----------------------------------------------------------------------------%
@@ -136,14 +134,14 @@
%-----------------------------------------------------------------------------%
-intermod__write_optfile(!ModuleInfo, !IO) :-
+write_optfile(!ModuleInfo, !IO) :-
% We don't want to output line numbers in the .opt files,
% since that causes spurious changes to the .opt files
% when you make trivial changes (e.g. add comments) to the source files.
globals__io_lookup_bool_option(line_numbers, LineNumbers, !IO),
globals__io_set_option(line_numbers, bool(no), !IO),
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
module_name_to_file_name(ModuleName, ".opt.tmp", yes, TmpName, !IO),
io__open_output(TmpName, Result2, !IO),
(
@@ -155,7 +153,7 @@
Result2 = ok(FileStream),
io__set_output_stream(FileStream, OutputStream, !IO),
module_info_predids(!.ModuleInfo, RealPredIds),
- module_info_assertion_table(!.ModuleInfo, AssertionTable),
+ module_info_get_assertion_table(!.ModuleInfo, AssertionTable),
assertion_table_pred_ids(AssertionTable, AssertPredIds),
list__append(AssertPredIds, RealPredIds, PredIds),
globals__io_lookup_int_option(intermod_inline_simple_threshold,
@@ -166,11 +164,11 @@
globals__io_lookup_bool_option(intermod_unused_args, UnusedArgs, !IO),
some [!IntermodInfo] (
init_intermod_info(!.ModuleInfo, !:IntermodInfo),
- intermod__gather_preds(PredIds, yes, Threshold,
- HigherOrderSizeLimit, Deforestation, !IntermodInfo),
- intermod__gather_instances(!IntermodInfo),
- intermod__gather_types(!IntermodInfo),
- intermod__write_intermod_info(!.IntermodInfo, !IO),
+ gather_preds(PredIds, yes, Threshold, HigherOrderSizeLimit,
+ Deforestation, !IntermodInfo),
+ gather_instances(!IntermodInfo),
+ gather_types(!IntermodInfo),
+ write_intermod_info(!.IntermodInfo, !IO),
intermod_info_get_module_info(!.IntermodInfo, !:ModuleInfo),
io__set_output_stream(OutputStream, _, !IO),
io__close_output(FileStream, !IO),
@@ -189,26 +187,26 @@
%
% Predicates to gather stuff to output to .opt file.
-:- pred intermod__gather_preds(list(pred_id)::in, bool::in, int::in,
- int::in, bool::in, intermod_info::in, intermod_info::out) is det.
+:- pred gather_preds(list(pred_id)::in, bool::in, int::in, int::in, bool::in,
+ intermod_info::in, intermod_info::out) is det.
-intermod__gather_preds(AllPredIds, CollectTypes, InlineThreshold,
- HigherOrderSizeLimit, Deforestation, !Info) :-
+gather_preds(AllPredIds, CollectTypes, InlineThreshold, HigherOrderSizeLimit,
+ Deforestation, !Info) :-
% First gather exported preds.
ProcessLocalPreds = no,
- intermod__gather_pred_list(AllPredIds, ProcessLocalPreds, CollectTypes,
+ gather_pred_list(AllPredIds, ProcessLocalPreds, CollectTypes,
InlineThreshold, HigherOrderSizeLimit, Deforestation, !Info),
% Then gather preds used by exported preds (recursively).
set__init(ExtraExportedPreds0),
- intermod__gather_preds_2(ExtraExportedPreds0, CollectTypes,
- InlineThreshold, HigherOrderSizeLimit, Deforestation, !Info).
+ gather_preds_2(ExtraExportedPreds0, CollectTypes, InlineThreshold,
+ HigherOrderSizeLimit, Deforestation, !Info).
-:- pred intermod__gather_preds_2(set(pred_id)::in, bool::in, int::in,
- int::in, bool::in, intermod_info::in, intermod_info::out) is det.
+:- pred gather_preds_2(set(pred_id)::in, bool::in, int::in, int::in, bool::in,
+ intermod_info::in, intermod_info::out) is det.
-intermod__gather_preds_2(ExtraExportedPreds0, CollectTypes,
- InlineThreshold, HigherOrderSizeLimit, Deforestation, !Info) :-
+gather_preds_2(ExtraExportedPreds0, CollectTypes, InlineThreshold,
+ HigherOrderSizeLimit, Deforestation, !Info) :-
intermod_info_get_pred_decls(!.Info, ExtraExportedPreds),
NewlyExportedPreds = set__to_sorted_list(
ExtraExportedPreds `set__difference` ExtraExportedPreds0),
@@ -217,23 +215,22 @@
;
NewlyExportedPreds = [_ | _],
ProcessLocalPreds = yes,
- intermod__gather_pred_list(NewlyExportedPreds, ProcessLocalPreds,
- CollectTypes, InlineThreshold, HigherOrderSizeLimit, Deforestation,
- !Info),
- intermod__gather_preds_2(ExtraExportedPreds, CollectTypes,
- InlineThreshold, HigherOrderSizeLimit, Deforestation, !Info)
+ gather_pred_list(NewlyExportedPreds, ProcessLocalPreds, CollectTypes,
+ InlineThreshold, HigherOrderSizeLimit, Deforestation, !Info),
+ gather_preds_2(ExtraExportedPreds, CollectTypes, InlineThreshold,
+ HigherOrderSizeLimit, Deforestation, !Info)
).
-:- pred intermod__gather_pred_list(list(pred_id)::in, bool::in, bool::in,
+:- pred gather_pred_list(list(pred_id)::in, bool::in, bool::in,
int::in, int::in, bool::in, intermod_info::in, intermod_info::out) is det.
-intermod__gather_pred_list([], _, _, _, _, _, !Info).
-intermod__gather_pred_list([PredId | PredIds], ProcessLocalPreds, CollectTypes,
+gather_pred_list([], _, _, _, _, _, !Info).
+gather_pred_list([PredId | PredIds], ProcessLocalPreds, CollectTypes,
InlineThreshold, HigherOrderSizeLimit, Deforestation, !Info) :-
intermod_info_get_module_info(!.Info, ModuleInfo0),
module_info_preds(ModuleInfo0, PredTable0),
map__lookup(PredTable0, PredId, PredInfo0),
- module_info_type_spec_info(ModuleInfo0, TypeSpecInfo),
+ module_info_get_type_spec_info(ModuleInfo0, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, TypeSpecForcePreds, _, _),
pred_info_clauses_info(PredInfo0, ClausesInfo0),
(
@@ -244,14 +241,14 @@
%
clauses_info_explicit_vartypes(ClausesInfo0, ExplicitVarTypes),
map__is_empty(ExplicitVarTypes),
- intermod__should_be_processed(ProcessLocalPreds, PredId, PredInfo0,
+ should_be_processed(ProcessLocalPreds, PredId, PredInfo0,
TypeSpecForcePreds, InlineThreshold, HigherOrderSizeLimit,
Deforestation, ModuleInfo0)
->
SavedInfo = !.Info,
% Write a declaration to the `.opt' file for
% `exported_to_submodules' predicates.
- intermod__add_proc(PredId, DoWrite0, !Info),
+ add_proc(PredId, DoWrite0, !Info),
clauses_info_clauses_rep(ClausesInfo0, ClausesRep0),
(
DoWrite0 = yes,
@@ -260,7 +257,7 @@
intermod_info_set_var_types(VarTypes, !Info),
intermod_info_set_tvarset(TVarSet, !Info),
get_clause_list(ClausesRep0, Clauses0),
- intermod__traverse_clauses(Clauses0, Clauses, DoWrite, !Info),
+ traverse_clauses(Clauses0, Clauses, DoWrite, !Info),
set_clause_list(Clauses, ClausesRep)
;
DoWrite0 = no,
@@ -293,16 +290,14 @@
;
true
),
- intermod__gather_pred_list(PredIds, ProcessLocalPreds, CollectTypes,
+ gather_pred_list(PredIds, ProcessLocalPreds, CollectTypes,
InlineThreshold, HigherOrderSizeLimit, Deforestation, !Info).
-:- pred intermod__should_be_processed(bool::in, pred_id::in, pred_info::in,
+:- pred should_be_processed(bool::in, pred_id::in, pred_info::in,
set(pred_id)::in, int::in, int::in, bool::in,
module_info::in) is semidet.
-intermod__should_be_processed(ProcessLocalPreds, PredId, PredInfo,
- TypeSpecForcePreds, InlineThreshold, HigherOrderSizeLimit,
- Deforestation, ModuleInfo) :-
+should_be_processed(ProcessLocalPreds, PredId, PredInfo, TypeSpecForcePreds, InlineThreshold, HigherOrderSizeLimit, Deforestation, ModuleInfo) :-
(
ProcessLocalPreds = no,
( pred_info_is_exported(PredInfo)
@@ -344,7 +339,7 @@
\+ set__member(PredId, TypeSpecForcePreds),
% No point exporting code which isn't very inlinable.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
\+ clauses_contain_noninlinable_foreign_code(Target, Clauses),
@@ -394,16 +389,16 @@
clauses_contain_noninlinable_foreign_code(Target, [_ | Cs]) :-
clauses_contain_noninlinable_foreign_code(Target, Cs).
-:- pred intermod__traverse_clauses(list(clause)::in, list(clause)::out,
+:- pred traverse_clauses(list(clause)::in, list(clause)::out,
bool::out, intermod_info::in, intermod_info::out) is det.
-intermod__traverse_clauses([], [], yes, !Info).
-intermod__traverse_clauses([clause(P, Goal0, L, C) | Clauses0],
+traverse_clauses([], [], yes, !Info).
+traverse_clauses([clause(P, Goal0, L, C) | Clauses0],
[clause(P, Goal, L, C) | Clauses], DoWrite, !Info) :-
- intermod__traverse_goal(Goal0, Goal, DoWrite1, !Info),
+ traverse_goal(Goal0, Goal, DoWrite1, !Info),
(
DoWrite1 = yes,
- intermod__traverse_clauses(Clauses0, Clauses, DoWrite, !Info)
+ traverse_clauses(Clauses0, Clauses, DoWrite, !Info)
;
DoWrite1 = no,
Clauses = Clauses0,
@@ -475,116 +470,111 @@
% Go over the goal of an exported proc looking for proc decls, types,
% insts and modes that we need to write to the optfile.
%
-:- pred intermod__traverse_goal(hlds_goal::in, hlds_goal::out, bool::out,
+:- pred traverse_goal(hlds_goal::in, hlds_goal::out, bool::out,
intermod_info::in, intermod_info::out) is det.
-intermod__traverse_goal(conj(Goals0) - Info, conj(Goals) - Info, DoWrite,
- !Info) :-
- intermod__traverse_list_of_goals(Goals0, Goals, DoWrite, !Info).
-intermod__traverse_goal(par_conj(Goals0) - Info, par_conj(Goals) - Info,
- DoWrite, !Info) :-
- intermod__traverse_list_of_goals(Goals0, Goals, DoWrite, !Info).
-intermod__traverse_goal(disj(Goals0) - Info, disj(Goals) - Info, DoWrite,
+traverse_goal(conj(Goals0) - Info, conj(Goals) - Info, DoWrite, !Info) :-
+ traverse_list_of_goals(Goals0, Goals, DoWrite, !Info).
+traverse_goal(par_conj(Goals0) - Info, par_conj(Goals) - Info, DoWrite,
!Info) :-
- intermod__traverse_list_of_goals(Goals0, Goals, DoWrite, !Info).
-intermod__traverse_goal(Goal, Goal, DoWrite, !Info) :-
+ traverse_list_of_goals(Goals0, Goals, DoWrite, !Info).
+traverse_goal(disj(Goals0) - Info, disj(Goals) - Info, DoWrite, !Info) :-
+ traverse_list_of_goals(Goals0, Goals, DoWrite, !Info).
+traverse_goal(Goal, Goal, DoWrite, !Info) :-
Goal = call(PredId, _, _, _, _, _) - _,
% Ensure that the called predicate will be exported.
- intermod__add_proc(PredId, DoWrite, !Info).
-intermod__traverse_goal(Goal @ generic_call(CallType, _, _, _) - Info,
+ add_proc(PredId, DoWrite, !Info).
+traverse_goal(Goal @ generic_call(CallType, _, _, _) - Info,
Goal - Info, DoWrite, !Info) :-
( CallType = higher_order(_, _, _, _), DoWrite = yes
; CallType = class_method(_, _, _, _), DoWrite = no
; CallType = cast(_), DoWrite = no
; CallType = aditi_builtin(_, _), DoWrite = yes
).
-intermod__traverse_goal(switch(Var, CanFail, Cases0) - Info,
+traverse_goal(switch(Var, CanFail, Cases0) - Info,
switch(Var, CanFail, Cases) - Info, DoWrite, !Info) :-
- intermod__traverse_cases(Cases0, Cases, DoWrite, !Info).
+ traverse_cases(Cases0, Cases, DoWrite, !Info).
% Export declarations for preds used in higher order pred constants
% or function calls.
-intermod__traverse_goal(unify(LVar, RHS0, C, D, E) - Info,
+traverse_goal(unify(LVar, RHS0, C, D, E) - Info,
unify(LVar, RHS, C, D, E) - Info, DoWrite, !Info) :-
- intermod__module_qualify_unify_rhs(LVar, RHS0, RHS, DoWrite, !Info).
-intermod__traverse_goal(not(Goal0) - Info, not(Goal) - Info, DoWrite, !Info) :-
- intermod__traverse_goal(Goal0, Goal, DoWrite, !Info).
-intermod__traverse_goal(scope(Reason, Goal0) - Info,
+ module_qualify_unify_rhs(LVar, RHS0, RHS, DoWrite, !Info).
+traverse_goal(not(Goal0) - Info, not(Goal) - Info, DoWrite, !Info) :-
+ traverse_goal(Goal0, Goal, DoWrite, !Info).
+traverse_goal(scope(Reason, Goal0) - Info,
scope(Reason, Goal) - Info, DoWrite, !Info) :-
- intermod__traverse_goal(Goal0, Goal, DoWrite, !Info).
-intermod__traverse_goal(if_then_else(Vars, Cond0, Then0, Else0) - Info,
+ traverse_goal(Goal0, Goal, DoWrite, !Info).
+traverse_goal(if_then_else(Vars, Cond0, Then0, Else0) - Info,
if_then_else(Vars, Cond, Then, Else) - Info, DoWrite, !Info) :-
- intermod__traverse_goal(Cond0, Cond, DoWrite1, !Info),
- intermod__traverse_goal(Then0, Then, DoWrite2, !Info),
- intermod__traverse_goal(Else0, Else, DoWrite3, !Info),
+ traverse_goal(Cond0, Cond, DoWrite1, !Info),
+ traverse_goal(Then0, Then, DoWrite2, !Info),
+ traverse_goal(Else0, Else, DoWrite3, !Info),
bool__and_list([DoWrite1, DoWrite2, DoWrite3], DoWrite).
% Inlineable exported pragma_foreign_code goals can't use any
% non-exported types, so we just write out the clauses.
-intermod__traverse_goal(Goal @ foreign_proc(_, _, _, _, _, _) - Info,
+traverse_goal(Goal @ foreign_proc(_, _, _, _, _, _) - Info,
Goal - Info, yes, !Info).
-intermod__traverse_goal(shorthand(_) - _, _, _, !Info) :-
+traverse_goal(shorthand(_) - _, _, _, !Info) :-
% These should have been expanded out by now.
- error("intermod__traverse_goal: unexpected shorthand").
+ error("traverse_goal: unexpected shorthand").
-:- pred intermod__traverse_list_of_goals(hlds_goals::in, hlds_goals::out,
+:- pred traverse_list_of_goals(hlds_goals::in, hlds_goals::out,
bool::out, intermod_info::in, intermod_info::out) is det.
-intermod__traverse_list_of_goals([], [], yes, !Info).
-intermod__traverse_list_of_goals([Goal0 | Goals0], [Goal | Goals], !:DoWrite,
- !Info) :-
- intermod__traverse_goal(Goal0, Goal, !:DoWrite, !Info),
+traverse_list_of_goals([], [], yes, !Info).
+traverse_list_of_goals([Goal0 | Goals0], [Goal | Goals], !:DoWrite, !Info) :-
+ traverse_goal(Goal0, Goal, !:DoWrite, !Info),
(
!.DoWrite = yes,
- intermod__traverse_list_of_goals(Goals0, Goals, !:DoWrite, !Info)
+ traverse_list_of_goals(Goals0, Goals, !:DoWrite, !Info)
;
!.DoWrite = no,
Goals = Goals0
).
-:- pred intermod__traverse_cases(list(case)::in, list(case)::out, bool::out,
+:- pred traverse_cases(list(case)::in, list(case)::out, bool::out,
intermod_info::in, intermod_info::out) is det.
-intermod__traverse_cases([], [], yes, !Info).
-intermod__traverse_cases([case(F, Goal0) | Cases0],
+traverse_cases([], [], yes, !Info).
+traverse_cases([case(F, Goal0) | Cases0],
[case(F, Goal) | Cases], !:DoWrite, !Info) :-
- intermod__traverse_goal(Goal0, Goal, !:DoWrite, !Info),
+ traverse_goal(Goal0, Goal, !:DoWrite, !Info),
(
!.DoWrite = yes,
- intermod__traverse_cases(Cases0, Cases, !:DoWrite, !Info)
+ traverse_cases(Cases0, Cases, !:DoWrite, !Info)
;
!.DoWrite = no,
Cases = Cases0
).
+ % add_proc/4 tries to do what ever is necessary to ensure that the
+ % specified predicate will be exported, so that it can be called from
+ % clauses in the `.opt' file. If it can't, then it returns DoWrite = no,
+ % which will prevent the caller from being included in the `.opt' file.
+ %
+ % If a proc called within an exported proc is local, we need to add
+ % a declaration for the called proc to the .opt file. If a proc called
+ % within an exported proc is from a different module, we need to include
+ % an `:- import_module' declaration to import that module in the `.opt'
+ % file.
%
- % intermod__add_proc/4 tries to do what ever is necessary to
- % ensure that the specified predicate will be exported,
- % so that it can be called from clauses in the `.opt' file.
- % If it can't, then it returns DoWrite = no, which will
- % prevent the caller from being included in the `.opt' file.
- %
- % If a proc called within an exported proc is local, we need
- % to add a declaration for the called proc to the .opt file.
- % If a proc called within an exported proc is from a different
- % module, we need to include an `:- import_module' declaration
- % to import that module in the `.opt' file.
- %
-:- pred intermod__add_proc(pred_id::in, bool::out,
+:- pred add_proc(pred_id::in, bool::out,
intermod_info::in, intermod_info::out) is det.
-intermod__add_proc(PredId, DoWrite, !Info) :-
+add_proc(PredId, DoWrite, !Info) :-
( PredId = invalid_pred_id ->
% This will happen for type class instance methods defined using
% the clause syntax. Currently we can't handle intermodule
% optimization of those.
DoWrite = no
;
- intermod__add_proc_2(PredId, DoWrite, !Info)
+ add_proc_2(PredId, DoWrite, !Info)
).
-:- pred intermod__add_proc_2(pred_id::in, bool::out,
+:- pred add_proc_2(pred_id::in, bool::out,
intermod_info::in, intermod_info::out) is det.
-intermod__add_proc_2(PredId, DoWrite, !Info) :-
+add_proc_2(PredId, DoWrite, !Info) :-
intermod_info_get_module_info(!.Info, ModuleInfo),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
pred_info_import_status(PredInfo, Status),
@@ -692,24 +682,24 @@
set__insert(Modules0, PredModule, Modules),
intermod_info_set_modules(Modules, !Info)
;
- error("intermod__add_proc: unexpected status")
+ error("add_proc: unexpected status")
).
% Resolve overloading and module qualify everything in a unify_rhs.
% Fully module-qualify the right-hand-side of a unification.
- % For function calls and higher-order terms, call intermod__add_proc
+ % For function calls and higher-order terms, call add_proc
% so that the predicate or function will be exported if necessary.
%
-:- pred intermod__module_qualify_unify_rhs(prog_var::in, unify_rhs::in,
+:- pred module_qualify_unify_rhs(prog_var::in, unify_rhs::in,
unify_rhs::out, bool::out, intermod_info::in,
intermod_info::out) is det.
-intermod__module_qualify_unify_rhs(_LHS, RHS @ var(_Var), RHS, yes, !Info).
-intermod__module_qualify_unify_rhs(_LHS,
+module_qualify_unify_rhs(_LHS, RHS @ var(_Var), RHS, yes, !Info).
+module_qualify_unify_rhs(_LHS,
lambda_goal(A,B,C,D,E,F,G,H,Goal0),
lambda_goal(A,B,C,D,E,F,G,H,Goal), DoWrite, !Info) :-
- intermod__traverse_goal(Goal0, Goal, DoWrite, !Info).
-intermod__module_qualify_unify_rhs(_LHS, RHS @ functor(Functor, _Exist, _Vars),
+ traverse_goal(Goal0, Goal, DoWrite, !Info).
+module_qualify_unify_rhs(_LHS, RHS @ functor(Functor, _Exist, _Vars),
RHS, DoWrite, !Info) :-
% Is this a higher-order predicate or higher-order function
% term?
@@ -719,7 +709,7 @@
% Make sure that the predicate/function is exported.
%
proc(PredId, _) = unshroud_pred_proc_id(ShroudedPredProcId),
- intermod__add_proc(PredId, DoWrite, !Info)
+ add_proc(PredId, DoWrite, !Info)
;
%
% It's an ordinary constructor, or a constant of a builtin
@@ -736,26 +726,24 @@
%-----------------------------------------------------------------------------%
-:- pred intermod__gather_instances(intermod_info::in, intermod_info::out)
- is det.
+:- pred gather_instances(intermod_info::in, intermod_info::out) is det.
-intermod__gather_instances(!Info) :-
+gather_instances(!Info) :-
intermod_info_get_module_info(!.Info, ModuleInfo),
- module_info_instances(ModuleInfo, Instances),
- map__foldl(intermod__gather_instances_2(ModuleInfo), Instances, !Info).
+ module_info_get_instance_table(ModuleInfo, Instances),
+ map__foldl(gather_instances_2(ModuleInfo), Instances, !Info).
-:- pred intermod__gather_instances_2(module_info::in, class_id::in,
+:- pred gather_instances_2(module_info::in, class_id::in,
list(hlds_instance_defn)::in,
intermod_info::in, intermod_info::out) is det.
-intermod__gather_instances_2(ModuleInfo, ClassId, InstanceDefns, !Info) :-
- list__foldl(intermod__gather_instances_3(ModuleInfo, ClassId),
- InstanceDefns, !Info).
+gather_instances_2(ModuleInfo, ClassId, InstanceDefns, !Info) :-
+ list__foldl(gather_instances_3(ModuleInfo, ClassId), InstanceDefns, !Info).
-:- pred intermod__gather_instances_3(module_info::in, class_id::in,
+:- pred gather_instances_3(module_info::in, class_id::in,
hlds_instance_defn::in, intermod_info::in, intermod_info::out) is det.
-intermod__gather_instances_3(ModuleInfo, ClassId, InstanceDefn, !Info) :-
+gather_instances_3(ModuleInfo, ClassId, InstanceDefn, !Info) :-
InstanceDefn = hlds_instance_defn(A, Status, C, D, E, Interface0,
MaybePredProcIds, H, I),
(
@@ -783,13 +771,11 @@
MethodAL)
;
MaybePredProcIds = no,
- error("intermod__gather_instances_3: " ++
- "method pred_proc_ids not filled in")
+ error("gather_instances_3: method pred_proc_ids not filled in")
),
- list__map_foldl(intermod__qualify_instance_method(ModuleInfo),
+ list__map_foldl(qualify_instance_method(ModuleInfo),
MethodAL, Methods, [], PredIds),
- list__map_foldl(intermod__add_proc, PredIds, DoWriteMethodsList,
- !Info),
+ list__map_foldl(add_proc, PredIds, DoWriteMethodsList, !Info),
bool__and_list(DoWriteMethodsList, DoWriteMethods),
(
DoWriteMethods = yes,
@@ -839,13 +825,12 @@
% Resolve overloading of instance methods before writing them
% to the `.opt' file.
%
-:- pred intermod__qualify_instance_method(module_info::in,
+:- pred qualify_instance_method(module_info::in,
pair(pred_id, instance_method)::in, instance_method::out,
list(pred_id)::in, list(pred_id)::out) is det.
-intermod__qualify_instance_method(ModuleInfo,
- MethodCallPredId - InstanceMethod0, InstanceMethod,
- PredIds0, PredIds) :-
+qualify_instance_method(ModuleInfo, MethodCallPredId - InstanceMethod0,
+ InstanceMethod, PredIds0, PredIds) :-
module_info_pred_info(ModuleInfo, MethodCallPredId, MethodCallPredInfo),
pred_info_arg_types(MethodCallPredInfo, MethodCallTVarSet, _,
MethodCallArgTypes),
@@ -868,7 +853,7 @@
),
InstanceMethodDefn = name(InstanceMethodName)
;
- % This will force intermod__add_proc to return DoWrite = no.
+ % This will force add_proc to return DoWrite = no.
PredId = invalid_pred_id,
PredIds = [PredId | PredIds0],
@@ -892,7 +877,7 @@
% intermodule optimization for type class instance declarations
% using the new syntax.
%
- % This will force intermod__add_proc to return DoWrite = no.
+ % This will force add_proc to return DoWrite = no.
PredId = invalid_pred_id,
PredIds = [PredId | PredIds0],
% We can just leave the method definition unchanged.
@@ -913,7 +898,7 @@
MethodArity, MethodCallTVarSet, MethodCallArgTypes,
MaybePredId, InstanceMethodName) :-
- module_info_ctor_field_table(ModuleInfo, CtorFieldTable),
+ module_info_get_ctor_field_table(ModuleInfo, CtorFieldTable),
(
is_field_access_function_name(ModuleInfo, InstanceMethodName0,
MethodArity, _, FieldName),
@@ -926,7 +911,7 @@
;
TypeCtors0 = []
),
- module_info_ctors(ModuleInfo, Ctors),
+ module_info_get_cons_table(ModuleInfo, Ctors),
(
map__search(Ctors, cons(InstanceMethodName0, MethodArity),
MatchingConstructors)
@@ -966,26 +951,26 @@
%-----------------------------------------------------------------------------%
-:- pred intermod__gather_types(intermod_info::in, intermod_info::out) is det.
+:- pred gather_types(intermod_info::in, intermod_info::out) is det.
-intermod__gather_types(!Info) :-
+gather_types(!Info) :-
intermod_info_get_module_info(!.Info, ModuleInfo),
- module_info_types(ModuleInfo, Types),
- map__foldl(intermod__gather_types_2, Types, !Info).
+ module_info_get_type_table(ModuleInfo, Types),
+ map__foldl(gather_types_2, Types, !Info).
-:- pred intermod__gather_types_2(type_ctor::in, hlds_type_defn::in,
+:- pred gather_types_2(type_ctor::in, hlds_type_defn::in,
intermod_info::in, intermod_info::out) is det.
-intermod__gather_types_2(TypeCtor, TypeDefn0, !Info) :-
+gather_types_2(TypeCtor, TypeDefn0, !Info) :-
intermod_info_get_module_info(!.Info, ModuleInfo),
- module_info_name(ModuleInfo, ModuleName),
- ( intermod__should_write_type(ModuleName, TypeCtor, TypeDefn0) ->
+ module_info_get_name(ModuleInfo, ModuleName),
+ ( should_write_type(ModuleName, TypeCtor, TypeDefn0) ->
hlds_data__get_type_defn_body(TypeDefn0, TypeBody0),
(
TypeBody0 = du_type(Ctors, Tags, Enum, MaybeUserEqComp0,
ReservedTag, MaybeForeign0)
->
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
%
@@ -1004,14 +989,13 @@
% The header code must be written since it could be used
% by the foreign type.
intermod_info_set_write_header(!Info),
- intermod__resolve_foreign_type_body_overloading(
- ModuleInfo, TypeCtor, ForeignTypeBody0,
- ForeignTypeBody, !Info),
+ resolve_foreign_type_body_overloading(ModuleInfo, TypeCtor,
+ ForeignTypeBody0, ForeignTypeBody, !Info),
MaybeForeign = yes(ForeignTypeBody),
MaybeUserEqComp = MaybeUserEqComp0
;
- intermod__resolve_unify_compare_overloading(ModuleInfo,
- TypeCtor, MaybeUserEqComp0, MaybeUserEqComp, !Info),
+ resolve_unify_compare_overloading(ModuleInfo, TypeCtor,
+ MaybeUserEqComp0, MaybeUserEqComp, !Info),
MaybeForeign = MaybeForeign0
),
TypeBody = du_type(Ctors, Tags, Enum, MaybeUserEqComp,
@@ -1023,8 +1007,8 @@
% The header code must be written since it could be used
% by the foreign type.
intermod_info_set_write_header(!Info),
- intermod__resolve_foreign_type_body_overloading(ModuleInfo,
- TypeCtor, ForeignTypeBody0, ForeignTypeBody, !Info),
+ resolve_foreign_type_body_overloading(ModuleInfo, TypeCtor,
+ ForeignTypeBody0, ForeignTypeBody, !Info),
TypeBody = foreign_type(ForeignTypeBody),
hlds_data__set_type_defn_body(TypeBody, TypeDefn0, TypeDefn)
;
@@ -1036,14 +1020,14 @@
true
).
-:- pred intermod__resolve_foreign_type_body_overloading(module_info::in,
+:- pred resolve_foreign_type_body_overloading(module_info::in,
type_ctor::in, foreign_type_body::in, foreign_type_body::out,
intermod_info::in, intermod_info::out) is det.
-intermod__resolve_foreign_type_body_overloading(ModuleInfo,
- TypeCtor, foreign_type_body(MaybeIL0, MaybeC0, MaybeJava0),
+resolve_foreign_type_body_overloading(ModuleInfo, TypeCtor,
+ foreign_type_body(MaybeIL0, MaybeC0, MaybeJava0),
foreign_type_body(MaybeIL, MaybeC, MaybeJava), !Info) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
%
@@ -1055,59 +1039,58 @@
% a module to IL when the workspace was compiled to C).
%
( ( Target = c ; Target = asm ) ->
- intermod__resolve_foreign_type_body_overloading_2(ModuleInfo,
- TypeCtor, MaybeC0, MaybeC, !Info)
+ resolve_foreign_type_body_overloading_2(ModuleInfo, TypeCtor,
+ MaybeC0, MaybeC, !Info)
;
MaybeC = MaybeC0
),
( Target = il ->
- intermod__resolve_foreign_type_body_overloading_2(ModuleInfo,
- TypeCtor, MaybeIL0, MaybeIL, !Info)
+ resolve_foreign_type_body_overloading_2(ModuleInfo, TypeCtor,
+ MaybeIL0, MaybeIL, !Info)
;
MaybeIL = MaybeIL0
),
( Target = java ->
- intermod__resolve_foreign_type_body_overloading_2(ModuleInfo,
- TypeCtor, MaybeJava0, MaybeJava, !Info)
+ resolve_foreign_type_body_overloading_2(ModuleInfo, TypeCtor,
+ MaybeJava0, MaybeJava, !Info)
;
MaybeJava = MaybeJava0
).
-:- pred intermod__resolve_foreign_type_body_overloading_2(module_info::in,
- type_ctor::in,
+:- pred resolve_foreign_type_body_overloading_2(module_info::in, type_ctor::in,
foreign_type_lang_body(T)::in, foreign_type_lang_body(T)::out,
intermod_info::in, intermod_info::out) is det.
-intermod__resolve_foreign_type_body_overloading_2(_, _, no, no, !Info).
-intermod__resolve_foreign_type_body_overloading_2(ModuleInfo, TypeCtor,
+resolve_foreign_type_body_overloading_2(_, _, no, no, !Info).
+resolve_foreign_type_body_overloading_2(ModuleInfo, TypeCtor,
yes(foreign_type_lang_data(Body, MaybeUserEqComp0, Assertions)),
yes(foreign_type_lang_data(Body, MaybeUserEqComp, Assertions)),
!Info) :-
- intermod__resolve_unify_compare_overloading(ModuleInfo, TypeCtor,
+ resolve_unify_compare_overloading(ModuleInfo, TypeCtor,
MaybeUserEqComp0, MaybeUserEqComp, !Info).
-:- pred intermod__resolve_unify_compare_overloading(module_info::in,
+:- pred resolve_unify_compare_overloading(module_info::in,
type_ctor::in, maybe(unify_compare)::in, maybe(unify_compare)::out,
intermod_info::in, intermod_info::out) is det.
-intermod__resolve_unify_compare_overloading(_, _, no, no, !Info).
-intermod__resolve_unify_compare_overloading(_, _,
+resolve_unify_compare_overloading(_, _, no, no, !Info).
+resolve_unify_compare_overloading(_, _,
yes(abstract_noncanonical_type(IsSolverType)),
yes(abstract_noncanonical_type(IsSolverType)), !Info).
-intermod__resolve_unify_compare_overloading(ModuleInfo, TypeCtor,
+resolve_unify_compare_overloading(ModuleInfo, TypeCtor,
yes(unify_compare(MaybeUserEq0, MaybeUserCompare0)),
yes(unify_compare(MaybeUserEq, MaybeUserCompare)), !Info) :-
- intermod__resolve_user_special_pred_overloading(ModuleInfo,
+ resolve_user_special_pred_overloading(ModuleInfo,
unify, TypeCtor, MaybeUserEq0, MaybeUserEq, !Info),
- intermod__resolve_user_special_pred_overloading(ModuleInfo,
+ resolve_user_special_pred_overloading(ModuleInfo,
compare, TypeCtor, MaybeUserCompare0, MaybeUserCompare, !Info).
-:- pred intermod__resolve_user_special_pred_overloading(module_info::in,
+:- pred resolve_user_special_pred_overloading(module_info::in,
special_pred_id::in, type_ctor::in, maybe(sym_name)::in,
maybe(sym_name)::out, intermod_info::in, intermod_info::out) is det.
-intermod__resolve_user_special_pred_overloading(_, _, _, no, no, !Info).
-intermod__resolve_user_special_pred_overloading(ModuleInfo, SpecialId,
+resolve_user_special_pred_overloading(_, _, _, no, no, !Info).
+resolve_user_special_pred_overloading(ModuleInfo, SpecialId,
TypeCtor, yes(Pred0), yes(Pred), !Info) :-
module_info_get_special_pred_map(ModuleInfo, SpecialPreds),
map__lookup(SpecialPreds, SpecialId - TypeCtor, UnifyPredId),
@@ -1117,12 +1100,12 @@
add_marker(calls_are_fully_qualified, Markers0, Markers),
typecheck__resolve_pred_overloading(ModuleInfo, Markers, ArgTypes,
TVarSet, Pred0, Pred, UserEqPredId),
- intermod__add_proc(UserEqPredId, _, !Info).
+ add_proc(UserEqPredId, _, !Info).
-:- pred intermod__should_write_type(module_name::in,
- type_ctor::in, hlds_type_defn::in) is semidet.
+:- pred should_write_type(module_name::in, type_ctor::in, hlds_type_defn::in)
+ is semidet.
-intermod__should_write_type(ModuleName, TypeCtor, TypeDefn) :-
+should_write_type(ModuleName, TypeCtor, TypeDefn) :-
hlds_data__get_type_defn_status(TypeDefn, ImportStatus),
TypeCtor = Name - _Arity,
Name = qualified(ModuleName, _),
@@ -1132,12 +1115,11 @@
% Output module imports, types, modes, insts and predicates
%
-:- pred intermod__write_intermod_info(intermod_info::in,
- io::di, io::uo) is det.
+:- pred write_intermod_info(intermod_info::in, io::di, io::uo) is det.
-intermod__write_intermod_info(IntermodInfo, !IO) :-
+write_intermod_info(IntermodInfo, !IO) :-
intermod_info_get_module_info(IntermodInfo, ModuleInfo),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
io__write_string(":- module ", !IO),
mercury_output_bracketed_sym_name(ModuleName, !IO),
io__write_string(".\n", !IO),
@@ -1153,7 +1135,7 @@
set__empty(Preds),
set__empty(PredDecls),
Instances = [],
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
\+ (
map__member(Types, _, TypeDefn),
hlds_data__get_type_defn_status(TypeDefn, Status),
@@ -1164,13 +1146,12 @@
->
true
;
- intermod__write_intermod_info_2(IntermodInfo, !IO)
+ write_intermod_info_2(IntermodInfo, !IO)
).
-:- pred intermod__write_intermod_info_2(intermod_info::in, io::di, io::uo)
- is det.
+:- pred write_intermod_info_2(intermod_info::in, io::di, io::uo) is det.
-intermod__write_intermod_info_2(IntermodInfo, !IO) :-
+write_intermod_info_2(IntermodInfo, !IO) :-
IntermodInfo = info(_, Preds0, PredDecls0, Instances, Types,
ModuleInfo, WriteHeader, _, _),
set__to_sorted_list(Preds0, Preds),
@@ -1183,16 +1164,16 @@
% XXX this could be reduced to the set that is actually needed
% by the items being written.
io__write_string(":- use_module ", !IO),
- intermod__write_modules(Modules, !IO)
+ write_modules(Modules, !IO)
;
Modules = []
),
- intermod__write_types(Types, !IO),
- intermod__write_insts(ModuleInfo, !IO),
- intermod__write_modes(ModuleInfo, !IO),
- intermod__write_classes(ModuleInfo, !IO),
- intermod__write_instances(Instances, !IO),
+ write_types(Types, !IO),
+ write_insts(ModuleInfo, !IO),
+ write_modes(ModuleInfo, !IO),
+ write_classes(ModuleInfo, !IO),
+ write_instances(Instances, !IO),
% Disable verbose dumping of clauses.
globals__io_lookup_string_option(dump_hlds_options, VerboseDump, !IO),
@@ -1211,14 +1192,14 @@
;
WriteHeader = no
),
- intermod__write_pred_decls(ModuleInfo, PredDecls, !IO),
- intermod__write_preds(ModuleInfo, Preds, !IO),
+ write_pred_decls(ModuleInfo, PredDecls, !IO),
+ write_preds(ModuleInfo, Preds, !IO),
globals__io_set_option(dump_hlds_options, string(VerboseDump), !IO).
-:- pred intermod__write_modules(list(module_name)::in, io::di, io::uo) is det.
+:- pred write_modules(list(module_name)::in, io::di, io::uo) is det.
-intermod__write_modules([], !IO).
-intermod__write_modules([Module | Rest], !IO) :-
+write_modules([], !IO).
+write_modules([Module | Rest], !IO) :-
mercury_output_bracketed_sym_name(Module, !IO),
(
Rest = [],
@@ -1226,19 +1207,19 @@
;
Rest = [_ | _],
io__write_string(", ", !IO),
- intermod__write_modules(Rest, !IO)
+ write_modules(Rest, !IO)
).
-:- pred intermod__write_types(assoc_list(type_ctor, hlds_type_defn)::in,
- io::di, io::uo) is det.
+:- pred write_types(assoc_list(type_ctor, hlds_type_defn)::in, io::di, io::uo)
+ is det.
-intermod__write_types(Types, !IO) :-
- list__foldl(intermod__write_type, Types, !IO).
+write_types(Types, !IO) :-
+ list__foldl(write_type, Types, !IO).
-:- pred intermod__write_type(pair(type_ctor, hlds_type_defn)::in,
+:- pred write_type(pair(type_ctor, hlds_type_defn)::in,
io::di, io::uo) is det.
-intermod__write_type(TypeCtor - TypeDefn, !IO) :-
+write_type(TypeCtor - TypeDefn, !IO) :-
hlds_data__get_type_defn_tvarset(TypeDefn, VarSet),
hlds_data__get_type_defn_tparams(TypeDefn, Args),
hlds_data__get_type_defn_body(TypeDefn, Body),
@@ -1321,18 +1302,18 @@
true
).
-:- pred intermod__write_modes(module_info::in, io::di, io::uo) is det.
+:- pred write_modes(module_info::in, io::di, io::uo) is det.
-intermod__write_modes(ModuleInfo, !IO) :-
- module_info_name(ModuleInfo, ModuleName),
- module_info_modes(ModuleInfo, Modes),
+write_modes(ModuleInfo, !IO) :-
+ module_info_get_name(ModuleInfo, ModuleName),
+ module_info_get_mode_table(ModuleInfo, Modes),
mode_table_get_mode_defns(Modes, ModeDefns),
- map__foldl(intermod__write_mode(ModuleName), ModeDefns, !IO).
+ map__foldl(write_mode(ModuleName), ModeDefns, !IO).
-:- pred intermod__write_mode(module_name::in, mode_id::in, hlds_mode_defn::in,
+:- pred write_mode(module_name::in, mode_id::in, hlds_mode_defn::in,
io::di, io::uo) is det.
-intermod__write_mode(ModuleName, ModeId, ModeDefn, !IO) :-
+write_mode(ModuleName, ModeId, ModeDefn, !IO) :-
ModeId = SymName - _Arity,
ModeDefn = hlds_mode_defn(Varset, Args, eqv_mode(Mode), Context,
ImportStatus),
@@ -1347,19 +1328,19 @@
true
).
-:- pred intermod__write_insts(module_info::in, io::di, io::uo) is det.
+:- pred write_insts(module_info::in, io::di, io::uo) is det.
-intermod__write_insts(ModuleInfo, !IO) :-
- module_info_name(ModuleInfo, ModuleName),
- module_info_insts(ModuleInfo, Insts),
+write_insts(ModuleInfo, !IO) :-
+ module_info_get_name(ModuleInfo, ModuleName),
+ module_info_get_inst_table(ModuleInfo, Insts),
inst_table_get_user_insts(Insts, UserInsts),
user_inst_table_get_inst_defns(UserInsts, InstDefns),
- map__foldl(intermod__write_inst(ModuleName), InstDefns, !IO).
+ map__foldl(write_inst(ModuleName), InstDefns, !IO).
-:- pred intermod__write_inst(module_name::in, inst_id::in, hlds_inst_defn::in,
+:- pred write_inst(module_name::in, inst_id::in, hlds_inst_defn::in,
io::di, io::uo) is det.
-intermod__write_inst(ModuleName, InstId, InstDefn, !IO) :-
+write_inst(ModuleName, InstId, InstDefn, !IO) :-
InstId = SymName - _Arity,
InstDefn = hlds_inst_defn(Varset, Args, Body, Context, ImportStatus),
(
@@ -1379,17 +1360,17 @@
true
).
-:- pred intermod__write_classes(module_info::in, io::di, io::uo) is det.
+:- pred write_classes(module_info::in, io::di, io::uo) is det.
-intermod__write_classes(ModuleInfo, !IO) :-
- module_info_name(ModuleInfo, ModuleName),
- module_info_classes(ModuleInfo, Classes),
- map__foldl(intermod__write_class(ModuleName), Classes, !IO).
+write_classes(ModuleInfo, !IO) :-
+ module_info_get_name(ModuleInfo, ModuleName),
+ module_info_get_class_table(ModuleInfo, Classes),
+ map__foldl(write_class(ModuleName), Classes, !IO).
-:- pred intermod__write_class(module_name::in, class_id::in,
+:- pred write_class(module_name::in, class_id::in,
hlds_class_defn::in, io::di, io::uo) is det.
-intermod__write_class(ModuleName, ClassId, ClassDefn, !IO) :-
+write_class(ModuleName, ClassId, ClassDefn, !IO) :-
ClassDefn = hlds_class_defn(ImportStatus, Constraints, HLDSFunDeps,
_Ancestors, TVars, _Kinds, Interface, _HLDSClassInterface, TVarSet,
Context),
@@ -1422,16 +1403,16 @@
TVar = list.index1_det(TVars, N)
).
-:- pred intermod__write_instances(assoc_list(class_id, hlds_instance_defn)::in,
+:- pred write_instances(assoc_list(class_id, hlds_instance_defn)::in,
io::di, io::uo) is det.
-intermod__write_instances(Instances, !IO) :-
- list__foldl(intermod__write_instance, Instances, !IO).
+write_instances(Instances, !IO) :-
+ list__foldl(write_instance, Instances, !IO).
-:- pred intermod__write_instance(pair(class_id, hlds_instance_defn)::in,
+:- pred write_instance(pair(class_id, hlds_instance_defn)::in,
io::di, io::uo) is det.
-intermod__write_instance(ClassId - InstanceDefn, !IO) :-
+write_instance(ClassId - InstanceDefn, !IO) :-
InstanceDefn = hlds_instance_defn(ModuleName, _, Context, Constraints,
Types, Body, _, TVarSet, _),
ClassId = class_id(ClassName, _),
@@ -1441,11 +1422,11 @@
% We need to write all the declarations for local predicates so
% the procedure labels for the C code are calculated correctly.
%
-:- pred intermod__write_pred_decls(module_info::in, list(pred_id)::in,
+:- pred write_pred_decls(module_info::in, list(pred_id)::in,
io::di, io::uo) is det.
-intermod__write_pred_decls(_, [], !IO).
-intermod__write_pred_decls(ModuleInfo, [PredId | PredIds], !IO) :-
+write_pred_decls(_, [], !IO).
+write_pred_decls(ModuleInfo, [PredId | PredIds], !IO) :-
module_info_pred_info(ModuleInfo, PredId, PredInfo),
Module = pred_info_module(PredInfo),
Name = pred_info_name(PredInfo),
@@ -1500,19 +1481,17 @@
compare(Result, ProcInt1, ProcInt2)
),
list__sort(CompareProcId, ProcIds, SortedProcIds),
- intermod__write_pred_modes(Procs, qualified(Module, Name),
- PredOrFunc, SortedProcIds, !IO),
- intermod__write_pragmas(PredInfo, !IO),
- intermod__write_type_spec_pragmas(ModuleInfo, PredId, !IO),
- intermod__write_pred_decls(ModuleInfo, PredIds, !IO).
+ write_pred_modes(Procs, qualified(Module, Name), PredOrFunc, SortedProcIds,
+ !IO),
+ write_pragmas(PredInfo, !IO),
+ write_type_spec_pragmas(ModuleInfo, PredId, !IO),
+ write_pred_decls(ModuleInfo, PredIds, !IO).
-:- pred intermod__write_pred_modes(map(proc_id, proc_info)::in,
- sym_name::in, pred_or_func::in, list(proc_id)::in,
- io::di, io::uo) is det.
+:- pred write_pred_modes(map(proc_id, proc_info)::in, sym_name::in,
+ pred_or_func::in, list(proc_id)::in, io::di, io::uo) is det.
-intermod__write_pred_modes(_, _, _, [], !IO).
-intermod__write_pred_modes(Procs, SymName, PredOrFunc, [ProcId | ProcIds],
- !IO) :-
+write_pred_modes(_, _, _, [], !IO).
+write_pred_modes(Procs, SymName, PredOrFunc, [ProcId | ProcIds], !IO) :-
map__lookup(Procs, ProcId, ProcInfo),
proc_info_maybe_declared_argmodes(ProcInfo, MaybeArgModes),
proc_info_declared_determinism(ProcInfo, MaybeDetism),
@@ -1523,7 +1502,7 @@
ArgModes = ArgModes0,
Detism = Detism0
;
- error("intermod__write_pred_modes: attempt to write undeclared mode")
+ error("write_pred_modes: attempt to write undeclared mode")
),
proc_info_context(ProcInfo, Context),
varset__init(Varset),
@@ -1537,19 +1516,19 @@
mercury_output_pred_mode_decl(Varset, SymName, ArgModes,
yes(Detism), Context, !IO)
),
- intermod__write_pred_modes(Procs, SymName, PredOrFunc, ProcIds, !IO).
+ write_pred_modes(Procs, SymName, PredOrFunc, ProcIds, !IO).
-:- pred intermod__write_preds(module_info::in, list(pred_id)::in,
+:- pred write_preds(module_info::in, list(pred_id)::in,
io::di, io::uo) is det.
-intermod__write_preds(_, [], !IO).
-intermod__write_preds(ModuleInfo, [PredId | PredIds], !IO) :-
+write_preds(_, [], !IO).
+write_preds(ModuleInfo, [PredId | PredIds], !IO) :-
module_info_pred_info(ModuleInfo, PredId, PredInfo),
Module = pred_info_module(PredInfo),
Name = pred_info_name(PredInfo),
SymName = qualified(Module, Name),
PredOrFunc = pred_info_is_pred_or_func(PredInfo),
- intermod__write_pragmas(PredInfo, !IO),
+ write_pragmas(PredInfo, !IO),
% The type specialization pragmas for exported preds should
% already be in the interface file.
@@ -1563,20 +1542,20 @@
hlds_out__write_promise(PromiseType, 0, ModuleInfo,
PredId, VarSet, no, HeadVars, PredOrFunc, Clause, no, !IO)
;
- error("intermod__write_preds: assertion not a single clause.")
+ error("write_preds: assertion not a single clause.")
)
;
- list__foldl(intermod__write_clause(ModuleInfo, PredId, VarSet,
+ list__foldl(write_clause(ModuleInfo, PredId, VarSet,
HeadVars, PredOrFunc, SymName), Clauses, !IO)
),
- intermod__write_preds(ModuleInfo, PredIds, !IO).
+ write_preds(ModuleInfo, PredIds, !IO).
-:- pred intermod__write_clause(module_info::in, pred_id::in, prog_varset::in,
+:- pred write_clause(module_info::in, pred_id::in, prog_varset::in,
list(prog_var)::in, pred_or_func::in, sym_name::in, clause::in,
io::di, io::uo) is det.
-intermod__write_clause(ModuleInfo, PredId, VarSet, HeadVars,
- PredOrFunc, _SymName, Clause0, !IO) :-
+write_clause(ModuleInfo, PredId, VarSet, HeadVars, PredOrFunc, _SymName,
+ Clause0, !IO) :-
Clause0 = clause(_, _, mercury, _),
strip_headvar_unifications(HeadVars, Clause0, ClauseHeadVars, Clause),
% Variable numbers need to be appended for the case
@@ -1589,8 +1568,8 @@
ClauseHeadVars, PredOrFunc, Clause, UseDeclaredModes, MaybeVarTypes,
!IO).
-intermod__write_clause(ModuleInfo, PredId, VarSet, _HeadVars,
- PredOrFunc, SymName, Clause, !IO) :-
+write_clause(ModuleInfo, PredId, VarSet, _HeadVars, PredOrFunc, SymName,
+ Clause, !IO) :-
Clause = clause(ProcIds, Goal, foreign_language(_), _),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
pred_info_procedures(PredInfo, Procs),
@@ -1607,18 +1586,18 @@
Goal = foreign_proc(Attributes, _, _, Args, _, PragmaCode) - _
)
->
- list__foldl(intermod__write_foreign_clause(Procs, PredOrFunc,
+ list__foldl(write_foreign_clause(Procs, PredOrFunc,
PragmaCode, Attributes, Args, VarSet, SymName), ProcIds, !IO)
;
error("foreign_proc expected within this goal")
).
-:- pred intermod__write_foreign_clause(proc_table::in, pred_or_func::in,
+:- pred write_foreign_clause(proc_table::in, pred_or_func::in,
pragma_foreign_code_impl::in, pragma_foreign_proc_attributes::in,
list(foreign_arg)::in, prog_varset::in, sym_name::in, proc_id::in,
io::di, io::uo) is det.
-intermod__write_foreign_clause(Procs, PredOrFunc, PragmaImpl,
+write_foreign_clause(Procs, PredOrFunc, PragmaImpl,
Attributes, Args, VarSet0, SymName, ProcId, !IO) :-
map__lookup(Procs, ProcId, ProcInfo),
proc_info_maybe_declared_argmodes(ProcInfo, MaybeArgModes),
@@ -1628,7 +1607,7 @@
mercury_output_pragma_foreign_code(Attributes, SymName,
PredOrFunc, PragmaVars, VarSet, PragmaImpl, !IO)
;
- error("intermod__write_clause: no mode declaration")
+ error("write_clause: no mode declaration")
).
% Strip the `Headvar__n = Term' unifications from each clause,
@@ -1717,9 +1696,9 @@
strip_headvar_unifications_from_goal_list(Goals0, HeadVars,
RevGoals1, Goals, !HeadVarMap).
-:- pred intermod__write_pragmas(pred_info::in, io::di, io::uo) is det.
+:- pred write_pragmas(pred_info::in, io::di, io::uo) is det.
-intermod__write_pragmas(PredInfo, !IO) :-
+write_pragmas(PredInfo, !IO) :-
Module = pred_info_module(PredInfo),
Name = pred_info_name(PredInfo),
Arity = pred_info_orig_arity(PredInfo),
@@ -1727,14 +1706,14 @@
SymName = qualified(Module, Name),
pred_info_get_markers(PredInfo, Markers),
markers_to_marker_list(Markers, MarkerList),
- intermod__write_pragmas(SymName, Arity, MarkerList, PredOrFunc, !IO).
+ write_pragmas(SymName, Arity, MarkerList, PredOrFunc, !IO).
-:- pred intermod__write_pragmas(sym_name::in, int::in, list(marker)::in,
+:- pred write_pragmas(sym_name::in, int::in, list(marker)::in,
pred_or_func::in, io::di, io::uo) is det.
-intermod__write_pragmas(_, _, [], _, !IO).
-intermod__write_pragmas(SymName, Arity, [Marker | Markers], PredOrFunc, !IO) :-
- intermod__should_output_marker(Marker, ShouldOutput),
+write_pragmas(_, _, [], _, !IO).
+write_pragmas(SymName, Arity, [Marker | Markers], PredOrFunc, !IO) :-
+ should_output_marker(Marker, ShouldOutput),
(
ShouldOutput = yes,
hlds_out__marker_name(Marker, Name),
@@ -1742,71 +1721,73 @@
;
ShouldOutput = no
),
- intermod__write_pragmas(SymName, Arity, Markers, PredOrFunc, !IO).
+ write_pragmas(SymName, Arity, Markers, PredOrFunc, !IO).
-:- pred intermod__write_type_spec_pragmas(module_info::in, pred_id::in,
+:- pred write_type_spec_pragmas(module_info::in, pred_id::in,
io::di, io::uo) is det.
-intermod__write_type_spec_pragmas(ModuleInfo, PredId, !IO) :-
- module_info_type_spec_info(ModuleInfo, type_spec_info(_, _, _, PragmaMap)),
+write_type_spec_pragmas(ModuleInfo, PredId, !IO) :-
+ module_info_get_type_spec_info(ModuleInfo, TypeSpecInfo),
+ PragmaMap = TypeSpecInfo ^ pragma_map,
( multi_map__search(PragmaMap, PredId, TypeSpecPragmas) ->
- list__foldl(
- ( pred(Pragma::in, IO0::di, IO::uo) is det :-
+ list__foldl(write_type_spec_pragma, TypeSpecPragmas, !IO)
+ ;
+ true
+ ).
+
+:- pred write_type_spec_pragma(pragma_type::in, io::di, io::uo) is det.
+
+write_type_spec_pragma(Pragma, !IO) :-
( Pragma = type_spec(_, _, _, _, _, _, _, _) ->
AppendVarnums = yes,
- mercury_output_pragma_type_spec(Pragma, AppendVarnums,
- IO0, IO)
- ;
- error("write_type_spec_pragmas")
- )
- ), TypeSpecPragmas, !IO)
+ mercury_output_pragma_type_spec(Pragma, AppendVarnums, !IO)
;
- true
+ error("write_type_spec_pragma")
).
% Is a pragma declaration required in the `.opt' file for
% a predicate with the given marker.
%
-:- pred intermod__should_output_marker(marker::in, bool::out) is det.
+:- pred should_output_marker(marker::in, bool::out) is det.
-intermod__should_output_marker(stub, no).
+should_output_marker(stub, no).
% Since the inferred declarations are output, these
% don't need to be done in the importing module.
-intermod__should_output_marker(infer_type, no).
-intermod__should_output_marker(infer_modes, no).
+should_output_marker(infer_type, no).
+should_output_marker(infer_modes, no).
% Purity is output as part of the pred/func decl.
-intermod__should_output_marker((impure), no).
-intermod__should_output_marker((semipure), no).
+should_output_marker((impure), no).
+should_output_marker((semipure), no).
% There is no pragma required for generated class methods.
-intermod__should_output_marker(class_method, no).
-intermod__should_output_marker(class_instance_method, no).
-intermod__should_output_marker(named_class_instance_method, no).
+should_output_marker(class_method, no).
+should_output_marker(class_instance_method, no).
+should_output_marker(named_class_instance_method, no).
% The warning for calls to local obsolete predicates should appear
% once in the defining module, not in importing modules.
-intermod__should_output_marker(obsolete, no).
-intermod__should_output_marker(user_marked_inline, yes).
-intermod__should_output_marker(user_marked_no_inline, yes).
-intermod__should_output_marker(heuristic_inline, no).
-intermod__should_output_marker(dnf, yes).
-intermod__should_output_marker(aditi, yes).
-intermod__should_output_marker(base_relation, yes).
-intermod__should_output_marker(aditi_memo, yes).
-intermod__should_output_marker(aditi_no_memo, yes).
-intermod__should_output_marker(naive, yes).
-intermod__should_output_marker(psn, yes).
-intermod__should_output_marker(supp_magic, yes).
-intermod__should_output_marker(context, yes).
-intermod__should_output_marker(promised_pure, yes).
-intermod__should_output_marker(promised_semipure, yes).
-intermod__should_output_marker(terminates, yes).
-intermod__should_output_marker(does_not_terminate, yes).
+should_output_marker(obsolete, no).
+should_output_marker(user_marked_inline, yes).
+should_output_marker(user_marked_no_inline, yes).
+should_output_marker(heuristic_inline, no).
+should_output_marker(dnf, yes).
+should_output_marker(aditi, yes).
+should_output_marker(base_relation, yes).
+should_output_marker(aditi_memo, yes).
+should_output_marker(aditi_no_memo, yes).
+should_output_marker(naive, yes).
+should_output_marker(psn, yes).
+should_output_marker(supp_magic, yes).
+should_output_marker(context, yes).
+should_output_marker(promised_pure, yes).
+should_output_marker(promised_semipure, yes).
+should_output_marker(terminates, yes).
+should_output_marker(does_not_terminate, yes).
% Termination should only be checked in the defining module.
-intermod__should_output_marker(check_termination, no).
-intermod__should_output_marker(generate_inline, _) :-
+should_output_marker(check_termination, no).
+should_output_marker(generate_inline, _) :-
% This marker should only occur after the magic sets transformation.
- error("intermod__should_output_marker: generate_inline").
-intermod__should_output_marker(calls_are_fully_qualified, no).
-intermod__should_output_marker(mode_check_clauses, yes).
+ error("should_output_marker: generate_inline").
+should_output_marker(calls_are_fully_qualified, no).
+should_output_marker(mode_check_clauses, yes).
:- pred get_pragma_foreign_code_vars(list(foreign_arg)::in, list(mode)::in,
prog_varset::in, prog_varset::out, list(pragma_var)::out) is det.
@@ -1952,13 +1933,13 @@
% the .opt file are exported, and inhibit dead proc elimination
% on those preds.
%
-intermod__adjust_pred_import_status(!Module, !IO) :-
+adjust_pred_import_status(!Module, !IO) :-
globals__io_lookup_bool_option(very_verbose, VeryVerbose, !IO),
maybe_write_string(VeryVerbose,
"% Adjusting import status of predicates in the `.opt' file...", !IO),
module_info_predids(!.Module, PredIds),
- module_info_globals(!.Module, Globals),
+ module_info_get_globals(!.Module, Globals),
globals__lookup_int_option(Globals, intermod_inline_simple_threshold,
Threshold),
globals__lookup_bool_option(Globals, deforestation, Deforestation),
@@ -1966,10 +1947,10 @@
HigherOrderSizeLimit),
some [!Info] (
init_intermod_info(!.Module, !:Info),
- intermod__gather_preds(PredIds, yes, Threshold, HigherOrderSizeLimit,
+ gather_preds(PredIds, yes, Threshold, HigherOrderSizeLimit,
Deforestation, !Info),
- intermod__gather_instances(!Info),
- intermod__gather_types(!Info),
+ gather_instances(!Info),
+ gather_types(!Info),
do_adjust_pred_import_status(!.Info, !Module)
),
maybe_write_string(VeryVerbose, " done\n", !IO).
@@ -1988,19 +1969,19 @@
:- pred adjust_type_status(module_info::in, module_info::out) is det.
adjust_type_status(!ModuleInfo) :-
- module_info_types(!.ModuleInfo, Types0),
+ module_info_get_type_table(!.ModuleInfo, Types0),
map__to_assoc_list(Types0, TypesAL0),
list__map_foldl(adjust_type_status_2, TypesAL0, TypesAL, !ModuleInfo),
map__from_assoc_list(TypesAL, Types),
- module_info_set_types(Types, !ModuleInfo).
+ module_info_set_type_table(Types, !ModuleInfo).
:- pred adjust_type_status_2(pair(type_ctor, hlds_type_defn)::in,
pair(type_ctor, hlds_type_defn)::out,
module_info::in, module_info::out) is det.
adjust_type_status_2(TypeCtor - TypeDefn0, TypeCtor - TypeDefn, !ModuleInfo) :-
- module_info_name(!.ModuleInfo, ModuleName),
- ( intermod__should_write_type(ModuleName, TypeCtor, TypeDefn0) ->
+ module_info_get_name(!.ModuleInfo, ModuleName),
+ ( should_write_type(ModuleName, TypeCtor, TypeDefn0) ->
hlds_data__set_type_defn_status(exported, TypeDefn0, TypeDefn),
fixup_special_preds(TypeCtor, !ModuleInfo)
;
@@ -2021,11 +2002,11 @@
:- pred adjust_class_status(module_info::in, module_info::out) is det.
adjust_class_status(!ModuleInfo) :-
- module_info_classes(!.ModuleInfo, Classes0),
+ module_info_get_class_table(!.ModuleInfo, Classes0),
map__to_assoc_list(Classes0, ClassAL0),
list__map_foldl(adjust_class_status_2, ClassAL0, ClassAL, !ModuleInfo),
map__from_assoc_list(ClassAL, Classes),
- module_info_set_classes(Classes, !ModuleInfo).
+ module_info_set_class_table(Classes, !ModuleInfo).
:- pred adjust_class_status_2(pair(class_id, hlds_class_defn)::in,
pair(class_id, hlds_class_defn)::out,
@@ -2054,12 +2035,12 @@
:- pred adjust_instance_status(module_info::in, module_info::out) is det.
adjust_instance_status(!ModuleInfo) :-
- module_info_instances(!.ModuleInfo, Instances0),
+ module_info_get_instance_table(!.ModuleInfo, Instances0),
map__to_assoc_list(Instances0, InstanceAL0),
list__map_foldl(adjust_instance_status_2, InstanceAL0, InstanceAL,
!ModuleInfo),
map__from_assoc_list(InstanceAL, Instances),
- module_info_set_instances(Instances, !ModuleInfo).
+ module_info_set_instance_table(Instances, !ModuleInfo).
:- pred adjust_instance_status_2(pair(class_id, list(hlds_instance_defn))::in,
pair(class_id, list(hlds_instance_defn))::out,
@@ -2161,7 +2142,7 @@
% Read in and process the optimization interfaces.
%
-intermod__grab_optfiles(!Module, FoundError, !IO) :-
+grab_optfiles(!Module, FoundError, !IO) :-
% Read in the .opt files for imported and ancestor modules.
ModuleName = !.Module ^ module_name,
Ancestors0 = !.Module ^ parent_deps,
Index: compiler/interval.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/interval.m,v
retrieving revision 1.7
diff -u -b -r1.7 interval.m
--- compiler/interval.m 30 Aug 2005 04:11:52 -0000 1.7
+++ compiler/interval.m 27 Sep 2005 06:39:37 -0000
@@ -295,7 +295,7 @@
require_in_regs(InputArgs, !IntervalInfo),
require_access(InputArgs, !IntervalInfo)
;
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
call_gen__generic_call_info(Globals, GenericCall,
length(InputArgs), _, GenericVarsArgInfos, _, _),
assoc_list__keys(GenericVarsArgInfos, GenericVars),
Index: compiler/lambda.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lambda.m,v
retrieving revision 1.104
diff -u -b -r1.104 lambda.m
--- compiler/lambda.m 19 Sep 2005 04:28:57 -0000 1.104
+++ compiler/lambda.m 27 Sep 2005 06:39:37 -0000
@@ -405,7 +405,7 @@
% different calling conventions.
proc_info_interface_code_model(Call_ProcInfo, Call_CodeModel),
determinism_to_code_model(Detism, CodeModel),
- module_info_globals(ModuleInfo0, Globals),
+ module_info_get_globals(ModuleInfo0, Globals),
globals__lookup_bool_option(Globals, highlevel_code, HighLevelCode),
(
HighLevelCode = no,
@@ -451,7 +451,7 @@
ArgVars = put_typeinfo_vars_first(ArgVars1, VarTypes),
list__append(ArgVars, Vars, AllArgVars),
- module_info_name(ModuleInfo0, ModuleName),
+ module_info_get_name(ModuleInfo0, ModuleName),
goal_info_get_context(LambdaGoalInfo, OrigContext),
term__context_file(OrigContext, OrigFile),
term__context_line(OrigContext, OrigLine),
Index: compiler/liveness.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/liveness.m,v
retrieving revision 1.136
diff -u -b -r1.136 liveness.m
--- compiler/liveness.m 30 Aug 2005 04:11:53 -0000 1.136
+++ compiler/liveness.m 27 Sep 2005 06:39:39 -0000
@@ -225,7 +225,7 @@
proc_info_varset(!.ProcInfo, VarSet),
proc_info_vartypes(!.ProcInfo, VarTypes),
proc_info_rtti_varmaps(!.ProcInfo, RttiVarMaps),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
body_should_use_typeinfo_liveness(PredInfo, Globals, TypeInfoLiveness),
live_info_init(ModuleInfo, TypeInfoLiveness, VarTypes, RttiVarMaps,
@@ -1532,7 +1532,7 @@
% So we intersect the headvars with the non-locals and
% (if doing typeinfo liveness calculation) their
% typeinfo vars.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
proc_info_goal(ProcInfo, _Goal - GoalInfo),
goal_info_get_code_gen_nonlocals(GoalInfo, NonLocals0),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
Index: compiler/loop_inv.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/loop_inv.m,v
retrieving revision 1.22
diff -u -b -r1.22 loop_inv.m
--- compiler/loop_inv.m 13 Sep 2005 04:56:07 -0000 1.22
+++ compiler/loop_inv.m 27 Sep 2005 06:39:39 -0000
@@ -742,7 +742,7 @@
AuxHeadVars = HeadVars ++ ComputedInvArgs,
- hlds_module__module_info_name(ModuleInfo0, ModuleName),
+ hlds_module__module_info_get_name(ModuleInfo0, ModuleName),
hlds_module__module_info_pred_proc_info(ModuleInfo0, PredId, ProcId,
PredInfo, ProcInfo),
Index: compiler/magic.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/magic.m,v
retrieving revision 1.56
diff -u -b -r1.56 magic.m
--- compiler/magic.m 26 Sep 2005 05:48:08 -0000 1.56
+++ compiler/magic.m 27 Sep 2005 06:39:40 -0000
@@ -482,7 +482,7 @@
{
% Always preprocess base relations defined in
% this module.
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
PredModuleName = pred_info_module(PredInfo),
ModuleName = PredModuleName
;
@@ -533,7 +533,7 @@
(
{ ModuleName = pred_info_module(PredInfo0) },
- { module_info_name(ModuleInfo0, ModuleName) }
+ { module_info_get_name(ModuleInfo0, ModuleName) }
->
{ pred_info_context(PredInfo0, Context) },
magic_util__check_args(HeadVars0, ArgModes0, ArgTypes0,
@@ -995,13 +995,13 @@
magic__interface_from_c(EntryPoints, CPredProcId, AditiPredProcId) -->
magic_info_get_module_info(ModuleInfo0),
- { module_info_globals(ModuleInfo0, Globals) },
+ { module_info_get_globals(ModuleInfo0, Globals) },
{ globals__lookup_bool_option(Globals, aditi_only, AditiOnly) },
{ module_info_pred_proc_info(ModuleInfo0,
CPredProcId, PredInfo0, ProcInfo0) },
{ pred_info_get_markers(PredInfo0, Markers) },
- { module_info_name(ModuleInfo0, ModuleName) },
+ { module_info_get_name(ModuleInfo0, ModuleName) },
(
{ AditiOnly = no },
{ check_marker(Markers, base_relation) },
Index: compiler/magic_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/magic_util.m,v
retrieving revision 1.53
diff -u -b -r1.53 magic_util.m
--- compiler/magic_util.m 14 Sep 2005 05:26:37 -0000 1.53
+++ compiler/magic_util.m 27 Sep 2005 06:39:40 -0000
@@ -1377,7 +1377,7 @@
{ set__union(Errors0, TypeErrors, Errors) }
;
magic_info_get_module_info(ModuleInfo),
- { module_info_types(ModuleInfo, Types) },
+ { module_info_get_type_table(ModuleInfo, Types) },
{ map__lookup(Types, TypeCtor, TypeDefn) },
{ hlds_data__get_type_defn_body(TypeDefn, TypeBody) },
{ set__init(NewErrors0) },
Index: compiler/make_hlds_passes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/make_hlds_passes.m,v
retrieving revision 1.12
diff -u -b -r1.12 make_hlds_passes.m
--- compiler/make_hlds_passes.m 29 Sep 2005 06:33:07 -0000 1.12
+++ compiler/make_hlds_passes.m 30 Sep 2005 06:31:49 -0000
@@ -158,7 +158,7 @@
% doing this may cause a compiler abort.
(
InvalidTypes1 = no,
- module_info_types(!.Module, Types),
+ module_info_get_type_table(!.Module, Types),
map__foldl3(process_type_defn, Types, no, InvalidTypes2, !Module,
!IO)
;
@@ -200,7 +200,7 @@
InvalidModes = InvalidModes0 `or` InvalidModes1,
mq_info_get_num_errors(MQInfo, MQ_NumErrors),
- module_info_num_errors(!.Module, ModuleNumErrors),
+ module_info_get_num_errors(!.Module, ModuleNumErrors),
NumErrors = ModuleNumErrors + MQ_NumErrors,
module_info_set_num_errors(NumErrors, !Module),
% The predid list is constructed in reverse order, for efficiency,
@@ -212,9 +212,9 @@
check_for_errors(P, FoundError, !ModuleInfo, !IO) :-
io__get_exit_status(BeforeStatus, !IO),
io__set_exit_status(0, !IO),
- module_info_num_errors(!.ModuleInfo, BeforeNumErrors),
+ module_info_get_num_errors(!.ModuleInfo, BeforeNumErrors),
P(!ModuleInfo, !IO),
- module_info_num_errors(!.ModuleInfo, AfterNumErrors),
+ module_info_get_num_errors(!.ModuleInfo, AfterNumErrors),
io__get_exit_status(AfterStatus, !IO),
(
AfterStatus = 0,
@@ -453,7 +453,7 @@
Item = mutable(Name, Type, _InitValue, Inst, _Attrs),
!.Status = item_status(ImportStatus, _),
( status_defined_in_this_module(ImportStatus, yes) ->
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
GetPredDecl = prog_mutable.get_pred_decl(ModuleName, Name,
Type, Inst),
add_item_decl_pass_1(GetPredDecl, Context, !Status, !ModuleInfo, _,
@@ -619,7 +619,7 @@
%
% XXX We don't currently support languages other than C.
%
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
ForeignDecl = pragma(compiler(mutable_decl),
foreign_decl(c, foreign_decl_is_exported,
"extern MR_Word " ++ TargetMutableName ++ ";")),
@@ -1059,7 +1059,7 @@
add_item_clause(Item, !Status, Context, !ModuleInfo, !QualInfo, !IO) :-
Item = mutable(Name, _Type, InitTerm, Inst, MutAttrs),
( status_defined_in_this_module(!.Status, yes) ->
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
varset__new_named_var(varset__init, "X", X, VarSet),
Attrs0 = default_attributes(c),
set_may_call_mercury(will_not_call_mercury, Attrs0, Attrs1),
@@ -1197,7 +1197,7 @@
% ( R = A + B <=> R = B + A ).
%
GoalType = promise(PromiseType) ,
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
module_add_clause(VarSet, predicate, qualified(ModuleName, Name),
HeadVars, Goal, Status, Context, GoalType, !ModuleInfo, !QualInfo, !IO).
@@ -1207,7 +1207,7 @@
predicate_table_search_sym_arity(PredTable0, is_fully_qualified,
Name, Arity, PredIds)
->
- module_info_stratified_preds(!.ModuleInfo, StratPredIds0),
+ module_info_get_stratified_preds(!.ModuleInfo, StratPredIds0),
set__insert_list(StratPredIds0, PredIds, StratPredIds),
module_info_set_stratified_preds(StratPredIds, !ModuleInfo)
;
@@ -1395,7 +1395,7 @@
% Check that a function applied to an exported type
% is also exported.
%
- module_info_ctor_field_table(Module, CtorFieldTable),
+ module_info_get_ctor_field_table(Module, CtorFieldTable),
(
% Abstract types have status `abstract_exported',
% so errors won't be reported for local field
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.351
diff -u -b -r1.351 mercury_compile.m
--- compiler/mercury_compile.m 29 Sep 2005 06:33:07 -0000 1.351
+++ compiler/mercury_compile.m 30 Sep 2005 06:31:49 -0000
@@ -1504,13 +1504,13 @@
io__remove_file(UsageFileName, _, !IO),
% magic sets can report errors.
- module_info_num_errors(HLDS50, NumErrors),
+ module_info_get_num_errors(HLDS50, NumErrors),
( NumErrors = 0 ->
globals__io_lookup_bool_option(intermodule_analysis, IntermodAnalysis,
!IO),
(
IntermodAnalysis = yes,
- module_info_analysis_info(HLDS50, AnalysisInfo),
+ module_info_get_analysis_info(HLDS50, AnalysisInfo),
analysis__write_analysis_files(
module_name_to_module_id(ModuleName), AnalysisInfo, !IO)
;
@@ -1879,7 +1879,7 @@
Prog = module(Module, Items),
parse_tree_to_hlds(Prog, MQInfo, EqvMap, HLDS, QualInfo,
UndefTypes, UndefModes, !IO),
- module_info_num_errors(HLDS, NumErrors),
+ module_info_get_num_errors(HLDS, NumErrors),
io__get_exit_status(Status, !IO),
(
( Status \= 0
@@ -2126,7 +2126,7 @@
;
true
),
- module_info_name(!.HLDS, ModuleName),
+ module_info_get_name(!.HLDS, ModuleName),
module_name_to_file_name(ModuleName, ".opt", yes, OptName, !IO),
update_interface(OptName, !IO),
touch_interface_datestamp(ModuleName, ".optdate", !IO)
@@ -2137,7 +2137,7 @@
( Intermod = yes ->
UpdateStatus = yes
; UseOptFiles = yes ->
- module_info_name(!.HLDS, ModuleName),
+ module_info_get_name(!.HLDS, ModuleName),
module_name_to_search_file_name(ModuleName, ".opt", OptName, !IO),
search_for_file(IntermodDirs, OptName, Found, !IO),
( Found = ok(_) ->
@@ -2445,7 +2445,7 @@
:- pred generate_aditi_proc_info(module_info::in, list(rtti_data)::out) is det.
generate_aditi_proc_info(HLDS, AditiProcInfoRttiData) :-
- module_info_aditi_top_down_procs(HLDS, Procs),
+ module_info_get_aditi_top_down_procs(HLDS, Procs),
AditiProcInfoRttiData = list__map(
(func(aditi_top_down_proc(proc(PredId, ProcId), _)) =
rtti__make_aditi_proc_info(HLDS, PredId, ProcId)
@@ -2458,7 +2458,7 @@
io::di, io::uo) is det.
backend_pass(!HLDS, GlobalData, LLDS, !DumpInfo, !IO) :-
- module_info_name(!.HLDS, ModuleName),
+ module_info_get_name(!.HLDS, ModuleName),
globals__io_lookup_bool_option(unboxed_float, UnboxFloat, !IO),
globals__io_lookup_bool_option(common_data, DoCommonData, !IO),
StaticCellInfo0 = init_static_cell_info(ModuleName, UnboxFloat,
@@ -2587,7 +2587,7 @@
% typeinfo_liveness. Since they may be opt_imported into other
% modules, we must switch off the tracing of such preds on a
% pred-by-pred basis; module-by-module wouldn't work.
- module_info_globals(!.HLDS, Globals0),
+ module_info_get_globals(!.HLDS, Globals0),
globals__get_trace_level(Globals0, TraceLevel),
globals__set_trace_level_none(Globals0, Globals1),
module_info_set_globals(Globals1, !HLDS),
@@ -2595,7 +2595,7 @@
globals__io_set_globals(Globals1Unique, !IO),
backend_pass_by_preds_3(ProcIds, PredId, PredInfo, !HLDS,
!GlobalData, IdProcList, !IO),
- module_info_globals(!.HLDS, Globals2),
+ module_info_get_globals(!.HLDS, Globals2),
globals__set_trace_level(TraceLevel, Globals2, Globals),
module_info_set_globals(Globals, !HLDS),
copy(Globals, GlobalsUnique),
@@ -2641,7 +2641,7 @@
backend_pass_by_preds_4(PredInfo, !ProcInfo, ProcId, PredId, !HLDS,
!GlobalData, ProcCode, !IO) :-
- module_info_globals(!.HLDS, Globals),
+ module_info_get_globals(!.HLDS, Globals),
globals__lookup_bool_option(Globals, optimize_saved_vars_const,
SavedVarsConst),
(
@@ -2737,9 +2737,9 @@
puritycheck(Verbose, Stats, !HLDS, FoundTypeError, FoundPostTypecheckError,
!IO) :-
- module_info_num_errors(!.HLDS, NumErrors0),
+ module_info_get_num_errors(!.HLDS, NumErrors0),
puritycheck(FoundTypeError, FoundPostTypecheckError, !HLDS, !IO),
- module_info_num_errors(!.HLDS, NumErrors),
+ module_info_get_num_errors(!.HLDS, NumErrors),
( NumErrors \= NumErrors0 ->
maybe_write_string(Verbose,
"% Program contains purity error(s).\n", !IO),
@@ -2754,13 +2754,13 @@
bool::out, bool::out, io::di, io::uo) is det.
modecheck(Verbose, Stats, !HLDS, FoundModeError, UnsafeToContinue, !IO) :-
- module_info_num_errors(!.HLDS, NumErrors0),
+ module_info_get_num_errors(!.HLDS, NumErrors0),
maybe_benchmark_modes(
(pred(H0::in, {H,U}::out, di, uo) is det -->
modecheck(H0, H, U)
),
"modecheck", !.HLDS, {!:HLDS, UnsafeToContinue}, !IO),
- module_info_num_errors(!.HLDS, NumErrors),
+ module_info_get_num_errors(!.HLDS, NumErrors),
( NumErrors \= NumErrors0 ->
FoundModeError = yes,
maybe_write_string(Verbose, "% Program contains mode error(s).\n",
@@ -2843,9 +2843,9 @@
module_info::in, module_info::out, bool::out, io::di, io::uo) is det.
check_determinism(Verbose, Stats, !HLDS, FoundError, !IO) :-
- module_info_num_errors(!.HLDS, NumErrors0),
+ module_info_get_num_errors(!.HLDS, NumErrors0),
determinism_pass(!HLDS, !IO),
- module_info_num_errors(!.HLDS, NumErrors),
+ module_info_get_num_errors(!.HLDS, NumErrors),
( NumErrors \= NumErrors0 ->
FoundError = yes,
maybe_write_string(Verbose,
@@ -2935,9 +2935,9 @@
check_unique_modes(Verbose, Stats, !HLDS, FoundError, !IO) :-
maybe_write_string(Verbose,
"% Checking for backtracking over unique modes...\n", !IO),
- module_info_num_errors(!.HLDS, NumErrors0),
+ module_info_get_num_errors(!.HLDS, NumErrors0),
unique_modes__check_module(!HLDS, !IO),
- module_info_num_errors(!.HLDS, NumErrors),
+ module_info_get_num_errors(!.HLDS, NumErrors),
( NumErrors \= NumErrors0 ->
FoundError = yes,
maybe_write_string(Verbose,
@@ -2954,7 +2954,7 @@
check_stratification(Verbose, Stats, !HLDS, FoundError,
!IO) :-
- module_info_stratified_preds(!.HLDS, StratifiedPreds),
+ module_info_get_stratified_preds(!.HLDS, StratifiedPreds),
globals__io_lookup_bool_option(warn_non_stratification, Warn, !IO),
(
( \+ set__empty(StratifiedPreds)
@@ -3188,7 +3188,7 @@
(
ShowDepGraph = yes,
maybe_write_string(Verbose, "% Writing dependency graph...", !IO),
- module_info_name(!.HLDS, ModuleName),
+ module_info_get_name(!.HLDS, ModuleName),
module_name_to_file_name(ModuleName, ".dependency_graph", yes,
FileName, !IO),
io__open_output(FileName, Res, !IO),
@@ -3223,7 +3223,7 @@
maybe_write_string(Verbose,
"% Outputing profiling call graph...", !IO),
maybe_flush_output(Verbose, !IO),
- module_info_name(!.HLDS, ModuleName),
+ module_info_get_name(!.HLDS, ModuleName),
module_name_to_file_name(ModuleName, ".prof", yes, ProfFileName, !IO),
io__open_output(ProfFileName, Res, !IO),
( Res = ok(FileStream) ->
@@ -3414,7 +3414,7 @@
% Always produce the specialized versions for which
% `:- pragma type_spec' declarations exist, because
% importing modules might call them.
- module_info_type_spec_info(!.HLDS, TypeSpecInfo),
+ module_info_get_type_spec_info(!.HLDS, TypeSpecInfo),
TypeSpecInfo = type_spec_info(TypeSpecPreds, _, _, _),
(
( HigherOrder = yes
@@ -3991,7 +3991,7 @@
foreign_interface_info::out) is det.
get_c_interface_info(HLDS, UseForeignLanguage, Foreign_InterfaceInfo) :-
- module_info_name(HLDS, ModuleName),
+ module_info_get_name(HLDS, ModuleName),
module_info_get_foreign_decl(HLDS, ForeignDecls),
module_info_get_foreign_import_module(HLDS, ForeignImports),
module_info_get_foreign_body_code(HLDS, ForeignBodyCode),
@@ -4430,8 +4430,9 @@
base_typeclass_info__generate_rtti(HLDS, TypeClassInfoRtti),
generate_aditi_proc_info(HLDS, AditiProcInfoRtti),
- module_info_globals(HLDS, Globals),
- globals__lookup_bool_option(Globals, new_type_class_rtti, NewTypeClassRtti),
+ module_info_get_globals(HLDS, Globals),
+ globals__lookup_bool_option(Globals, new_type_class_rtti,
+ NewTypeClassRtti),
type_class_info__generate_rtti(HLDS, NewTypeClassRtti,
NewTypeClassInfoRttiData),
list__condense([TypeCtorRtti, TypeClassInfoRtti,
@@ -4505,7 +4506,7 @@
globals__io_lookup_accumulating_option(dump_hlds, DumpStages, !IO),
StageNumStr = stage_num_str(StageNum),
( should_dump_stage(StageNum, StageNumStr, StageName, DumpStages) ->
- module_info_name(HLDS, ModuleName),
+ module_info_get_name(HLDS, ModuleName),
module_name_to_file_name(ModuleName, ".hlds_dump", yes, BaseFileName,
!IO),
DumpFileName = BaseFileName ++ "." ++ StageNumStr ++ "-" ++ StageName,
@@ -4655,7 +4656,7 @@
globals__io_lookup_bool_option(dump_rl, Dump, !IO),
(
Dump = yes,
- module_info_name(ModuleInfo, ModuleName0),
+ module_info_get_name(ModuleInfo, ModuleName0),
mdbcomp__prim_data__sym_name_to_string(ModuleName0, ModuleName),
string__append_list([ModuleName, ".rl_dump", StageName], DumpFile),
globals__io_lookup_bool_option(verbose, Verbose, !IO),
Index: compiler/ml_closure_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_closure_gen.m,v
retrieving revision 1.33
diff -u -b -r1.33 ml_closure_gen.m
--- compiler/ml_closure_gen.m 13 Sep 2005 01:19:55 -0000 1.33
+++ compiler/ml_closure_gen.m 27 Sep 2005 06:39:43 -0000
@@ -223,7 +223,7 @@
Access, Initializer, Context),
ClosureLayoutDefns = ClosureProcIdDefns ++ TVarDefns ++
ClosureArgDefns ++ [ClosureLayoutDefn],
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
MLDS_ModuleName = mercury_module_name_to_mlds(ModuleName),
ClosureLayoutRval = lval(var(qual(MLDS_ModuleName, module_qual, Name),
ClosureLayoutType)).
@@ -237,7 +237,7 @@
InitProcId = init_obj(const(null(ProcIdType))),
ProcIdType = mlds__generic_type,
ClosureProcIdDefns = [].
-% module_info_name(ModuleInfo, ModuleName),
+% module_info_get_name(ModuleInfo, ModuleName),
% term__context_file(Context, FileName),
% term__context_line(Context, LineNumber),
% % XXX We don't have the GoalInfo here,
@@ -345,7 +345,7 @@
;
% For other types, we need to generate a definition of the
% pseudo_type_info for that type, in the the current module.
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
RttiData = pseudo_type_info(PseudoTypeInfo),
rtti_data_to_id(RttiData, RttiId),
RttiDefns0 = rtti_data_list_to_mlds(ModuleInfo, [RttiData]),
@@ -380,7 +380,7 @@
;
% For other types, we need to generate a definition of the type_info
% for that type, in the the current module.
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
RttiData = type_info(TypeInfo),
rtti_data_to_id(RttiData, RttiId),
RttiDefns0 = rtti_data_list_to_mlds(ModuleInfo, [RttiData]),
@@ -437,7 +437,7 @@
Defn = ml_gen_static_const_defn(TvarVectorName, ArrayType,
Access, Initializer, Context),
Defns = [Defn],
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
MLDS_ModuleName = mercury_module_name_to_mlds(ModuleName),
MLDS_Rval = lval(var(
qual(MLDS_ModuleName, module_qual, TvarVectorName),
@@ -875,7 +875,7 @@
% Generate code to declare and initialize the local variables
% needed for accurate GC.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
(
MaybeClosureA = yes({ClosureArgType2, ClosureArgName2}),
globals__get_gc_method(Globals, accurate)
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.158
diff -u -b -r1.158 ml_code_gen.m
--- compiler/ml_code_gen.m 29 Sep 2005 06:33:08 -0000 1.158
+++ compiler/ml_code_gen.m 30 Sep 2005 06:31:50 -0000
@@ -803,7 +803,7 @@
%-----------------------------------------------------------------------------%
ml_code_gen(ModuleInfo, MLDS, !IO) :-
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
ml_gen_foreign_code(ModuleInfo, ForeignCode, !IO),
ml_gen_imports(ModuleInfo, Imports),
ml_gen_defns(ModuleInfo, Defns, !IO),
@@ -864,18 +864,18 @@
ml_gen_imports(ModuleInfo, MLDS_ImportList) :-
% Determine all the mercury imports.
% XXX This is overly conservative, i.e. we import more than we really need.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
module_info_get_all_deps(ModuleInfo, AllImports0),
% No module needs to import itself.
- module_info_name(ModuleInfo, ThisModule),
+ module_info_get_name(ModuleInfo, ThisModule),
AllImports = set__delete(AllImports0, ThisModule),
P = (func(Name) = mercury_import(compiler_visible_interface,
mercury_module_name_to_mlds(Name))),
% For every foreign type determine the import needed to find
% the declaration for that type.
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
ForeignTypeImports = list__condense(
list__map(foreign_type_required_imports(Target), map__values(Types))),
@@ -1049,7 +1049,7 @@
Initializer = init_obj(const(null(Type))),
proc_info_context(ProcInfo, Context),
(
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_gc_method(Globals, GC_Method),
GC_Method = accurate
->
@@ -1203,7 +1203,7 @@
ml_det_copy_out_vars(ModuleInfo, CopiedOutputVars, !Info) :-
ml_gen_info_get_byref_output_vars(!.Info, OutputVars),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, det_copy_out, DetCopyOut),
(
% If --det-copy-out is enabled, all output variables are returned
@@ -1238,7 +1238,7 @@
ml_gen_info::in, ml_gen_info::out) is det.
ml_set_up_initial_succ_cont(ModuleInfo, NondetCopiedOutputVars, !Info) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, nondet_copy_out, NondetCopyOut),
(
NondetCopyOut = yes,
@@ -2162,7 +2162,7 @@
AssignOutputsList
]),
ml_gen_info_get_module_info(!.Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
( CodeModel = model_non ->
@@ -2345,7 +2345,7 @@
OutputVarLvals, ForeignCode),
ml_gen_info_get_module_info(!.Info, ModuleInfo),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
MLDSModuleName = mercury_module_name_to_mlds(ModuleName),
ml_success_lval(!.Info, SucceededLval),
@@ -2439,7 +2439,7 @@
% the procedure interface, not from the procedure body
ml_gen_info_get_byref_output_vars(!.Info, ByRefOutputVars),
ml_gen_info_get_value_output_vars(!.Info, CopiedOutputVars),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
MLDSModuleName = mercury_module_name_to_mlds(ModuleName),
% XXX in the code to marshall parameters, fjh says:
@@ -2740,7 +2740,7 @@
ml_gen_obtain_release_global_lock(Info, ThreadSafe, PredId,
ObtainLock, ReleaseLock) :-
ml_gen_info_get_module_info(Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, parallel, Parallel),
(
Parallel = yes,
@@ -2918,7 +2918,7 @@
)
->
% In the usual case, we can just use an assignment and perhaps a cast.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_data, HighLevelData),
(
HighLevelData = yes,
@@ -3007,7 +3007,7 @@
MLDSType = mercury_type_to_mlds_type(ModuleInfo, OrigType),
% Construct an MLDS lval for the local Java representation
% of the argument.
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
MLDSModuleName = mercury_module_name_to_mlds(ModuleName),
NonMangledVarName = mlds__var_name(ArgName, no),
QualLocalVarName = qual(MLDSModuleName, module_qual,
@@ -3109,7 +3109,7 @@
->
% In the usual case, we can just use an assignment,
% perhaps with a cast.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_data,
HighLevelData),
(
Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.94
diff -u -b -r1.94 ml_code_util.m
--- compiler/ml_code_util.m 19 Sep 2005 07:26:24 -0000 1.94
+++ compiler/ml_code_util.m 27 Sep 2005 06:39:44 -0000
@@ -1077,7 +1077,7 @@
ml_gen_params_base(ModuleInfo, HeadVarNames, HeadTypes, HeadModes,
PredOrFunc, CodeModel, FuncParams, !MaybeInfo) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
CopyOut = get_copy_out_option(Globals, CodeModel),
ml_gen_arg_decls(ModuleInfo, HeadVarNames, HeadTypes, HeadModes,
CopyOut, FuncArgs0, RetTypes0, !MaybeInfo),
@@ -1892,7 +1892,7 @@
ml_gen_maybe_gc_trace_code_2(VarName, DeclType, HowToGetTypeInfo, Context,
Maybe_GC_TraceCode, !Info) :-
ml_gen_info_get_module_info(!.Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_gc_method(Globals, GC),
(
GC = accurate,
@@ -2038,7 +2038,7 @@
% type_infos. This is safe because those type_infos will only be used
% in the immediately following call to gc_trace/1.
ml_gen_info_get_module_info(!.Info, ModuleInfo),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
fixup_newobj(MLDS_TypeInfoStatement0,
mercury_module_name_to_mlds(ModuleName),
MLDS_TypeInfoStatement, MLDS_NewobjLocals),
@@ -2441,7 +2441,7 @@
ml_gen_info_get_module_name(Info, ModuleName) :-
ml_gen_info_get_module_info(Info, ModuleInfo),
- module_info_name(ModuleInfo, ModuleName).
+ module_info_get_name(ModuleInfo, ModuleName).
ml_gen_info_get_pred_id(Info, Info ^ pred_id).
ml_gen_info_get_proc_id(Info, Info ^ proc_id).
@@ -2466,7 +2466,7 @@
ml_gen_info_get_globals(Info, Globals) :-
ml_gen_info_get_module_info(Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals).
+ module_info_get_globals(ModuleInfo, Globals).
ml_gen_info_new_label(Label, !Info) :-
Counter0 = !.Info ^ label,
Index: compiler/ml_type_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_type_gen.m,v
retrieving revision 1.44
diff -u -b -r1.44 ml_type_gen.m
--- compiler/ml_type_gen.m 13 Sep 2005 01:19:57 -0000 1.44
+++ compiler/ml_type_gen.m 27 Sep 2005 06:39:44 -0000
@@ -105,7 +105,7 @@
globals__io_get_target(Target, !IO),
(
HighLevelData = yes,
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__keys(TypeTable, TypeCtors0),
list__filter((pred(TypeCtor::in) is semidet :-
\+ type_ctor_needs_lowlevel_rep(Target, TypeCtor)
@@ -343,7 +343,7 @@
BaseClassId = mlds__class_type(QualBaseClassName, BaseClassArity,
mlds__class),
QualBaseClassName = qual(BaseClassModuleName, QualKind, BaseClassName),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
BaseClassQualifier = mlds__append_class_qualifier(
BaseClassModuleName, QualKind, Globals,
BaseClassName, BaseClassArity),
@@ -624,7 +624,7 @@
% Generate a constructor function to initialize the fields, if needed
% (not all back-ends use constructor functions).
MaybeSecTagVal = get_secondary_tag(TagVal),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
( target_uses_constructors(Target) = yes ->
( ml_tag_uses_base_class(TagVal) ->
Index: compiler/ml_unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ml_unify_gen.m,v
retrieving revision 1.85
diff -u -b -r1.85 ml_unify_gen.m
--- compiler/ml_unify_gen.m 22 Sep 2005 06:08:40 -0000 1.85
+++ compiler/ml_unify_gen.m 27 Sep 2005 06:39:45 -0000
@@ -462,7 +462,7 @@
ml_gen_reserved_address(ModuleInfo, reserved_object(TypeCtor, QualCtorName,
CtorArity), _Type) = Rval :-
( QualCtorName = qualified(ModuleName, CtorName) ->
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
MLDS_ModuleName = mercury_module_name_to_mlds(ModuleName),
TypeCtor = TypeName - TypeArity,
unqualify_name(TypeName, UnqualTypeName),
@@ -548,7 +548,7 @@
% secondary tag -- are boxed, and so we need box it here.
ml_gen_info_get_module_info(!.Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_data, HighLevelData),
(
HighLevelData = no,
@@ -830,7 +830,7 @@
ml_gen_field_type(Info, Type, FieldType) :-
ml_gen_info_get_module_info(Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_data, HighLevelData),
ml_type_as_field(Type, ModuleInfo, HighLevelData, FieldType).
@@ -1138,7 +1138,7 @@
->
% Figure out the type of the field. Note that for the MLDS->C and
% MLDS->asm back-ends, we need to box floating point fields.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_data, HighLevelData),
ml_type_as_field(ConsArgType, ModuleInfo, HighLevelData, BoxedArgType),
MLDS_Type = mercury_type_to_mlds_type(ModuleInfo, BoxedArgType),
@@ -1435,7 +1435,7 @@
Offset, ArgNum, Tag, Context, !Statements, !Info) :-
Field = MaybeFieldName - FieldType,
ml_gen_info_get_module_info(!.Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, highlevel_data, HighLevelData),
(
% With the low-level data representation, we access all fields
@@ -1646,7 +1646,7 @@
ModuleInfo, Rval),
SecondaryTagTest = binop(eq, SecondaryTagField,
const(int_const(SecondaryTagVal))),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_int_option(Globals, num_tag_bits, NumTagBits),
( NumTagBits = 0 ->
% No need to test the primary tag.
@@ -1690,7 +1690,7 @@
ml_gen_secondary_tag_rval(PrimaryTagVal, VarType, ModuleInfo, Rval) =
SecondaryTagField :-
MLDS_VarType = mercury_type_to_mlds_type(ModuleInfo, VarType),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
globals__lookup_bool_option(Globals, highlevel_data, HighLevelData),
(
@@ -1732,8 +1732,8 @@
% secondary tags. If so, then the secondary tag field is in a class
% "tag_type" that is derived from the base class for this type,
% rather than in the base class itself.
- module_info_globals(ModuleInfo, Globals),
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_globals(ModuleInfo, Globals),
+ module_info_get_type_table(ModuleInfo, TypeTable),
TypeDefn = map__lookup(TypeTable, TypeCtor),
hlds_data__get_type_defn_body(TypeDefn, TypeDefnBody),
( TypeDefnBody = du_type(Ctors, TagValues, _, _, _ReservedTag, _) ->
Index: compiler/mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds.m,v
retrieving revision 1.122
diff -u -b -r1.122 mlds.m
--- compiler/mlds.m 29 Sep 2005 06:33:09 -0000 1.122
+++ compiler/mlds.m 30 Sep 2005 06:31:51 -0000
@@ -1793,13 +1793,13 @@
MLDSType = mlds__mercury_array_type(MLDSElemType)
;
type_to_ctor_and_args(Type, TypeCtor, _),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__search(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, Body),
Body = foreign_type(foreign_type_body(MaybeIL, MaybeC,
MaybeJava))
->
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
(
Target = c,
Index: compiler/mode_constraints.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_constraints.m,v
retrieving revision 1.13
diff -u -b -r1.13 mode_constraints.m
--- compiler/mode_constraints.m 13 Sep 2005 04:56:09 -0000 1.13
+++ compiler/mode_constraints.m 27 Sep 2005 06:39:47 -0000
@@ -123,7 +123,7 @@
map.init, AbstractModeConstraints
),
- hlds_module.module_info_name(!.ModuleInfo, ModuleName),
+ hlds_module.module_info_get_name(!.ModuleInfo, ModuleName),
CreateDirectories = yes,
parse_tree.modules.module_name_to_file_name(ModuleName,
Index: compiler/mode_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_errors.m,v
retrieving revision 1.91
diff -u -b -r1.91 mode_errors.m
--- compiler/mode_errors.m 14 Sep 2005 05:26:38 -0000 1.91
+++ compiler/mode_errors.m 27 Sep 2005 06:39:47 -0000
@@ -360,7 +360,7 @@
% If there's more than one error, and we have verbose-errors enabled,
% report them all.
mode_info_get_module_info(ModeInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, verbose_errors, VerboseErrors),
(
VerboseErrors = yes,
@@ -441,7 +441,7 @@
= Specs :-
DelayedGoal = delayed_goal(Vars, Error, Goal),
mode_info_get_module_info(!.ModeInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, debug_modes, Debug),
(
Debug = yes,
@@ -550,7 +550,7 @@
words("expected instantiatedness was"),
words(add_quotes(inst_to_string(ModeInfo, Inst))), suffix("."), nl],
mode_info_get_module_info(ModeInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, verbose_errors, VerboseErrors),
(
VerboseErrors = yes,
@@ -618,7 +618,7 @@
words("have the following insts:"), nl_indent_delta(1)] ++
inst_list_to_sep_lines(!.ModeInfo, Insts) ++
[words("which does not match any of the valid modes for")],
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, verbose_errors, VerboseErrors),
(
VerboseErrors = yes,
@@ -722,7 +722,7 @@
words(add_quotes(inst_to_string(ModeInfo, VarInst))), suffix(","), nl,
words("expected instantiatedness was `ground' or `any'."), nl],
mode_info_get_module_info(ModeInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, verbose_errors, VerboseErrors),
(
VerboseErrors = yes,
@@ -775,7 +775,7 @@
% This "error" message is really a "sorry, not implemented" message.
% We only print the message if we will actually generating code.
mode_info_get_module_info(ModeInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, errorcheck_only, ErrorcheckOnly),
(
ErrorcheckOnly = no,
@@ -815,7 +815,7 @@
mode_info_get_varset(ModeInfo, VarSet),
mode_info_get_instvarset(ModeInfo, InstVarSet),
mode_info_get_module_info(ModeInfo, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
(
RHS = error_at_var(Y),
RHSStr = mercury_var_to_string(Y, VarSet, no)
Index: compiler/mode_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_info.m,v
retrieving revision 1.73
diff -u -b -r1.73 mode_info.m
--- compiler/mode_info.m 27 Aug 2005 09:41:57 -0000 1.73
+++ compiler/mode_info.m 27 Sep 2005 06:39:47 -0000
@@ -391,7 +391,7 @@
mode_info_init(ModuleInfo, PredId, ProcId, Context, LiveVars, InstMapping0,
HowToCheck, MayChangeProc, ModeInfo) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, debug_modes, DebugModes),
globals__lookup_int_option(Globals, debug_modes_pred_id,
DebugModesPredId),
@@ -498,10 +498,10 @@
module_info_preds(ModeInfo ^ module_info, Preds).
mode_info_get_modes(ModeInfo, Modes) :-
- module_info_modes(ModeInfo ^ module_info, Modes).
+ module_info_get_mode_table(ModeInfo ^ module_info, Modes).
mode_info_get_insts(ModeInfo, Insts) :-
- module_info_insts(ModeInfo ^ module_info, Insts).
+ module_info_get_inst_table(ModeInfo ^ module_info, Insts).
mode_info_set_call_context(unify(UnifyContext), !MI) :-
mode_info_set_mode_context(unify(UnifyContext, left), !MI).
Index: compiler/mode_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mode_util.m,v
retrieving revision 1.173
diff -u -b -r1.173 mode_util.m
--- compiler/mode_util.m 28 Sep 2005 07:32:11 -0000 1.173
+++ compiler/mode_util.m 28 Sep 2005 07:39:02 -0000
@@ -268,16 +268,15 @@
%-----------------------------------------------------------------------------%
-modes_to_arg_modes(ModuleInfo, Modes, Types, ArgModes) :-
- ( Modes = [], Types = [] ->
- ArgModes = []
- ; Modes = [Mode | Modes1], Types = [Type | Types1] ->
+modes_to_arg_modes(_ModuleInfo, [], [], []).
+modes_to_arg_modes(_ModuleInfo, [], [_ | _], _) :-
+ unexpected(this_file, "modes_to_arg_modes: length mismatch").
+modes_to_arg_modes(_ModuleInfo, [_ | _], [], _) :-
+ unexpected(this_file, "modes_to_arg_modes: length mismatch").
+modes_to_arg_modes(ModuleInfo, [Mode | Modes], [Type | Types],
+ [ArgMode | ArgModes]) :-
mode_to_arg_mode(ModuleInfo, Mode, Type, ArgMode),
- modes_to_arg_modes(ModuleInfo, Modes1, Types1, ArgModes1),
- ArgModes = [ArgMode | ArgModes1]
- ;
- unexpected(this_file, "modes_to_arg_modes: length mismatch")
- ).
+ modes_to_arg_modes(ModuleInfo, Modes, Types, ArgModes).
mode_to_arg_mode(ModuleInfo, Mode, Type, ArgMode) :-
mode_to_arg_mode_2(ModuleInfo, Mode, Type, [], ArgMode).
@@ -392,7 +391,7 @@
inst_lookup(ModuleInfo, InstName, Inst) :-
(
InstName = unify_inst(_, _, _, _),
- module_info_insts(ModuleInfo, InstTable),
+ module_info_get_inst_table(ModuleInfo, InstTable),
inst_table_get_unify_insts(InstTable, UnifyInstTable),
map__lookup(UnifyInstTable, InstName, MaybeInst),
( MaybeInst = known(Inst0, _) ->
@@ -402,7 +401,7 @@
)
;
InstName = merge_inst(A, B),
- module_info_insts(ModuleInfo, InstTable),
+ module_info_get_inst_table(ModuleInfo, InstTable),
inst_table_get_merge_insts(InstTable, MergeInstTable),
map__lookup(MergeInstTable, A - B, MaybeInst),
( MaybeInst = known(Inst0) ->
@@ -412,7 +411,7 @@
)
;
InstName = ground_inst(_, _, _, _),
- module_info_insts(ModuleInfo, InstTable),
+ module_info_get_inst_table(ModuleInfo, InstTable),
inst_table_get_ground_insts(InstTable, GroundInstTable),
map__lookup(GroundInstTable, InstName, MaybeInst),
( MaybeInst = known(Inst0, _) ->
@@ -422,7 +421,7 @@
)
;
InstName = any_inst(_, _, _, _),
- module_info_insts(ModuleInfo, InstTable),
+ module_info_get_inst_table(ModuleInfo, InstTable),
inst_table_get_any_insts(InstTable, AnyInstTable),
map__lookup(AnyInstTable, InstName, MaybeInst),
( MaybeInst = known(Inst0, _) ->
@@ -432,7 +431,7 @@
)
;
InstName = shared_inst(SharedInstName),
- module_info_insts(ModuleInfo, InstTable),
+ module_info_get_inst_table(ModuleInfo, InstTable),
inst_table_get_shared_insts(InstTable, SharedInstTable),
map__lookup(SharedInstTable, SharedInstName, MaybeInst),
( MaybeInst = known(Inst0) ->
@@ -442,7 +441,7 @@
)
;
InstName = mostly_uniq_inst(NondetLiveInstName),
- module_info_insts(ModuleInfo, InstTable),
+ module_info_get_inst_table(ModuleInfo, InstTable),
inst_table_get_mostly_uniq_insts(InstTable,
NondetLiveInstTable),
map__lookup(NondetLiveInstTable, NondetLiveInstName, MaybeInst),
@@ -453,7 +452,7 @@
)
;
InstName = user_inst(Name, Args),
- module_info_insts(ModuleInfo, InstTable),
+ module_info_get_inst_table(ModuleInfo, InstTable),
inst_table_get_user_insts(InstTable, UserInstTable),
user_inst_table_get_inst_defns(UserInstTable, InstDefns),
list__length(Args, Arity),
@@ -790,7 +789,7 @@
;
type_to_ctor_and_args(Type, TypeCtor, TypeArgs),
TypeCtor = qualified(TypeModule, _) - _,
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__search(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_tparams(TypeDefn, TypeParams),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
@@ -898,7 +897,7 @@
mode_get_insts_semidet(ModuleInfo, user_defined_mode(Name, Args),
Initial, Final) :-
list__length(Args, Arity),
- module_info_modes(ModuleInfo, Modes),
+ module_info_get_mode_table(ModuleInfo, Modes),
mode_table_get_mode_defns(Modes, ModeDefns),
map__search(ModeDefns, Name - Arity, HLDS_Mode),
HLDS_Mode = hlds_mode_defn(_VarSet, Params, ModeDefn, _Context, _Status),
Index: compiler/modes.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modes.m,v
retrieving revision 1.313
diff -u -b -r1.313 modes.m
--- compiler/modes.m 28 Sep 2005 07:32:11 -0000 1.313
+++ compiler/modes.m 28 Sep 2005 07:39:03 -0000
@@ -608,7 +608,7 @@
( ErrsInThisPred = 0 ->
true
;
- module_info_num_errors(!.ModuleInfo, ModNumErrors0),
+ module_info_get_num_errors(!.ModuleInfo, ModNumErrors0),
ModNumErrors1 = ModNumErrors0 + ErrsInThisPred,
module_info_set_num_errors(ModNumErrors1, !ModuleInfo),
module_info_remove_predid(PredId, !ModuleInfo)
@@ -1522,7 +1522,7 @@
instmap__lookup_var(InstMap, Arg1, Inst1),
Inst1 = bound(Unique, [functor(ConsId, [])]),
mode_info_get_module_info(!.ModeInfo, ModuleInfo),
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
mode_info_get_var_types(!.ModeInfo, VarTypes),
map__lookup(VarTypes, Arg1, ArgType1),
type_to_ctor_and_args(ArgType1, ArgTypeCtor1, _),
@@ -3150,7 +3150,7 @@
;
TypeCtor = unqualified(_TypeName) - _Arity,
mode_info_get_module_info(!.ModeInfo, ModuleInfo),
- hlds_module__module_info_name(ModuleInfo, ModuleName)
+ hlds_module__module_info_get_name(ModuleInfo, ModuleName)
),
NonLocals = set__make_singleton_set(Var),
InstmapDeltaAL = [Var - Inst],
Index: compiler/passes_aux.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.72
diff -u -b -r1.72 passes_aux.m
--- compiler/passes_aux.m 13 Sep 2005 04:56:10 -0000 1.72
+++ compiler/passes_aux.m 27 Sep 2005 06:39:51 -0000
@@ -603,9 +603,9 @@
report_sizes(ModuleInfo, !IO) :-
module_info_preds(ModuleInfo, Preds),
tree_stats("Pred table", Preds, !IO),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
tree_stats("Type table", Types, !IO),
- module_info_ctors(ModuleInfo, Ctors),
+ module_info_get_cons_table(ModuleInfo, Ctors),
tree_stats("Constructor table", Ctors, !IO).
:- pred tree_stats(string::in, map(_K, _V)::in, io::di, io::uo) is det.
Index: compiler/pd_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_info.m,v
retrieving revision 1.19
diff -u -b -r1.19 pd_info.m
--- compiler/pd_info.m 22 Jul 2005 12:31:58 -0000 1.19
+++ compiler/pd_info.m 27 Sep 2005 06:39:51 -0000
@@ -616,7 +616,7 @@
goal_info_get_context(GoalInfo, Context),
term__context_line(Context, Line),
pd_info_get_module_info(!.PDInfo, ModuleInfo0),
- module_info_name(ModuleInfo0, ModuleName),
+ module_info_get_name(ModuleInfo0, ModuleName),
make_pred_name_with_context(ModuleName, "DeforestationIn",
predicate, PredName, Line, Count, SymName),
unqualify_name(SymName, Name),
Index: compiler/pd_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_util.m,v
retrieving revision 1.40
diff -u -b -r1.40 pd_util.m
--- compiler/pd_util.m 30 Aug 2005 04:11:56 -0000 1.40
+++ compiler/pd_util.m 27 Sep 2005 06:39:51 -0000
@@ -219,7 +219,7 @@
pd_util__requantify_goal(NonLocals, !Goal, !PDInfo),
pd_util__recompute_instmap_delta(!Goal, !PDInfo),
pd_util__rerun_det_analysis(!Goal, !PDInfo, !IO),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
simplify__find_simplifications(no, Globals, Simplifications),
pd_util__simplify_goal(Simplifications, !Goal, !PDInfo)
;
@@ -239,7 +239,7 @@
pd_util__simplify_goal(Simplifications, Goal0, Goal, !PDInfo) :-
% Construct a simplify_info.
pd_info_get_module_info(!.PDInfo, ModuleInfo0),
- module_info_globals(ModuleInfo0, Globals),
+ module_info_get_globals(ModuleInfo0, Globals),
pd_info_get_pred_proc_id(!.PDInfo, proc(PredId, ProcId)),
proc_info_vartypes(ProcInfo0, VarTypes0),
det_info_init(ModuleInfo0, VarTypes0, PredId, ProcId, Globals, DetInfo0),
@@ -370,7 +370,7 @@
ModuleInfo0, ModuleInfo),
pd_info_set_module_info(ModuleInfo, !PDInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
proc_info_vartypes(ProcInfo, VarTypes),
det_info_init(ModuleInfo, VarTypes, PredId, ProcId, Globals, DetInfo),
pd_info_get_instmap(!.PDInfo, InstMap),
Index: compiler/polymorphism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/polymorphism.m,v
retrieving revision 1.276
diff -u -b -r1.276 polymorphism.m
--- compiler/polymorphism.m 22 Sep 2005 06:17:20 -0000 1.276
+++ compiler/polymorphism.m 27 Sep 2005 06:39:52 -0000
@@ -2246,7 +2246,7 @@
Proofs = !.Info ^ proof_map,
ModuleInfo = !.Info ^ module_info,
- module_info_instances(ModuleInfo, InstanceTable),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
map__lookup(InstanceTable, ClassId, InstanceList),
list__index1_det(InstanceList, InstanceNum, ProofInstanceDefn),
@@ -2364,7 +2364,7 @@
% Look up the definition of the subclass
poly_info_get_module_info(!.Info, ModuleInfo),
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
map__lookup(ClassTable, SubClassId, SubClassDefn),
% Work out which superclass typeclass_info to take.
@@ -2411,7 +2411,7 @@
poly_info_get_module_info(!.Info, ModuleInfo),
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
map__lookup(ClassTable, ClassId, ClassDefn),
polymorphism__get_arg_superclass_vars(ClassDefn, InstanceTypes,
@@ -2430,7 +2430,7 @@
polymorphism__new_typeclass_info_var(Constraint, ClassNameString,
BaseVar, !Info),
- module_info_instances(ModuleInfo, InstanceTable),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
map__lookup(InstanceTable, ClassId, InstanceList),
list__index1_det(InstanceList, InstanceNum, InstanceDefn),
InstanceModuleName = InstanceDefn ^ instance_module,
@@ -3105,7 +3105,7 @@
% Work out how many superclasses the class has.
list__length(ClassTypes, ClassArity),
ClassId = class_id(ClassName0, ClassArity),
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
map__lookup(ClassTable, ClassId, ClassDefn),
SuperClasses = ClassDefn ^ class_supers,
list__length(SuperClasses, NumSuperClasses),
@@ -3301,11 +3301,11 @@
module_info::out) is det.
polymorphism__expand_class_method_bodies(!ModuleInfo) :-
- module_info_classes(!.ModuleInfo, Classes),
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_class_table(!.ModuleInfo, Classes),
+ module_info_get_name(!.ModuleInfo, ModuleName),
map__keys(Classes, ClassIds0),
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, user_guided_type_specialization,
TypeSpec),
(
Index: compiler/post_term_analysis.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_term_analysis.m,v
retrieving revision 1.4
diff -u -b -r1.4 post_term_analysis.m
--- compiler/post_term_analysis.m 29 Aug 2005 08:44:13 -0000 1.4
+++ compiler/post_term_analysis.m 27 Sep 2005 06:39:52 -0000
@@ -106,7 +106,7 @@
->
module_info_get_special_pred_map(ModuleInfo,
SpecialPredMap),
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map.foldl(warn_non_term_user_special_pred(ModuleInfo,
TypeTable), SpecialPredMap, !IO)
;
Index: compiler/post_typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/post_typecheck.m,v
retrieving revision 1.79
diff -u -b -r1.79 post_typecheck.m
--- compiler/post_typecheck.m 14 Sep 2005 05:26:39 -0000 1.79
+++ compiler/post_typecheck.m 27 Sep 2005 06:39:52 -0000
@@ -691,7 +691,7 @@
(
check_marker(Markers, base_relation),
ModuleName = pred_info_module(!.PredInfo),
- module_info_name(ModuleInfo, ModuleName)
+ module_info_get_name(ModuleInfo, ModuleName)
->
check_aditi_state(ModuleInfo, !.PredInfo, !IO)
;
@@ -764,7 +764,7 @@
% case for assertions
PromiseType = true
->
- module_info_assertion_table(!.Module, AssertTable0),
+ module_info_get_assertion_table(!.Module, AssertTable0),
assertion_table_add_assertion(PromiseId, AssertionId,
AssertTable0, AssertTable),
module_info_set_assertion_table(AssertTable, !Module),
@@ -780,7 +780,7 @@
->
promise_ex_goal(PromiseId, !.Module, Goal),
predids_from_goal(Goal, PredIds),
- module_info_exclusive_table(!.Module, Table0),
+ module_info_get_exclusive_table(!.Module, Table0),
list__foldl(exclusive_table_add(PromiseId), PredIds,
Table0, Table),
module_info_set_exclusive_table(Table, !Module)
@@ -1311,7 +1311,7 @@
find_matching_constructor(ModuleInfo, TVarSet, ConsId, Type, ArgTypes) :-
type_to_ctor_and_args(Type, TypeCtor, _),
- module_info_ctors(ModuleInfo, ConsTable),
+ module_info_get_cons_table(ModuleInfo, ConsTable),
map__search(ConsTable, ConsId, ConsDefns),
list__member(ConsDefn, ConsDefns),
@@ -1320,7 +1320,7 @@
ConsArgs, ConsTypeCtor, _),
ConsTypeCtor = TypeCtor,
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__search(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_tvarset(TypeDefn, TypeTVarSet),
hlds_data__get_type_defn_kind_map(TypeDefn, TypeKindMap),
@@ -1563,7 +1563,7 @@
error("get_constructor_containing_field: " ++
"type_to_ctor_and_args failed")
),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__lookup(Types, TermTypeCtor, TermTypeDefn),
hlds_data__get_type_defn_body(TermTypeDefn, TermTypeBody),
( Ctors = TermTypeBody ^ du_type_ctors ->
@@ -1658,7 +1658,7 @@
check_for_missing_definitions(ModuleInfo, !NumErrors, !FoundTypeError,
!IO) :-
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map.foldl3(check_for_missing_definitions_2, TypeTable,
!NumErrors, !FoundTypeError, !IO).
Index: compiler/pragma_c_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pragma_c_gen.m,v
retrieving revision 1.80
diff -u -b -r1.80 pragma_c_gen.m
--- compiler/pragma_c_gen.m 7 Sep 2005 06:51:57 -0000 1.80
+++ compiler/pragma_c_gen.m 27 Sep 2005 06:39:52 -0000
@@ -1232,7 +1232,7 @@
get_maybe_foreign_type_info(CI, Type) = MaybeForeignTypeInfo :-
code_info__get_module_info(CI, Module),
- module_info_types(Module, Types),
+ module_info_get_type_table(Module, Types),
(
type_to_ctor_and_args(Type, TypeId, _SubTypes),
map__search(Types, TypeId, Defn),
Index: compiler/proc_label.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/proc_label.m,v
retrieving revision 1.11
diff -u -b -r1.11 proc_label.m
--- compiler/proc_label.m 22 Mar 2005 06:40:18 -0000 1.11
+++ compiler/proc_label.m 27 Sep 2005 06:39:52 -0000
@@ -127,7 +127,7 @@
PredModule, PredName, PredArity, ProcIdInt).
make_uni_label(ModuleInfo, TypeCtor, UniModeNum) = ProcLabel :-
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
( TypeCtor = qualified(TypeModule, TypeName) - Arity ->
( hlds_pred__in_in_unification_proc_id(UniModeNum) ->
Module = TypeModule
Index: compiler/purity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/purity.m,v
retrieving revision 1.78
diff -u -b -r1.78 purity.m
--- compiler/purity.m 14 Sep 2005 05:26:40 -0000 1.78
+++ compiler/purity.m 27 Sep 2005 06:39:55 -0000
@@ -262,7 +262,7 @@
PostTypecheckError, !ModuleInfo, !IO),
check_preds_purity_2(PredIds, !ModuleInfo, NumErrors1, NumErrors, !IO),
- module_info_num_errors(!.ModuleInfo, Errs0),
+ module_info_get_num_errors(!.ModuleInfo, Errs0),
Errs = Errs0 + NumErrors,
module_info_set_num_errors(Errs, !ModuleInfo).
Index: compiler/recompilation.usage.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/recompilation.usage.m,v
retrieving revision 1.20
diff -u -b -r1.20 recompilation.usage.m
--- compiler/recompilation.usage.m 26 Sep 2005 05:48:10 -0000 1.20
+++ compiler/recompilation.usage.m 27 Sep 2005 06:39:55 -0000
@@ -122,7 +122,7 @@
"% Writing recompilation compilation " ++
"dependency information\n", !IO),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
module_name_to_file_name(ModuleName, ".used", yes, FileName,
!IO),
io__open_output(FileName, FileResult, !IO),
@@ -158,7 +158,7 @@
io__write_int(version_numbers_version_number, !IO),
io__write_string(".\n\n", !IO),
- module_info_name(ModuleInfo, ThisModuleName),
+ module_info_get_name(ModuleInfo, ThisModuleName),
map__lookup(Timestamps, ThisModuleName,
module_timestamp(_, ThisModuleTimestamp, _)),
io__write_string("(", !IO),
@@ -523,7 +523,7 @@
visible_modules(ModuleInfo, VisibleModule) :-
visible_module(VisibleModule, ModuleInfo),
- \+ module_info_name(ModuleInfo, VisibleModule).
+ \+ module_info_get_name(ModuleInfo, VisibleModule).
:- pred insert_into_imported_items_map(module_name::in,
imported_items::in, imported_items::out) is det.
@@ -592,7 +592,7 @@
% Find items used by imported instances for local classes.
%
ModuleInfo = !.Info ^ module_info,
- module_info_instances(ModuleInfo, Instances),
+ module_info_get_instance_table(ModuleInfo, Instances),
map__foldl(find_items_used_by_instances, Instances, !Info),
Predicates = UsedItems ^ predicates,
@@ -752,7 +752,7 @@
%
% Is it a constructor.
%
- module_info_ctors(ModuleInfo, Ctors),
+ module_info_get_cons_table(ModuleInfo, Ctors),
( map__search(Ctors, cons(SymName, Arity), ConsDefns0) ->
ConsDefns1 = ConsDefns0
;
@@ -796,7 +796,7 @@
(
is_field_access_function_name(ModuleInfo, SymName, Arity,
_, FieldName),
- module_info_ctor_field_table(ModuleInfo, CtorFields),
+ module_info_get_ctor_field_table(ModuleInfo, CtorFields),
map__search(CtorFields, FieldName, FieldDefns)
->
MatchingFields = list__map(
@@ -959,7 +959,7 @@
recompilation__usage__find_items_used_by_item((type), TypeCtor, !Info) :-
ModuleInfo = !.Info ^ module_info,
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__lookup(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
( TypeBody = eqv_type(Type) ->
@@ -971,19 +971,19 @@
).
recompilation__usage__find_items_used_by_item(type_body, TypeCtor, !Info) :-
ModuleInfo = !.Info ^ module_info,
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__lookup(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
recompilation__usage__find_items_used_by_type_body(TypeBody, !Info).
recompilation__usage__find_items_used_by_item((mode), ModeId, !Info):-
ModuleInfo = !.Info ^ module_info,
- module_info_modes(ModuleInfo, Modes),
+ module_info_get_mode_table(ModuleInfo, Modes),
mode_table_get_mode_defns(Modes, ModeDefns),
map__lookup(ModeDefns, ModeId, ModeDefn),
recompilation__usage__find_items_used_by_mode_defn(ModeDefn, !Info).
recompilation__usage__find_items_used_by_item((inst), InstId, !Info):-
ModuleInfo = !.Info ^ module_info,
- module_info_insts(ModuleInfo, Insts),
+ module_info_get_inst_table(ModuleInfo, Insts),
inst_table_get_user_insts(Insts, UserInsts),
user_inst_table_get_inst_defns(UserInsts, UserInstDefns),
map__lookup(UserInstDefns, InstId, InstDefn),
@@ -993,7 +993,7 @@
ClassItemId = ClassName - ClassArity,
ClassId = class_id(ClassName, ClassArity),
ModuleInfo = !.Info ^ module_info,
- module_info_classes(ModuleInfo, Classes),
+ module_info_get_class_table(ModuleInfo, Classes),
map__lookup(Classes, ClassId, ClassDefn),
Constraints = ClassDefn ^ class_supers,
ClassInterface = ClassDefn ^ class_interface,
@@ -1007,7 +1007,7 @@
recompilation__usage__find_items_used_by_class_method,
Methods, !Info)
),
- module_info_instances(ModuleInfo, Instances),
+ module_info_get_instance_table(ModuleInfo, Instances),
( map__search(Instances, ClassId, InstanceDefns) ->
list__foldl(recompilation__usage__find_items_used_by_instance(
ClassItemId), InstanceDefns, !Info)
@@ -1052,7 +1052,7 @@
% --intermodule-optimization, which isn't handled here yet)
ModuleInfo = !.Info ^ module_info,
(
- module_info_name(ModuleInfo, InstanceModuleName)
+ module_info_get_name(ModuleInfo, InstanceModuleName)
->
true
;
@@ -1243,7 +1243,7 @@
%
% Record items used by `:- pragma type_spec' declarations.
%
- module_info_type_spec_info(ModuleInfo, TypeSpecInfo),
+ module_info_get_type_spec_info(ModuleInfo, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, _, _, PragmaMap),
( map__search(PragmaMap, PredId, TypeSpecPragmas) ->
list__foldl(find_items_used_by_type_spec,
@@ -1569,7 +1569,7 @@
item_is_local(Info, NameArity) :-
NameArity = qualified(ModuleName, _) - _,
- module_info_name(Info ^ module_info, ModuleName).
+ module_info_get_name(Info ^ module_info, ModuleName).
:- pred recompilation__usage__record_imported_item(item_type::in,
pair(sym_name, arity)::in,
Index: compiler/rl.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rl.m,v
retrieving revision 1.34
diff -u -b -r1.34 rl.m
--- compiler/rl.m 22 Mar 2005 06:40:22 -0000 1.34
+++ compiler/rl.m 27 Sep 2005 06:39:56 -0000
@@ -699,7 +699,7 @@
:- import_module string.
rl__default_temporary_state(ModuleInfo, TmpState) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, detect_rl_streams, Streams),
(
Streams = yes,
@@ -945,7 +945,7 @@
determinism_components(Detism, cannot_fail, MaxSoln),
MaxSoln \= at_most_zero,
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, fully_strict, FullyStrict),
% I'm not sure whether this test is actually worthwhile --
@@ -1090,7 +1090,7 @@
rl__get_entry_proc_name(ModuleInfo, PredProcId, PredInfo, PredName, Arity,
ProcName) :-
PredProcId = proc(_, ProcId),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
PredOrFunc = pred_info_is_pred_or_func(PredInfo),
PredModule = pred_info_module(PredInfo),
pred_info_get_aditi_owner(PredInfo, Owner),
Index: compiler/rl_block_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rl_block_opt.m,v
retrieving revision 1.14
diff -u -b -r1.14 rl_block_opt.m
--- compiler/rl_block_opt.m 30 Aug 2005 04:11:58 -0000 1.14
+++ compiler/rl_block_opt.m 27 Sep 2005 06:39:56 -0000
@@ -532,7 +532,7 @@
dag_get_flags(Flags),
dag_get_rl_opt_info(RLInfo),
{ rl_opt_info_get_module_info(ModuleInfo, RLInfo, _) },
- { module_info_globals(ModuleInfo, Globals) },
+ { module_info_get_globals(ModuleInfo, Globals) },
{ globals__lookup_bool_option(Globals,
optimize_rl_index, OptimizeIndex) },
(
Index: compiler/rl_exprn.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rl_exprn.m,v
retrieving revision 1.54
diff -u -b -r1.54 rl_exprn.m
--- compiler/rl_exprn.m 13 Sep 2005 04:56:11 -0000 1.54
+++ compiler/rl_exprn.m 27 Sep 2005 06:39:56 -0000
@@ -620,7 +620,7 @@
RLGoal = rl_goal(_, VarSet, VarTypes, InstMap,
Inputs, MaybeOutputs, Goals, _),
rl_exprn_info_init(ModuleInfo0, InstMap, VarTypes, VarSet, Info0),
- module_info_globals(ModuleInfo0, Globals),
+ module_info_get_globals(ModuleInfo0, Globals),
globals__lookup_bool_option(Globals, aditi_calls_mercury,
AditiCallsMercury),
(
@@ -1113,7 +1113,7 @@
DataName0) },
{ DataName = mercury_data_prefix ++ DataName0 },
- { module_info_aditi_top_down_procs(ModuleInfo1, Procs0) },
+ { module_info_get_aditi_top_down_procs(ModuleInfo1, Procs0) },
{ module_info_set_aditi_top_down_procs(ModuleInfo1,
[aditi_top_down_proc(PredProcId, DataName) | Procs0],
ModuleInfo) },
@@ -1126,7 +1126,7 @@
rl_exprn_info_get_next_mercury_proc(ModuleProcId, ExprnProcId),
rl_exprn_info_get_module_info(ModuleInfo0),
- { module_info_name(ModuleInfo0, ModuleName) },
+ { module_info_get_name(ModuleInfo0, ModuleName) },
{ ModuleStr = sym_name_mangle(ModuleName) },
{ ProcName = string__append_list(
[ModuleStr, "__aditi_proc__", int_to_string(ModuleProcId)]) }.
Index: compiler/rl_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rl_gen.m,v
retrieving revision 1.22
diff -u -b -r1.22 rl_gen.m
--- compiler/rl_gen.m 22 Jul 2005 12:31:59 -0000 1.22
+++ compiler/rl_gen.m 27 Sep 2005 06:39:57 -0000
@@ -163,7 +163,7 @@
{ module_info_pred_info(ModuleInfo,
EntryPredId, EntryPredInfo) },
{ pred_info_get_aditi_owner(EntryPredInfo, Owner) },
- { module_info_name(ModuleInfo, ModuleName0) },
+ { module_info_get_name(ModuleInfo, ModuleName0) },
{ mdbcomp__prim_data__sym_name_to_string(ModuleName0,
ModuleName) },
{ string__int_to_string(RLProcId, ProcStr) },
Index: compiler/rl_key.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rl_key.m,v
retrieving revision 1.22
diff -u -b -r1.22 rl_key.m
--- compiler/rl_key.m 22 Mar 2005 06:40:23 -0000 1.22
+++ compiler/rl_key.m 27 Sep 2005 06:39:57 -0000
@@ -143,7 +143,7 @@
( TypeCategory = user_ctor_type
; TypeCategory = enum_type
),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
type_to_ctor_and_args(Type, TypeCtor, _),
map__search(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, Body),
@@ -1044,7 +1044,7 @@
ConsId1 = cons(_, _),
ConsId2 = cons(_, _)
->
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
type_to_ctor_and_args(Type, TypeCtor, _),
map__search(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, Body),
Index: compiler/rl_out.pp
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rl_out.pp,v
retrieving revision 1.28
diff -u -b -r1.28 rl_out.pp
--- compiler/rl_out.pp 24 Mar 2005 02:00:31 -0000 1.28
+++ compiler/rl_out.pp 30 Sep 2005 07:52:41 -0000
@@ -104,7 +104,7 @@
%-----------------------------------------------------------------------------%
rl_out__generate_schema_file(ModuleInfo) -->
- { module_info_name(ModuleInfo, ModuleName) },
+ { module_info_get_name(ModuleInfo, ModuleName) },
module_name_to_file_name(ModuleName, ".base_schema", yes, FileName),
io__open_output(FileName, Res),
( { Res = ok(Stream) } ->
@@ -125,7 +125,7 @@
rl_out__generate_schema_file_2(ModuleInfo, PredId) -->
{ module_info_pred_info(ModuleInfo, PredId, PredInfo) },
{ pred_info_get_markers(PredInfo, Markers) },
- { module_info_name(ModuleInfo, Module) },
+ { module_info_get_name(ModuleInfo, Module) },
{ PredModule = pred_info_module(PredInfo) },
(
{ Module = PredModule },
@@ -228,7 +228,7 @@
#if INCLUDE_ADITI_OUTPUT % See ../Mmake.common.in,
rl_out__generate_rl_bytecode(Procs, MaybeRLFile, ModuleInfo0, ModuleInfo) -->
- { module_info_name(ModuleInfo0, ModuleName0) },
+ { module_info_get_name(ModuleInfo0, ModuleName0) },
module_name_to_file_name(ModuleName0, ".rlo", yes, RLOName),
module_name_to_file_name(ModuleName0, ".rla", yes, RLAName),
globals__io_lookup_bool_option(verbose, Verbose),
@@ -401,7 +401,7 @@
rl_out__generate_update_procs(PredId) -->
rl_out_info_get_module_info(ModuleInfo),
{ module_info_pred_info(ModuleInfo, PredId, PredInfo) },
- { module_info_name(ModuleInfo, ModuleName) },
+ { module_info_get_name(ModuleInfo, ModuleName) },
{ PredModule = pred_info_module(PredInfo) },
(
{ ModuleName = PredModule },
@@ -776,7 +776,7 @@
{ list__map(RemoveSlashes, ProcNameList0, ProcNameList) },
{ string__from_char_list(ProcNameList, ProcNameStr1) },
rl_out_info_get_module_info(ModuleInfo),
- { module_info_name(ModuleInfo, ModuleName0) },
+ { module_info_get_name(ModuleInfo, ModuleName0) },
{ mdbcomp__prim_data__sym_name_to_string(ModuleName0, ModuleName) },
{ string__format("%s/%s/Memoed__%s__%i",
[s(Owner), s(ModuleName), s(ProcNameStr1), i(Counter0)],
Index: compiler/rtti.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti.m,v
retrieving revision 1.58
diff -u -b -r1.58 rtti.m
--- compiler/rtti.m 27 Sep 2005 06:20:46 -0000 1.58
+++ compiler/rtti.m 27 Sep 2005 06:39:57 -0000
@@ -959,7 +959,7 @@
pseudo_type_info_is_exported(type_var(_)) = no.
rtti__make_rtti_proc_label(ModuleInfo, PredId, ProcId) = ProcLabel :-
- module_info_name(ModuleInfo, ThisModule),
+ module_info_get_name(ModuleInfo, ThisModule),
module_info_pred_proc_info(ModuleInfo, PredId, ProcId,
PredInfo, ProcInfo),
PredOrFunc = pred_info_is_pred_or_func(PredInfo),
Index: compiler/rtti_to_mlds.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/rtti_to_mlds.m,v
retrieving revision 1.60
diff -u -b -r1.60 rtti_to_mlds.m
--- compiler/rtti_to_mlds.m 12 Sep 2005 05:24:23 -0000 1.60
+++ compiler/rtti_to_mlds.m 27 Sep 2005 06:39:59 -0000
@@ -295,7 +295,7 @@
qualified(ProcLabel ^ proc_module, ProcLabel ^ proc_name)/
ProcLabel ^ proc_arity,
ProcNameStr),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = init_struct(mlds__rtti_type(item_type(RttiId)), [
gen_init_proc_id(ModuleInfo, ProcLabel),
@@ -318,7 +318,7 @@
TCDecl = tc_decl(TCId, Version, Supers),
TCId = tc_id(TCName, TVarNames, MethodIds),
TCName = tc_name(ModuleSymName, ClassName, Arity),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
TVarNamesRttiId = tc_rtti_id(TCName, type_class_id_var_names),
(
TVarNames = [],
@@ -439,7 +439,7 @@
InstanceConstrsTCRttiName =
type_class_instance_constraints(Types),
InstanceConstrsRttiId = tc_rtti_id(TCName, InstanceConstrsTCRttiName),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
TypeRttiDatas = list__map(maybe_pseudo_type_info_to_rtti_data, Types),
gen_pseudo_type_info_array(ModuleInfo, TypeRttiDatas, TypesInit,
@@ -487,7 +487,7 @@
RealRttiDatas = list__filter(real_rtti_data, ArgRttiDatas),
SubDefnLists = list__map(rtti_data_to_mlds(ModuleInfo), RealRttiDatas),
SubDefns = list__condense(SubDefnLists),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = init_struct(mlds__rtti_type(item_type(RttiId)), [
gen_init_rtti_name(ModuleName, RttiTypeCtor, type_ctor_info),
gen_init_cast_rtti_datas_array(mlds__type_info_type,
@@ -500,7 +500,7 @@
SubDefnLists = list__map(rtti_data_to_mlds(ModuleInfo), RealRttiDatas),
SubDefns = list__condense(SubDefnLists),
RttiTypeCtor = var_arity_id_to_rtti_type_ctor(VarArityId),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = init_struct(mlds__rtti_type(item_type(RttiId)), [
gen_init_rtti_name(ModuleName, RttiTypeCtor, type_ctor_info),
gen_init_int(list__length(ArgTypes)),
@@ -519,7 +519,7 @@
RealRttiDatas = list__filter(real_rtti_data, ArgRttiDatas),
SubDefnLists = list__map(rtti_data_to_mlds(ModuleInfo), RealRttiDatas),
SubDefns = list__condense(SubDefnLists),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = init_struct(mlds__rtti_type(item_type(RttiId)), [
gen_init_rtti_name(ModuleName, RttiTypeCtor, type_ctor_info),
gen_init_cast_rtti_datas_array(mlds__pseudo_type_info_type,
@@ -532,7 +532,7 @@
SubDefnLists = list__map(rtti_data_to_mlds(ModuleInfo), RealRttiDatas),
SubDefns = list__condense(SubDefnLists),
RttiTypeCtor = var_arity_id_to_rtti_type_ctor(VarArityId),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = init_struct(mlds__rtti_type(item_type(RttiId)), [
gen_init_rtti_name(ModuleName, RttiTypeCtor, type_ctor_info),
gen_init_int(list__length(ArgTypes)),
@@ -550,7 +550,7 @@
gen_functors_layout_info(ModuleInfo, RttiTypeCtor, TypeCtorDetails,
FunctorInit, LayoutInit, Defns) :-
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
(
TypeCtorDetails = enum(_, EnumFunctors, EnumByValue,
EnumByName),
@@ -676,7 +676,7 @@
MaybeArgNames = list__map(du_arg_info_name, ArgInfos),
ArgNames = list__filter_map(project_yes, MaybeArgNames),
ContainsVarBitVector = compute_contains_var_bit_vector(ArgTypes),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
(
ArgInfos = [_ | _],
ArgTypeDefns = gen_field_types(ModuleInfo, RttiTypeCtor,
@@ -821,7 +821,7 @@
counter__allocate(TCNum, !Counter),
MakeRttiId(TCNum, Arity, RttiId),
TCDeclRttiName = type_class_decl,
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
TypeRttiDatas = list__map(maybe_pseudo_type_info_to_rtti_data, Types),
gen_pseudo_type_info_array(ModuleInfo, TypeRttiDatas, PTIInits,
PTIDefns),
@@ -845,7 +845,7 @@
gen_exist_info(ModuleInfo, RttiTypeCtor, Ordinal, ExistInfo) = MLDS_Defns :-
ExistInfo = exist_info(Plain, InTci, Constraints, Locns),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
RttiName = exist_info(Ordinal),
RttiId = ctor_rtti_id(RttiTypeCtor, RttiName),
list__length(Constraints, Tci),
@@ -919,7 +919,7 @@
gen_enum_value_ordered_table(ModuleInfo, RttiTypeCtor, EnumByValue)
= MLDS_Defn :-
map__values(EnumByValue, Functors),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
FunctorRttiNames = list__map(enum_functor_rtti_name, Functors),
Init = gen_init_rtti_names_array(ModuleName, RttiTypeCtor,
FunctorRttiNames),
@@ -932,7 +932,7 @@
gen_enum_name_ordered_table(ModuleInfo, RttiTypeCtor, EnumByName)
= MLDS_Defn :-
map__values(EnumByName, Functors),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
FunctorRttiNames = list__map(enum_functor_rtti_name, Functors),
Init = gen_init_rtti_names_array(ModuleName, RttiTypeCtor,
FunctorRttiNames),
@@ -943,7 +943,7 @@
map(int, sectag_table)) = list(mlds__defn).
gen_du_ptag_ordered_table(ModuleInfo, RttiTypeCtor, PtagMap) = MLDS_Defns :-
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
map__to_assoc_list(PtagMap, PtagList),
SubDefns = list__map(
gen_du_stag_ordered_table(ModuleName, RttiTypeCtor), PtagList),
@@ -1019,7 +1019,7 @@
map__values(NameArityMap, ArityMaps),
list__map(map__values, ArityMaps, FunctorLists),
list__condense(FunctorLists, Functors),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
FunctorRttiNames = list__map(du_functor_rtti_name, Functors),
Init = gen_init_rtti_names_array(ModuleName, RttiTypeCtor,
FunctorRttiNames),
@@ -1036,7 +1036,7 @@
NumericResFunctorReps, SymbolicResFunctorReps),
list__length(NumericResFunctorReps, NumNumericResFunctorReps),
list__length(SymbolicResFunctorReps, NumSymbolicResFunctorReps),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
ResDefns = [gen_res_addr_functor_table(ModuleName, RttiTypeCtor,
ResFunctors)],
( NumSymbolicResFunctorReps = 0 ->
@@ -1091,7 +1091,7 @@
map__values(NameArityMap, ArityMaps),
list__map(map__values, ArityMaps, FunctorLists),
list__condense(FunctorLists, Functors),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = gen_init_array(
gen_maybe_res_name_ordered_table_element(ModuleName,
RttiTypeCtor),
@@ -1370,7 +1370,7 @@
RealRttiDatas = list__filter(real_rtti_data, [PTIRttiData]),
DefnLists = list__map(rtti_data_to_mlds(ModuleInfo), RealRttiDatas),
Defns = list__condense(DefnLists),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = gen_init_cast_rtti_data(mlds__pseudo_type_info_type,
ModuleName, PTIRttiData).
@@ -1381,7 +1381,7 @@
RealRttiDatas = list__filter(real_rtti_data, PTIRttiDatas),
DefnLists = list__map(rtti_data_to_mlds(ModuleInfo), RealRttiDatas),
Defns = list__condense(DefnLists),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Init = gen_init_cast_rtti_datas_array(mlds__pseudo_type_info_type,
ModuleName, PTIRttiDatas).
@@ -1392,7 +1392,7 @@
RealRttiDatas = list__filter(real_rtti_data, PTIRttiDatas),
DefnLists = list__map(rtti_data_to_mlds(ModuleInfo), RealRttiDatas),
Defns = list__condense(DefnLists),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
Inits = list__map(
gen_init_cast_rtti_data(mlds__pseudo_type_info_type,
ModuleName),
Index: compiler/saved_vars.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/saved_vars.m,v
retrieving revision 1.52
diff -u -b -r1.52 saved_vars.m
--- compiler/saved_vars.m 30 Aug 2005 04:11:58 -0000 1.52
+++ compiler/saved_vars.m 27 Sep 2005 06:39:59 -0000
@@ -65,7 +65,7 @@
saved_vars_proc(PredId, ProcId, ProcInfo0, ProcInfo, !ModuleInfo, !IO) :-
write_proc_progress_message("% Minimizing saved vars in ",
PredId, ProcId, !.ModuleInfo, !IO),
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
module_info_pred_info(!.ModuleInfo, PredId, PredInfo),
body_should_use_typeinfo_liveness(PredInfo, Globals, TypeInfoLiveness),
saved_vars_proc_no_io(TypeInfoLiveness, ProcInfo0, ProcInfo, !ModuleInfo).
Index: compiler/simplify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.153
diff -u -b -r1.153 simplify.m
--- compiler/simplify.m 12 Sep 2005 05:24:24 -0000 1.153
+++ compiler/simplify.m 27 Sep 2005 06:39:59 -0000
@@ -188,7 +188,7 @@
simplify__proc_return_msgs(Simplifications, PredId, ProcId, !ModuleInfo,
!ProcInfo, Msgs) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
proc_info_vartypes(!.ProcInfo, VarTypes0),
det_info_init(!.ModuleInfo, VarTypes0, PredId, ProcId, Globals,
DetInfo0),
@@ -1410,7 +1410,7 @@
determinism_components(Det, CanFail, at_most_one),
unify_proc__lookup_mode_num(ModuleInfo, TypeCtor, UniMode, Det,
ProcId),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, special_preds, SpecialPreds),
(
hlds_pred__in_in_unification_proc_id(ProcId),
@@ -1801,7 +1801,7 @@
goal_info_get_nonlocals(ConjInfo, ConjNonLocals),
map__init(Subn0),
simplify_info_get_module_info(!.Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_trace_level(Globals, TraceLevel),
globals__lookup_bool_option(Globals, trace_optimized, TraceOptimized),
simplify_info_get_varset(!.Info, VarSet0),
Index: compiler/special_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/special_pred.m,v
retrieving revision 1.52
diff -u -b -r1.52 special_pred.m
--- compiler/special_pred.m 29 Aug 2005 08:44:13 -0000 1.52
+++ compiler/special_pred.m 27 Sep 2005 06:39:59 -0000
@@ -184,7 +184,7 @@
; TypeCategory = enum_type
; is_introduced_type_info_type_category(TypeCategory) = yes
),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__search(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, Body),
hlds_data__get_type_defn_status(TypeDefn, Status),
@@ -220,7 +220,7 @@
(
status_defined_in_this_module(Status, no)
;
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, special_preds, no)
),
@@ -289,7 +289,7 @@
% references to this rtti so the rtti must be defined in the runtime
% not the library.
compiler_generated_rtti_for_builtins(ModuleInfo) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
( Target = il ; Target = java ).
Index: compiler/stack_alloc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_alloc.m,v
retrieving revision 1.10
diff -u -b -r1.10 stack_alloc.m
--- compiler/stack_alloc.m 22 Mar 2005 06:40:25 -0000 1.10
+++ compiler/stack_alloc.m 27 Sep 2005 06:39:59 -0000
@@ -69,7 +69,7 @@
allocate_stack_slots_in_proc(PredId, _ProcId, ModuleInfo, !ProcInfo, !IO) :-
initial_liveness(!.ProcInfo, PredId, ModuleInfo, Liveness0),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_trace_level(Globals, TraceLevel),
(
eff_trace_level_needs_input_vars(PredInfo, !.ProcInfo,
Index: compiler/stack_layout.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_layout.m,v
retrieving revision 1.104
diff -u -b -r1.104 stack_layout.m
--- compiler/stack_layout.m 19 Sep 2005 07:26:25 -0000 1.104
+++ compiler/stack_layout.m 27 Sep 2005 06:39:59 -0000
@@ -105,7 +105,7 @@
stack_layout__generate_llds(ModuleInfo0, !GlobalData, Layouts, LayoutLabels) :-
global_data_get_all_proc_layouts(!.GlobalData, ProcLayoutList),
- module_info_globals(ModuleInfo0, Globals),
+ module_info_get_globals(ModuleInfo0, Globals),
globals__lookup_bool_option(Globals, agc_stack_layout, AgcLayout),
globals__lookup_bool_option(Globals, trace_stack_layout, TraceLayout),
globals__lookup_bool_option(Globals, procid_stack_layout,
@@ -149,7 +149,7 @@
Layouts0),
(
TraceLayout = yes,
- module_info_name(ModuleInfo0, ModuleName),
+ module_info_get_name(ModuleInfo0, ModuleName),
globals__lookup_bool_option(Globals, rtti_line_numbers,
LineNumbers),
(
Index: compiler/stack_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stack_opt.m,v
retrieving revision 1.18
diff -u -b -r1.18 stack_opt.m
--- compiler/stack_opt.m 6 Mar 2005 05:17:30 -0000 1.18
+++ compiler/stack_opt.m 27 Sep 2005 06:40:00 -0000
@@ -172,7 +172,7 @@
simplify__proc([], PredId, ProcId, !ModuleInfo, !ProcInfo, !IO),
detect_liveness_proc(PredId, ProcId, !.ModuleInfo, !ProcInfo, !IO),
initial_liveness(!.ProcInfo, PredId, !.ModuleInfo, Liveness0),
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
module_info_pred_info(!.ModuleInfo, PredId, PredInfo),
body_should_use_typeinfo_liveness(PredInfo, Globals, TypeInfoLiveness),
globals__lookup_bool_option(Globals, opt_no_return_calls,
@@ -232,7 +232,7 @@
arg_info__partition_proc_args(!.ProcInfo, ModuleInfo,
InputArgs, OutputArgs, UnusedArgs),
HeadVars = set__union_list([InputArgs, OutputArgs, UnusedArgs]),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals,
optimize_saved_vars_cell_candidate_headvars, CandHeadvars),
(
@@ -398,7 +398,7 @@
;
type_to_ctor_and_args(Type, TypeCtor, _),
ModuleInfo = IntParams ^ module_info,
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__lookup(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
ConsTable = TypeBody ^ du_type_cons_tag_values
Index: compiler/store_alloc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/store_alloc.m,v
retrieving revision 1.91
diff -u -b -r1.91 store_alloc.m
--- compiler/store_alloc.m 30 Aug 2005 04:11:59 -0000 1.91
+++ compiler/store_alloc.m 27 Sep 2005 06:40:00 -0000
@@ -70,7 +70,7 @@
%-----------------------------------------------------------------------------%
allocate_store_maps(RunType, PredId, ModuleInfo, !ProcInfo) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
( RunType = final_allocation ->
proc_info_goal(!.ProcInfo, Goal0),
Index: compiler/stratify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/stratify.m,v
retrieving revision 1.40
diff -u -b -r1.40 stratify.m
--- compiler/stratify.m 14 Sep 2005 05:26:40 -0000 1.40
+++ compiler/stratify.m 27 Sep 2005 06:40:00 -0000
@@ -79,7 +79,7 @@
relation__atsort(DepGraph0, FOSCCs1),
dep_sets_to_lists_and_sets(FOSCCs1, [], FOSCCs),
globals__io_lookup_bool_option(warn_non_stratification, Warn, !IO),
- module_info_stratified_preds(!.ModuleInfo, StratifiedPreds),
+ module_info_get_stratified_preds(!.ModuleInfo, StratifiedPreds),
first_order_check_sccs(FOSCCs, StratifiedPreds, Warn, !ModuleInfo,
!IO).
Index: compiler/switch_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/switch_util.m,v
retrieving revision 1.22
diff -u -b -r1.22 switch_util.m
--- compiler/switch_util.m 25 Aug 2005 03:19:48 -0000 1.22
+++ compiler/switch_util.m 27 Sep 2005 06:40:00 -0000
@@ -298,7 +298,7 @@
;
unexpected(this_file, "dense_switch__type_range: invalid enum type?")
),
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__lookup(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
( ConsTable = TypeBody ^ du_type_cons_tag_values ->
@@ -319,7 +319,7 @@
;
unexpected(this_file, "unknown type in get_ptag_counts")
),
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__lookup(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, Body),
( ConsTable = Body ^ du_type_cons_tag_values ->
Index: compiler/table_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/table_gen.m,v
retrieving revision 1.92
diff -u -b -r1.92 table_gen.m
--- compiler/table_gen.m 16 Sep 2005 05:42:52 -0000 1.92
+++ compiler/table_gen.m 27 Sep 2005 06:40:01 -0000
@@ -156,7 +156,7 @@
table_gen__transform_proc_if_possible(EvalMethod, PredId,
ProcId, ProcInfo0, _, PredInfo0, _, !ModuleInfo, !GenMap, !IO)
;
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, trace_table_io, yes),
proc_info_has_io_state_pair(!.ModuleInfo, ProcInfo0,
_InArgNum, _OutArgNum)
@@ -437,7 +437,7 @@
% The case EvalMethod = eval_normal was caught by the code above.
(
EvalMethod = eval_table_io(Decl, Unitize),
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, trace_table_io_states,
TableIoStates),
assoc_list__from_corresponding_lists(HeadVars, ArgModes, HeadVarModes),
@@ -2229,7 +2229,7 @@
ForeignArg = foreign_arg(ArgVar, yes(ArgName - in_mode), Type),
( TypeCat = enum_type ->
( type_to_ctor_and_args(Type, TypeCtor, _) ->
- module_info_types(ModuleInfo, TypeDefnTable),
+ module_info_get_type_table(ModuleInfo, TypeDefnTable),
map__lookup(TypeDefnTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
(
@@ -3485,7 +3485,7 @@
:- pred tabling_via_extra_args(module_info::in, bool::out) is det.
tabling_via_extra_args(ModuleInfo, TablingViaExtraArgs) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, tabling_via_extra_args,
TablingViaExtraArgs).
Index: compiler/term_constr_initial.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_initial.m,v
retrieving revision 1.4
diff -u -b -r1.4 term_constr_initial.m
--- compiler/term_constr_initial.m 13 Sep 2005 04:56:12 -0000 1.4
+++ compiler/term_constr_initial.m 27 Sep 2005 06:40:01 -0000
@@ -163,7 +163,7 @@
process_imported_pred(PredId, !ModuleInfo) :-
some [!PredTable] (
module_info_preds(!.ModuleInfo, !:PredTable),
- module_info_type_spec_info(!.ModuleInfo, TypeSpecInfo),
+ module_info_get_type_spec_info(!.ModuleInfo, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, TypeSpecPredIds, _, _),
( not set.member(PredId, TypeSpecPredIds) ->
PredInfo0 = !.PredTable ^ det_elem(PredId),
Index: compiler/term_constr_main.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_constr_main.m,v
retrieving revision 1.5
diff -u -b -r1.5 term_constr_main.m
--- compiler/term_constr_main.m 4 Aug 2005 09:39:24 -0000 1.5
+++ compiler/term_constr_main.m 27 Sep 2005 06:40:01 -0000
@@ -500,7 +500,7 @@
:- pred make_opt_int(list(pred_id)::in, module_info::in, io::di, io::uo) is det.
make_opt_int(PredIds, ModuleInfo, !IO) :-
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
module_name_to_file_name(ModuleName, ".opt.tmp", no, OptFileName, !IO),
globals.io_lookup_bool_option(verbose, Verbose, !IO),
maybe_write_string(Verbose,
@@ -538,7 +538,7 @@
( RunningTerm2 = yes ->
module_info_pred_info(ModuleInfo, PredId, PredInfo),
pred_info_import_status(PredInfo, ImportStatus),
- module_info_type_spec_info(ModuleInfo, TypeSpecInfo),
+ module_info_get_type_spec_info(ModuleInfo, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, TypeSpecForcePreds, _, _),
(
(ImportStatus = exported
Index: compiler/term_norm.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/term_norm.m,v
retrieving revision 1.10
diff -u -b -r1.10 term_norm.m
--- compiler/term_norm.m 12 Sep 2005 05:24:25 -0000 1.10
+++ compiler/term_norm.m 27 Sep 2005 06:40:01 -0000
@@ -142,7 +142,7 @@
:- pred find_weights(module_info::in, weight_table::out) is det.
find_weights(ModuleInfo, Weights) :-
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__to_assoc_list(TypeTable, TypeList),
map__init(Weights0),
list__foldl(find_weights_for_type, TypeList, Weights0, Weights).
Index: compiler/termination.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/termination.m,v
retrieving revision 1.52
diff -u -b -r1.52 termination.m
--- compiler/termination.m 29 Aug 2005 08:55:12 -0000 1.52
+++ compiler/termination.m 27 Sep 2005 06:40:02 -0000
@@ -890,7 +890,7 @@
io::di, io::uo) is det.
termination__make_opt_int(PredIds, Module, !IO) :-
- module_info_name(Module, ModuleName),
+ module_info_get_name(Module, ModuleName),
module_name_to_file_name(ModuleName, ".opt.tmp", no, OptFileName, !IO),
globals__io_lookup_bool_option(verbose, Verbose, !IO),
maybe_write_string(Verbose,
@@ -921,7 +921,7 @@
termination__write_pred_termination_info(Module, PredId, !IO) :-
module_info_pred_info(Module, PredId, PredInfo),
pred_info_import_status(PredInfo, ImportStatus),
- module_info_type_spec_info(Module, TypeSpecInfo),
+ module_info_get_type_spec_info(Module, TypeSpecInfo),
TypeSpecInfo = type_spec_info(_, TypeSpecForcePreds, _, _),
(
Index: compiler/trans_opt.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trans_opt.m,v
retrieving revision 1.29
diff -u -b -r1.29 trans_opt.m
--- compiler/trans_opt.m 3 Jun 2005 15:59:40 -0000 1.29
+++ compiler/trans_opt.m 27 Sep 2005 06:40:02 -0000
@@ -101,7 +101,7 @@
% declarations.
trans_opt__write_optfile(Module, !IO) :-
- module_info_name(Module, ModuleName),
+ module_info_get_name(Module, ModuleName),
module_name_to_file_name(ModuleName, ".trans_opt.tmp", yes, TmpOptName,
!IO),
io__open_output(TmpOptName, Result, !IO),
@@ -122,7 +122,7 @@
;
Result = ok(Stream),
io__set_output_stream(Stream, OldStream, !IO),
- module_info_name(Module, ModName),
+ module_info_get_name(Module, ModName),
io__write_string(":- module ", !IO),
mercury_output_bracketed_sym_name(ModName, !IO),
io__write_string(".\n", !IO),
@@ -136,7 +136,7 @@
list__foldl(term_constr_main.output_pred_termination2_info(Module),
PredIds, !IO),
- module_info_exception_info(Module, ExceptionInfo),
+ module_info_get_exception_info(Module, ExceptionInfo),
list__foldl(
exception_analysis__write_pragma_exceptions(Module,
ExceptionInfo),
Index: compiler/tupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/tupling.m,v
retrieving revision 1.11
diff -u -b -r1.11 tupling.m
--- compiler/tupling.m 30 Aug 2005 04:12:00 -0000 1.11
+++ compiler/tupling.m 27 Sep 2005 06:40:02 -0000
@@ -150,7 +150,7 @@
%
tuple_arguments(!ModuleInfo, !IO) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_string_option(Globals,
tuple_trace_counts_file, TraceCountsFile),
( TraceCountsFile = "" ->
@@ -172,7 +172,7 @@
io::di, io::uo) is det.
tuple_arguments_2(!ModuleInfo, TraceCounts0, !IO) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
% We use the same cost options as for the stack optimisation.
globals__lookup_int_option(Globals,
optimize_saved_vars_cell_cv_load_cost, CellVarLoadCost),
@@ -197,7 +197,7 @@
FieldVarLoadCost, FieldVarStoreCost,
CostsRatio, MinArgsToTuple),
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
restrict_trace_counts_to_module(ModuleName, TraceCounts0, TraceCounts),
module_info_ensure_dependency_info(!ModuleInfo),
@@ -253,7 +253,7 @@
maybe_tuple_scc(TraceCounts, TuningParams, DepGraph, SCC,
!ModuleInfo, !Counter, !TransformMap, !IO) :-
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, very_verbose, VeryVerbose),
(
VeryVerbose = yes,
@@ -754,7 +754,7 @@
create_aux_pred(PredId, ProcId, PredInfo, ProcInfo, Counter,
AuxPredProcId, CallAux, ModuleInfo0, ModuleInfo) :-
- module_info_name(ModuleInfo0, ModuleName),
+ module_info_get_name(ModuleInfo0, ModuleName),
proc_info_headvars(ProcInfo, AuxHeadVars),
proc_info_goal(ProcInfo, Goal @ (_GoalExpr - GoalInfo)),
@@ -883,7 +883,7 @@
detect_liveness_proc(PredId, ProcId, !.ModuleInfo, !ProcInfo,
!IO),
initial_liveness(!.ProcInfo, PredId, !.ModuleInfo, Liveness0),
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
body_should_use_typeinfo_liveness(PredInfo, Globals,
TypeInfoLiveness),
globals__lookup_bool_option(Globals,
@@ -1050,7 +1050,7 @@
cls_require_in_regs(CountInfo, InputArgs, !CountState),
cls_put_in_regs(OutputArgs, !CountState)
;
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
call_gen__generic_call_info(Globals, GenericCall,
length(InputArgs), _, GenericVarsArgInfos, _, _),
assoc_list__keys(GenericVarsArgInfos, GenericVars),
Index: compiler/type_class_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_class_info.m,v
retrieving revision 1.9
diff -u -b -r1.9 type_class_info.m
--- compiler/type_class_info.m 1 Apr 2005 14:29:02 -0000 1.9
+++ compiler/type_class_info.m 27 Sep 2005 06:40:02 -0000
@@ -65,13 +65,13 @@
% requested to generate all the descriptors we can.
generate_rtti(ModuleInfo, GenerateAll, RttiDatas) :-
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
map__to_assoc_list(ClassTable, Classes),
list__foldl(generate_class_decl(ModuleInfo), Classes,
[], RttiDatas0),
(
GenerateAll = yes,
- module_info_instances(ModuleInfo, InstanceTable),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
map__to_assoc_list(InstanceTable, Instances),
list__foldl(generate_instance_decls(ModuleInfo), Instances,
RttiDatas0, RttiDatas)
Index: compiler/type_ctor_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_ctor_info.m,v
retrieving revision 1.68
diff -u -b -r1.68 type_ctor_info.m
--- compiler/type_ctor_info.m 22 Sep 2005 06:17:21 -0000 1.68
+++ compiler/type_ctor_info.m 27 Sep 2005 06:40:03 -0000
@@ -97,8 +97,8 @@
%---------------------------------------------------------------------------%
generate_hlds(!ModuleInfo) :-
- module_info_name(!.ModuleInfo, ModuleName),
- module_info_types(!.ModuleInfo, TypeTable),
+ module_info_get_name(!.ModuleInfo, ModuleName),
+ module_info_get_type_table(!.ModuleInfo, TypeTable),
map__keys(TypeTable, TypeCtors0),
(
ModuleName = mercury_public_builtin_module,
@@ -220,7 +220,7 @@
gen_type_ctor_gen_info(TypeCtor, TypeName, TypeArity, TypeDefn, ModuleName,
ModuleInfo, TypeCtorGenInfo) :-
hlds_data__get_type_defn_status(TypeDefn, Status),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
module_info_get_special_pred_map(ModuleInfo, SpecMap),
globals__lookup_bool_option(Globals, special_preds, SpecialPreds),
(
@@ -254,7 +254,7 @@
%---------------------------------------------------------------------------%
generate_rtti(ModuleInfo, Tables) :-
- module_info_type_ctor_gen_infos(ModuleInfo, TypeCtorGenInfos),
+ module_info_get_type_ctor_gen_infos(ModuleInfo, TypeCtorGenInfos),
construct_type_ctor_infos(TypeCtorGenInfos, ModuleInfo,
[], Dynamic, [], Static0),
% The same pseudo_type_info may be generated in several places; we need
@@ -287,7 +287,7 @@
make_rtti_proc_label(ComparePredProcId, ModuleInfo, CompareProcLabel),
type_to_univ(UnifyProcLabel, UnifyUniv),
type_to_univ(CompareProcLabel, CompareUniv),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
hlds_data__get_type_defn_body(HldsDefn, TypeBody),
Version = type_ctor_info_rtti_version,
@@ -686,7 +686,7 @@
MaybeExistInfo = no
;
ExistTvars = [_ | _],
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
generate_exist_into(ExistTvars, Constraints, ClassTable, ExistInfo),
MaybeExistInfo = yes(ExistInfo)
),
Index: compiler/type_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/type_util.m,v
retrieving revision 1.155
diff -u -b -r1.155 type_util.m
--- compiler/type_util.m 22 Sep 2005 06:17:21 -0000 1.155
+++ compiler/type_util.m 27 Sep 2005 06:40:03 -0000
@@ -664,7 +664,7 @@
UserEqComp).
type_body_has_user_defined_equality_pred(ModuleInfo, TypeBody, UserEqComp) :-
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__get_target(Globals, Target),
(
TypeBody = du_type(_, _, _, _, _, _),
@@ -718,7 +718,7 @@
type_util__type_to_type_defn(ModuleInfo, Type, TypeDefn) :-
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
type_to_ctor_and_args(Type, TypeCtor, _TypeArgs),
map__search(TypeTable, TypeCtor, TypeDefn).
@@ -819,7 +819,7 @@
:- pred type_ctor_is_enumeration(type_ctor::in, module_info::in) is semidet.
type_ctor_is_enumeration(TypeCtor, ModuleInfo) :-
- module_info_types(ModuleInfo, TypeDefnTable),
+ module_info_get_type_table(ModuleInfo, TypeDefnTable),
map__search(TypeDefnTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
TypeBody ^ du_type_is_enum = yes.
@@ -889,7 +889,7 @@
Constructors = [ctor(ExistQVars, ClassConstraints,
unqualified("{}"), CtorArgs)]
;
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__search(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_tparams(TypeDefn, TypeParams),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
@@ -911,7 +911,7 @@
; type_ctor_is_tuple(TypeCtor) ->
NumFunctors = 1
;
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__search(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
map__count(TypeBody ^ du_type_cons_tag_values, NumFunctors)
@@ -987,12 +987,12 @@
type_util__cons_id_arg_types(ModuleInfo, VarType, ConsId, ArgTypes) :-
type_to_ctor_and_args(VarType, TypeCtor, TypeArgs),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__search(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeDefnBody),
map__member(TypeDefnBody ^ du_type_cons_tag_values, ConsId, _),
- module_info_ctors(ModuleInfo, Ctors),
+ module_info_get_cons_table(ModuleInfo, Ctors),
map__lookup(Ctors, ConsId, ConsDefns),
list__member(ConsDefn, ConsDefns),
@@ -1026,7 +1026,7 @@
type_util__is_existq_cons(ModuleInfo, VarType, ConsId, ConsDefn),
ConsDefn = hlds_cons_defn(ExistQVars, Constraints, Args, _, _),
assoc_list__values(Args, ArgTypes),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
type_to_ctor_and_args(VarType, TypeCtor, _),
map__lookup(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_tvarset(TypeDefn, TypeVarSet),
@@ -1058,11 +1058,11 @@
type_util__do_get_type_and_cons_defn(ModuleInfo, TypeCtor, ConsId,
TypeDefn, ConsDefn) :-
type_util__get_cons_defn(ModuleInfo, TypeCtor, ConsId, ConsDefn),
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__lookup(Types, TypeCtor, TypeDefn).
type_util__get_cons_defn(ModuleInfo, TypeCtor, ConsId, ConsDefn) :-
- module_info_ctors(ModuleInfo, Ctors),
+ module_info_get_cons_table(ModuleInfo, Ctors),
% will fail for builtin cons_ids.
map__search(Ctors, ConsId, ConsDefns),
MatchingCons = (pred(ThisConsDefn::in) is semidet :-
@@ -1103,7 +1103,7 @@
type_is_no_tag_type(ModuleInfo, Type, Ctor, ArgType) :-
type_to_ctor_and_args(Type, TypeCtor, TypeArgs),
- module_info_no_tag_types(ModuleInfo, NoTagTypes),
+ module_info_get_no_tag_types(ModuleInfo, NoTagTypes),
map__search(NoTagTypes, TypeCtor, NoTagType),
NoTagType = no_tag_type(TypeParams, Ctor, ArgType0),
( TypeParams = [] ->
Index: compiler/typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.376
diff -u -b -r1.376 typecheck.m
--- compiler/typecheck.m 12 Sep 2005 05:24:27 -0000 1.376
+++ compiler/typecheck.m 27 Sep 2005 06:40:04 -0000
@@ -443,7 +443,7 @@
!:HeadTypeParams)
),
- module_info_classes(!.ModuleInfo, ClassTable),
+ module_info_get_class_table(!.ModuleInfo, ClassTable),
make_head_hlds_constraints(ClassTable, TypeVarSet0,
PredConstraints, Constraints),
( pred_info_is_field_access_function(!.ModuleInfo, !.PredInfo) ->
@@ -845,7 +845,7 @@
% a user-defined equality predicate, or which is existentially
% typed.
%
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
map__lookup(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, Body),
special_pred_for_type_needs_typecheck(ModuleInfo, SpecialPredId, Body).
@@ -1707,7 +1707,7 @@
typecheck_call_pred_id_adjust_arg_types(PredId, Args, GoalPath, AdjustArgTypes,
!Info, !IO) :-
typecheck_info_get_module_info(!.Info, ModuleInfo),
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
module_info_get_predicate_table(ModuleInfo, PredicateTable),
predicate_table_get_preds(PredicateTable, Preds),
map__lookup(Preds, PredId, PredInfo),
@@ -1746,7 +1746,7 @@
% suitable renamed apart.
%
typecheck_info_get_module_info(!.Info, ModuleInfo),
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
module_info_get_predicate_table(ModuleInfo, PredicateTable),
predicate_table_get_preds(PredicateTable, Preds),
typecheck_info_get_type_assign_set(!.Info, TypeAssignSet0),
@@ -2694,7 +2694,7 @@
make_pred_cons_info(Info, PredId, PredTable, FuncArity, GoalPath,
!ConsInfos) :-
typecheck_info_get_module_info(Info, ModuleInfo),
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
map__lookup(PredTable, PredId, PredInfo),
PredArity = pred_info_orig_arity(PredInfo),
IsPredOrFunc = pred_info_is_pred_or_func(PredInfo),
@@ -2819,7 +2819,7 @@
is_field_access_function_name(ModuleInfo, Name, Arity, AccessType,
FieldName),
- module_info_ctor_field_table(ModuleInfo, CtorFieldTable),
+ module_info_get_ctor_field_table(ModuleInfo, CtorFieldTable),
map__search(CtorFieldTable, FieldName, FieldDefns),
list__filter_map(
@@ -2839,7 +2839,7 @@
MaybeFunctorConsTypeInfo),
(
MaybeFunctorConsTypeInfo = ok(FunctorConsTypeInfo),
- module_info_classes(Info ^ module_info, ClassTable),
+ module_info_get_class_table(Info ^ module_info, ClassTable),
convert_field_access_cons_type_info(ClassTable, AccessType,
FieldName, FieldDefn, FunctorConsTypeInfo,
OrigExistTVars, ConsTypeInfo)
@@ -2874,7 +2874,7 @@
;
Info ^ is_field_access_function = yes
),
- module_info_ctors(ModuleInfo, Ctors),
+ module_info_get_cons_table(ModuleInfo, Ctors),
map__lookup(Ctors, ConsId, ConsDefns0),
list__filter(
(pred(CtorDefn::in) is semidet :-
@@ -3352,7 +3352,7 @@
%
typecheck_info_get_predid(Info, PredId),
typecheck_info_get_module_info(Info, ModuleInfo),
- module_info_classes(ModuleInfo, ClassTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
module_info_pred_info(ModuleInfo, PredId, PredInfo),
(
Body ^ du_type_is_foreign_type = yes(_),
Index: compiler/typecheck_errors.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck_errors.m,v
retrieving revision 1.5
diff -u -b -r1.5 typecheck_errors.m
--- compiler/typecheck_errors.m 14 Sep 2005 05:26:40 -0000 1.5
+++ compiler/typecheck_errors.m 27 Sep 2005 06:40:04 -0000
@@ -1787,7 +1787,7 @@
checkpoint(Msg, !Info, !IO) :-
typecheck_info_get_module_info(!.Info, ModuleInfo),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, debug_types, DoCheckPoint),
(
DoCheckPoint = yes,
Index: compiler/typecheck_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck_info.m,v
retrieving revision 1.2
diff -u -b -r1.2 typecheck_info.m
--- compiler/typecheck_info.m 12 Sep 2005 05:24:28 -0000 1.2
+++ compiler/typecheck_info.m 27 Sep 2005 06:40:04 -0000
@@ -527,13 +527,13 @@
%-----------------------------------------------------------------------------%
typecheck_info_get_module_name(Info, Name) :-
- module_info_name(Info ^ module_info, Name).
+ module_info_get_name(Info ^ module_info, Name).
typecheck_info_get_preds(Info, Preds) :-
module_info_get_predicate_table(Info ^ module_info, Preds).
typecheck_info_get_types(Info, Types) :-
- module_info_types(Info ^ module_info, Types).
+ module_info_get_type_table(Info ^ module_info, Types).
typecheck_info_get_ctors(Info, Ctors) :-
- module_info_ctors(Info ^ module_info, Ctors).
+ module_info_get_cons_table(Info ^ module_info, Ctors).
typecheck_info_get_pred_markers(Info, PredMarkers) :-
typecheck_info_get_module_info(Info, ModuleInfo),
Index: compiler/typeclasses.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typeclasses.m,v
retrieving revision 1.3
diff -u -b -r1.3 typeclasses.m
--- compiler/typeclasses.m 12 Sep 2005 05:24:28 -0000 1.3
+++ compiler/typeclasses.m 27 Sep 2005 06:40:04 -0000
@@ -107,9 +107,9 @@
perform_context_reduction(OrigTypeAssignSet, !Info, !IO) :-
checkpoint("before context reduction", !Info, !IO),
typecheck_info_get_module_info(!.Info, ModuleInfo),
- module_info_classes(ModuleInfo, ClassTable),
- module_info_superclasses(ModuleInfo, SuperClassTable),
- module_info_instances(ModuleInfo, InstanceTable),
+ module_info_get_class_table(ModuleInfo, ClassTable),
+ module_info_get_superclass_table(ModuleInfo, SuperClassTable),
+ module_info_get_instance_table(ModuleInfo, InstanceTable),
typecheck_info_get_type_assign_set(!.Info, TypeAssignSet0),
list__filter_map(
reduce_type_assign_context(ClassTable, SuperClassTable,
Index: compiler/unify_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_gen.m,v
retrieving revision 1.152
diff -u -b -r1.152 unify_gen.m
--- compiler/unify_gen.m 13 Sep 2005 04:56:12 -0000 1.152
+++ compiler/unify_gen.m 27 Sep 2005 06:40:04 -0000
@@ -453,7 +453,7 @@
"generate_construction_2: tabling_pointer constant has args"),
code_info__get_module_info(!.CI, ModuleInfo),
ProcLabel = make_proc_label(ModuleInfo, PredId, ProcId),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
DataAddr = data_addr(ModuleName, tabling_pointer(ProcLabel)),
code_info__assign_const_to_var(Var,
const(data_addr_const(DataAddr, no)), !CI),
@@ -569,7 +569,7 @@
),
% This optimization distorts deep profiles, so don't perform it
% in deep profiling grades.
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_bool_option(Globals, profile_deep, Deep),
Deep = no
->
@@ -666,7 +666,7 @@
),
continuation_info__generate_closure_layout( ModuleInfo, PredId, ProcId,
ClosureInfo),
- module_info_name(ModuleInfo, ModuleName),
+ module_info_get_name(ModuleInfo, ModuleName),
goal_info_get_context(GoalInfo, Context),
term__context_file(Context, FileName),
term__context_line(Context, LineNumber),
Index: compiler/unify_proc.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unify_proc.m,v
retrieving revision 1.151
diff -u -b -r1.151 unify_proc.m
--- compiler/unify_proc.m 12 Sep 2005 05:24:29 -0000 1.151
+++ compiler/unify_proc.m 27 Sep 2005 06:40:04 -0000
@@ -288,13 +288,13 @@
unify_proc__search_mode_num(!.ModuleInfo, TypeCtor,
UnifyMode, Determinism, _)
;
- module_info_types(!.ModuleInfo, TypeTable),
+ module_info_get_type_table(!.ModuleInfo, TypeTable),
map__search(TypeTable, TypeCtor, TypeDefn),
hlds_data__get_type_defn_body(TypeDefn, TypeBody),
(
TypeCtor = TypeName - _TypeArity,
TypeName = qualified(TypeModuleName, _),
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
ModuleName = TypeModuleName,
TypeBody = abstract_type(_)
;
@@ -616,7 +616,7 @@
unify_proc__collect_type_defn(ModuleInfo, TypeCtor, Type,
TVarSet, TypeBody, Context) :-
- module_info_types(ModuleInfo, Types),
+ module_info_get_type_table(ModuleInfo, Types),
map__lookup(Types, TypeCtor, TypeDefn),
hlds_data__get_type_defn_tvarset(TypeDefn, TVarSet),
hlds_data__get_type_defn_tparams(TypeDefn, TypeParams),
@@ -701,7 +701,7 @@
error("generate_initialise_clauses: type_to_ctor_and_args failed")
),
PredName = special_pred__special_pred_name(initialise, TypeCtor),
- hlds_module__module_info_name(ModuleInfo, ModuleName),
+ hlds_module__module_info_get_name(ModuleInfo, ModuleName),
TypeCtor = TypeSymName - _TypeArity,
sym_name_get_module_name(TypeSymName, ModuleName, TypeModuleName),
InitPred = qualified(TypeModuleName, PredName),
@@ -1275,7 +1275,7 @@
can_compare_constants_as_ints(Info) = CanCompareAsInt :-
ModuleInfo = Info ^ module_info,
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
lookup_bool_option(Globals, can_compare_constants_as_ints,
CanCompareAsInt).
@@ -1337,7 +1337,7 @@
;
Ctors = [_ | _],
unify_proc__info_get_module_info(ModuleInfo, !Info),
- module_info_globals(ModuleInfo, Globals),
+ module_info_get_globals(ModuleInfo, Globals),
globals__lookup_int_option(Globals, compare_specialization,
CompareSpec),
list__length(Ctors, NumCtors),
Index: compiler/unneeded_code.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unneeded_code.m,v
retrieving revision 1.23
diff -u -b -r1.23 unneeded_code.m
--- compiler/unneeded_code.m 15 Aug 2005 07:18:31 -0000 1.23
+++ compiler/unneeded_code.m 27 Sep 2005 06:40:04 -0000
@@ -298,7 +298,7 @@
),
list__foldl(NeededEverywhere, NeededVarsList,
WhereNeededMap0, WhereNeededMap1),
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
globals__lookup_bool_option(Globals, reorder_conj, ReorderConj),
globals__lookup_bool_option(Globals, fully_strict, FullyStrict),
globals__lookup_int_option(Globals, unneeded_code_copy_limit, Limit),
Index: compiler/untupling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/untupling.m,v
retrieving revision 1.7
diff -u -b -r1.7 untupling.m
--- compiler/untupling.m 30 Aug 2005 04:12:02 -0000 1.7
+++ compiler/untupling.m 27 Sep 2005 06:40:04 -0000
@@ -171,7 +171,7 @@
transform_map::in, transform_map::out, counter::in, counter::out) is det.
expand_args_in_pred(PredId, !ModuleInfo, !TransformMap, !Counter) :-
- module_info_types(!.ModuleInfo, TypeTable),
+ module_info_get_type_table(!.ModuleInfo, TypeTable),
module_info_pred_info(!.ModuleInfo, PredId, PredInfo),
(
% Only perform the transformation on predicates which
@@ -221,7 +221,7 @@
expand_args_in_proc(PredId, ProcId, !ModuleInfo, !TransformMap, !Counter) :-
some [!ProcInfo] (
- module_info_types(!.ModuleInfo, TypeTable),
+ module_info_get_type_table(!.ModuleInfo, TypeTable),
module_info_pred_proc_info(!.ModuleInfo, PredId, ProcId,
PredInfo0, !:ProcInfo),
@@ -408,7 +408,7 @@
create_aux_pred(PredId, ProcId, PredInfo, ProcInfo, Counter,
AuxPredId, AuxProcId, CallAux, AuxPredInfo, AuxProcInfo,
!ModuleInfo) :-
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
proc_info_headvars(ProcInfo, AuxHeadVars),
proc_info_goal(ProcInfo, Goal @ (_GoalExpr - GoalInfo)),
@@ -515,7 +515,7 @@
map__search(TransformMap, proc(CalleePredId, CalleeProcId),
transformed_proc(_, CallAux0 - CallAuxInfo))
->
- module_info_types(ModuleInfo, TypeTable),
+ module_info_get_type_table(ModuleInfo, TypeTable),
module_info_pred_proc_info(ModuleInfo, CalleePredId,
CalleeProcId, _CalleePredInfo, CalleeProcInfo),
proc_info_argmodes(CalleeProcInfo, OrigArgModes),
Index: compiler/unused_args.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/unused_args.m,v
retrieving revision 1.107
diff -u -b -r1.107 unused_args.m
--- compiler/unused_args.m 30 Aug 2005 04:12:02 -0000 1.107
+++ compiler/unused_args.m 27 Sep 2005 06:40:05 -0000
@@ -213,7 +213,7 @@
globals__io_lookup_bool_option(make_optimization_interface, MakeOpt, !IO),
(
MakeOpt = yes,
- module_info_name(!.ModuleInfo, ModuleName),
+ module_info_get_name(!.ModuleInfo, ModuleName),
module_name_to_file_name(ModuleName, ".opt.tmp", no, OptFileName, !IO),
io__open_append(OptFileName, OptFileRes, !IO),
(
@@ -289,7 +289,7 @@
map__init(ProcCallInfo0),
map__init(VarUsage0),
module_info_predids(!.ModuleInfo, PredIds),
- module_info_unused_arg_info(!.ModuleInfo, UnusedArgInfo),
+ module_info_get_unused_arg_info(!.ModuleInfo, UnusedArgInfo),
setup_local_var_usage(PredIds, UnusedArgInfo, VarUsage0, VarUsage,
[], PredProcList, ProcCallInfo0, ProcCallInfo, !ModuleInfo, !IO).
@@ -356,7 +356,7 @@
PredArity = pred_info_orig_arity(PredInfo),
FuncId = pred_or_func_name_arity_to_func_id(PredOrFunc,
PredName, PredArity, ProcId),
- module_info_analysis_info(!.ModuleInfo, AnalysisInfo0),
+ module_info_get_analysis_info(!.ModuleInfo, AnalysisInfo0),
lookup_best_result(module_name_to_module_id(PredModule),
FuncId, unused_args_func_info(PredArity),
any_call, MaybeBestResult, AnalysisInfo0, AnalysisInfo, !IO),
@@ -398,7 +398,7 @@
initialise_vardep(Vars, !VarDep),
setup_output_args(!.ModuleInfo, ProcInfo, !VarDep),
- module_info_globals(!.ModuleInfo, Globals),
+ module_info_get_globals(!.ModuleInfo, Globals),
proc_interface_should_use_typeinfo_liveness(PredInfo, ProcId,
Globals, TypeInfoLiveness),
(
@@ -873,7 +873,7 @@
globals__io_lookup_bool_option(intermodule_analysis, Intermod, !IO),
(
Intermod = yes,
- module_info_analysis_info(!.ModuleInfo, AnalysisInfo0),
+ module_info_get_analysis_info(!.ModuleInfo, AnalysisInfo0),
PredOrFunc = pred_info_is_pred_or_func(OrigPredInfo),
PredArity = pred_info_orig_arity(OrigPredInfo),
ModuleId = module_name_to_module_id(PredModule),
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
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/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
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/gears
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/moose/tests
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/solver_types
cvs diff: Diffing extras/solver_types/library
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 extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
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 slice
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
Index: tools/subst
===================================================================
RCS file: tools/subst
diff -N tools/subst
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ tools/subst 27 Sep 2005 06:39:20 -0000
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+mkdir NEW
+
+for file in *.pp
+do
+ echo $file
+ sed -f SUBST $file > NEW/$file
+ rm `basename $file`.m
+done
+
+for file in *.m
+do
+ echo $file
+ sed -f SUBST $file > NEW/$file
+done
+
+exit 0
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