Commit Graph

3 Commits

Author SHA1 Message Date
Zoltan Somogyi
2f7c5fb87f Update the programming style of some tests. 2020-10-03 17:43:38 +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
Peter Wang
d883fb772e Fix a bug in the following optimisation of model_non lambdas:
Estimated hours taken: 1
Branches: main

Fix a bug in the following optimisation of model_non lambdas:

        % Optimize a special case: replace
        %   `(pred(Y1, Y2, ...) is Detism :-
        %       p(X1, X2, ..., Y1, Y2, ...))'
        % where `p' has determinism `Detism' with
        %   `p(X1, X2, ...)'
        %

For the LLDS back-end the optimisation was also applied when `p' is model_det
but the lambda is model_non.  However it was incorrectly applied for the
erlang grade as well.

compiler/lambda.m:
	Don't apply the optimisation in the case above.

tests/hard_coded/Mmakefile:
tests/hard_coded/nondet_lambda.exp:
tests/hard_coded/nondet_lambda.m:
	Add a test case.
2007-09-04 03:12:21 +00:00