Replace some switches with if-then-elses.

Estimated hours taken: 0.5
Branches: main

compiler/cse_detection.m:
compiler/module_qual.m:
compiler/simplify.m:
compiler/switch_detection.m:
compiler/unused_args.m:
	Replace some switches with if-then-elses.

	Minor formatting improvements, break overlong lines etc.
This commit is contained in:
Julien Fischer
2007-11-19 06:11:17 +00:00
parent 4d1c58a865
commit eb25a143e8
5 changed files with 59 additions and 15 deletions

View File

@@ -593,9 +593,13 @@ construct_common_unify(Var, hlds_goal(GoalExpr0, GoalInfo), !CseInfo,
Unif0 = deconstruct(_, Consid, Args, Submodes, CanFail, CanCGC)
->
Unif = deconstruct(Var, Consid, Args, Submodes, CanFail, CanCGC),
( RHS = rhs_functor(_, _, _) ->
(
RHS = rhs_functor(_, _, _),
GoalExpr1 = unify(Var, RHS, Umode, Unif, Ucontext)
;
( RHS = rhs_var(_)
; RHS = rhs_lambda_goal(_, _, _, _, _, _, _, _)
),
unexpected(this_file,
"non-functor unify in construct_common_unify")
),