util/.gitignore:
util/Mmakefile:
Don't build or install the mkinit_erl program.
util/mkinit.c:
util/mkinit_common.c:
Remove references to mkinit_erl.c.
Delete handling of -m option (only used by mkinit_erl).
util/mkinit_erl.c:
Delete source file.
Except where noted otherwise below most of these warnings relate to implicit
conversions between 64- and 32-bit integers or the signedness of integers
differing in spots.
library/construct.m:
Delete an unused local variable in the implementation of get_functor_lex.
library/bitmap.m:
The function MR_bitmap_cmp returns an MR_Integer not an int.
library/thread.semaphore.m:
Change the count field of the ML_SEMAPHORE_STRUCT structure into
an MR_Integer (which is what gets passed in).
trace/mercury_trace_declarative.c:
Avoid a warning about fprintf being called where its second argument
is not a string literal. (In this case it can be replaced by a call
to fputs.)
library/io.m:
mdbcomp/rtti_access.m:
trace/mercury_trace.c:
trace/mercury_trace_cmd_breakpoint.c:
trace/mercury_trace_cmd_help.c:
trace/mercury_trace_completion.m:
trace/mercury_trace_declarative.[ch]:
trace/mercury_trace_external.c:
trace/mercury_trace_internal.c:
trace/mercury_trace_source.c:
trace/mercury_trace_tables.c:
trace/mercury_trace_vars.c:
util/info_to_mdb.c:
util/mfiltercc.c:
util/mdemangle.c:
util/mkinit.c:
util/mkinit_erl.c:
util/mkinit_common.h:
util/mkinit_common.c:
As above.
Estimated hours taken: 1
Branches: main
Allow mkinit_erl accept the -f flag as well.
util/mkinit_erl.c:
Accept the -f flag.
util/mkinit.c:
util/mkinit_common.c:
util/mkinit_common.h:
Move the process_file_list_file into mkinit_common.c.
Estimated hours taken: 12
Branches: main
Support :- initialise and :- finalise predicates in the Erlang backend.
compiler/compile_target_code.m:
Refactor the code relating to running mkinit to generate .init and
_init.c files, and compiling _init.c files.
Generalise the code so that it can call mkinit_erl with the right
options.
compiler/dead_proc_elim.m:
Add initialisation and finalisation predicates to the queue at the
start of the pass so that they won't be eliminated. For the C
backends we implicitly :- foreign_export init and final preds so they
would never be eliminated, but we don't do that in the Erlang
backend.
compiler/elds.m:
Extend the ELDS to hold pred_proc_ids of init/final preds.
compiler/erl_code_gen.m:
compiler/mercury_compile.m:
Conform to change in ELDS.
compiler/elds_to_erlang.m:
Output mercury__required_init and mercury__required_final functions
which call user initialisation and finalisation predicates, if any.
Write out -export annotations for those functions.
Write out REQUIRED_INIT and REQUIRED_FINAL directives for those
functions.
compiler/hlds_module.m:
compiler/make_hlds_passes.m:
Remember the arity of init/final preds in the HLDS, not just the
sym_name.
Add predicates to return the pred_proc_ids of init/final preds.
Delete module_info_user_init_pred_c_name and
module_info_user_final_pred_c_name as they are unused.
compiler/make.program_target.m:
Call make_erlang_program_init_file and make_erlang_library_init_file
when building an Erlang executable or library, respectively.
Install a .init file when installing an Erlang library.
Conform to changes in compile_target_code.m.
compiler/modules.m:
In module_name_to_file_name, treat extensions specially if they end
".erl" and ".beam", not only if they are exactly those strings. This
is because we may pass "_init.erl" or "_init.beam" as the extension.
compiler/options.m:
Add an option `--mkinit-erl-command'.
util/Mmakefile:
util/.cvsignore:
util/mkinit_erl.c:
Add `mkinit_erl' program which is a modified version of `mkinit'.
util/mkinit.c:
util/mkinit_common.c:
util/mkinit_common.h:
Factor out code common to mkinit and mkinit_erl into mkinit_common.c
and mkinit_common.h.
tests/hard_coded/Mmakefile:
Fix misspellings of "MERCURY_SUPPRESS_STACK_TRACE".
tests/hard_coded/impure_init_and_final.m:
Add Erlang foreign proc.