[m-rev.] diff: use switch detection fix
Zoltan Somogyi
zs at cs.mu.OZ.AU
Thu Apr 13 13:58:43 AEST 2006
The apr 7 fix has been installed on all systems except mundroo, and Julien
will need to reinstall mundroo from scratch anyway.
Zoltan.
compiler/constraint.m:
Update some code to use it natural expression, which uses a switch
in which all arms contain only disjunctions of unifications, not
straight unifications.
configure.in:
Require the installed compiler to include the bug fix to switch
detection I committed on Apr 7, since without that fix code like
this is rejected by the compiler.
cvs diff: Diffing .
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.450
diff -u -b -r1.450 configure.in
--- configure.in 7 Apr 2006 08:33:09 -0000 1.450
+++ configure.in 12 Apr 2006 05:55:22 -0000
@@ -274,84 +274,30 @@
Version = MR_RTTI_VERSION;
").
- % The code below is the valid/state_var_mode_bug2 test case.
+ % The code below is the hard_coded/disjs_in_switch test case.
% The compiler now depends on the installed compiler handling
% code like this test case correctly.
- :- pred p(bool::in, bool::in, int::in, int::out) is semidet.
- p(A, B, !Y) :-
- some [[X0, _X]] (
- p0(X0),
- p2(X0, X1),
- p2(X1, X2),
- (
- A = yes
- ->
- (
- B = yes,
- p1(X2),
- p2(X2, X3),
- p1(X3),
- X4 = X3
- ;
- B = no,
+ :- type tp
+ ---> f(int)
+ ; g(int, int)
+ ; h(float)
+ ; i(string).
+
+ :- pred p(tp::in, string::out) is det.
+
+ p(T, U) :-
(
- p1(X2),
- p2(X2, X3)
- ->
- p1(X3),
- X4 = X3
- ;
- X4 = X2
- )
+ ( T = f(_)
+ ; T = g(_, _)
),
- X5 = X4
- ;
- (
- p1(X2),
- p2(X2, X3)
- ->
- (
- A = yes,
- p1(X3),
- p2(X3, X4),
- (
- B = yes,
- p2(X4, X5)
+ U = "f or g"
;
- B = no,
- X5 = X4
- )
- ;
- A = no,
- X5 = X3
- )
- ;
- p1(X2)
- ->
- p1(X2),
- p2(X2, X3),
- p1(X3),
- X5 = X3
- ;
- X5 = X2
- )
+ ( T = h(_)
+ ; T = i(_)
),
- _X = X5
+ U = "h or i"
).
-
- :- pred p0(int::out) is det.
-
- p0(0).
-
- :- pred p1(int::in) is semidet.
-
- p1(1).
-
- :- pred p2(int::in, int::out) is semidet.
-
- p2(X0, X0) :-
- p1(X0).
EOF
if
# Test for the `--force-disable-tracing' option
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/constraint.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/constraint.m,v
retrieving revision 1.74
diff -u -b -r1.74 constraint.m
--- compiler/constraint.m 7 Apr 2006 01:29:25 -0000 1.74
+++ compiler/constraint.m 12 Apr 2006 05:56:46 -0000
@@ -167,11 +167,9 @@
;
GoalExpr = scope(Reason, SubGoal0),
(
- Reason = exist_quant(_),
- propagate_goal(SubGoal0, Constraints, SubGoal, !Info, !IO),
- FinalGoals = [scope(Reason, SubGoal) - GoalInfo]
- ;
- Reason = from_ground_term(_),
+ ( Reason = exist_quant(_)
+ ; Reason = from_ground_term(_)
+ ),
propagate_goal(SubGoal0, Constraints, SubGoal, !Info, !IO),
FinalGoals = [scope(Reason, SubGoal) - GoalInfo]
;
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list