Estimated hours taken: 7
Restructure the RTTI implementation to eliminate dependencies on the LLDS,
so that it can be used for the MLDS back-end as well as the LLDS back-end.
(Note that I have not yet modified the MLDS back-end to actually make
use of it; that will be a separate change.)
compiler/rtti.m:
Eliminate the dependency on LLDS, by replacing code_addr with a new
type `rtti_proc_label'. Add a procedure `rtti__make_proc_label' for
constructing these.
compiler/type_ctor_info.m:
Eliminate the dependency on LLDS, by calling rtti__make_proc_label
rather than code_util__make_entry_label.
compiler/ml_code_util.m:
Add a new procedure `ml_gen_pred_label_from_rtti',
for (eventual) use by ml_base_type_info.m.
Restructure the implementation of ml_gen_pred_label so that it
works by first calling rtti__make_proc_label and then calling
ml_gen_pred_label_from_rtti.
compiler/code_util.m:
Add new procedure `make_entry_label_from_rtti', for use by rtti_out.m.
Restructure the implementation of the predicates make_entry_label,
make_local_entry_label, and make_proc_label so that they work by first
calling rtti__make_proc_label. Change make_user_proc_label to take
a boolean rather than an import_status.
Also update the documentation for code_util__compiler_generated,
adding an XXX comment saying that the name is misleading.
compiler/rtti_out.m:
Call code_util__make_entry_label_from_rtti to
convert the rtti_proc_labels in the RTTI into code_addrs.
compiler/rl.m:
Update to reflect the changed interface to
code_util__make_user_proc_label.