Estimated hours taken: 4
Branches: main
Trace builtin and private_builtin (with the exception of external predicates
and those that are polymorhphic, but have no extra type_info arguments).
This allows subterms to be traced through calls to predicates in builtin
and private_builtin and fixes an assertion failure in the declarative debugger
that was triggered when an untraced builtin called a traced predicate
(the debugger would then think the events from the traced predicate were
child events of the parent of the untraced predicate, which would cause the
assertion failure).
compiler/code_gen.m:
compiler/hlds_pred.m:
compiler/mercury_compile.m:
compiler/ml_code_util.m:
compiler/polymorphism.m:
compiler/stack_layout.m:
compiler/term_constr_initial.m:
mdbcomp/prim_data.m:
mdbcomp/program_representation.m:
Move no_type_info_builtin from compiler/hlds_pred.m to
mdbcomp/program_representation.m, so that the debugger can call it
to see what builtin polymorphic predicates do not have extra type_info
arguments.
Define pred_is_external to be true for predicates defined with
:- external. The debugger needs to know not to expect any events for
such predicates.
Trace the builtin and private_builtin modules.
tests/debugger/loopcheck.exp3:
tests/debugger/uci.exp2:
tests/debugger/uci_index.exp:
Changes to expected output due to the fact that builtins are now
traced.
tests/debugger/declarative/Mmakefile:
tests/debugger/declarative/typed_unify.exp:
tests/debugger/declarative/typed_unify.inp:
tests/debugger/declarative/typed_unify.m:
Test tracking of a subterm through a builtin.
Estimated hours taken: 2
Branches: main
runtime/mercury_unify_compare_body.h:
Add a mechanism, conditional on #ifdef MR_CHECK_DU_EQ, for testing
whether two values are bit-for-bit identical before invoking any of
the more specific unify or compare code.
Fix some old bugs which showed up only with -DMR_COMPARE_BY_RTTI:
we were invoking some macros with the wrong number of arguments.
runtime/mercury_conf_param.h:
Document MR_CHECK_DU_EQ. Turn it on unless another macro,
MR_DISABLE_CHECK_DU_EQ, is defined. This improves performance by
six percent. (Thanks to Ralph for the reminder to evaluate this again.
When I tried this several years ago, it was a performance loss.)
tests/debugger/uci.exp2:
Add this new expected output file for this test. While uci.exp contains
the expected output without -DMR_CHECK_DU_EQ, uci.exp2 contains the
expected output with it, since we no longer get calls to the
type-specific unify and compare predicates in some cases.