[m-dev.] diff: fix bug in exception.m

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Oct 4 19:04:17 AEST 1999


A bit over a year ago, Tyson changed the interface to deep_copy(),
but unfortunately failed to change the calls to deep_copy() in
extras/exception.m.  This change fixes that.

----------

Estimated hours taken: 1

library/exception.m:
	Fix a bug that broke exception handling in non-gc grades:
	deep_copy() takes a pointer to the value to be copied,
	not the value itself.

Workspace: /home/mercury0/fjh/mercury
Index: library/exception.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/exception.m,v
retrieving revision 1.5
diff -u -r1.5 exception.m
--- exception.m	1999/09/27 05:20:32	1.5
+++ exception.m	1999/10/04 08:59:15
@@ -960,7 +960,7 @@
 	assert(MR_EXCEPTION_FRAMEVARS->heap_ptr <=
 		MR_EXCEPTION_FRAMEVARS->heap_zone->top);
 	save_transient_registers();
-	exception = deep_copy((Word *) exception,
+	exception = deep_copy(&exception,
 		(Word *) &mercury_data_std_util__type_ctor_info_univ_0,
 		MR_EXCEPTION_FRAMEVARS->heap_ptr,
 		MR_EXCEPTION_FRAMEVARS->heap_zone->top);
@@ -977,7 +977,7 @@
 	assert(MR_EXCEPTION_FRAMEVARS->solns_heap_ptr <=
 		MR_solutions_heap_zone->top);
 	save_transient_registers();
-	exception = deep_copy((Word *) exception,
+	exception = deep_copy(&exception,
 		(Word *) &mercury_data_std_util__type_ctor_info_univ_0,
 		saved_solns_heap_ptr, MR_solutions_heap_zone->top);
 	restore_transient_registers();

-- 
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