[m-rev.] diff: no_type_info_builtin documentation

Zoltan Somogyi zs at cs.mu.OZ.AU
Mon Oct 20 10:27:42 AEST 2003

	Clarity the documentation of no_type_info_builtin.


cvs diff: Diffing .
Index: hlds_pred.m
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.129
diff -u -b -r1.129 hlds_pred.m
--- hlds_pred.m	19 Sep 2003 11:10:02 -0000	1.129
+++ hlds_pred.m	19 Oct 2003 13:30:39 -0000
@@ -1965,14 +1965,18 @@
 :- pred non_special_body_should_use_typeinfo_liveness(globals::in,
 	bool::out) is det.
-	% unsafe_type_cast and unsafe_promise_unique are polymorphic
-	% builtins which do not need their type_infos. unsafe_type_cast
-	% can be introduced by common.m after polymorphism is run, so it
-	% is much simpler to avoid introducing type_info arguments for it.
-	% Since both of these are really just assignment unifications, it
-	% is desirable to generate them inline.
-	% There are also some predicates in private_builtin.m to
-	% manipulate typeclass_infos which don't need their type_infos.
+	% Some predicates that operate on polymorphic values do not need
+	% the type_infos describing the types bound to the variables.
+	% It is of course faster not to pass type_infos to such predicates
+	% (especially since may also be able to avoid constructing those
+	% type_infos), and it can also be easier for a compiler module
+	% (e.g. common.m, size_prof.m) that generates calls to such predicates
+	% not to have to create those type_infos.
+	%
+	% All the predicates for whose names no_type_info_builtin succeeds
+	% are defined by compiler implementors. They are all predicates
+	% implemented by foreign language code in the standard library.
+	% For some, but not all, the compiler generates code inline.
 :- pred no_type_info_builtin(module_name::in, string::in, int::in) is semidet.
 	% If the procedure has a input/output pair of io__state arguments,
cvs diff: Diffing notes
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