[m-rev.] for review: Disallow closures with partially instantiated direct arg arguments.

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Apr 15 17:06:09 AEST 2021


2021-04-15 17:02 GMT+10:00 "Peter Wang" <novalazy at gmail.com>:
> +            % We did allow a closure to be constructed from a clone procedure,
> +            % but that leaves the HLDS in an inconsistent state, e.g. the type
> +            % and inst of the closure variable needs to be updated for the
> +            % extra arguments, and it gets a lot more complicated than that.
> +            % While the float registers pass is the only part of the compiler
> +            % known to break on the inconsistency, that may only be due to the
> +            % the rarity of higher order terms with daio arguments. Leaving the
> +            % HLDS in an inconsistent state is a bad idea anyway.

Please add a reference to the date of the discussion.

> +            sorry($pred,
> +                "cannot construct closure with partially-instantiated " ++
> +                "direct_arg arguments")

An error message is preferable to a compiler abort, but this situation is so rare
that for now, it is ok.

The diff is otherwise fine. Thanks.

Zoltan.


More information about the reviews mailing list