[m-rev.] [reuse] diff: heap profile instruction in wrong place

Peter Ross peter.ross at miscrit.be
Sat Mar 24 04:19:15 AEDT 2001


Hi,


===================================================================


Estimated hours taken: 0.1
Branches: reuse

compiler/mlds_to_c.m:
    Move the heap profile code so that it only gets run if the cell
    cache lookup fails.


Index: mlds_to_c.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_c.m,v
retrieving revision 1.55.2.12
diff -u -r1.55.2.12 mlds_to_c.m
--- mlds_to_c.m	2001/03/21 14:30:17	1.55.2.12
+++ mlds_to_c.m	2001/03/23 17:16:12
@@ -2416,12 +2416,7 @@
 		Size = const(int_const(-1))
 	},
 
-	{ FuncInfo = func_info(FuncName, _) },
-	mlds_maybe_output_heap_profile_instr(Context, Indent + 1, Args,
-			FuncName, MaybeCtorName),
-
 	globals__io_lookup_bool_option(cell_cache, CellCache),
-
 	( { CellCache = yes } ->
 		mlds_indent(Context, Indent + 1),
 		mlds_output_lval(Target),
@@ -2438,6 +2433,10 @@
 	;
 		{ NewIndent = Indent + 1 }
 	),
+
+	{ FuncInfo = func_info(FuncName, _) },
+	mlds_maybe_output_heap_profile_instr(Context, NewIndent, Args,
+			FuncName, MaybeCtorName),
 
 	mlds_indent(Context, NewIndent),
 	mlds_output_lval(Target),

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