Commit Graph

35 Commits

Author SHA1 Message Date
Julien Fischer
33ea40c8a3 Fix spelling.
library/uint16.m:
library/uint32.m:
library/uint64.m:
    As above.
2023-04-03 20:22:33 +10:00
Zoltan Somogyi
5cbcfaa0ed Move X_to_doc functions to pretty_printer.m.
library/array.m:
library/char.m:
library/float.m:
library/int.m:
library/int16.m:
library/int32.m:
library/int64.m:
library/int8.m:
library/list.m:
library/one_or_more.m:
library/string.m:
library/tree234.m:
library/uint.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
library/uint8.m:
library/version_array.m:
    Mark the X_to_doc function in each of these modules as obsolete,
    and make it a forwarding function to the actual implementation
    in pretty_printer.m. The intention is that when these forwarding
    functions are eventually removed, this will also remove the dependency
    of these modules on pretty_printer.m. This should help at least some
    of these modules escape the giant SCC in the library's dependency graph.
    (It does not make sense that a library module that adds code to increment
    an int thereby becomes dependent on pretty_printer.m through int.m.)

library/pretty_printer.m:
    Move all the X_to_doc functions from the above modules here.

    Fix the one_or_more_to_doc function, which was

    - missing the comma between the two arguments of the one_or_more
      function symbol, and

    - would print "..., ...]" instead of just "...]" at the end of the
      tail list when that list exceeded the limits of the specified pp_params.

    Rename one of the moved types along with its function symbols,
    to reduce ambiguity.

    Put arrays before their indexes in the argument lists of some of
    the moved functions.

    Some of the moved X_to_doc functions for compound types returned
    a doc that had an indent wrapper. These indents differed between the
    various X_to_doc functions without any visible reason, but they are
    also redundant. The callers can trivially add such wrappers if they
    want to, but taking them off, if they want them off, is harder.
    Eliminate the problem by deleting all such indent wrappers.

    Add formatters for the intN, uintN and one_or_more types to the
    default formatter map. Their previous absence was an oversight.

    Add a function, get_formatter_map_entry_types, that returns the ids
    of the types in the formatter_map given to the function. It is intended
    for tests/hard_coded/test_pretty_printer_defaults.m, but is exported
    for anyone to use.

tests/hard_coded/test_pretty_printer_defaults.{m,exp}:
    Use get_formatter_map_entry_types to print the default formatter map
    in a format that is much more easily readable.

NEWS:
    Announce all the user-visible changes above.
2022-12-27 18:27:52 +11:00
Zoltan Somogyi
4c528d429d Add <<u and >>u to library/{int,uint}*.m ...
... along with their unchecked equivalents. These differ from <<, >> and
their unchecked equivalents in that they take the shift amount as a uint,
instead of an int.

library/int.m:
library/int16.m:
library/int32.m:
library/int64.m:
library/int8.m:
library/uint.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
library/uint8.m:
    As above. The unchecked versions have only declarations, since
    these operations have been recognized as builtins for a while now.

NEWS:
    Document the new operations, and the recent change to recognize
    <<u and >>u as single tokens, and fix a typo in a recent addition.

configure.ac:
    Require the compiler to be sufficiently recent to be able to parse
    <<u and >>u as operators.

compiler/options.m:
    Provide a way for a later change to configure.ac to detect the presence
    of this change.

tests/hard_coded/bitwise_int.exp:
tests/hard_coded/bitwise_int.exp2:
tests/hard_coded/bitwise_int.m:
tests/hard_coded/bitwise_int16.exp:
tests/hard_coded/bitwise_int16.m:
tests/hard_coded/bitwise_int32.exp:
tests/hard_coded/bitwise_int32.m:
tests/hard_coded/bitwise_int64.exp:
tests/hard_coded/bitwise_int64.m:
tests/hard_coded/bitwise_int8.exp:
tests/hard_coded/bitwise_int8.m:
tests/hard_coded/bitwise_uint.exp:
tests/hard_coded/bitwise_uint.exp2:
tests/hard_coded/bitwise_uint.m:
tests/hard_coded/bitwise_uint16.exp:
tests/hard_coded/bitwise_uint16.m:
tests/hard_coded/bitwise_uint32.exp:
tests/hard_coded/bitwise_uint32.m:
tests/hard_coded/bitwise_uint64.exp:
tests/hard_coded/bitwise_uint64.m:
tests/hard_coded/bitwise_uint8.exp:
tests/hard_coded/bitwise_uint8.m:
    Check that <<u and >>u compute the same results as << and >> respectively.
2022-12-07 23:12:33 +11:00
Julien Fischer
e7d28ff90f Update copyright notices in stdlib.
library/*.m:
    As above.
2022-06-07 21:51:03 +10:00
Zoltan Somogyi
06f81f1cf0 Add end_module declarations ...
.. to modules which did not yet have them.
2022-01-09 10:36:15 +11:00
Julien Fischer
a3b882930f Add casts to and from uint{16,32,64} and uint8.
While these casts can be implemented by casting via uint, the resulting code is
less readable than code that uses direct casts.

library/uint16.m:
library/uint32.m:
library/uint64.m:
    Add cast_from_uint8/1 and cast_to_uint8/1 to these modules.

NEWS:
    Announce the above additions.

tests/hard_coded/Mmakefile:
tests/hard_coded/uint{16,32,64}_uint_casts.{m,exp}:
    Add tests for the new casts.
2021-11-13 15:09:25 +11:00
Julien Fischer
5ee544794c Fix an incorrect section heading.
library/uint16.m:
    As above.
2021-10-31 16:04:03 +11:00
Zoltan Somogyi
4926b38ea6 Add uint->uintN conversions.
library/uint16.m:
library/uint32.m:
library/uint64.m:
library/uint8.m:
    Add to each of these modules whichever subset of {from_uint, det_from_uint,
    cast_from_uint} makes sense for that module.

tests/hard_coded/from_uint_uint8.{m,exp}:
tests/hard_coded/from_uint_uint16.{m,exp}:
tests/hard_coded/from_uint_uint32.{m,exp}:
    Three new test cases to test the changes to uint{8,16,32}.m.
    The change to uint64.m will be tested later.

tests/hard_coded/Mmakefile:
    Enable the new test cases.

library/string.m:
    Add ways to convert strings to uints.

NEWS:
    Announce the new predicates and functions.
2021-06-30 23:55:56 +10:00
Zoltan Somogyi
0d7c8a7654 Specify pred or func for all pragmas.
*/*.m:
    As above.

configure.ac:
    Require the installed compiler to support this capability.
2021-06-16 15:23:58 +10:00
Julien Fischer
a52b094e25 Setting and testing individual bits of uint8s, uint16s and uint64s.
library/uint8.m:
library/uint16.m:
library/uint64.m:
    Add functions for setting, clearing, flipping and testing
    the individual bits of a uint8, uint16 and uint64 values.

NEWS:
    Announce the new functions.

tests/hard_coded/Mmakefile:
tests/hard_coded/bit_access_uint{8,16,64}.{m,exp}:
    Add a test case.
2021-04-10 03:21:14 +10:00
Julien Fischer
e32a34db38 Add bitwise rotations for uint16s and uint8s.
library/uint8.m:
library/uint16.m:
    As above.

tests/hard_coded/Mmakefile:
tests/hard_coded/rotate_uint{8,16}.{m,ex}:
    Add tests for the new functions.
2021-03-29 17:03:02 +11:00
Peter Wang
0d3fcbaae3 Delete Erlang code from library/mdbcomp/browser directories.
library/*.m:
    Delete Erlang foreign code and foreign types.

    Delete documentation specific to Erlang targets.

library/deconstruct.m:
    Add pragma no_determinism_warning to allow functor_number_cc/3
    to compile for now.

library/Mercury.options:
    Delete workaround only needed when targetting Erlang.

browser/listing.m:
mdbcomp/rtti_access.m:
    Delete Erlang foreign code and foreign types.
2020-10-28 14:10:56 +11:00
Zoltan Somogyi
85f20002c5 Move the domain_error type to exception.m.
library/math.m:
library/exception.m:
    Move the domain_error type from math.m to exception.m.

NEWS:
    Announce the change as a potentially breaking change.

deep_profiler/query.m:
library/float.m:
library/int.m:
library/int16.m:
library/int32.m:
library/int64.m:
library/int8.m:
library/integer.m:
library/uint.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
library/uint8.m:
    Replace all references to math.domain_error with just domain_error.
    Delete imports of math.m where this was the only reason for the import.
2020-05-01 18:57:43 +10:00
Julien Fischer
f89054f165 Use error($pred, "...") in more spots in the standard library.
Also, throw software_error/1 exceptions rather than directly throwing strings
in a few spots.

Undo special Ralph-style formatting.

library/*.:
    As above.

tests/hard_coded/array2d_from_array.exp:
tests/hard_coded/array2d.exp:
tests/hard_coded/test_injection.exp:
   Update to conform with the above change.
2019-10-15 17:48:36 +11:00
Mark Brown
7721516520 Implement SFC random number generators, in various sizes
library/rng.sfc.m:
	New module that implements the above.

library/MODULES_DOC:
library/library.m:
library/rng.m:
	Add the new library module.

library/uint16.m:
	Add functions to cast to/from uint64.

tests/hard_coded/Mmakefile:
tests/hard_coded/*.*:
	Update/extend tests.
2019-08-28 00:52:17 +10:00
Zoltan Somogyi
c7f8ebbe2f Avoid warnings from --warn-non-contiguous-{clauses,foreign-procs}.
browser/collect_lib.m:
browser/declarative_execution.m:
browser/dl.m:
browser/io_action.m:
compiler/make.util.m:
compiler/pickle.m:
compiler/process_util.m:
compiler/prog_event.m:
library/array.m:
library/benchmarking.m:
library/bit_buffer.m:
library/builtin.m:
library/char.m:
library/deconstruct.m:
library/dir.m:
library/erlang_rtti_implementation.m:
library/int.m:
library/int16.m:
library/int32.m:
library/int64.m:
library/int8.m:
library/io.m:
library/math.m:
library/mutvar.m:
library/private_builtin.m:
library/profiling_builtin.m:
library/rtti_implementation.m:
library/store.m:
library/string.format.m:
library/string.m:
library/table_builtin.m:
library/term_size_prof_builtin.m:
library/thread.m:
library/time.m:
library/type_desc.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
library/uint8.m:
ssdb/ssdb.m:
    As above. This mostly involved two things.

    The first was grouping foreign_procs by predicate instead of by language.
    In a few cases, this revealed that some predicates *had* no foreign_proc
    for a language, while related predicates did have one that just aborted
    if called. This diff adds similar aborting foreign_procs to predicate/
    language combinations that were missing them, when this seemed obviously
    the right thing to do.

    The second was moving pragmas about a predicate from the middle of the
    block of clauses of that predicate to the start of that block.
2018-10-19 11:01:33 +11:00
Adrian Wong
6e1beaf117 Fix some comments in {int,uint}.m. (#46)
library/int8.m:
library/int16.m:
library/int64.m:
library/uint8.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
    As above.
2018-07-13 14:25:29 +10:00
Mark Brown
d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +10:00
Julien Fischer
7c0d97c793 Fix Java implementations of cast_to_uint/1.
library/uint8.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
     Deal with the XXXs in the Java foreign_procs for cast_to_uint/1
2018-06-06 16:46:13 +10:00
Julien Fischer
ef166d19cc Fix C# implementations of cast_to_uint/1.
library/uint8.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
    Deal with the XXXs in the foreign_procs for cast_to_uint/1.
2018-06-06 15:02:24 +10:00
Zoltan Somogyi
b06b2621b3 Move towards packing args with secondary tags.
compiler/hlds_data.m:
    Add bespoke types to record information about local and remote secondary
    tags. The one for local secondary tags includes the value of the
    primary and secondary tag together, since construct unifications
    need to assign this value, and it is better to compute this once,
    instead leaving the target language compiler to do it, potentially
    many times.

    Use a wrapped uint8 to record primary tag values, and wrapped uints
    to record secondary tag values. The wrap is to prevent any accidental
    confusion with other values. The use of uint8 and uint has two purposes.
    First, using the tighest possible representation. Tags are never negative,
    and primary tags cannot exceed 7. Second, using these types in the compiler
    help us eat our own dogfood; if a change causes a problem affecting
    these types, its bootcheck should fail, alerting us to the problem.

    Add commented-out types and fields that will be needed for packing
    sub-word-sized arguments together with both local and remote secondary
    tags.

compiler/du_type_layout.m:
    Generate references to tags in the new format.

compiler/ml_unify_gen.m:
compiler/unify_gen.m:

compiler/modecheck_goal.m:
    Conform to the changes above.

    Fix an old bug: the inst corresponding to a constant with a primary
    and a local secondary tag is not the secondary tag alone, but both tags
    together.

compiler/bytecode.m:
compiler/bytecode_gen.m:
compiler/closure_gen.m:
compiler/disj_gen.m:
compiler/export.m:
compiler/hlds_code_util.m:
compiler/jumpopt.m:
compiler/lco.m:
compiler/llds_out_data.m:
compiler/llds_out_instr.m:
compiler/lookup_switch.m:
compiler/lookup_util.m:
compiler/ml_accurate_gc.m:
compiler/ml_call_gen.m:
compiler/ml_closure_gen.m:
compiler/ml_code_util.m:
compiler/ml_elim_nested.m:
compiler/ml_string_switch.m:
compiler/ml_switch_gen.m:
compiler/ml_tag_switch.m:
compiler/ml_type_gen.m:
compiler/mlds_dump.m:
compiler/mlds_to_c_data.m:
compiler/mlds_to_c_stmt.m:
compiler/opt_debug.m:
compiler/peephole.m:
compiler/rtti.m:
compiler/rtti_out.m:
compiler/rtti_to_mlds.m:
compiler/string_switch.m:
compiler/switch_util.m:
compiler/tag_switch.m:
compiler/type_ctor_info.m:
    Conform to the change to hlds_data.m.

    In two places, in rtti_out.m and rtti_to_mlds.m, delete old code
    that was needed only to implement reserved tags, which we have
    stopped supporting a few months ago.

library/uint8.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
    Add predicates to cast from each of these types to uint.
2018-06-06 03:35:20 +02:00
Zoltan Somogyi
bf354fc25f Standardize {int,uint}{8,16,32,64}.m as much as possible.
library/int8.m:
library/int16.m:
library/int32.m:
library/int64.m:
library/uint8.m:
library/uint16.m:
library/uint32.m:
library/uint64.m:
    Impose the same structure on all these modules to pretty much
    the maximum extent possible. The obvious differences include things
    such as the modules for the unsigned variants not containing predicates
    for computing absolute values, for returning their minimum value,
    or for unary minus (or plus), nor having any differences between
    flooring and truncating division. There are also differences
    in whether conversion predicates to or from the int type may fail.

library/Mercury.options:
    Require these modules to have the same order of definitions as
    declarations.
2018-05-26 23:30:31 +02:00
Julien Fischer
2f5b58df1f Reduce code duplication among the fixed size integer modules.
library/int16.m:
library/int32.m:
library/int64.m:
     Replace the implementations of some operations with calls to
     their unsigned counterparts.

library/uint16.m
    Implement reverse_bits/1 in Mercury.  (For the Java backend,
    we still call the version in the Java library.)

library/Mercury.options:
    Do not warn about unused imports in the int32 module.
2018-04-01 21:29:27 +10:00
Julien Fischer
ee76350044 Add more operations on 16-bit integers.
library/int16.m:
library/uint16.m:
    Add num_zeros/1, num_ones/1, num_leading_zeros/1, num_trailing_zeros/1
    and reverse_bits/1.

tests/hard_coded/Mmakefile:
tests/hard_coded/bit_twiddle_uint16.{m,exp}:
tests/hard_coded/bit_twiddle_int16.{m,exp}:
    Add tests of the above.
2018-03-31 22:29:25 +11:00
Julien Fischer
e6c208e4cb Respond to review comments from Zoltan.
library/int{8,16,32,64}.m:
library/integer.m:
library/uint.m:
library/uint{8,16,32,64}.m:
    As above.
2018-02-02 10:33:25 -05:00
Julien Fischer
8506fb5298 Add conversion functions from bytes (uint8s) to 16-bit integers.
library/int16.m:
library/uint16.m:
     As above.

tests/hard_coded/Mmakefile:
tests/hard_coded/int16_from_bytes.{m,exp}:
tests/hard_coded/uint16_from_bytes.{m,exp}:
     Test the new functions.
2017-10-10 19:26:38 -04:00
Julien Fischer
f15520d4d8 Fix another typo.
library/uint16.m:
    s/int/int16/ in a spot.
2017-09-25 09:35:22 -04:00
Julien Fischer
c70c2c4dbf Fix a typo.
library/uint16.m:
    s/I6/I16/ in a spot.
2017-09-25 09:00:26 -04:00
Julien Fischer
2134a23d9d Add a reverse_bytes/1 function for the int16, int32, uint16 and uint32 types.
Add functions for reversing the bytes in the int16, int32, uint16 and uint32
types.  These are intended for use in implementing endianness conversions.

library/int16.m:
library/uint16.m:
library/int32.m:
library/uint32.m:
    As above.
2017-09-25 07:06:19 -04:00
Julien Fischer
db05403325 Writing 16- and 32-bit integers to binary file streams.
Add predicates for writing 16- and 32-bit integers to binary file streams in
native, little and big endian byte order to the standard library.

library/io.m:
    Add the new predicates.

library/uint16.m:
library/uint32.m:
    Add a functions for casting from the signed to unsigned versions
    of these types.

runtime/mercury_int.h:
    New header intended to hold things related to the implementation
    of the integer types in C grades.  Currently it contains the
    macros defining the byte reverse operations for 16- and 32-bit
    types.   (It will eventually contain macros for (un)boxing 64-bit
    integer types on 32-bit platforms as well.)

runtime/mercury_imp.h:
runtime/Mmakefile:
     Add the new header.

tests/hard_coded/Mmakefile:
tests/write_binary_multibyte_int.{m,exp}:
     Add a test for the new predicates.
2017-09-25 06:50:42 -04:00
Julien Fischer
2473186fbd Add functions returning the min/max values for fixed size int types.
library/int{8,16,32}.m:
    Add min_int* and max_int*.

library/uint{8,16,32}.m:
    Add max_uint*.  Where this was already defined using foreign_procs,
    use Mercury clauses instead.
2017-08-31 15:40:11 +10:00
Julien Fischer
ef5d797371 Use fixed size integer literals in the library and compiler.
configure.ac:
    Check that the bootstrap compiler supports fixed size
    integer types.

library/int16.m:
library/int32.m:
library/int8.m:
library/integer.m:
library/uint16.m:
library/uint32.m:
library/uint8.m:
compiler/lookup_switch.m:
     Use fixed size integer literals instead of casting from ints.
2017-08-30 20:51:45 +10:00
Peter Wang
44ffb1affb Fix spelling. 2017-08-24 11:35:02 +10:00
Julien Fischer
3f28b096ef Add builtin 8, 16 and 32 bit integer types -- Part 2.
Enable support for literals of the new types.

Begin implementing library support for 8, 16, and 32 bit types.

Update the compiler to represent values of their own constants.

library/int8.m:
library/int16.m:
library/int32.m:
library/uint8.m:
library/uint16.m:
library/uint32.m:
    Begin filling these modules out.

library/uint.m:
    Unrelated change: add the predicates plus/2, minus/2 and
    times/2 for uints.

library/integer.m:
    Add predicates for converting integer/0 values into values
    of the new types.

    Add functions for converting values of the new types into
    integer/0 values.

library/string.m:
    Add functions for converting values of the new types to strings.

library/private_builtin.m:
    Replace the placeholder definitions for the builtin unify and compare
    predicates for the new types with their actual definitions.

library/erlang_rtti_implementation.m:
library/rtti_implementation.m:
    Replace placeholder definitions for the new types with their
    actual definitions.

library/io.m:
    Add predicates for writing values of the new types to file streams.

library/stream.string_writer.m:
    Implement generic write and print for values of the new types.

library/string.to_string.m:
    Likewise for string/1.

library/term.m:
library/term_conversion.m:
    Add predicates and functions for converting the new types to
    and from terms.

compiler/builtin_ops.m:
compiler/elds.m:
compiler/hlds_data.m:
compiler/llds.m:
compiler/mlds.m:
compiler/prog_data.m:
    Replace placeholders for the new types with the new types.

compiler/superhomogeneous.m:
    Enable literals of the new types.

compiler/mlds_to_cs.m:
    Avoid a warning from the C# compiler for bitwise-or operators
    with sbyte operands.

compiler/c_util.m:
compiler/elds_to_erlang.m:
compiler/hlds_out_util.m:
compiler/llds_out_data.m:
compiler/lookup_switch.m:
compiler/mlds_to_c.m:
compiler/mlds_to_java.m:
compiler/opt_debug.m:
compiler/parse_tree_out_info.m:
compiler/parse_tree_to_term.m:
compiler/prog_out.m:
compiler/prog_rep.m:
compiler/prog_util.m:
    Replace placeholder code for the new types with code that uses the new
    types.

tests/invalid/invalid_int.m:
tests/invalid/invalid_int.err_exp2:
    Extend this test case to cover the fixed size integer types.
2017-08-21 09:50:16 +10:00
Julien Fischer
8a240ba3f0 Add builtin 8, 16 and 32 bit integer types -- Part 1.
Add the new builtin types: int8, uint8, int16, uint16, int32 and uint32.
Support for these new types will need to be bootstrapped over several changes.
This is the first such change and does the following:

- Extends the compiler to recognise 'int8', 'uint8', 'int16', 'uint16', 'int32'
  and 'uint32' as builtin types.
- Extends the set of builtin arithmetic, bitwise and relational operators to
  cover the new types.
- Extends all of the code generators to handle new types.  There currently lots
  of limitations and placeholders marked by 'XXX FIXED SIZE INT'.  These will
  be lifted in later changes.
- Extends the runtimes to support the new types.
- Adds new modules to the standard library intended to hold the basic
  operations on the new types.  (These are currently empty and not documented.)

This change does not introduce the two 64-bit types, 'int64' and 'uint64'.
Their implementation is more complicated and is best left to a separate change.

compiler/prog_type.m:
compiler/prog_data.m:
compiler/builtin_lib_types.m:
    Recognise int8, uint8, int16, uint16, int32 and uint32 as builtin types.

    Add new type, int_type/0,that enumerates all the possible integer types.

    Extend the cons_id/0 type to cover the new types.

compiler/builtin_ops.m:
    Parameterize the integer operations in the unary_op/0 and binary_op/0
    types by the new int_type/0 type.

    Add builtin operations for all the new types.

compiler/hlds_data.m:
    Add new tag types for the new types.

compiler/hlds_pred.m:
    Parameterize integers in the table_trie_step/0 type.

compiler/ctgc.selector.m:
compiler/dead_proc_elim.m:
compiler/export.m:
compiler/foreign.m:
compiler/goal_util.m:
compiler/higher_order.m:
compiler/hlds_code_util.m:
compiler/hlds_dependency_graph.m:
compiler/hlds_out_pred.m:
compiler/hlds_out_util.m:
compiler/implementation_defined_literals.m:
compiler/inst_check.m:
compiler/mercury_to_mercury.m:
compiler/mode_util.m:
compiler/module_qual.qualify_items.m:
compiler/opt_debug.m:
compiler/opt_util.m:
compiler/parse_tree_out_info.m:
compiler/parse_tree_to_term.m:
compiler/parse_type_name.m:
compiler/polymorphism.m:
compiler/prog_out.m:
compiler/prog_rep.m:
compiler/prog_rep_tables.m:
compiler/prog_util.m:
compiler/rbmm.exection_path.m:
compiler/rtti.m:
compiler/rtti_to_mlds.m:
compiler/switch_util.m:
compiler/table_gen.m:
compiler/type_constraints.m:
compiler/type_ctor_info.m:
compiler/type_util.m:
compiler/typecheck.m:
compiler/unify_gen.m:
compiler/unify_proc.m:
compiler/unused_imports.m:
compiler/xml_documentation.m:
    Conform to the above changes to the parse tree and HLDS.

compiler/c_util.m:
    Support generating the builtin operations for the new types.

doc/reference_manual.texi:
    Add the new types to the list of reserved type names.

    Add the mapping from the new types to their target language types.
    These are commented out for now.

compiler/llds.m:
    Replace the lt_integer/0 and lt_unsigned functors of the llds_type/0,
    with a single lt_int/1 functor that is parameterized by the int_type/0
    type.

    Add a representations for constants of the new types to the LLDS.

compiler/call_gen.m:
compiler/dupproc.m:
compiler/exprn_aux.m:
compiler/global_data.m:
compiler/jumpopt.m:
compiler/llds_out_data.m:
compiler/llds_out_global.m:
compiler/llds_out_instr.m:
compiler/lookup_switch.m:
compiler/middle_rec.m:
compiler/peephole.m:
compiler/pragma_c_gen.m:
compiler/stack_layout.m:
compiler/string_switch.m:
compiler/switch_gen.m:
compiler/tag_switch.m:
compiler/trace_gen.m:
compiler/transform_llds.m:
    Support the new types in the LLDS code generator.

compiler/mlds.m:
    Support constants of the new types in the MLDS.

compiler/ml_accurate_gc.m:
compiler/ml_call_gen.m:
compiler/ml_code_util.m:
compiler/ml_disj_gen.m:
compiler/ml_foreign_proc_gen.m:
compiler/ml_global_data.m:
compiler/ml_lookup_switch.m:
compiler/ml_simplify_switch.m:
compiler/ml_string_switch.m:
compiler/ml_switch_gen.m:
compiler/ml_tailcall.m:
compiler/ml_type_gen.m:
compiler/ml_unify_gen.m:
compiler/ml_util.m:
compiler/mlds_to_target_util.m:
    Conform to the above changes to the MLDS.

compiler/mlds_to_c.m:
compiler/mlds_to_cs.m:
compiler/mlds_to_java.m:
    Generate the appropriate target code for constants of the new
    types and operations involving them.

compiler/bytecode.m:
compiler/bytecode_gen.m:
    Handle the new types in the bytecode generator; we just abort if we
    encounter them for now.

compiler/elds.m:
compiler/elds_to_erlang.m:
compiler/erl_call_gen.m:
compiler/erl_code_util.m:
compiler/erl_rtti.m:
compiler/erl_unify_gen.m:
    Handle the new types in the Erlang code generator.

library/private_builtin.m:
    Add placeholders for the builtin unify and compare operations for
    the new types.  Since the bootstrapping compiler will not recognise
    the new types we give the polymorphic arguments.  These can be
    replaced after this change has bootstrapped.

    Update the Java list of TypeCtorRep constants.

library/int8.m:
library/int16.m:
library/int32.m:
library/uint8.m:
library/uint16.m:
library/uint32.m:
    New modules that will eventually contain builtin operations
    on the new types.

library/library.m:
library/MODULES_UNDOC:
    Do not include the above modules in the library documentation
    for now.

library/construct.m:
library/erlang_rtti_implementation.m:
library/rtti_implementation.m:
deep_profiler/program_representation_utils.m:
mdbcomp/program_representation.m:
    Handle the new types.

runtime/mercury_dotnet.cs.in:
java/runtime/TypeCtorRep.java:
runtime/mercury_type_info.h:
    Update the list of TypeCtorReps.

configure.ac:
runtime/mercury_conf.h.in:
    Check for the header stdint.h.

runtime/mercury_std.h:
    Include stdint.h; abort if that header is no present.

runtime/mercury_builtin_types.[ch]:
runtime/mercury_builtin_types_proc_layouts.h:
runtime/mercury_construct.c:
runtime/mercury_deconstruct.c:
runtime/mercury_deep_copy_body.h:
runtime/mercury_ml_expand_body.h
runtime/mercury_table_type_body.h:
runtime/mercury_tabling_macros.h:
runtime/mercury_tabling_preds.h:
runtime/mercury_term_size.c:
runtime/mercury_unify_compare_body.h:
    Add the new builtin types and handle them throughout the runtime.
2017-07-18 01:31:01 +10:00