[m-rev.] for review: Bug fix for enumerated type switch statements in Java
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Dec 23 16:34:02 AEDT 2003
On 23-Dec-2003, James Goddard <goddardjames at yahoo.com> wrote:
>
> Bug fix for enumerated type switch statements in Java.
That looks good.
One comment:
> +++ mlds_to_java.m 23 Dec 2003 03:07:13 -0000
> @@ -213,7 +213,11 @@
>
> rval_is_enum_object(Rval) :-
> Rval = lval(Lval),
> - Lval = var(_, VarType),
> + (
> + Lval = var(_, VarType)
> + ;
> + Lval = field(_, _, _, VarType, _)
> + ),
> type_is_enum(VarType).
The name VarType is now misleading. I suggest using "LvalType" instead,
or alternatively writing it as
rval_is_enum_object(Rval) :-
Rval = lval(Lval),
(
Lval = var(_, VarType),
type_is_enum(VarType)
;
Lval = field(_, _, _, FieldType, _),
type_is_enum(FieldType)
).
Also, please fix the indentation of that predicate while you're at it.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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