mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 13:23:53 +00:00
Estimated hours taken: 3
Branches: main
Modify the program representation bytecode to include mode information for the
head variables of a procedure.
Modes in the program representation bytecode and structure are represented as
an initial instantiation state, and a final instantiation state. These can
have one of the three values each: free, ground and other.
mdbcomp/program_representation.m:
Introduce new types head_var_rep, var_mode_rep and inst_rep.
Head variables of a proc_defn_rep structure now use the head_var_rep type.
Add head_var_to_var function.
Add code to read in mode information with head variables from progrep
bytecode.
Increment the Deep.procrep file format version number.
Use a higher order abstraction to remove duplicated code.
compiler/prog_rep.m:
Write out bytecodes for the modes of procedures' head variables.
deep_profiler/program_representation_utils.m:
Conform to changes in mdbcomp/program_representation.m
Print out the mode information for each variable in the head of a
procedure.
Use a higher order abstraction to remove duplicated code.
browser/declarative_tree.m:
Conform to changes in mdbcomp/program_representation.m
runtime/mercury_deep_profiling.c:
Increment the Deep.procrep file format version number.