[m-rev.] diff: add inline directives for heap primitives
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Feb 5 20:21:25 AEDT 2002
Estimated hours taken: 0.25
Branches: main
library/private_builtin.m:
Add `pragma inline' declarations for `free_heap', `mark_hp', and
`restore_hp'. These routines are defined in C in ways which
may make it not obvious to the Mercury compiler that they are
worth inlining.
Workspace: /home/earth/fjh/ws-earth4/mercury
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.93
diff -u -d -r1.93 private_builtin.m
--- library/private_builtin.m 5 Feb 2002 09:14:49 -0000 1.93
+++ library/private_builtin.m 5 Feb 2002 09:20:34 -0000
@@ -1152,6 +1152,16 @@
:- implementation.
+/*
+** These routines are defined in C in ways which may make it not obvious
+** to the Mercury compiler that they are worth inlining.
+**
+** (Note: it's probably not worth inlining gc_trace/1...)
+*/
+:- pragma inline(free_heap/1).
+:- pragma inline(mark_hp/1).
+:- pragma inline(restore_hp/1).
+
:- pragma foreign_decl("C", "
#include ""mercury_heap.h"" /* for MR_free_heap() */
").
--
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