[m-rev.] diff: fix compiler abort because of missing init preds.

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Nov 1 15:45:41 AEDT 2007


Estimated hours taken: 0.1
Branches: main

Fix a compiler abort caused by the fact that initialisation predicates
are no longer created for solver types by default.

compiler/modecheck_unify.m:
 	Fix a spot where the compiler was trying to insert calls
 	to initialisation predicates when automatic initialisation is
 	disabled.

Julien.

Index: compiler/modecheck_unify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/modecheck_unify.m,v
retrieving revision 1.120
diff -u -r1.120 modecheck_unify.m
--- compiler/modecheck_unify.m	31 Oct 2007 03:58:27 -0000	1.120
+++ compiler/modecheck_unify.m	1 Nov 2007 04:42:17 -0000
@@ -525,12 +525,12 @@
          HowToCheckGoal = check_modes,
          inst_match.inst_is_free(ModuleInfo0, InstOfX),
          mode_info_may_init_solver_vars(!.ModeInfo),
+        mode_info_solver_init_is_supported(!.ModeInfo),
          instmap.lookup_vars(ArgVars0, InstMap0, InstArgs0),
          all_arg_vars_are_non_free_or_solver_vars(ArgVars0, InstArgs0,
              VarTypes, ModuleInfo0, ArgVarsToInit)
      ->
-        modes.construct_initialisation_calls(ArgVarsToInit, InitGoals,
-            !ModeInfo),
+        construct_initialisation_calls(ArgVarsToInit, InitGoals, !ModeInfo),
          (
              InitGoals = [],
              ExtraGoals1 = no_extra_goals

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list