[m-rev.] diff: fix mantis bug 368
Julien Fischer
jfischer at opturion.com
Sat Feb 7 01:50:13 AEDT 2015
On Fri, 6 Feb 2015, Zoltan Somogyi wrote:
> On Fri, 06 Feb 2015 17:12:11 +1100 (EST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
>> It seems in both grades the reset clause is added twice,
>> but with different variable names :-(, and thus probably
>> in two different places in the compiler. This means my recent
>> diff probably stepped on an earlier workaround.
>
> The problem wasn't a workaround, but this comma vs period bug:
>
> diff --git a/compiler/ctgc.selector.m b/compiler/ctgc.selector.m
> index c4ab16f..b70a30e 100644
> --- a/compiler/ctgc.selector.m
> +++ b/compiler/ctgc.selector.m
> @@ -524,7 +524,7 @@ branch_map_search([Type - Sel | TypeSels], KeyType, ValueSel):-
>
> reset_tables(!IO) :-
> table_reset_for_type_contains_subtype_1_4(!IO),
> - table_reset_for_type_arg_types_3(!IO).
> + table_reset_for_type_arg_types_3(!IO),
> table_reset_for_normalize_selector_with_type_information_4(!IO).
>
> The last line was a clause defining the aux predicate that is now defined
> automatically by add_mutable_aux_preds.m. For C, it defines the predicate
> using a foreign_proc, which overrides the clause. For the other backends,
> the automatically generated clause had this stray clause added to it,
> leading to the error.
>
> I am committing the fix.
Thanks Zoltan. I've retested building the compiler in the non-C grades
and both this problem and the original bug are fixed. (There are some
unrelated build system issues that prevent everything from building
in the Erlang grade; both the C# and Java grades are fine.)
Cheers,
Julien.
More information about the reviews
mailing list