mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
Estimated hours taken: 2
Branches: main
Implement impure functions as attributes of user events.
trace/mercury_event_spec.[ch]:
Allow the representation of such attributes in C code, and add the code
to write out such attributes.
trace/mercury_event_scanner.l:
trace/mercury_event_parser.y:
Implement the scanning and parsing of such attributes.
compiler/prog_event.m:
Modify the type of the terms generated by trace/mercury_event_spec.c
to include a pure/impure indication for function attributes.
Take this into account when generating the types of function
attributes.
Simplify some code by eliminating a redundant lookup in a map.
tests/debugger/synth_attr.{m,exp}:
Convert this line to four-space indentation, and update the expected
output to reflect the vim mode line at the top.
tests/debugger/synth_attr_impure.{m,inp,exp}:
tests/debugger/synth_attr_impure_spec:
New test case (a modified version of the synth_attr test case)
to test the new functionality.
tests/debugger/Mercury.options:
tests/debugger/Mmakefile:
Enable the new test case.
In the Mmakefile, delete some redundant 2>&1 constructs that were
apparantly created by careless cut-and-paste.
17 lines
123 B
Plaintext
17 lines
123 B
Plaintext
echo on
|
|
register --quiet
|
|
user
|
|
print *
|
|
browse !test_list
|
|
p
|
|
^2^1
|
|
p
|
|
quit
|
|
user
|
|
vars
|
|
print *
|
|
print !arg_b
|
|
user
|
|
print *
|
|
continue
|