Estimated hours taken: 10
Fix a code generator abort reported by Stephane Marie
<stephane.marie@detexis.thomson-csf.com>.
The bug was in the code to work out the instmap after a deconstruction
unification with complicated sub-unifications.
The instmap_delta for the unification contained only the bindings for
the first argument for which a new variable was created.
The test case now gives an error during mode analysis
rather than a code generator abort (for unification procedures
of imported types) or a mode error during unique mode analysis
(for local types).
compiler/modes.m:
compiler/modecheck_call.m:
compiler/modecheck_unify.m:
Simplify the code to handle extra goals by not attempting
to bodge together the instmap after the main goal.
Instead, the code now creates the extra unifications and
rechecks the goal with the unifications added.
compiler/mode_info.m:
Add a field to say whether we are reprocessing a goal after
adding extra goals. Abort if the reprocessing adds more extra goals.
The `may_changed_called_proc' field is now separate from
the `how_to_check_goal' field. This is used to avoid
repeating the search for the best procedure when rerunning
mode analysis after adding the extra goals.
compiler/modecheck_unify.m:
Removed predicate unify_vars - it is no longer used.
compiler/unify_proc.m:
Call module_info_remove_predid if there are mode errors
in a unification procedure to avoid spurious determinism
errors.
tests/hard_coded/Mmakefile:
tests/hard_coded/partial_implied_mode.m:
tests/hard_coded/partial_implied_mode.err_exp:
Test case. It would be nicer if the error message pointed
to the unification which caused the unification procedure
to be created, rather than the type declaration in the
interface file.