[m-rev.] for post-commit review: inline union_deps
Peter Wang
novalazy at gmail.com
Fri Dec 2 14:46:45 AEDT 2022
On Thu, 01 Dec 2022 20:52:38 +1100 "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> Inline all (higher-order) calls to union_deps.
>
> compiler/make.dependencies.m:
> Most calls to deps_set_foldl3_maybe_stop_at_error_{mi,fi} call them
> with closures that package up the union_deps predicate or its
> union_deps_plain_set. Create new versions of these predicates that
> in effect
>
> - replace the higher order call to the closure argument with a first order
> call to union_deps or union_deps_plain_set, and then
> - inline the call.
>
> This reduces the height of the higher-order upon higher-order stack by one.
>
> It also deletes the last remaining calls to union_deps and to
> union_deps_plain_set, so this diff deletes them.
>
> The new versions completely replace all uses of
> deps_set_foldl3_maybe_stop_at_error_mi, so delete that predicate.
>
> Move two local types to the top of the implementation section.
> Before this diff, they were defined *after* their first use.
>
> Note the need for documentation.
>
> compiler/make.module_target.m:
> Eliminate a reference to union_deps here as well.
That's fine.
Peter
More information about the reviews
mailing list