[m-rev.] diff: support `hlc' and `hl' grades
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Nov 27 22:35:19 AEDT 2001
On 22-Nov-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Add support for `--gc none' to the MLDS->C back-end,
> i.e. support the `hlc' and `hl' grades.
Estimated hours taken: 0.5
Branches: main
Fix an omission in my previous change to add support for `--gc none'
to the MLDS->C back-end.
runtime/mercury.c:
Call MR_make_hp_float_aligned() in MR_box_float and
MR_asm_box_float(), to ensure that the memory allocated
in `--gc none' grades will be properly aligned for a float.
Workspace: /home/earth/fjh/ws-earth4/mercury
Index: runtime/mercury.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.c,v
retrieving revision 1.25
diff -u -d -r1.25 mercury.c
--- runtime/mercury.c 31 May 2001 06:00:10 -0000 1.25
+++ runtime/mercury.c 27 Nov 2001 11:30:47 -0000
@@ -855,8 +855,10 @@
MR_Box
MR_box_float(MR_Float f)
{
- MR_Float *ptr = (MR_Float *)
- MR_new_object(MR_Float, sizeof(MR_Float), "float");
+ MR_Float *ptr;
+
+ MR_make_hp_float_aligned();
+ ptr = (MR_Float *) MR_new_object(MR_Float, sizeof(MR_Float), "float");
*ptr = f;
return (MR_Box) ptr;
}
@@ -880,8 +882,10 @@
MR_Box
MR_asm_box_float(MR_Float f)
{
- MR_Float *ptr = (MR_Float *)
- MR_new_object(MR_Float, sizeof(MR_Float), "float");
+ MR_Float *ptr;
+
+ MR_make_hp_float_aligned();
+ ptr = (MR_Float *) MR_new_object(MR_Float, sizeof(MR_Float), "float");
*ptr = f;
return (MR_Box) ptr;
}
--
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