compiler/typecheck_error_undef.m:
If we are reporting an error for a reference to an undefined predicate,
check whether any predicates exist whose names are "close enough"
to the name of the referenced predicate, and if yes, add to the
error message a line containing "(Did you mean x, y or z?)".
(Doing the same for references to undefined functions is future work.
The two are separate because things that look like function references
can also refer to e.g. data constructors.)
library/edit_distance.m:
Add this new module to implement the "close enough" check.
This new module is similar to the existing edit_seq.m module,
but it is designed to serve different requirements, and it seems to me
to be far from trivial to write code to meet both sets of requirements
at once.
library/library.m:
library/MODULES_DOC:
Include the new module in the standard library.
NEWS.md:
Announce the new library module.
tests/hard_coded/edit_distance_test_closest.{m,exp}:
tests/hard_coded/edit_distance_test_cost.{m,exp}:
Two new test cases, each of which tests one of the two predicates
exported by the new library module.
tests/hard_coded/Mmakefile:
Enable the new test cases.
tests/invalid/qual_basic_test2.err_exp:
tests/invalid/types2.err_exp:
tests/invalid/undef_symbol.err_exp:
tests/invalid_submodules/undef_mod_qual.err_exp:
Expect the new "did you mean" additions to error messages.
compiler/add_foreign_proc.m:
Simplify the if-then-else chain that checks whether a foreign_proc
should be added to the HLDS, and if not, what, if any, error message
should be generated for it.
Document two separate factors that complicate the cases that
this chain has to deal with. Name the test cases that exemplify
those complications.
compiler/hlds_pred.m:
Activate an old commented-out optimization.
tests/hard_coded/foreign_type2.m:
Put the contents of this test case (one of the ones now listed in
add_foreign_proc) into a logical order. The reordering does not affect
the substance of the test.
tests/hard_coded/runtime_opt.exp2:
Alternative expected output for where stdout and stderr are
interleaved differently.
tests/hard_coded/runtime_opt.m:
Document what the expected outputs are for.
Given a switch arm that matches several cons_ids, and which contains
one or more switches on the *same* variable, such as the arm for
f1/f2/f3/f4 below,
(
(X = f1 ; X = f2 ; X = f3 ; X = f4),
...
(
X = f1,
...
;
(X = f2 ; X = f3),
...
;
X = f4,
...
),
...
;
...
)
this new optimization
- partitions the set of cons_id in that arm (in this case, {f1,f2,f3,f4})
as finely as needed by any other the switches on X in that arm
(in this case, that is three partitions containing {f1}, {f2,f3} and {f4}),
- splits that original switch arm into N arms, one arm for each partition,
making a copy of the switch arm's goal for each partition,
- restricts any switches on the original switch variable (in this case, X)
inside the copy of the arm goal inside each new case to only the cons_ids
in that case's partition, and then replacing any resulting one-arm switches
with the just goal inside that one arm.
The code resulting from these three steps will include some code duplication
(some of the pieces of code denoted by ... in the example above would be
duplicated), but it will need to execute fewer transfers of control.
This is worthwhile because (a) the branch instructions used to implement
switches are hard to predict unless most paths through the nested switches
are rarely if ever taken, and (b) the pipeline breaks caused by branches
that are not correctly predicted are one of the two major contributors
to the runtime of Mercury programs. (The other major contributors are
data cache misses.)
The implementation of this option has two major parts.
- Part 1 consists of discovering whether a procedure body contains
any code in which a switch on a variable is nested inside an arm
of another switch on that same variable. For any instance of such
a pair of switches, it records the identity of the variable and
the set of cons_ids of the outermost arm.
- Part 2 consists of actually transforming the procedure body
by splitting each outermost switch arm thus recorded. (This part
contains all three of the steps above.)
We integrate part 1 with the usual procedure body traversal of the
simplification pass, which makes it quite cheap. In most procedure bodies,
it won't find any nested switches meeting its criteria. We execute part 2,
which is relatively expensive, only if it does.
compiler/simplify_info.m:
Add a new type, switch_arm, which represents one arm of a switch.
Add a new field to the simplify_nested_context type. Its type
is list(switch_arm), and it represents the stack of switch arms (if any)
that the goal currently being simplified is inside. simplify_goal_switch.m
uses this field to detect switches that occur inside an arm of an
ancestor goal that is also a switch on the same variable.
Add a new field to the simplify_info, a set of switch_arms,
that denotes the set of switch arms from which that detection
has actually happened, and which should therefore be
partitioned and split.
compiler/simplify_goal_switch.m:
Add the code for doing the detection and recording mentioned just above.
This is the Part 1 mentioned above.
compiler/split_switch_arms.m:
This new module implements the splitting up process.
This is the Part 2 mentioned above.
compiler/simplify.m:
Include the new module in the simplify subpackage of the check_hlds
package.
compiler/notes/compiler_design.html:
Document the new module.
compiler/simplify_proc.m:
Invoke split_switch_arms.m (part 2) if the part of simplify_goal_switch.m
implementing part 1 has found any work for it to do.
compiler/simplify_tasks.m:
Add split_switch_arms as one of the tasks that simplification
may be asked to do. Set its default value from the value of
a new optimization option that, when specified, calls for it to be done.
compiler/options.m:
Add this option, --split-switch-arms.
Change the internal name of an existing option,
everything_in_one_c_function, to the one expected by
tools/make_optimization_options_middle.
Replace the part of this file that is constructed by
tools/make_optimization_options_middle.
doc/user_guide.texi:
Document the new option.
tools/make_optimization_options_db:
Add --split-switch-arms to the optimization tuple.
Fix software rot by
- renaming optimize_tailcalls to optimize_mlds_tailcalls inside the
optimization tuple, as it has been in options.m, and
- deleting erlang_switch_on_strings_as_atoms from the opt_tuple,
as it has been from options.m.
tools/make_optimization_options_end:
Enable the new option by default at optimization level 2.
tools/make_optimization_options_middle:
Fix bugs in this script, which generates compiler/optimization_options.m.
One bug was that it referred to the opt_level and opt_space options
by the wrong name (optopt_level and optopt_space respectively).
The other bug was that it expected opt_level to be a string_special option,
when it is an int_special option.
Make the handler_file this script generates easier to put into options.m
by not generating a line that (a) already exists in options.m, and
(b) would need to have a comma put after it, if one wanted this line
to replace the copy already in options.m.
compiler/optimization_options.m:
Rebuild this file after the changes above.
compiler/simplify_goal_unify.m:
Conform to the changes above.
compiler/inst_merge.m:
Mark two predicates, inst_merge_[34], to be inlined. The intention
is that inst_merge_4 should be inlined into inst_merge_3, and then
inst_merge_3 should be inlined inside inst_merge_2; that would then
generate six levels of switches, three on one of the insts to be
merged and three on the other, which the new optimization could
then flatten. Unfortunately, inlining does not do this yet.
tests/hard_coded/test_split_switch_arms.{m,exp}:
A new test case for the the new transformation.
tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
Enable the new test case, and specify the new option for it.
tests/hard_coded/backend_external.m:
tests/hard_coded/backend_external_pred.m:
tests/hard_coded/c_write_string.m:
tests/hard_coded/ee_dummy.m:
tests/hard_coded/pragma_c_code.m:
tests/hard_coded/pragma_foreign_export.m:
tests/hard_coded/target_mlobjs.m:
tests/hard_coded/type_tables.m:
tests/submodules/sm_exp_bug.m:
Use don't-care variables to handle the I/O state in foreign procs.
Assigning the I/O state at the end of the foreign_proc body results
in spurious warnings about uninitialized variables from MSVC.
tests/hard_coded/Mmakefile:
Invoke cl appropriately to compile nonascii_gen.
Handle the .exe extension where necessary.
tests/DEFNS_FOR_TESTS.in:
Add a variable that says of we are using MSVC.
tests/hard_coded/write_xml.m:
Update the comment at the head of this module that explains the
differences between the expected outputs.
tests/hard_coded/write_xml.exp3:
Expected output for this test on in a high-level C grade on Windows.
The Substitute character (U+001A) is treated as EOF for text mode files on
Windows. Omit that character from the test.
tests/hard_coded/nonascii_gen.c:
Do not emit U+001A in the set of test characters.
tests/hard_coded/nonascii.m:
Conform to the above change.
Update syntax in a spot.
tests/hard_coded/nonascii.exp:
Conform to the above change.
library/mercury_term_lexer.m:
As above.
NEWS.md:
Announce the change.
doc/reference_manual.texi:
Document the change.
tests/hard_coded/parse_number_from_string.exp:
tests/invalid_nodepend/invalid_float_literal.err_exp:
Update these expected outputs after the change.
library/mercury_term_lexer.m:
Make the diagnostics for malformed numbers more detailed, and thus
more easily understandable.
tests/hard_coded/parse_number_from_string.exp:
tests/invalid_nodepend/invalid_binary_literal.err_exp:
tests/invalid_nodepend/invalid_decimal_literal.err_exp:
tests/invalid_nodepend/invalid_float_literal.err_exp:
tests/invalid_nodepend/invalid_hex_literal.err_exp:
tests/invalid_nodepend/invalid_octal_literal.err_exp:
Update the expected error messages.
tests/hard_coded/*.m:
Rename modules as mentioned above.
In a few cases, where the main module's name itself had a suffix,
such as "_mod_a" or "_main", remove that suffix. This entails
renaming the .exp file as well. (In some cases, this meant that
the name of a helper module was "taken over" by the main module
of the test case.)
Update all references to the moved modules.
General updates to programming style, such as
- replacing DCG notation with state var notation
- replacing (C->T;E) with (if C then T else E)
- moving pred/func declarations to just before their code
- replacing io.write/io.nl sequences with io.write_line
- replacing io.print/io.nl sequences with io.print_line
- fixing too-long lines
- fixing grammar errors in comments
tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
Update all references to the moved modules.
Enable the constant_prop_int test case. The fact that it wasn't enabled
before is probably an accident. (When constant_prop_int.m was created,
the test case was added to a list in the Mmakefile, but that list
was later removed due to never being referenced.)
tests/hard_coded/constant_prop_int.{m,exp}:
Delete the calls to shift operations with negative shift amounts,
since we have added a compile-time error for these since the test
was originally created.
--no-ansi (mgnuc) and --no-ansi-c (mmc) have not actually done anything for
many years now. Deprecate these options and remove their "use" throughout most
of the Mercury system. (The remaining uses are in the Makefiles for the Boehm
GC, which need to be updated separately.)
Also deprecate the internal compiler option --cflags-for-ansi.
compiler/options.m:
Document that --no-ansi-c is now deprecated.
Document that the internal option --cflags-for-ansi is now
deprecated.
compiler/compile_target_code.m:
Do not pass the ANSI options to the C compiler.
scripts/mgnuc.in:
scripts/mgnuc_file_opts.sh-subr:
Deprecate the --no-ansi option; delete code that no longer does
anything useful.
configure.ac:
Delete the configuration variable CFLAGS_FOR_ANSI; it is only ever
set to be empty. (The comment talks about --no-ansi doing other things
in the mgnuc script. It used to also cause some preprocessor macros
to be defined for compatibility with the system headers on some
platforms -- that has not been the case since 2013.)
doc/user_guide.texi:
Document that --no-ansi-c is deprecated.
bytecode/Mmakefile:
compiler/Mercury.options:
library/Mercury.options:
extras/odbc/odbc.m:
runtime/Mmakefile:
scripts/Mercury.config.bootstrap.in:
scripts/Mercury.config.in:
tests/hard_coded/Mercury.options:
tests/valid/Mercury.options:
trace/Mmakefile:
util/Mmakefile:
Conform to the above change.
NEWS.md:
Announce the above.
tests/hard_coded/write_binary.m:
Print the term whose write-out-and-read-back is being tested
before the test, not after. Print the result of the test after this.
If the test succeeds, don't print the term out again.
Put blank lines between different kinds of tests, and between
tests of different terms.
Return error messages as strings, rather than as exceptions,
where possible.
Make the diagnostic for "read back term differs from original"
more useful for debugging write_binary/read_binary.
Put the declaration of a predicate just before the predicate.
tests/hard_coded/write_binary.exp:
Expect the updated output.
... and make {input,output}_stream synonyms for them, rather than vice versa.
library/io.m:
As above.
library/bitmap.m:
library/dir.m:
library/io.primitives_read.m:
library/io.stream_db.m:
library/io.text_read.m:
library/mercury_term_lexer.m:
library/stream.string_writer.m:
Conform to the change above.
tests/hard_coded/stream_string_writer_types.exp:
Expect the new type_ctor for text streams.
library/fatter_sparse_bitset.m:
Add this version of fat_sparse_bitset.m, which stores *two* words
worth of bits in each cell, not one. This word would otherwise be unused,
because the Boehm-Demers-Weiser allocator rounds up requests for three
word cells to four.
library/MODULES_DOC:
library/library.m:
Add the new module to the list of library modules.
library/fat_sparse_bitset.m:
library/sparse_bitset.m:
library/tree_bitset.m:
Update the documentation of all these other bitset modules. Copy
the same basic introduction to all the relevant modules. Add documentation
of the differences to tree_bitset.m and fatter_sparse_bitset.m, with
a pointer in fat_sparse_bitset.m to fatter_sparse_bitset.m.
library/test_bitset.m:
Test the new module as well as the others.
tests/hard_coded/speedtest_bitset.m:
Extend the benchmarking of list_to_set operations to the new module.
To allow the benchmarking to be tough enough to be informative, comment
out the benchmarking of the old_list_to_set operations.
... by using the algorithm now in sparse_bitset.list_to_set.
Keep the old list_to_set algorithm around in both modules for a short while
to allow comparative benchmarking.
library/fat_sparse_bitset.m:
library/sparse_bitset.m:
As above.
tests/hard_coded/speedtest_bitset.m:
A benchmark program to compare the old and new list_to_set algorithms,
both versus each other, and between sparse_bitset and fat_sparse_bitset.
library/test_bitset.m:
Instead of comparing just one bitset module (tree_bitset by default)
against set_ordlist, compare all of them (tree_bitset, sparse_bitset,
and fat_sparse_bitset) against set_ordlist.
tests/hard_coded/test_bitsets.{m,exp}:
Rename this test case from test_tree_bitset to test_bitsets, since
(through library/test_bitset.m) we now test ALL bitset implementations,
not just tree_bitset.
tests/hard_coded/Mmakefile:
Refer to the test by its new name.
The current implementation of the unsigned conversion specifiers (i.e. %x, %X,
%o, %u) for fixed-size 8-, 16- and 32-bit signed integers works by casting
theses values into (word-sized) ints and then using the existing code for
formatting ints as unsigned values. This does not work for negative values as
they are being sign extended when converted to ints. For example,
io.format("%x", [i8(min_int8)], !IO)
prints:
ffffffffffffff80 (on a 64-bit machine)
rather than just:
80
Fix the above problem by casting ints, int8s, int16s etc. that are being
formatted as unsigned values to uints and using the uint formatting code.
NOTE: the formatting code for 64-bit integers follows a different code path
and is not affected by any of this.
library/string.format.m:
Implement unsigned conversion specifiers for non-64-bit signed
integers by casting to uint and using the uint formatting code.
Add predicates for converting signed integers into uints.
The format_unsigned_int_* predicates can be deleted after this change
is installed.
compiler/format_call.m:
Implement unsigned conversion specifiers for non-64-bit signed
integers by casting to uint and using the uint formatting code.
compiler/introduced_call_table.m:
Update the table of introduced predicates.
compiler/options.m:
Add an option that can be used to test whether this fix is
installed.
tests/hard_coded/Mmakefile:
tests/hard_coded/Mercury.options:
tests/hard_coded/opt_format_sign_extend.{m,exp}:
Test that formatting code introduced by the compiler does not
accidentally sign-extend negative values.
tests/string_format/string_format_{o,x,u}.{m,exp,exp2}:
Make these tests much more comprehensive then they previously
were.
Implement two transitive closure algorithms in the digraph module:
- Basic_TC by Yannis Ioannidis et al.
- STACK_TC by Esko Nuutila, a refinement of the SIMPLE_TC algorithm
previously implemented
On 450 graphs randomly generated by tests/hard_coded/digraph_tc.m,
ranging from 100 to 3000 vertices:
- basic_tc ran from 0.79 to 1.66 times as fast as simple_tc
(mean 1.139, stdev 0.136)
- basic_tc ran from 0.83 to 1.81 times as fast as stack_tc
(mean 1.131, stdev 0.160)
Therefore, after this commit, I will delete the simple_tc and stack_tc
implementations, but they will be available in the version history.
library/digraph.m:
Implement Basic_TC and STACK_TC.
Use map.transform_value in key_set_map_union to replace a search
followed by update.
tests/hard_coded/digraph_tc.m:
Test and benchmark the new algorithms.
Also compare inverse graphs to check that predecessor maps are
maintained properly.
library/sparse_bitset.m:
library/fat_sparse_bitset.m:
Speed up the remove_leq and remove_gt operations by moving a
loop invariant computation, the conversion of the boundary item's index
into an <offset,bitposn> pair, out of the loop.
Eliminate some unnecessary differences between the two modules,
e.g. clear_bit being a predicate rather than a function.
library/test_bitset.m:
Add facilities to test the remove_leq and remove_gt operations
of sparse_bitset.m, fat_sparse_bitset.m, and tree_bitset.m
against the same operations on plain old set_ordlists.
Bring this module up to date by requiring set elements to be
members of the uenum typeclass, not the enum typeclass.
Make the test_bitset type a bespoke type.
library/tree_bitset.m:
Add predicate versions of the remove_leq and remove_gt operations
alongside the existing function versions, to allow the new code
in test_bitset.m to work the same way regardless of which bitset module
it is testing.
For uniformity with the other bitset modules, require set elements to be
members of the uenum typeclass, not the enum typeclass.
Change the other integers, such as level numbers, to be unsigned
as well, to avoid the need for casts.
NEWS:
Announce the new additions and changes.
tests/hard_coded/test_tree_bitset.{m,exp}:
Use those new facilities to test those operations, and add some
test sets designed for that purpose.
Add a comment about the limitations of this testing strategy.
tests/hard_coded/bitset_tester.m:
Delete this long-unused module. (It was the original basis of
the test_bitset.m module in the library directory, but it became unused
when test_tree_bitset.m switched to using that module a long time ago.)
library/digraph.m:
Delete digraph.old_tc, digraph.old_rtc and digraph.slow_rtc.
tests/hard_coded/digraph_tc.m:
tests/hard_coded/digraph_tc.exp:
Delete comparisons using old_tc, old_rtc and slow_rtc.
Implement transitive closure using the simple_tc algorithm from
Esko Nuutila's doctoral thesis.
On a sample of graphs randomly generated by tests/hard_coded/digraph_tc.m,
ranging from 100 to 3000 vertices, the simple_tc implementation ran
from 2.33 to 93 times as fast as the old implementation on my machine.
library/digraph.m:
Rename digraph.tc and digraph.rtc to digraph.old_tc and
digraph.old_rtc. They are kept around for benchmarking,
and will be deleted soon.
Use the simple_tc algorithm to implement digraph.tc.
Use digraph.tc to implement digraph.rtc.
Let key_set_map_add call sparse_bitset.insert_new instead of
sparse_bitset.contains followed by sparse_bitset.insert.
tests/hard_coded/digraph_tc.m:
Add code to benchmark the new and old TC implementations.
library/std_util.m:
Make std_util.pow/3 throw an exception if it is called with a negative
integer as its second argument.
tests/hard_coded/Mmakefile:
tests/hard_coded/func_exp.{m,exp}:
Add a test of pow/3.
NEWS:
Announce the above change.
The implementation of digraph.rtc was incorrect (as demonstrated in the
new test case), which meant that digraph.tc was also incorrect.
library/digraph.m:
Fix the implementation of rtc (reflexive transitive closure):
- Following the algorithm used in digraph.cliques, it needs to
traverse the graph G in *reverse* depth-first order.
- To find the clique containing a vertex X, it needs to do a DFS on
the *reversed* graph to find the vertices with a path to X.
The vertices that were previously unvisited will be members of
the same clique as X.
- Previously it found the "followers" of the elements of the clique,
and the followers of those followers, then added edges from the
members of the current clique to those followers. However, that
only includes vertices two steps removed from the clique.
I have fixed it to add edges to *all* vertices reachable from
members of the clique.
Add straightforward implementations of tc and rtc for comparison.
Add some comments.
tests/hard_coded/Mmakefile:
tests/hard_coded/digraph_tc.exp:
tests/hard_coded/digraph_tc.inp:
tests/hard_coded/digraph_tc.m:
Add test case.
NEWS:
Announce the fixes.
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.
The recent change to sparse_bitsets broke the lex library in extras.
Specifically, we now now need to make characters an instance of the
uenum typeclass. This diff does so.
library/char.m:
Add predicates and functions for converting between unsigned integers
and characters.
Make characters an instance of the uenum typeclass.
tests/hard_coded/Mmakefile:
tests/hard_coded/char_uint_conv.{m,exp,exp2}:
Add a test of the above conversions.
NEWS:
Announce the additions.
extras/lex/lex.m:
Conform to recent changes.
... 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.
tests/hard_coded/bitwise_int.m:
tests/hard_coded/bitwise_int16.m:
tests/hard_coded/bitwise_int32.m:
tests/hard_coded/bitwise_int64.m:
tests/hard_coded/bitwise_int8.m:
tests/hard_coded/bitwise_uint.m:
tests/hard_coded/bitwise_uint16.m:
tests/hard_coded/bitwise_uint32.m:
tests/hard_coded/bitwise_uint64.m:
tests/hard_coded/bitwise_uint8.m:
Most of the expected output files of these test cases were
easily readable already, but there were some exceptions caused
by unnecessary differences between their source codes.
The main problem was with bitwise_uint.m (uint_bitwise.m until recently),
whose .exp file contained very long lines of the form A op B = C
where A, B and C could each be 64 bits (and chars) long. Fix this
by adopting the format used by the other modules:
A op
B =
C
The other problem was that in some test cases, the indentation had
an off-by-one bug. They generated output such as
\ aaaa =
bbbb
instead of the much-easier-to-visually-check
\ aaaa =
bbbb
A third, much less important change is the deletion of unnecessary
blank lines.
tests/hard_coded/bitwise_int.exp:
tests/hard_coded/bitwise_int16.exp:
tests/hard_coded/bitwise_int32.exp:
tests/hard_coded/bitwise_int64.exp:
tests/hard_coded/bitwise_int8.exp:
tests/hard_coded/bitwise_uint.exp:
tests/hard_coded/bitwise_uint16.exp:
tests/hard_coded/bitwise_uint32.exp:
tests/hard_coded/bitwise_uint64.exp:
tests/hard_coded/bitwise_uint8.exp:
Conform to the changes in codes of the tests.