Commit Graph

4 Commits

Author SHA1 Message Date
Zoltan Somogyi
4865f11503 Update programming style. 2020-10-04 13:20:42 +11:00
Julien Fischer
dd4b389f56 Implement compile time evaluation for uint operations.
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.
2017-05-14 02:40:26 +10:00
Zoltan Somogyi
33eb3028f5 Clean up the tests in half the test directories.
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.
2015-02-14 20:14:03 +11:00
Fergus Henderson
c6198506c5 Improve the testing of constant propagation.
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.
2004-02-10 13:13:11 +00:00