compiler/const_prop.m:
Extend this module to support compile time evaluation of uint operations.
compiler/uint_emu.m:
A new module that emulates `uint' operations for the bits-per-uint in
a manner similar to the int_emu module.
compiler/libs.m:
Include the new module.
tests/hard_coded/constant_prop_1.{m,exp}:
tests/hard_coded/constant_prop_2.{m,exp}:
Test compile time evaluation of uint operations.
Update coding style in these tests.
tests/hard_coded/Mmakefile:
Conform to the above changes. (XXX the existing check
for the Java grade doesn't actually work.)
Delete left over IL and GCC backend stuff.
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: 1
Branches: main
Improve the testing of constant propagation.
tests/hard_coded/Mmakefile:
tests/hard_coded/constant_prop_1.m:
tests/hard_coded/constant_prop_1.exp:
tests/hard_coded/constant_prop_2.m:
tests/hard_coded/constant_prop_2.exp:
tests/hard_coded/Mercury.options:
Add two new tests of constant propagation.
For the first test, we test by grepping the generated target code
for the expected constants.
For the second test, we test by including a reference to an
undefined external procedure "link_error" which will get
optimized away iff the compiler does constant propagation.