tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Estimated hours taken: 4
Branches: main
Make the user friendly names of predicates introduced by lambda expressions
(more) unique. This is necessary so they can be distinguished from each other
in trace count files.
If two or more lambda expression appear in the same context, then include
their sequence number in that context in the user friendly predicate name.
compiler/hlds_module.m:
Instead of keeping a counter of how many lambdas appear in a module,
keep a seperate counter for each context (filename/lineno). This
way we only need to include the sequence number in the predicate
name if there are two or more lambdas in the same context.
compiler/hlds_pred.m:
Add a new field to the `lambda' functor which records the count of the
lambda expressin in its context.
compiler/hlds_out.m:
Unify with lambda/3 instead of lambda/2.
compiler/lambda.m:
Use the sequence number of the lambda expression in its context
when creating the predicate origin.
compiler/layout.m:
Store the origin of a closure predicate in the layout data of the
closure, so that it's user friendly name can be included in the
generated C code.
compiler/layout_out.m:
When generating a user friendly name for lambda expression predicates,
include the sequence number of the lambda expression if the sequence
number is greater than one.
compiler/stack_layout.m:
Pass the closure origin to the closure layout construction predicate.
compiler/unify_gen.m:
Pass the closure origin when constructing the closure layout.
tests/debugger/Mmakefile:
tests/debugger/lambdatest.exp:
tests/debugger/lambdatest.inp:
tests/debugger/lambdatest.m:
Test that the predicate names for lambda expressions are unique,
even if they appear in the same call.
tests/debugger/higher_order.exp:
tests/debugger/lambda_expr.exp:
tests/debugger/declarative/find_origin.exp:
tests/debugger/declarative/find_origin.exp2:
tests/debugger/declarative/higher_order.exp:
tests/debugger/declarative/higher_order.exp2:
tests/debugger/declarative/ho2.exp2:
tests/debugger/declarative/trust.exp:
tests/hard_coded/deconstruct_arg.exp:
Expect the new (more) unique predicate names.