[m-rev.] for review: fix detism warnings for compound compare builtins
Zoltan Somogyi
zs at csse.unimelb.edu.au
Tue Jul 17 15:40:41 AEST 2007
For review by anyone.
Zoltan.
Fix a problem I noticed while fixing bootstrap at -O6: determinism warnings for
private_builtin.m.
compiler/add_pred.m:
Mark builtin predicates (e.g. the recently added compound_{lt,eq})
for which we generate never-to-be-invoked dummy bodies as just stubs,
to avoid determinism warnings from the compiler.
compiler/c_util.m:
Reorganize the way we categorize binary operators. Instead of a set of
predicates for recognizing each class of binops, have just one
predicate that returns the category, along with the C operator (since
the two are usually needed together.
The reason for the change is that some binary operators, including
compound_{lt,eq} but also others, fell through the cracks. The new
predicate is a det switch on binary_op, so new operators won't be
able to fall through the cracks in future.
Unary operators were already being handled this way, though in a
simpler fashion, since they all fall into one category.
compiler/llds_out.m:
compiler/mlds_to_c.m:
compiler/mlds_to_managed.m:
Conform to the change to c_util.m. This involves switching from
if-then-else chains to switches, and deleting now unneeded predicates.
compiler/opt_debug.m:
Don't go through llds_out to get at the printable representations
of binary operators.
compiler/simplify.m:
Fix the formatting of the simplification of compound_{lt,eq}.
compiler/options.m:
Add a name for the compiler_sufficiently_recent option that will allow
configure scripts to test for the fix.
cvs diff: Diffing .
Index: add_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/add_pred.m,v
retrieving revision 1.31
diff -u -b -r1.31 add_pred.m
--- add_pred.m 2 Jul 2007 05:30:27 -0000 1.31
+++ add_pred.m 17 Jul 2007 00:15:55 -0000
@@ -243,15 +243,21 @@
goal_info_set_nonlocals(NonLocals, GoalInfo0, GoalInfo),
(
Module = mercury_private_builtin_module,
- ( Name = "store_at_ref"
- ; Name = "builtin_compound_eq"
+ (
+ Name = "store_at_ref",
+ StubPrime = no
+ ;
+ ( Name = "builtin_compound_eq"
; Name = "builtin_compound_lt"
+ ),
+ StubPrime = yes
)
->
GoalExpr = conj(plain_conj, []),
ExtraVars = [],
ExtraTypes = [],
- VarSet = VarSet0
+ VarSet = VarSet0,
+ Stub = StubPrime
;
Module = mercury_private_builtin_module,
Name = "trace_get_io_state"
@@ -285,7 +291,8 @@
ConjGoal = hlds_goal(ConjExpr, GoalInfoWithZeroHeadVars),
Reason = promise_purity(dont_make_implicit_promises, purity_semipure),
- GoalExpr = scope(Reason, ConjGoal)
+ GoalExpr = scope(Reason, ConjGoal),
+ Stub = no
;
Module = mercury_private_builtin_module,
Name = "trace_set_io_state"
@@ -296,7 +303,8 @@
GoalExpr = scope(Reason, ConjGoal),
ExtraVars = [],
ExtraTypes = [],
- VarSet = VarSet0
+ VarSet = VarSet0,
+ Stub = no
;
% Construct the pseudo-recursive call to Module.Name(HeadVars).
SymName = qualified(Module, Name),
@@ -308,7 +316,8 @@
MaybeUnifyContext, SymName),
ExtraVars = [],
ExtraTypes = [],
- VarSet = VarSet0
+ VarSet = VarSet0,
+ Stub = no
),
% Construct a clause containing that pseudo-recursive call.
@@ -333,7 +342,14 @@
% predicates. The code generator will still generate inline code for calls
% to these predicates.
pred_info_get_markers(!.PredInfo, Markers0),
- add_marker(marker_user_marked_no_inline, Markers0, Markers),
+ add_marker(marker_user_marked_no_inline, Markers0, Markers1),
+ (
+ Stub = yes,
+ add_marker(marker_stub, Markers1, Markers)
+ ;
+ Stub = no,
+ Markers = Markers1
+ ),
pred_info_set_markers(Markers, !PredInfo).
%-----------------------------------------------------------------------------%
Index: c_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/c_util.m,v
retrieving revision 1.35
diff -u -b -r1.35 c_util.m
--- c_util.m 18 Mar 2007 23:34:51 -0000 1.35
+++ c_util.m 15 Jul 2007 12:42:05 -0000
@@ -96,29 +96,8 @@
%
% Operators.
%
-% The following predicates all take as input an operator, check if it is
-% an operator of the specified kind, and if so, return the name of the
-% corresponding C operator that can be used to implement it.
-
- % The operator returned will be <, >, etc.;
- % it can be used in the form `strcmp(<Arg1>, <Arg2>) <Op> 0'.
- %
-:- pred string_compare_op(binary_op::in, string::out) is semidet.
-
- % The operator returned will be +, *, etc.;
- % the arguments should be floats and the result will be a float.
- %
-:- pred float_op(binary_op::in, string::out) is semidet.
-
- % The operator returned will be <, >, etc.;
- % the arguments should be floats and the result will be a boolean.
- %
-:- pred float_compare_op(binary_op::in, string::out) is semidet.
-
- % The operator returned will be an infix operator. The arguments should be
- % cast to MR_Unsigned, and the result will be a boolean.
- %
-:- pred unsigned_compare_op(binary_op::in, string::out) is semidet.
+% The following predicates all take as input an operator, and return the name
+% of the corresponding C operator that can be used to implements it.
% The operator returned will be either a prefix operator or a macro
% or function name. The operand needs to be placed in parentheses
@@ -126,10 +105,18 @@
%
:- pred unary_prefix_op(unary_op::in, string::out) is det.
- % The operator returned will be an infix operator. The arguments should be
- % integer or booleans and the result will be an integer or a boolean.
- %
-:- pred binary_infix_op(binary_op::in, string::out) is semidet.
+:- type binop_category
+ ---> array_index_binop
+ ; compound_compare_binop
+ ; string_compare_binop
+ ; unsigned_compare_binop
+ ; float_compare_binop
+ ; float_arith_binop
+ ; int_or_bool_binary_infix_binop
+ ; macro_binop.
+
+:- pred binop_category_string(binary_op::in, binop_category::out, string::out)
+ is det.
%-----------------------------------------------------------------------------%
@@ -376,52 +363,64 @@
unary_prefix_op(mktag, "MR_mktag").
unary_prefix_op(tag, "MR_tag").
unary_prefix_op(unmktag, "MR_unmktag").
+unary_prefix_op(strip_tag, "MR_strip_tag").
unary_prefix_op(mkbody, "MR_mkbody").
unary_prefix_op(unmkbody, "MR_unmkbody").
-unary_prefix_op(strip_tag, "MR_strip_tag").
unary_prefix_op(hash_string, "MR_hash_string").
unary_prefix_op(bitwise_complement, "~").
unary_prefix_op(logical_not, "!").
-string_compare_op(str_eq, "==").
-string_compare_op(str_ne, "!=").
-string_compare_op(str_le, "<=").
-string_compare_op(str_ge, ">=").
-string_compare_op(str_lt, "<").
-string_compare_op(str_gt, ">").
-
-unsigned_compare_op(unsigned_le, "<=").
-
-float_op(float_plus, "+").
-float_op(float_minus, "-").
-float_op(float_times, "*").
-float_op(float_divide, "/").
-
-float_compare_op(float_eq, "==").
-float_compare_op(float_ne, "!=").
-float_compare_op(float_le, "<=").
-float_compare_op(float_ge, ">=").
-float_compare_op(float_lt, "<").
-float_compare_op(float_gt, ">").
-
-binary_infix_op(int_add, "+").
-binary_infix_op(int_sub, "-").
-binary_infix_op(int_mul, "*").
-binary_infix_op(int_div, "/").
-binary_infix_op(unchecked_left_shift, "<<").
-binary_infix_op(unchecked_right_shift, ">>").
-binary_infix_op(bitwise_and, "&").
-binary_infix_op(bitwise_or, "|").
-binary_infix_op(bitwise_xor, "^").
-binary_infix_op(int_mod, "%").
-binary_infix_op(eq, "==").
-binary_infix_op(ne, "!=").
-binary_infix_op(logical_and, "&&").
-binary_infix_op(logical_or, "||").
-binary_infix_op(int_lt, "<").
-binary_infix_op(int_gt, ">").
-binary_infix_op(int_le, "<=").
-binary_infix_op(int_ge, ">=").
+% The operator strings for array_index, compound_lt and compound_eq are
+% dummies; they should never be used.
+
+binop_category_string(array_index(_), array_index_binop, "ARRAY_INDEX").
+
+binop_category_string(compound_lt, compound_compare_binop, "COMPOUND_LT").
+binop_category_string(compound_eq, compound_compare_binop, "COMPOUND_EQ").
+
+binop_category_string(str_eq, string_compare_binop, "==").
+binop_category_string(str_ne, string_compare_binop, "!=").
+binop_category_string(str_le, string_compare_binop, "<=").
+binop_category_string(str_ge, string_compare_binop, ">=").
+binop_category_string(str_lt, string_compare_binop, "<").
+binop_category_string(str_gt, string_compare_binop, ">").
+
+binop_category_string(unsigned_le, unsigned_compare_binop, "<=").
+
+binop_category_string(float_plus, float_arith_binop, "+").
+binop_category_string(float_minus, float_arith_binop, "-").
+binop_category_string(float_times, float_arith_binop, "*").
+binop_category_string(float_divide, float_arith_binop, "/").
+
+binop_category_string(float_eq, float_compare_binop, "==").
+binop_category_string(float_ne, float_compare_binop, "!=").
+binop_category_string(float_le, float_compare_binop, "<=").
+binop_category_string(float_ge, float_compare_binop, ">=").
+binop_category_string(float_lt, float_compare_binop, "<").
+binop_category_string(float_gt, float_compare_binop, ">").
+
+binop_category_string(int_add, int_or_bool_binary_infix_binop, "+").
+binop_category_string(int_sub, int_or_bool_binary_infix_binop, "-").
+binop_category_string(int_mul, int_or_bool_binary_infix_binop, "*").
+binop_category_string(int_div, int_or_bool_binary_infix_binop, "/").
+binop_category_string(unchecked_left_shift, int_or_bool_binary_infix_binop,
+ "<<").
+binop_category_string(unchecked_right_shift, int_or_bool_binary_infix_binop,
+ ">>").
+binop_category_string(bitwise_and, int_or_bool_binary_infix_binop, "&").
+binop_category_string(bitwise_or, int_or_bool_binary_infix_binop, "|").
+binop_category_string(bitwise_xor, int_or_bool_binary_infix_binop, "^").
+binop_category_string(int_mod, int_or_bool_binary_infix_binop, "%").
+binop_category_string(eq, int_or_bool_binary_infix_binop, "==").
+binop_category_string(ne, int_or_bool_binary_infix_binop, "!=").
+binop_category_string(logical_and, int_or_bool_binary_infix_binop, "&&").
+binop_category_string(logical_or, int_or_bool_binary_infix_binop, "||").
+binop_category_string(int_lt, int_or_bool_binary_infix_binop, "<").
+binop_category_string(int_gt, int_or_bool_binary_infix_binop, ">").
+binop_category_string(int_le, int_or_bool_binary_infix_binop, "<=").
+binop_category_string(int_ge, int_or_bool_binary_infix_binop, ">=").
+
+binop_category_string(body, macro_binop, "MR_body").
%-----------------------------------------------------------------------------%
Index: llds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/llds_out.m,v
retrieving revision 1.311
diff -u -b -r1.311 llds_out.m
--- llds_out.m 14 Jul 2007 02:32:43 -0000 1.311
+++ llds_out.m 16 Jul 2007 03:01:01 -0000
@@ -17,7 +17,6 @@
:- module ll_backend.llds_out.
:- interface.
-:- import_module backend_libs.builtin_ops.
:- import_module hlds.hlds_llds.
:- import_module hlds.hlds_module.
:- import_module libs.globals.
@@ -101,10 +100,6 @@
%
:- func reg_to_string(reg_type, int) = string.
- % Convert a binary operator to a string description of that operator.
- %
-:- func binary_op_to_string(binary_op) = string.
-
% Output an instruction and (if the third arg is yes) the comment.
% This predicate is provided for debugging use only.
%
@@ -179,6 +174,7 @@
:- implementation.
+:- import_module backend_libs.builtin_ops.
:- import_module backend_libs.c_util.
:- import_module backend_libs.export.
:- import_module backend_libs.name_mangle.
@@ -3107,12 +3103,13 @@
!IO),
output_rval_decls_format(Rval2, FirstIndent, LaterIndent, !N, !DeclSet,
!IO),
- %
+
% If floats are boxed, and the static ground terms option is enabled,
% then for each float constant which we might want to box we declare
% a static const variable holding that constant.
- %
- ( c_util.float_op(Op, OpStr) ->
+
+ c_util.binop_category_string(Op, Category, OpStr),
+ ( Category = float_arith_binop ->
globals.io_lookup_bool_option(unboxed_float, UnboxFloat, !IO),
globals.io_lookup_bool_option(static_ground_terms, StaticGroundTerms,
!IO),
@@ -4798,23 +4795,28 @@
output_rval(const(Const), !IO) :-
output_rval_const(Const, !IO).
output_rval(unop(UnaryOp, Exprn), !IO) :-
- output_unary_op(UnaryOp, !IO),
+ c_util.unary_prefix_op(UnaryOp, OpString),
+ io.write_string(OpString, !IO),
io.write_string("(", !IO),
llds.unop_arg_type(UnaryOp, ArgType),
output_rval_as_type(Exprn, ArgType, !IO),
io.write_string(")", !IO).
output_rval(binop(Op, X, Y), !IO) :-
+ binop_category_string(Op, Category, OpStr),
(
- Op = array_index(_Type)
- ->
+ Category = array_index_binop,
io.write_string("(", !IO),
output_rval_as_type(X, data_ptr, !IO),
io.write_string(")[", !IO),
output_rval_as_type(Y, integer, !IO),
io.write_string("]", !IO)
;
- c_util.string_compare_op(Op, OpStr)
- ->
+ Category = compound_compare_binop,
+ % These operators are intended to be generated only when using
+ % the Erlang backend.
+ unexpected(this_file, "output_rval: compound_compare_binop")
+ ;
+ Category = string_compare_binop,
io.write_string("(strcmp((char *)", !IO),
output_rval_as_type(X, word, !IO),
io.write_string(", (char *)", !IO),
@@ -4825,14 +4827,9 @@
io.write_string(" ", !IO),
io.write_string("0)", !IO)
;
- ( c_util.float_compare_op(Op, OpStr1) ->
- OpStr = OpStr1
- ; c_util.float_op(Op, OpStr2) ->
- OpStr = OpStr2
- ;
- fail
- )
- ->
+ ( Category = float_compare_binop
+ ; Category = float_arith_binop
+ ),
io.write_string("(", !IO),
output_rval_as_type(X, float, !IO),
io.write_string(" ", !IO),
@@ -4841,56 +4838,66 @@
output_rval_as_type(Y, float, !IO),
io.write_string(")", !IO)
;
-% XXX broken for C == minint
-% (since `NewC is 0 - C' overflows)
-% Op = (+),
-% Y = const(llconst_int(C)),
-% C < 0
-% ->
-% NewOp = (-),
-% NewC is 0 - C,
-% NewY = const(llconst_int(NewC)),
-% io.write_string("("),
-% output_rval(X),
-% io.write_string(" "),
-% output_binary_op(NewOp),
-% io.write_string(" "),
-% output_rval(NewY),
-% io.write_string(")")
-% ;
- % special-case equality ops to avoid some unnecessary
- % casts -- there's no difference between signed and
- % unsigned equality, so if both args are unsigned, we
- % don't need to cast them to (Integer)
+ Category = unsigned_compare_binop,
+ io.write_string("(", !IO),
+ output_rval_as_type(X, unsigned, !IO),
+ io.write_string(" ", !IO),
+ io.write_string(OpStr, !IO),
+ io.write_string(" ", !IO),
+ output_rval_as_type(Y, unsigned, !IO),
+ io.write_string(")", !IO)
+ ;
+ Category = int_or_bool_binary_infix_binop,
+ (
+ % Special-case equality ops to avoid some unnecessary casts --
+ % there's no difference between signed and unsigned equality,
+ % so if both args are unsigned, we don't need to cast them to
+ % MR_Integer.
( Op = eq ; Op = ne ),
- ( llds.rval_type(X, XType) ),
+ llds.rval_type(X, XType),
( XType = word ; XType = unsigned ),
- ( llds.rval_type(Y, YType) ),
+ llds.rval_type(Y, YType),
( YType = word ; YType = unsigned )
->
io.write_string("(", !IO),
output_rval(X, !IO),
io.write_string(" ", !IO),
- output_binary_op(Op, !IO),
+ io.write_string(OpStr, !IO),
io.write_string(" ", !IO),
output_rval(Y, !IO),
io.write_string(")", !IO)
+ % ;
+ % XXX broken for C == minint
+ % (since `NewC = 0 - C' overflows)
+ % Op = (+),
+ % Y = const(llconst_int(C)),
+ % C < 0
+ % ->
+ % NewOp = (-),
+ % NewC = 0 - C,
+ % NewY = const(llconst_int(NewC)),
+ % io.write_string("("),
+ % output_rval(X),
+ % io.write_string(" "),
+ % io.write_string(NewOpStr),
+ % io.write_string(" "),
+ % output_rval(NewY),
+ % io.write_string(")")
;
- c_util.unsigned_compare_op(Op, OpStr)
- ->
io.write_string("(", !IO),
- output_rval_as_type(X, unsigned, !IO),
+ output_rval_as_type(X, integer, !IO),
io.write_string(" ", !IO),
io.write_string(OpStr, !IO),
io.write_string(" ", !IO),
- output_rval_as_type(Y, unsigned, !IO),
+ output_rval_as_type(Y, integer, !IO),
io.write_string(")", !IO)
+ )
;
+ Category = macro_binop,
+ io.write_string(OpStr, !IO),
io.write_string("(", !IO),
output_rval_as_type(X, integer, !IO),
- io.write_string(" ", !IO),
- output_binary_op(Op, !IO),
- io.write_string(" ", !IO),
+ io.write_string(", ", !IO),
output_rval_as_type(Y, integer, !IO),
io.write_string(")", !IO)
).
@@ -4975,12 +4982,6 @@
io.write_string(")", !IO)
).
-:- pred output_unary_op(unary_op::in, io::di, io::uo) is det.
-
-output_unary_op(Op, !IO) :-
- c_util.unary_prefix_op(Op, OpString),
- io.write_string(OpString, !IO).
-
:- pred output_rval_const(rval_const::in, io::di, io::uo) is det.
output_rval_const(llconst_true, !IO) :-
@@ -5364,26 +5365,6 @@
%-----------------------------------------------------------------------------%
-:- pred output_binary_op(binary_op::in, io::di, io::uo) is det.
-
-output_binary_op(Op, !IO) :-
- ( c_util.binary_infix_op(Op, String) ->
- io.write_string(String, !IO)
- ;
- unexpected(this_file, "output_binary_op/3: invalid binary operator")
- ).
-
-binary_op_to_string(Op) = Name :-
- ( c_util.binary_infix_op(Op, Name0) ->
- Name = Name0
- ;
- % The following is just for debugging purposes -
- % string operators are not output as `str_eq', etc.
- functor(Op, canonicalize, Name, _)
- ).
-
-%-----------------------------------------------------------------------------%
-
lval_to_string(framevar(N)) =
"MR_fv(" ++ int_to_string(N) ++ ")".
lval_to_string(stackvar(N)) =
Index: mlds_to_c.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.217
diff -u -b -r1.217 mlds_to_c.m
--- mlds_to_c.m 14 Jul 2007 02:32:45 -0000 1.217
+++ mlds_to_c.m 16 Jul 2007 03:01:01 -0000
@@ -3667,24 +3667,20 @@
io::di, io::uo) is det.
mlds_output_binop(Op, X, Y, !IO) :-
+ binop_category_string(Op, Category, OpStr),
(
- Op = array_index(_Type)
- ->
+ Category = array_index_binop,
mlds_output_bracketed_rval(X, !IO),
io.write_string("[", !IO),
mlds_output_rval(Y, !IO),
io.write_string("]", !IO)
;
- Op = body
- ->
- io.write_string("MR_body(", !IO),
- mlds_output_rval(X, !IO),
- io.write_string(", ", !IO),
- mlds_output_rval(Y, !IO),
- io.write_string(")", !IO)
+ Category = compound_compare_binop,
+ % These operators are intended to be generated only when using
+ % the Erlang backend.
+ unexpected(this_file, "mlds_output_binop: compound_compare_binop")
;
- c_util.string_compare_op(Op, OpStr)
- ->
+ Category = string_compare_binop,
io.write_string("(strcmp(", !IO),
mlds_output_rval(X, !IO),
io.write_string(", ", !IO),
@@ -3695,14 +3691,9 @@
io.write_string(" ", !IO),
io.write_string("0)", !IO)
;
- ( c_util.float_compare_op(Op, OpStr1) ->
- OpStr = OpStr1
- ; c_util.float_op(Op, OpStr2) ->
- OpStr = OpStr2
- ;
- fail
- )
- ->
+ ( Category = float_compare_binop
+ ; Category = float_arith_binop
+ ),
io.write_string("(", !IO),
mlds_output_bracketed_rval(X, !IO),
io.write_string(" ", !IO),
@@ -3711,39 +3702,33 @@
mlds_output_bracketed_rval(Y, !IO),
io.write_string(")", !IO)
;
-% XXX Broken for C == minint, (since `NewC is 0 - C' overflows)
-% Op = (+),
-% Y = const(int_const(C)),
-% C < 0
-% ->
-% NewOp = (-),
-% NewC is 0 - C,
-% NewY = const(int_const(NewC)),
-% io.write_string("(", !IO),
-% mlds_output_rval(X, !IO),
-% io.write_string(" ", !IO),
-% mlds_output_binary_op(NewOp, !IO),
-% io.write_string(" ", !IO),
-% mlds_output_rval(NewY, !IO),
-% io.write_string(")", !IO)
-% ;
+ Category = unsigned_compare_binop,
+ io.write_string("( (MR_Unsigned) ", !IO),
+ mlds_output_rval(X, !IO),
+ io.write_string(" ", !IO),
+ io.write_string(OpStr, !IO),
+ io.write_string(" (MR_Unsigned) ", !IO),
+ mlds_output_rval(Y, !IO),
+ io.write_string(")", !IO)
+ ;
+ Category = int_or_bool_binary_infix_binop,
+ % We could treat X + (-const) specially, but we don't.
+ % The reason is documented in the equivalent code in llds_out.m.
io.write_string("(", !IO),
mlds_output_rval(X, !IO),
io.write_string(" ", !IO),
- mlds_output_binary_op(Op, !IO),
+ io.write_string(OpStr, !IO),
io.write_string(" ", !IO),
mlds_output_rval(Y, !IO),
io.write_string(")", !IO)
- ).
-
-:- pred mlds_output_binary_op(binary_op::in, io::di, io::uo) is det.
-
-mlds_output_binary_op(Op, !IO) :-
- ( c_util.binary_infix_op(Op, OpStr) ->
- io.write_string(OpStr, !IO)
;
- unexpected(this_file,
- "mlds_output_binary_op: invalid binary operator")
+ Category = macro_binop,
+ io.write_string(OpStr, !IO),
+ io.write_string("(", !IO),
+ mlds_output_rval(X, !IO),
+ io.write_string(", ", !IO),
+ mlds_output_rval(Y, !IO),
+ io.write_string(")", !IO)
).
:- pred mlds_output_rval_const(mlds_rval_const::in, io::di, io::uo) is det.
Index: mlds_to_managed.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mlds_to_managed.m,v
retrieving revision 1.43
diff -u -b -r1.43 mlds_to_managed.m
--- mlds_to_managed.m 14 Jul 2007 14:12:25 -0000 1.43
+++ mlds_to_managed.m 16 Jul 2007 06:45:10 -0000
@@ -443,7 +443,8 @@
sorry(this_file, "box or unbox unop")
).
write_rval(binop(Binop, Rval1, Rval2), !IO) :-
- ( c_util.binary_infix_op(Binop, BinopStr) ->
+ c_util.binop_category_string(Binop, Category, BinopStr),
+ ( Category = int_or_bool_binary_infix_binop ->
io.write_string("(", !IO),
write_rval(Rval1, !IO),
io.write_string(") ", !IO),
Index: opt_debug.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/opt_debug.m,v
retrieving revision 1.194
diff -u -b -r1.194 opt_debug.m
--- opt_debug.m 9 Jul 2007 13:28:33 -0000 1.194
+++ opt_debug.m 15 Jul 2007 12:30:48 -0000
@@ -112,6 +112,7 @@
:- implementation.
+:- import_module backend_libs.c_util.
:- import_module backend_libs.proc_label.
:- import_module hlds.hlds_data.
:- import_module hlds.hlds_rtti.
@@ -524,8 +525,8 @@
dump_unop(hash_string) = "hash_string".
dump_unop(bitwise_complement) = "bitwise_complement".
-dump_binop(Op) =
- llds_out.binary_op_to_string(Op).
+dump_binop(Op) = OpStr :-
+ c_util.binop_category_string(Op, _Category, OpStr).
dump_maybe_rvals(_, [], _) = "".
dump_maybe_rvals(MaybeProcLabel, [MR | MRs], N) = Str :-
Index: options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.577
diff -u -b -r1.577 options.m
--- options.m 17 Jul 2007 04:47:22 -0000 1.577
+++ options.m 17 Jul 2007 05:38:19 -0000
@@ -2432,6 +2432,8 @@
long_option("trace-io-builtins-2006-08-14", compiler_sufficiently_recent).
long_option("compound-compare-builtins-2007-07-09",
compiler_sufficiently_recent).
+long_option("no-det-warning-compound-compare-2007-07-17",
+ compiler_sufficiently_recent).
long_option("experiment", experiment).
long_option("feedback-file", feedback_file).
Index: simplify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.213
diff -u -b -r1.213 simplify.m
--- simplify.m 2 Jul 2007 05:30:30 -0000 1.213
+++ simplify.m 15 Jul 2007 09:26:25 -0000
@@ -1978,11 +1978,11 @@
goal_info_get_context(!.GoalInfo, Context),
goal_util.generate_simple_call(mercury_private_builtin_module,
- "builtin_compound_eq", pf_predicate, only_mode, detism_semi, purity_pure,
- [X, Y], [], [], ModuleInfo, Context, CondEq),
+ "builtin_compound_eq", pf_predicate, only_mode, detism_semi,
+ purity_pure, [X, Y], [], [], ModuleInfo, Context, CondEq),
goal_util.generate_simple_call(mercury_private_builtin_module,
- "builtin_compound_lt", pf_predicate, only_mode, detism_semi, purity_pure,
- [X, Y], [], [], ModuleInfo, Context, CondLt),
+ "builtin_compound_lt", pf_predicate, only_mode, detism_semi,
+ purity_pure, [X, Y], [], [], ModuleInfo, Context, CondLt),
Builtin = mercury_public_builtin_module,
make_const_construction(Res, cons(qualified(Builtin, "="), 0), ReturnEq),
cvs diff: Diffing notes
--------------------------------------------------------------------------
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