mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-21 20:33:55 +00:00
Estimated hours taken: 12
Bug fixes.
tests/term/arit_exp.m still fails with --intermodule-optimization
due to a slightly different (but correct) trans_opt file being produced.
compiler/simplify.m
Don't produce singleton disjunctions, since the code generator
barfs on them. Use a `some' instead.
Test case: tests/general/partition.m compiled with --deforestation.
compiler/unused_args.m
Deconstructions where the arguments included `any' insts were
not being handled correctly, due to inst_matches_binding
failing for any->any.
Test case: extras/trailed_update/samples/vqueens.m at -O3.
Don't warn about predicates from `.opt' files having unused
arguments, because in most cases the warning will be generated
when compiling the imported module.
compiler/higher_order.m
Fix a bug that caused compiler/modules.m to be miscompiled at
-O3 --intermodule-optimization, due to curried arguments for
multiple known higher-order arguments being passed to a
specialised version in the wrong order.
Test case: tests/hard_coded/ho_order2.m
compiler/mercury_compile.m
Call intermod__update_pred_import_status when compiling to
C at the same stage of the compilation as the `.opt' file
was written to ensure that the same information is being used.
Test case: tests/hard_coded/rational_test.m compiled with
--intermodule-optimization failed because of a link error.
Make sure polymorphism has been run before doing unused argument
checking with --errorcheck-only. Otherwise the argument indices
read in from `.opt' files are incorrect.
compiler/intermod.m
Use code_util__compiler_generated to test if a called predicate
is compiler generated, rather than looking for a call_unify_context
(function calls have a call_unify_context).
Add a progress message for updating the import status of predicates
exported to `.opt' files.
Fix a bug where the unused_args pragmas read in from the current
module's `.opt' file were given an import_status of `imported' rather
than `opt_imported' resulting in an error message from make_hlds.m.
compiler/dead_proc_elim.m
Ensure that predicates used by instance declarations and
`:- pragma export's are not eliminated by the dead_pred_elim
pass before typechecking.
Test case: most of the typeclass tests compiled with
--intermodule-optimization.
compiler/hlds_goal.m
Remove obsolete comments about the modes of a higher-order
unification being incorrect after polymorphism, since that
was fixed months ago.
compiler/options.m
Reenable deforestation.
Enable --intermodule-optimization and --intermod-unused-args
at -O5 so they get tested occasionally.
compiler/handle_options.m
Disable deforestation if --typeinfo-liveness is set, since
there are bugs in the folding code if extra typeinfos are
added to a new predicate's arguments by hlds_pred__define_new_pred.
Disable higher_order.m if --typeinfo-liveness is set, since
higher_order.m currently does not pass all necessary typeinfos
to specialised versions or update the typeinfo_varmap of
specialised versions.
Test case: tests/valid/agc_ho_pred.m
tests/hard_coded/ho_order2.m
tests/hard_coded/ho_order2.exp
Test case for higher_order.m.
tools/test_mercury
Added --intermod-unused-args to the options for murlibobo.
extras/trailed_update/{samples,tests}/Mmakefile
Add "-I.." to MGNUCFLAGS so gcc can find unsafe.h which
is #included in c_header_code read from unsafe.opt.
175 lines
4.1 KiB
Plaintext
175 lines
4.1 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
|
|
main_target: check
|
|
|
|
include ../Mmake.common
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
PROGS= \
|
|
address_of_builtins \
|
|
agg \
|
|
bidirectional \
|
|
boyer \
|
|
c_write_string \
|
|
cc_nondet_disj \
|
|
cc_and_non_cc_test \
|
|
common_type_cast \
|
|
construct \
|
|
curry \
|
|
curry2 \
|
|
deep_copy_bug \
|
|
det_in_semidet_cntxt \
|
|
division_test \
|
|
elim_special_pred \
|
|
eqv_type_bug \
|
|
error_func \
|
|
erroneous_liveness \
|
|
expand \
|
|
export_test \
|
|
float_map \
|
|
float_reg \
|
|
float_rounding_bug \
|
|
free_free_mode \
|
|
func_and_pred \
|
|
func_ctor_ambig \
|
|
func_test \
|
|
getopt_test \
|
|
ground_dd \
|
|
higher_order_func_test \
|
|
higher_order_syntax \
|
|
higher_order_type_manip \
|
|
ho_func_reg \
|
|
ho_order \
|
|
ho_order2 \
|
|
ho_solns \
|
|
ho_univ_to_type \
|
|
impossible_unify \
|
|
integer_test \
|
|
minint_bug \
|
|
mode_choice \
|
|
name_mangling \
|
|
no_fully_strict \
|
|
no_inline \
|
|
nullary_ho_func \
|
|
parent \
|
|
parent2 \
|
|
pragma_c_code \
|
|
pragma_inline \
|
|
pragma_import \
|
|
purity \
|
|
qual_adv_test \
|
|
qual_basic_test \
|
|
qual_is_test \
|
|
quoting_bug_test \
|
|
rational_test \
|
|
relation_test \
|
|
remove_file \
|
|
reorder_di \
|
|
rev_arith \
|
|
reverse_arith \
|
|
rnd \
|
|
rtc_bug \
|
|
string_alignment \
|
|
string_loop \
|
|
test_imported_no_tag \
|
|
tim_qual1 \
|
|
write \
|
|
write_reg1
|
|
|
|
# Not working:
|
|
# cycles - loops when compiled in a non-GC grade with --deforestation.
|
|
# cycles2 - loops when compiled in a non-GC grade.
|
|
# nested, nested2 - sometimes fail if using parallel makes
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# some tests need to be compiled with particular options
|
|
|
|
MCFLAGS-boyer = --infer-all
|
|
MCFLAGS-func_test = --infer-all
|
|
MCFLAGS-ho_order = --optimize-higher-order
|
|
MCFLAGS-ho_order2 = --optimize-higher-order
|
|
MCFLAGS-no_fully_strict = --no-fully-strict
|
|
MCFLAGS-rnd = -O6
|
|
|
|
# In grade `none' with options `-O1 --opt-space' on kryten
|
|
# (a sparc-sun-solaris2.5 system), mode_choice needs to be linked
|
|
# with `--no-strip', otherwise it gets a seg fault.
|
|
# The test case ../hard_coded/string_test suffers from a similar problem.
|
|
# This is probably a bug in one of the underlying tools (e.g. the Solaris
|
|
# linker) rather than a bug in Mercury, and since it is goes away when you
|
|
# compile with debugging information, it is very difficult to debug.
|
|
# It is much easier to just work around it this way rather than
|
|
# tracking it down.
|
|
MLFLAGS-mode_choice = --no-strip
|
|
|
|
# these tests run out of memory unless we have GC
|
|
GRADEFLAGS-integer_test = --gc conservative
|
|
GRADEFLAGS-integer_test_init = --gc conservative
|
|
GRADEFLAGS-rational_test = --gc conservative
|
|
GRADEFLAGS-rational_test_init = --gc conservative
|
|
|
|
# no_fully_strict is expected to fail (it calls error/1)
|
|
# so we need to ignore the exit status (hence the leading `-')
|
|
no_fully_strict.out: no_fully_strict
|
|
-./no_fully_strict > no_fully_strict.out 2>&1;
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
DEPS= $(PROGS:%=%.dep)
|
|
DEPENDS=$(PROGS:%=%.depend)
|
|
OUTS= $(PROGS:%=%.out)
|
|
RESS= $(PROGS:%=%.res)
|
|
MODS= $(PROGS:%=%.mod)
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
SUBDIRS = typeclasses
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
MMAKEFLAGS =
|
|
|
|
SUBDIR_MMAKE = mmake $(MMAKEFLAGS) \
|
|
GRADE='$(GRADE)' \
|
|
EXTRA_CFLAGS='$(EXTRA_CFLAGS)' \
|
|
EXTRA_MCFLAGS='$(EXTRA_MCFLAGS)'
|
|
|
|
dep: $(DEPS)
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir && $(SUBDIR_MMAKE) dep) || exit 1; \
|
|
done
|
|
|
|
depend: $(DEPENDS)
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir && $(SUBDIR_MMAKE) depend) || exit 1; \
|
|
done
|
|
|
|
check: $(OUTS) $(RESS)
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir && $(SUBDIR_MMAKE) check) || exit 1; \
|
|
done
|
|
|
|
mods: $(MODS)
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir && $(SUBDIR_MMAKE) mods) || exit 1; \
|
|
done
|
|
|
|
all: $(PROGS)
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir && $(SUBDIR_MMAKE) all) || exit 1; \
|
|
done
|
|
|
|
clean:
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir && $(SUBDIR_MMAKE) clean) || exit 1; \
|
|
done
|
|
|
|
realclean:
|
|
for dir in $(SUBDIRS); do \
|
|
(cd $$dir && $(SUBDIR_MMAKE) realclean) || exit 1; \
|
|
done
|
|
|
|
#-----------------------------------------------------------------------------#
|