Commit Graph

3 Commits

Author SHA1 Message Date
Julien Fischer
cc46e4634f Delete obsolete hash predicates.
library/hash_table.m:
library/version_hash_table.m:
     Delete hash predicates that were made obsolete in Mercury 20.06.

tests/hard_coded/test_int_hash.m:
     Replace a call to a now deleted predicate.

NEWS:
     Announce the deletions.
2022-04-03 13:40:50 +10:00
Julien Fischer
ca55327c27 Fix various problems with the new integer types and the Java backend.
compiler/mlds_to_java.m:
    Generate the correct for uint16 and uint8 right shifts: the
    existing code failed to account for the fact that Java will
    promote a byte or short that is the first operand of a shift
    to an int.

library/io.m:
    Add the missing Java definition of do_write_uint/5.

tests/hard_coded/test_int_hash.m:
    Translate the Java implementation of the hash function
    into C#.

tests/hard_coded/Mmakefile:
    Run the test_int_hash test in all grades.

test/hard_coded/bitwise_int.exp2:
    Add an expected output for backends where int is a 32-bit
    type.
2017-09-03 04:18:35 +10:00
Julien Fischer
0730d99a6e Reimplement the hash_pred for ints in Mercury.
library/hash_pred.m:
    As above: implementing this in Mercury means that we now have a working
    implementation for the non-C backends as well.

    Provide a link to the archived version of Thomas Wang's website.

tests/Mmakefile:
tests/hard_coded/test_int_hash.{m,exp}:
    Add a test the compares the above Mercury implementation to Ralph's
    original C implementation.
2017-09-03 01:25:57 +10:00