[m-rev.] diff: fix a bug in erlang code generator
Peter Wang
wangp at students.csse.unimelb.edu.au
Fri Jun 1 16:42:48 AEST 2007
Estimated hours taken: 0.5
Branches: main
compiler/erl_code_gen.m:
When creating a closure for the success expression of an if-then-else,
the variables bound in the condition should not be arguments to the
closure.
Index: erl_code_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/erl_code_gen.m,v
retrieving revision 1.6
diff -u -r1.6 erl_code_gen.m
--- erl_code_gen.m 1 Jun 2007 04:25:08 -0000 1.6
+++ erl_code_gen.m 1 Jun 2007 06:38:31 -0000
@@ -810,7 +810,7 @@
% Create a closure for the success expression if it is too large to
% duplicate into the branches.
% (InstMap1 = InstMap0 + optionally a variable bound to a closure)
- BoundNonLocals = set.union_list([CondVars, ThenVars, ElseVars]),
+ BoundNonLocals = set.union(ThenVars, ElseVars),
maybe_create_closure_for_success_expr(BoundNonLocals,
MaybeSuccessExpr0, MaybeMakeClosure, MaybeSuccessExpr,
InstMap0, InstMap1, !Info),
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list