[m-rev.] for post commit review by Ben: foreign_proc annotations for gc

Zoltan Somogyi zs at csse.unimelb.edu.au
Sat Jan 6 21:48:03 AEDT 2007


Add some foreign_proc attributes that Ben needs for his work on the native
garbage collector. One group of attributes (allocates_memory) is intended
for optimization: they let the compiler figure out whether it needs to emit
code to check the amount of available heap space before the foreign_proc.
The second group (registers_roots) is intended for catching errors: foreign
procs that do not register (or at least do not *assert* that they register)
the roots they may hold.

compiler/prog_data.m:
	Define the attributes.

	Standardize on spelling "does_not" instead of "doesnt".

compiler/prog_io_pragma.m:
	Parse the attributes.

compiler/*.m:
	Conform to the new spelling of attribute names.

doc/reference_manual.texi:
	Add documentation for the attributes. Since they are for developers
	only at the moment, leave the documentation commented out.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing boehm_gc/windows-untested
cvs diff: Diffing boehm_gc/windows-untested/vc60
cvs diff: Diffing boehm_gc/windows-untested/vc70
cvs diff: Diffing boehm_gc/windows-untested/vc71
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/code_info.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/code_info.m,v
retrieving revision 1.340
diff -u -b -r1.340 code_info.m
--- compiler/code_info.m	6 Jan 2007 09:23:26 -0000	1.340
+++ compiler/code_info.m	6 Jan 2007 09:39:51 -0000
@@ -1915,7 +1915,7 @@
                     affects_liveness, live_lvals_info(set.init),
                     "\t\tMR_save_transient_registers();\n"),
                 foreign_proc_raw_code(cannot_branch_away,
-                    doesnt_affect_liveness, live_lvals_info(set.init),
+                    does_not_affect_liveness, live_lvals_info(set.init),
                     "\t\tMR_commit_mark();\n"),
                 foreign_proc_raw_code(cannot_branch_away,
                     affects_liveness, live_lvals_info(set.init),
@@ -1994,7 +1994,7 @@
             % See the comment in prepare_for_semi_commit above.
             Components = [
                 foreign_proc_raw_code(cannot_branch_away,
-                    doesnt_affect_liveness, live_lvals_info(set.init),
+                    does_not_affect_liveness, live_lvals_info(set.init),
                     "\t\tMR_commit_cut();\n")
             ],
             CutCode = node([
Index: compiler/ite_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/ite_gen.m,v
retrieving revision 1.96
diff -u -b -r1.96 ite_gen.m
--- compiler/ite_gen.m	6 Jan 2007 09:23:36 -0000	1.96
+++ compiler/ite_gen.m	6 Jan 2007 09:39:53 -0000
@@ -444,17 +444,17 @@
         ),
 
         PNegCondComponents = [
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 live_lvals_info(set.init),
                 wrap_transient("\t\tMR_pneg_enter_cond();\n"))
         ],
         PNegThenComponents = [
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 live_lvals_info(set.init),
                 wrap_transient("\t\tMR_pneg_enter_then();\n"))
         ],
         PNegElseComponents = [
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 live_lvals_info(set.init),
                 wrap_transient("\t\tMR_pneg_enter_else(" ++ CtxtStr ++ ");\n"))
         ],
Index: compiler/livemap.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/livemap.m,v
retrieving revision 1.84
diff -u -b -r1.84 livemap.m
--- compiler/livemap.m	6 Jan 2007 09:23:38 -0000	1.84
+++ compiler/livemap.m	6 Jan 2007 09:39:53 -0000
@@ -324,7 +324,7 @@
                 !:ContainsBadUserCode = yes
             )
         ;
-            AffectsLiveness = doesnt_affect_liveness
+            AffectsLiveness = does_not_affect_liveness
         )
     ;
         Component = foreign_proc_raw_code(_Context, AffectsLiveness,
@@ -357,7 +357,7 @@
             !:ContainsBadUserCode = yes
         )
     ;
-        AffectsLiveness = doesnt_affect_liveness,
+        AffectsLiveness = does_not_affect_liveness,
         (
             LiveLvalInfo = no_live_lvals_info,
             !:ContainsBadUserCode = yes
Index: compiler/opt_debug.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/opt_debug.m,v
retrieving revision 1.189
diff -u -b -r1.189 opt_debug.m
--- compiler/opt_debug.m	6 Jan 2007 09:23:45 -0000	1.189
+++ compiler/opt_debug.m	6 Jan 2007 09:39:54 -0000
@@ -865,7 +865,7 @@
 :- func dump_affects_liveness(affects_liveness) = string.
 
 dump_affects_liveness(affects_liveness) = "affects_liveness".
-dump_affects_liveness(doesnt_affect_liveness) = "doesnt_affect_liveness".
+dump_affects_liveness(does_not_affect_liveness) = "does_not_affect_liveness".
 dump_affects_liveness(default_affects_liveness) = "default_affects_liveness".
 
 :- func dump_input_components(maybe(proc_label), list(foreign_proc_input))
Index: compiler/pragma_c_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pragma_c_gen.m,v
retrieving revision 1.101
diff -u -b -r1.101 pragma_c_gen.m
--- compiler/pragma_c_gen.m	6 Jan 2007 09:23:48 -0000	1.101
+++ compiler/pragma_c_gen.m	6 Jan 2007 09:39:55 -0000
@@ -530,7 +530,7 @@
     (
         MayCallMercury = proc_will_not_call_mercury,
         SaveRegsComp = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), "")
+            does_not_affect_liveness, live_lvals_info(set.init), "")
     ;
         MayCallMercury = proc_may_call_mercury,
         SaveRegsComp = foreign_proc_raw_code(cannot_branch_away,
@@ -542,9 +542,9 @@
     (
         ThreadSafe = proc_thread_safe,
         ObtainLock = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), ""),
+            does_not_affect_liveness, live_lvals_info(set.init), ""),
         ReleaseLock = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), "")
+            does_not_affect_liveness, live_lvals_info(set.init), "")
     ;
         ThreadSafe = proc_not_thread_safe,
         module_info_pred_info(ModuleInfo, PredId, PredInfo),
@@ -553,11 +553,11 @@
         ObtainLockStr = "\tMR_OBTAIN_GLOBAL_LOCK("""
             ++ MangledName ++ """);\n",
         ObtainLock = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), ObtainLockStr),
+            does_not_affect_liveness, live_lvals_info(set.init), ObtainLockStr),
         ReleaseLockStr = "\tMR_RELEASE_GLOBAL_LOCK("""
             ++ MangledName ++ """);\n",
         ReleaseLock = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), ReleaseLockStr)
+            does_not_affect_liveness, live_lvals_info(set.init), ReleaseLockStr)
     ),
 
     % <The C code itself>
@@ -576,22 +576,22 @@
             MaybeFailLabel = yes(FailLabel)
         ),
         DefSuccessComp = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init),
+            does_not_affect_liveness, live_lvals_info(set.init),
             "\tMR_bool " ++ foreign_proc_succ_ind_name ++ ";\n" ++
             "#undef SUCCESS_INDICATOR\n" ++
             "#define SUCCESS_INDICATOR " ++
                 foreign_proc_succ_ind_name ++ "\n"),
         UndefSuccessComp = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init),
+            does_not_affect_liveness, live_lvals_info(set.init),
             "#undef SUCCESS_INDICATOR\n" ++
             "#define SUCCESS_INDICATOR MR_r1\n")
     ;
         CheckSuccess_Comp = foreign_proc_noop,
         MaybeFailLabel = no,
         DefSuccessComp = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), ""),
+            does_not_affect_liveness, live_lvals_info(set.init), ""),
         UndefSuccessComp = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), "")
+            does_not_affect_liveness, live_lvals_info(set.init), "")
     ),
 
     % #ifndef MR_CONSERVATIVE_GC
@@ -603,7 +603,7 @@
     ;
         MayCallMercury = proc_may_call_mercury,
         RestoreRegsComp = foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init),
+            does_not_affect_liveness, live_lvals_info(set.init),
             "#ifndef MR_CONSERVATIVE_GC\n\t" ++
                 "MR_restore_registers();\n#endif\n")
     ),
@@ -691,11 +691,11 @@
 make_proc_label_hash_define(ModuleInfo, PredId, ProcId,
         ProcLabelHashDef, ProcLabelHashUndef) :-
     ProcLabelHashDef = foreign_proc_raw_code(cannot_branch_away,
-        doesnt_affect_liveness, live_lvals_info(set.init),
+        does_not_affect_liveness, live_lvals_info(set.init),
         "#define\tMR_PROC_LABEL\t" ++
             make_proc_label_string(ModuleInfo, PredId, ProcId) ++ "\n"),
     ProcLabelHashUndef = foreign_proc_raw_code(cannot_branch_away,
-        doesnt_affect_liveness, live_lvals_info(set.init),
+        does_not_affect_liveness, live_lvals_info(set.init),
         "#undef\tMR_PROC_LABEL\n").
 
 :- func make_proc_label_string(module_info, pred_id, proc_id) = string.
@@ -886,39 +886,39 @@
         CallComponents = [
             foreign_proc_inputs(InputDescs),
             foreign_proc_raw_code(cannot_branch_away,
-                doesnt_affect_liveness, no_live_lvals_info, InitSaveStruct),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+                does_not_affect_liveness, no_live_lvals_info, InitSaveStruct),
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SaveRegs),
             ProcLabelDefine,
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallDef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallDef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallDef3),
             foreign_proc_user_code(FirstContext, default_affects_liveness,
                 First),
             foreign_proc_user_code(SharedContext, default_affects_liveness,
                 Shared),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallSuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Succeed),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallLastSuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SucceedDiscard),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef3),
             ProcLabelUndef
         ],
@@ -930,40 +930,40 @@
 
         RetryDecls = [SaveStructDecl | OutDecls],
         RetryComponents = [
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, InitSaveStruct),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SaveRegs),
             ProcLabelDefine,
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryDef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryDef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryDef3),
             foreign_proc_user_code(LaterContext, default_affects_liveness,
                 Later),
             foreign_proc_user_code(SharedContext, default_affects_liveness,
                 Shared),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetrySuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Succeed),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryLastSuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SucceedDiscard),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef3),
             ProcLabelUndef
         ],
@@ -1001,40 +1001,40 @@
         CallDecls = [SaveStructDecl | Decls],
         CallComponents = [
             foreign_proc_inputs(InputDescs),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, InitSaveStruct),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SaveRegs),
             ProcLabelDefine,
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallDef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallDef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallDef3),
             foreign_proc_user_code(FirstContext, default_affects_liveness,
                 First),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, GotoSharedLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallSuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Succeed),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, CallLastSuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SucceedDiscard),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef3),
             ProcLabelUndef
         ],
@@ -1046,40 +1046,40 @@
 
         RetryDecls = [SaveStructDecl | OutDecls],
         RetryComponents = [
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, InitSaveStruct),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SaveRegs),
             ProcLabelDefine,
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryDef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryDef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryDef3),
             foreign_proc_user_code(LaterContext, default_affects_liveness,
                 Later),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, GotoSharedLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetrySuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Succeed),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RetryLastSuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SucceedDiscard),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef3),
             ProcLabelUndef
         ],
@@ -1091,38 +1091,38 @@
 
         SharedDecls = [SaveStructDecl | OutDecls],
         SharedComponents = [
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, InitSaveStruct),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SaveRegs),
             ProcLabelDefine,
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SharedDef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SharedDef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SharedDef3),
             foreign_proc_user_code(SharedContext, default_affects_liveness,
                 Shared),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SharedSuccessLabel),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Succeed),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SharedLastSuccessLabel),
-            foreign_proc_raw_code(can_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(can_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, RestoreRegs),
             foreign_proc_outputs(OutputDescs),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, SucceedDiscard),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef1),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef2),
-            foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+            foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
                 no_live_lvals_info, Undef3),
             ProcLabelUndef
         ],
Index: compiler/proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/proc_gen.m,v
retrieving revision 1.15
diff -u -b -r1.15 proc_gen.m
--- compiler/proc_gen.m	6 Jan 2007 09:23:48 -0000	1.15
+++ compiler/proc_gen.m	6 Jan 2007 09:39:55 -0000
@@ -913,7 +913,7 @@
             string.format("#define\tMR_ORDINARY_SLOTS\t%d\n",
                 [i(TotalSlots)], DefineStr),
             DefineComponents = [foreign_proc_raw_code(cannot_branch_away,
-                doesnt_affect_liveness, live_lvals_info(set.init), DefineStr)],
+                does_not_affect_liveness, live_lvals_info(set.init), DefineStr)],
             NondetFrameInfo = ordinary_frame(PushMsg, TotalSlots, yes(Struct)),
             AllocCode = node([
                 llds_instr(mkframe(NondetFrameInfo, yes(OutsideResumeAddress)),
@@ -1007,7 +1007,7 @@
         NondetPragma = yes,
         UndefStr = "#undef\tMR_ORDINARY_SLOTS\n",
         UndefComponents = [foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), UndefStr)],
+            does_not_affect_liveness, live_lvals_info(set.init), UndefStr)],
         UndefCode = node([
             llds_instr(foreign_proc_code([], UndefComponents,
                 proc_will_not_call_mercury, no, no, no, no, no, no), "")
@@ -1169,7 +1169,7 @@
                 ReturnMacroName = "MR_tbl_mmos_return_answer",
                 ReturnCodeStr = "\t" ++ ReturnMacroName ++ "(" ++
                     DebugStr ++ ", " ++ GeneratorLocnStr ++ ");\n",
-                Component = foreign_proc_user_code(no, doesnt_affect_liveness,
+                Component = foreign_proc_user_code(no, does_not_affect_liveness,
                     ReturnCodeStr),
                 SuccessCode = node([
                     llds_instr(livevals(LiveLvals), ""),
@@ -1268,13 +1268,13 @@
         ], BytecodeCall),
 
     BytecodeInstructionsComponents = [
-        foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+        foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
             live_lvals_info(set.init), "\t{\n"),
-        foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+        foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
             live_lvals_info(set.init), CallStruct),
-        foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+        foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
             no_live_lvals_info, BytecodeCall),
-        foreign_proc_raw_code(cannot_branch_away, doesnt_affect_liveness,
+        foreign_proc_raw_code(cannot_branch_away, does_not_affect_liveness,
             live_lvals_info(set.init), "\t}\n")
     ],
 
Index: compiler/prog_data.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_data.m,v
retrieving revision 1.184
diff -u -b -r1.184 prog_data.m
--- compiler/prog_data.m	3 Jan 2007 07:20:36 -0000	1.184
+++ compiler/prog_data.m	4 Jan 2007 07:02:34 -0000
@@ -705,6 +705,10 @@
     proc_may_modify_trail.
 :- func get_may_call_mm_tabled(pragma_foreign_proc_attributes) =
     may_call_mm_tabled.
+:- func get_allocates_memory(pragma_foreign_proc_attributes) =
+    allocates_memory.
+:- func get_registers_roots(pragma_foreign_proc_attributes) =
+    registers_roots.
 :- func get_box_policy(pragma_foreign_proc_attributes) = box_policy.
 :- func get_extra_attributes(pragma_foreign_proc_attributes)
     = pragma_foreign_proc_extra_attributes.
@@ -761,6 +765,14 @@
     pragma_foreign_proc_attributes::in,
     pragma_foreign_proc_attributes::out) is det.
 
+:- pred set_allocates_memory(allocates_memory::in,
+    pragma_foreign_proc_attributes::in,
+    pragma_foreign_proc_attributes::out) is det.
+
+:- pred set_registers_roots(registers_roots::in,
+    pragma_foreign_proc_attributes::in,
+    pragma_foreign_proc_attributes::out) is det.
+
 :- pred set_box_policy(box_policy::in,
     pragma_foreign_proc_attributes::in,
     pragma_foreign_proc_attributes::out) is det.
@@ -824,9 +836,21 @@
 
 :- type affects_liveness
     --->    affects_liveness
-    ;       doesnt_affect_liveness
+    ;       does_not_affect_liveness
     ;       default_affects_liveness.
 
+:- type allocates_memory
+    --->    does_not_allocate_memory
+    ;       allocates_bounded_memory
+    ;       allocates_unbounded_memory
+    ;       default_allocates_memory.
+
+:- type registers_roots
+    --->    registers_roots
+    ;       does_not_register_roots
+    ;       does_not_have_roots
+    ;       default_registers_roots.
+
     % This type specifies the termination property of a procedure
     % defined using pragma c_code or pragma foreign_proc.
     %
@@ -1681,6 +1705,8 @@
                 attr_may_call_mm_tabled         :: may_call_mm_tabled,
                 attr_box_policy                 :: box_policy,
                 attr_affects_liveness           :: affects_liveness,
+                attr_allocates_memory           :: allocates_memory,
+                attr_registers_roots            :: registers_roots,
                 attr_extra_attributes ::
                     list(pragma_foreign_proc_extra_attribute)
             ).
@@ -1690,7 +1716,8 @@
         proc_not_tabled_for_io, purity_impure, depends_on_mercury_calls,
         no_user_annotated_sharing, default_exception_behaviour,
         no, no, proc_may_modify_trail, default_calls_mm_tabled,
-        native_if_possible, default_affects_liveness, []).
+        native_if_possible, default_affects_liveness,
+        default_allocates_memory, default_registers_roots, []).
 
 get_may_call_mercury(Attrs) = Attrs ^ attr_may_call_mercury.
 get_thread_safe(Attrs) = Attrs ^ attr_thread_safe.
@@ -1706,6 +1733,8 @@
 get_may_call_mm_tabled(Attrs) = Attrs ^ attr_may_call_mm_tabled.
 get_box_policy(Attrs) = Attrs ^ attr_box_policy.
 get_affects_liveness(Attrs) = Attrs ^ attr_affects_liveness.
+get_allocates_memory(Attrs) = Attrs ^ attr_allocates_memory.
+get_registers_roots(Attrs) = Attrs ^ attr_registers_roots.
 get_extra_attributes(Attrs) = Attrs ^ attr_extra_attributes.
 
 set_may_call_mercury(MayCallMercury, Attrs0, Attrs) :-
@@ -1736,6 +1765,10 @@
     Attrs = Attrs0 ^ attr_box_policy := BoxPolicyStr.
 set_affects_liveness(AffectsLiveness, Attrs0, Attrs) :-
     Attrs = Attrs0 ^ attr_affects_liveness := AffectsLiveness.
+set_allocates_memory(AllocatesMemory, Attrs0, Attrs) :-
+    Attrs = Attrs0 ^ attr_allocates_memory := AllocatesMemory.
+set_registers_roots(RegistersRoots, Attrs0, Attrs) :-
+    Attrs = Attrs0 ^ attr_registers_roots := RegistersRoots.
 
 attributes_to_strings(Attrs) = StringList :-
     % We ignore Lang because it isn't an attribute that you can put
@@ -1744,7 +1777,8 @@
     Attrs = attributes(_Lang, MayCallMercury, ThreadSafe, TabledForIO,
         Purity, Terminates, _UserSharing, Exceptions, _LegacyBehaviour,
         OrdinaryDespiteDetism, MayModifyTrail, MayCallMM_Tabled,
-        BoxPolicy, AffectsLiveness, ExtraAttributes),
+        BoxPolicy, AffectsLiveness, AllocatesMemory, RegistersRoots,
+        ExtraAttributes),
     (
         MayCallMercury = proc_may_call_mercury,
         MayCallMercuryStr = "may_call_mercury"
@@ -1828,25 +1862,53 @@
     ),
     (
         BoxPolicy = native_if_possible,
-        BoxPolicyStr = []
+        BoxPolicyStrList = []
     ;
         BoxPolicy = always_boxed,
-        BoxPolicyStr = ["always_boxed"]
+        BoxPolicyStrList = ["always_boxed"]
     ),
     (
         AffectsLiveness = affects_liveness,
-        AffectsLivenessStr = ["affects_liveness"]
+        AffectsLivenessStrList = ["affects_liveness"]
     ;
-        AffectsLiveness = doesnt_affect_liveness,
-        AffectsLivenessStr = ["doesnt_affect_liveness"]
+        AffectsLiveness = does_not_affect_liveness,
+        AffectsLivenessStrList = ["doesnt_affect_liveness"]
     ;
         AffectsLiveness = default_affects_liveness,
-        AffectsLivenessStr = []
+        AffectsLivenessStrList = []
+    ),
+    (
+        AllocatesMemory = does_not_allocate_memory,
+        AllocatesMemoryStrList =["doesnt_allocate_memory"]
+    ;
+        AllocatesMemory = allocates_bounded_memory,
+        AllocatesMemoryStrList = ["allocates_bounded_memory"]
+    ;
+        AllocatesMemory = allocates_unbounded_memory,
+        AllocatesMemoryStrList = ["allocates_unbounded_memory"]
+    ;
+        AllocatesMemory = default_allocates_memory,
+        AllocatesMemoryStrList = []
+    ),
+    (
+        RegistersRoots = registers_roots,
+        RegistersRootsStrList = ["registers_roots"]
+    ;
+        RegistersRoots = does_not_register_roots,
+        RegistersRootsStrList =["doesnt_register_roots"]
+    ;
+        RegistersRoots = does_not_have_roots,
+        RegistersRootsStrList = ["doesnt_have_roots"]
+    ;
+        RegistersRoots = default_registers_roots,
+        RegistersRootsStrList = []
     ),
     StringList = [MayCallMercuryStr, ThreadSafeStr, TabledForIOStr |
         PurityStrList] ++ TerminatesStrList ++ ExceptionsStrList ++
         OrdinaryDespiteDetismStrList ++ MayModifyTrailStrList ++
-        MayCallMM_TabledStrList ++ BoxPolicyStr ++ AffectsLivenessStr ++
+        MayCallMM_TabledStrList ++ BoxPolicyStrList ++
+        AffectsLivenessStrList ++
+        AllocatesMemoryStrList ++ RegistersRootsStrList ++
         list.map(extra_attribute_to_string, ExtraAttributes).
 
 add_extra_attribute(NewAttribute, Attributes0,
Index: compiler/prog_io_pragma.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/prog_io_pragma.m,v
retrieving revision 1.119
diff -u -b -r1.119 prog_io_pragma.m
--- compiler/prog_io_pragma.m	3 Jan 2007 07:20:36 -0000	1.119
+++ compiler/prog_io_pragma.m	4 Jan 2007 07:05:02 -0000
@@ -1495,7 +1495,9 @@
     ;       coll_may_modify_trail(proc_may_modify_trail)
     ;       coll_may_call_mm_tabled(may_call_mm_tabled)
     ;       coll_box_policy(box_policy)
-    ;       coll_affects_liveness(affects_liveness).
+    ;       coll_affects_liveness(affects_liveness)
+    ;       coll_allocates_memory(allocates_memory)
+    ;       coll_registers_roots(registers_roots).
 
 :- pred parse_pragma_foreign_proc_attributes_term(foreign_language::in,
     string::in, varset::in, term::in,
@@ -1542,16 +1544,30 @@
             coll_may_call_mm_tabled(may_call_mm_tabled),
         coll_box_policy(native_if_possible) - coll_box_policy(always_boxed),
         coll_affects_liveness(affects_liveness) -
-            coll_affects_liveness(doesnt_affect_liveness)
+            coll_affects_liveness(does_not_affect_liveness),
+        coll_allocates_memory(does_not_allocate_memory) -
+            coll_allocates_memory(allocates_bounded_memory),
+        coll_allocates_memory(does_not_allocate_memory) -
+            coll_allocates_memory(allocates_unbounded_memory),
+        coll_allocates_memory(allocates_bounded_memory) -
+            coll_allocates_memory(allocates_unbounded_memory),
+        coll_registers_roots(does_not_register_roots) -
+            coll_registers_roots(registers_roots),
+        coll_registers_roots(does_not_register_roots) -
+            coll_registers_roots(does_not_have_roots),
+        coll_registers_roots(registers_roots) -
+            coll_registers_roots(does_not_have_roots)
     ],
+    ( parse_pragma_foreign_proc_attributes_term0(Varset, Term, AttrList) ->
     (
-        parse_pragma_foreign_proc_attributes_term0(Varset, Term, AttrList)
-    ->
-        (
+            some [Conflict1, Conflict2] (
             list.member(Conflict1 - Conflict2, ConflictingAttributes),
             list.member(Conflict1, AttrList),
             list.member(Conflict2, AttrList)
+            )
         ->
+            % We could include Conflict1 and Conflict2 in the message,
+            % but the conflict is usually very obvious even without this.
             Msg = "conflicting attributes in attribute list",
             MaybeAttributes = error1([Msg - Term])
         ;
@@ -1599,6 +1615,10 @@
     set_box_policy(BoxPolicy, !Attrs).
 process_attribute(coll_affects_liveness(AffectsLiveness), !Attrs) :-
     set_affects_liveness(AffectsLiveness, !Attrs).
+process_attribute(coll_allocates_memory(AllocatesMemory), !Attrs) :-
+    set_allocates_memory(AllocatesMemory, !Attrs).
+process_attribute(coll_registers_roots(RegistersRoots), !Attrs) :-
+    set_registers_roots(RegistersRoots, !Attrs).
 
     % Check whether all the required attributes have been set for
     % a particular language
@@ -1675,6 +1695,10 @@
         Flag = coll_box_policy(BoxPolicy)
     ; parse_affects_liveness(Term, AffectsLiveness) ->
         Flag = coll_affects_liveness(AffectsLiveness)
+    ; parse_allocates_memory(Term, AllocatesMemory) ->
+        Flag = coll_allocates_memory(AllocatesMemory)
+    ; parse_registers_roots(Term, RegistersRoots) ->
+        Flag = coll_registers_roots(RegistersRoots)
     ;
         fail
     ).
@@ -1730,8 +1754,46 @@
         Functor = "affects_liveness",
         AffectsLiveness = affects_liveness
     ;
-        Functor = "doesnt_affect_liveness",
-        AffectsLiveness = doesnt_affect_liveness
+        ( Functor = "doesnt_affect_liveness"
+        ; Functor = "does_not_affect_liveness"
+        ),
+        AffectsLiveness = does_not_affect_liveness
+    ).
+
+:- pred parse_allocates_memory(term::in, allocates_memory::out) is semidet.
+
+parse_allocates_memory(Term, AllocatesMemory) :-
+    Term = term.functor(term.atom(Functor), [], _),
+    (
+        ( Functor = "doesnt_allocate_memory"
+        ; Functor = "does_not_allocate_memory"
+        ),
+        AllocatesMemory = does_not_allocate_memory
+    ;
+        Functor = "allocates_bounded_memory",
+        AllocatesMemory = allocates_bounded_memory
+    ;
+        Functor = "allocates_unbounded_memory",
+        AllocatesMemory = allocates_unbounded_memory
+    ).
+
+:- pred parse_registers_roots(term::in, registers_roots::out) is semidet.
+
+parse_registers_roots(Term, RegistersRoots) :-
+    Term = term.functor(term.atom(Functor), [], _),
+    (
+        Functor = "registers_roots",
+        RegistersRoots = registers_roots
+    ;
+        ( Functor = "doesnt_register_roots"
+        ; Functor = "does_not_register_roots"
+        ),
+        RegistersRoots = does_not_register_roots
+    ;
+        ( Functor = "doesnt_have_roots"
+        ; Functor = "does_not_have_roots"
+        ),
+        RegistersRoots = does_not_have_roots
     ).
 
 :- pred parse_tabled_for_io(term::in, proc_tabled_for_io::out) is semidet.
Index: compiler/trace_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_gen.m,v
retrieving revision 1.13
diff -u -b -r1.13 trace_gen.m
--- compiler/trace_gen.m	6 Jan 2007 09:23:55 -0000	1.13
+++ compiler/trace_gen.m	6 Jan 2007 10:04:26 -0000
@@ -624,7 +624,7 @@
         TraceStmt1 = FillSlotsUptoTrail
     ),
     TraceComponents1 = [foreign_proc_raw_code(cannot_branch_away,
-        doesnt_affect_liveness, live_lvals_info(set.init), TraceStmt1)],
+        does_not_affect_liveness, live_lvals_info(set.init), TraceStmt1)],
     TraceCode1 = node([
         llds_instr(foreign_proc_code([], TraceComponents1,
             proc_will_not_call_mercury, no, no, MaybeLayoutLabel, no, yes, no),
@@ -644,7 +644,7 @@
         stackref_to_string(CallTableLval, CallTableLvalStr),
         TraceStmt3 = "\t\t" ++ CallTableLvalStr ++ " = 0;\n",
         TraceComponents3 = [foreign_proc_raw_code(cannot_branch_away,
-            doesnt_affect_liveness, live_lvals_info(set.init), TraceStmt3)],
+            does_not_affect_liveness, live_lvals_info(set.init), TraceStmt3)],
         TraceCode3 = node([
             llds_instr(foreign_proc_code([], TraceComponents3,
                 proc_will_not_call_mercury, no, no, no, no, yes, no), "")
@@ -672,7 +672,7 @@
         ),
         ResetStmt = MacroStr ++ "(" ++ CallDepthStr ++ ");\n",
         TraceCode = node([
-            llds_instr(arbitrary_c_code(doesnt_affect_liveness,
+            llds_instr(arbitrary_c_code(does_not_affect_liveness,
                 live_lvals_info(set.init), ResetStmt), "")
         ])
     ;
@@ -921,7 +921,7 @@
         true
     ),
     TraceComponents = [foreign_proc_raw_code(cannot_branch_away,
-        doesnt_affect_liveness, live_lvals_info(LiveLvalSet), TraceStmt)],
+        does_not_affect_liveness, live_lvals_info(LiveLvalSet), TraceStmt)],
     TraceCode =
         node([
             llds_instr(label(Label),
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
Index: doc/reference_manual.texi
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/reference_manual.texi,v
retrieving revision 1.376
diff -u -b -r1.376 reference_manual.texi
--- doc/reference_manual.texi	3 Jan 2007 11:22:33 -0000	1.376
+++ doc/reference_manual.texi	4 Jan 2007 11:21:21 -0000
@@ -6379,17 +6379,37 @@
 procedures that @samp{may_call_mercury}, in case none is specified, is
 @samp{may_call_mm_tabled}.
 
- at item @samp{affects_liveness/doesnt_affect_liveness}
+ at item @samp{affects_liveness/does_not_affect_liveness}
 This attribute declares whether or not a foreign procedure
 uses and/or modifies any part of the Mercury virtual machine
 (registers, stack slots)
 through means other than its arguments.
 The @samp{affects_liveness} attribute says that it does;
-The @samp{doesnt_affect_liveness} attribute says that it does not.
+The @samp{does_not_affect_liveness} attribute says that it does not.
 In the absence of either attribute,
 the compiler assumes @samp{affects_liveness},
 unless the code of the foreign_proc in question is empty.
 
+ at c @item
+ at c @samp{does_not_allocate_memory/allocates_bounded_memory/allocates_unbounded_memory}
+ at c This attribute declares whether a foreign procedure
+ at c allocates any memory on the Mercury heap,
+ at c and if it does, whether the amount allocated
+ at c is guaranteed to be smaller than the bound given
+ at c by the reserve space of the native garbage collector.
+
+ at c @item
+ at c @samp{registers_roots/does_not_register_roots/does_not_have_roots}
+ at c This attribute declares whether a foreign procedure
+ at c registers with the native garbage collector
+ at c all the root pointers it accesses.
+ at c This must always include
+ at c all global variables maintained by the foreign procedure.
+ at c If the foreign procedure may call Mercury,
+ at c it must also include any storage location in which
+ at c the foreign procedure stores roots before any call to Mercury
+ at c (since a gc may take place during such a call).
+
 @c @item @samp{no_sharing/unknown_sharing/sharing(MaybeTypes, SharingList)}
 @c This attribute declares whether or not a foreign procedure creates any
 @c structure sharing @ref{Structure sharing analysis} between its input
cvs diff: Diffing extras
cvs diff: Diffing extras/base64
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/stream/tests
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list