[m-rev.] diff: minor improvements to builtin, private_builtin
Julien Fischer
jfischer at opturion.com
Fri Aug 1 22:58:41 AEST 2025
On Fri, 1 Aug 2025 at 02:19, Zoltan Somogyi <zoltan.somogyi at runbox.com> wrote:
>
> This should not need review.
It broke the ROTD builds, it's getting a review ;-)
> Minor improvements to builtin modules.
>
> library/builtin.m:
> library/private_builtin.m:
> Abort if a predicate intended only for C is used
> when targeting Java or C#.
>
> Fix obsolete module qualifier and obsolete comments.
>
> Improve english and indentation in comments.
...
> diff --git a/library/private_builtin.m b/library/private_builtin.m
> index ca5baac96..9677e33ca 100644
> --- a/library/private_builtin.m
> +++ b/library/private_builtin.m
> @@ -1608,7 +1605,14 @@ nyi_foreign_type_compare(Result, _, _) :-
> ").
>
> unify_remote_arg_words(_, _, _, _) :-
> - semidet_fail.
> + % This predicate should only ever be called when targeting C,
> + % in which case, its definition will the foreign_proc above,
will *be* the foreign_proc
> + % not this clause.
> + ( if semidet_fail then
> + true
> + else
> + error("unify_remote_arg_words called")
> + ).
unify_remote_arg_words is semidet. The new body you have added
is det, which breaks complilation in the non-C grades.
> @@ -1636,6 +1640,9 @@ unify_remote_arg_words(_, _, _, _) :-
> ").
>
> compare_remote_uint_words(_, _, _, _, Result) :-
> + % This predicate should only ever be called when targeting C,
> + % in which case, its definition will the foreign_proc above,
Again, will *be* the foreign_proc. And in other spots throughout
this diff.
Julien.
More information about the reviews
mailing list