... as a preliminary for extending the emulation to sized ints and uints.
compiler/int_emu.m:
Move all the emulation operations from uint_emu.m to int_emu.m,
moving each uint operation next to its int equivalent. To make this
possible without naming conflicts, add a distinguishing prefix
to the name of each emulation predicate. (The emulations of each op
for signed and unsigned ints are related though somewhat different,
and both the similarities and differences are easily visible and checkable
when their code is next to each other.)
On the other hand, the emulation code for an operation for e.g.
int/int8/int16/int32/int64 can be *identical* when the number of bits
is a parameter of that code, and the next diff will exploit this fact.
Unify the target_bits_per_int predicate from int_emu.m and the
target_bits_per_uint predicate from uint_emu.m, which had exactly
the same logic, and call it target_word_bits.
compiler/uint_emu.m:
Delete this module.
compiler/libs.m:
Delete both int_emu.m and uint_emu as a submodule of this package.
compiler/parse_tree.m:
Move int_emu.m to become a submodule of this package, to allow the next
change to it to use the some_int_const type in prog_data.m.
compiler/notes/compiler_design.html:
Generalize the description of int_emu.m. Note that the description
of uint_emu.m cannot be deleted, because it didn't exist :-(
compiler/const_prop.m:
compiler/simplify_goal_call.m:
Conform to the changes above.
Mercury
Mercury is a logic/functional programming language which combines the clarity and the expressiveness of declarative programming with advanced static analysis and error detection features.
More information is available on the website's about pages, in other README files in the source code repository, and in the documentation.
Small sample programs written in Mercury can be found in the samples and extras directories of the source code repository.
README files
The Mercury compiler has two different backends and works on different operating systems. Specific information is contained in individual README files:
-
Bootstrapping discusses how to get Mercury installed.
This is important, as the Mercury compiler is written in Mercury.
-
C Low-level backend
This backend works well with GCC but also works with:
-
High-level backend targets
-
Supported operating systems
-
Other platform information
Other information
See the current release notes for the latest stable release. The news file lists any recent changes. The history file is relevant if you want to find out more about the past development of Mercury. The limitations file lists some ways in which the Mercury implementation does not yet meet its goals.
Information for developers
If you are considering contributing to the Mercury project, the website contains some documents that may be helpful. These include a document about contributions in general and specific information about contributing such as coding styles.
Contact
See our contact page.