[m-rev.] for review: comparison of preds/funcs
Zoltan Somogyi
zs at cs.mu.OZ.AU
Sun Apr 14 14:02:37 AEST 2002
On 14-Apr-2002, Mark Brown <dougl at cs.mu.OZ.AU> wrote:
> Well, MR_COMPARE_BY_RTTI is undocumented, and enabling it results in a
> compilation error. I can address both of these issues if you like.
The compilation errors are easily fixed: the diff, which I will commit,
follows this mail. I will do the documentation as well, but later.
> But
> another problem is that, even with MR_COMPARE_BY_RTTI enabled, comparison
> is still done through the type_ctor_info for arrays, so comparing by RTTI
> will need to be implemented for arrays. Is there a technical reason why
> this hasn't been done yet, or is it just a case of "not yet implemented"?
Not yet implemented. I can do this too; don't worry about it.
Zoltan.
cvs diff: Diffing .
Index: mercury_unify_compare_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_unify_compare_body.h,v
retrieving revision 1.22
diff -u -b -r1.22 mercury_unify_compare_body.h
--- mercury_unify_compare_body.h 12 Apr 2002 11:42:55 -0000 1.22
+++ mercury_unify_compare_body.h 14 Apr 2002 03:59:20 -0000
@@ -68,9 +68,6 @@
MR_type_ctor_layout(type_ctor_info).layout_equiv;
goto start_label;
- case MR_TYPECTOR_REP_EQUIV_VAR:
- MR_fatal_error("found type_ctor_rep MR_TYPECTOR_REP_EQUIV_VAR");
-
case MR_TYPECTOR_REP_NOTAG:
MR_save_transient_hp();
type_info = MR_create_type_info(
@@ -95,14 +92,14 @@
#ifdef select_compare_code
const MR_DuFunctorDesc *x_functor_desc;
const MR_DuFunctorDesc *y_functor_desc;
- MR_DuPtagLayout *x_ptaglayout;
- MR_DuPtagLayout *y_ptaglayout;
+ const MR_DuPtagLayout *x_ptaglayout;
+ const MR_DuPtagLayout *y_ptaglayout;
#else
MR_Word x_ptag;
MR_Word y_ptag;
MR_Word x_sectag;
MR_Word y_sectag;
- MR_DuPtagLayout *ptaglayout;
+ const MR_DuPtagLayout *ptaglayout;
#endif
MR_Word *x_data_value;
MR_Word *y_data_value;
@@ -116,7 +113,7 @@
#define MR_find_du_functor_desc(data, data_value, functor_desc) \
do { \
- MR_DuPtagLayout *ptaglayout; \
+ const MR_DuPtagLayout *ptaglayout; \
int ptag; \
int sectag; \
\
cvs diff: Diffing GETOPT
cvs diff: Diffing machdeps
--------------------------------------------------------------------------
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