[m-rev.] diff: fix LLDS reference unification bug
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Feb 23 15:20:42 AEDT 2003
Estimated hours taken: 1
Branches: main
Fix a bug that broke extras/trailed_update/samples/interpreter.
runtime/mercury_builtin_types.c:
Fix a bug in the LLDS code for unifying references: it needs to
test `r2 == r3' rather than `r1 == r2', since the argument in
`r1' will be a type_info, not a reference.
Workspace: /home/ceres/fjh/mercury
Index: runtime/mercury_builtin_types.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_builtin_types.c,v
retrieving revision 1.7
diff -u -d -r1.7 mercury_builtin_types.c
--- runtime/mercury_builtin_types.c 12 Feb 2003 05:37:23 -0000 1.7
+++ runtime/mercury_builtin_types.c 23 Feb 2003 04:13:05 -0000
@@ -1114,7 +1114,8 @@
#define module private_builtin
#define type ref
#define arity 1
-#define unify_code MR_r1 = (MR_r1 == MR_r2);
+/* The inputs are type_info in r1, first ref in r2, second ref in r3. */
+#define unify_code MR_r1 = (MR_r2 == MR_r3);
#define compare_code MR_fatal_error("called compare/3 for `ref' type");
#include "mercury_hand_unify_compare_body.h"
--
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