compiler/notes/todo.html:
Delete references to things that have been done, and to things
that won't be done.
compiler/notes/coding_standards.html:
compiler/notes/failure.html:
compiler/notes/gc_and_c_code.html:
compiler/notes/glossary.html:
compiler/notes/reviews.html:
compiler/notes/trailing.html:
compiler/notes/type_class_transformation.html:
Fix German Capitalization, and other minor nits.
The non-style changes include
- Replacing outdated information with up to date information.
- Deleting fully obsolete information, such as references to the IL backend.
- Replacing list entries that were just bare words or phrases
with full sentences, where this is useful.
- Improvements to make documents easier to read and understand.
However, the bulk of the diff consists of style changes. The initial main
of these changes are to eliminate, or at least reduce, inconsistencies
- between the styles of the different parts of each document, and
- between the styles of differents documents.
This applies both as they appear in a browser, and in the source .html file.
The main style changes are
- Add a vim mode line to each file.
- Do not specify a color for the page background; let the browser decide.
- Add a heading to the top of each page that echoes the title.
- Avoid SHOUTING in headings.
- Avoid the unneeded use of <hr>.
- Avoid the use of headings (e.g. h5) that are so low in the hierarchy that
browsers render them in a font that is *smaller* than the usual font.
- Replace definition lists with standard unordered lists
when the list items are not definitions.
- Replace ordered lists with standard unordered lists
when the list items have no meaningful order.
- Do not indent the contents of unordered lists, with the exception of
nested lists.
- Unless all entries in a list are extremely short,
do not try to put anything next to <li>.
- Fix violations reported by weblint.
compiler/notes/compiler_design.html:
The changes described above.
Explicitly introduce the notion of the middle end.
compiler/notes/bootstrapping.html:
Rewrite this almost from scratch.
compiler/notes/work_in_progress.html:
Rename the page to make it clear that these issues are NOT being
worked on.
compiler/notes/release_checklist.html:
compiler/notes/todo.html:
Note that these lists are quite out of date.
compiler/notes/allocation.html:
compiler/notes/analysis.html:
compiler/notes/bytecode.html:
compiler/notes/c_coding_standard.html:
compiler/notes/coding_standards.html:
compiler/notes/developer_intro.html:
compiler/notes/failure.html:
compiler/notes/gc_and_c_code.html:
compiler/notes/glossary.html:
compiler/notes/grade_library.html:
compiler/notes/index.html:
compiler/notes/interface_files.html:
compiler/notes/mlds_tail_recursion.html:
compiler/notes/overall_design.html:
compiler/notes/promise_ex.html:
compiler/notes/reviews.html:
compiler/notes/trailing.html:
compiler/notes/type_class_transformation.html:
compiler/notes/upgrade_boehm_gc.html:
compiler/notes/Mmakefile:
Add a target to run weblint on all the HTML files.
Estimated hours taken: 0.25
Apply some corrections that Warwick spotted in his
review of my recent trailing changes.
runtime/mercury_context.c:
Fix a couple of bugs in init_context(): the ticket_counter
should be initialized to 1, not 0, and we need to also
initialize the ticket_high_water field.
compiler/notes/trailing.html:
doc/reference_manual.texi:
Fix typos.
Estimated hours taken: 20
Fix several bugs in the trail handling.
Also improve the documentation of trailing, and add a new macro
MR_choicepoint_newer() to the public trailing interface.
The bugs which this change fixes are:
- choice point ids were being reused after commits,
rather than only after backtracking;
- for if-then-elses with nondet conditions, the generated code was
using MR_commit rather than MR_solve as the MR_untrail_reason;
- for semidet disjunctions, when committing to a particular disjunct
the generated code was not calling MR_reset_ticket(..., MR_commit)
to invoke function trail entries, and was also leaking a trail ticket
- the all-solutions predicates in std_util.m were leaking trail
tickets (i.e. allocating them but not pruning or discarding them).
runtime/mercury_trail.h:
runtime/mercury_regorder.h:
runtime/mercury_regs.h:
runtime/mercury_wrapper.c:
runtime/mercury_context.h:
runtime/mercury_engine.h:
A bunch of changes to add a new virtual register
`MR_ticket_high_water':
- in mercury_trail.h, add MR_ticket_high_water_var variable;
- in mercury_regorder.h, add MR_ticket_high_water macro;
- in mercury_regs.h, add MR_TICKET_HIGH_WATER_RN macro;
- in mercury_wrapper.c, change
print_register_usage_counts() to handle
MR_TICKET_HIGH_WATER_RN.
- in mercury_context.h and mercury_engine.h,
add code to save/restore this new register when
appropriate.
runtime/mercury_trail.h:
- Change MR_store_ticket() so that it does
`MR_ticket_counter = ++MR_ticket_high_water'
rather than just `MR_ticket_counter++'.
- Add new macros MR_prune_ticket() and MR_prune_tickets_to(),
which only reset MR_ticket_counter, not MR_ticket_high_water.
- Change the old macros MR_discard_ticket() and MR_discard_tickets_to()
so that they reset both MR_ticket_high_water and MR_ticket_counter.
- Add new macro MR_choicepoint_newer().
- Enclose macro arguments in parentheses.
- Some minor changes to the documentation.
doc/reference_manual.texi:
Document MR_choicepoint_newer().
Update the documentation to reflect the fact that exceptions
are now a standard part of Mercury.
Clarify the documentation in the "Avoiding Redundant Trailing"
section, and add a longish example.
compiler/notes/trailing.html:
Add some documentation on the trail and how we manage it.
compiler/llds.m:
compiler/mlds.m:
Add new `prune_ticket' and `prune_tickets_to' instructions,
corresponding to the new macros defined in runtime/mercury_trail.h.
Comment out the `discard_tickets_to' instruction, since it
is no longer used in the compiler (the MR_discard_tickets_to()
macro is only used by library/exception.m and the debugger's
retry command).
Replace the duplicated documentation in mlds.m with a pointer
to llds.m.
compiler/ite_gen.m:
compiler/code_gen.m:
compiler/code_info.m:
Change the trail handling code generated after commits
so that the ticket is pruned rather than discarded.
compiler/ite_gen.m:
When generating the reset_ticket instruction for
if-then-elses with nondet conditions, use `solve'
rather than `commit' as the reset_trail_reason.
compiler/disj_gen.m:
Add code to generate a reset_ticket(..., commit)
instruction at the end of every non-last disjunct
in semidet disjunctions.
compiler/dupelim.m:
compiler/livemap.m:
compiler/llds_common.m:
compiler/llds_out.m:
compiler/ml_elim_nested.m:
compiler/middle_rec.m:
compiler/opt_debug.m:
compiler/opt_util.m:
compiler/value_number.m:
compiler/vn_*.m:
Trivial modifications to handle the changes to the
trailing instructions.
library/exception.m:
Change the trail handling code so that when the goal in an
exception handler succeeds (rather than failing or throwing an
exception), the trail ticket we created on entry to the
handler is pruned rather than discarded.
library/std_util.m:
Add a new impure predicate `discard_trail_ticket', which calls
MR_discard_ticket(), and call it in `builtin_aggregate' and
`do_while' to discard the ticket that gets allocated by the
call to MR_store_ticket() in `get_registers'.