mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-14 21:35:49 +00:00
Estimated hours taken: 3 Branches: main Further improve trail usage optimization by omitting reset_undo_ticket instructions from disjuncts where the previous disjunct did not modify the trail. This can be done even in disjunctions where some of the disjuncts do modify the trail. At the moment this optimization is only implemented for the MLDS backend - I'll add it to the lowlevel backend as a separate change. compiler/add_trail_ops.m: Implement the above optimization for the MLDS backend. compiler/goal_form.m: Add a predicate goal_may_modify_trail. compiler/mercury_compile.m: Add a comment mentioning that after we have added trail ops (stage 410) to the HLDS we can no longer reorder disjunctions. This should be okay since none of the following passes reorder disjunctions anyway. vim/syntax/mercury.vim: Highlight `will_not_modify_trail' and `may_modify_trail' appropriately. NEWS: Make the description of what trail usage optimization does more precise. It affects goals other than if-then-elses, notably disjunctions and negations as well.
Mercury Syntax Highlighting Under Vim 6.0 1. Create a diretory `~/.vim': $ mkdir ~/.vim 2. Copy everything recursively from this directory into `~/.vim': $ cp -r . ~/.vim IMPORTANT: If you already have a file `~/.vim/after/filetype.vim' then you should copy the files from this directory one by one, except for `after/filetype.vim' which you should append to your own `~/.vim/after/filetype.vim'. 3. Ensure you have the following lines in your `~/.vimrc' file: filetype on filetype plugin on syntax enable 4. If you wish to change the colour scheme used by Vim's syntax highlighting, we suggest you put the necessary commands in `~/.vim/colors/mycolours.vim' and append the following to the above list of commands in your `~/.vimrc': colors mycolours 4. Vim will load `~/.vim/syntax/mercury.vim' and `~/.vim/ftplugin/mercury.vim' automatically when opening a .m or .moo file. The syntax file describes two options you may wish to alter from your `~/.vimrc' file. The ftplugin file defines a number of useful keyboard mappings you may wish to consider.