[m-dev.] trivial diff: MLDS back-end: abort nicely when copying closures

Fergus Henderson fjh at cs.mu.OZ.AU
Thu May 18 04:44:56 AEST 2000


This diff partially addresses bug B5 on the list I posted the other day:

	(B5) need to generate correct layout information for closures,
	     so that tests/hard_coded/copy_pred works.

It changes it from a bug to a not-yet-implemented feature.

----------

Estimated hours taken: 0.25

runtime/mercury_deep_copy_body.h:
	For the MLDS back-end, when copying closures,
	call MR_fatal_error() to abort with a "Sorry, not implemented"
	error, rather than crashing with a segmentation fault.

Workspace: /home/pgrad/fjh/ws/hg
Index: runtime/mercury_deep_copy_body.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_deep_copy_body.h,v
retrieving revision 1.22
diff -u -d -r1.22 mercury_deep_copy_body.h
--- runtime/mercury_deep_copy_body.h	2000/04/10 07:20:36	1.22
+++ runtime/mercury_deep_copy_body.h	2000/05/17 18:39:04
@@ -422,6 +422,10 @@
                 for (i = 0; i < args; i++) {
                     MR_PseudoTypeInfo arg_pseudo_type_info;
 
+#ifdef MR_HIGHLEVEL_CODE
+                    /* the closure_layout is NULL */
+                    MR_fatal_error("Sorry, not implemented: copying closures");
+#endif
                     arg_pseudo_type_info =
                         closure_layout->arg_pseudo_type_info[i];
                     new_closure->MR_closure_hidden_args_0[i] =

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list