[erlang-patches] Possible BEAM compiler patch

Björn Gustavsson bgustavsson@REDACTED
Sun Jul 25 15:23:14 CEST 2010


On Thu, Jun 24, 2010 at 12:49 PM, Martti Kuparinen
<martti.kuparinen@REDACTED> wrote:
> Hi,
>
> The NetBSD pkgsrc has this patch (pkgsrc/lang/erlang/patches/patch-ah)
>
>
> --- lib/compiler/src/v3_codegen.erl.orig        2008-02-05
> 08:37:35.000000000 -0
> 500
> +++ lib/compiler/src/v3_codegen.erl
> @@ -1481,6 +1481,8 @@ cg_binary_size_1([], Bits, Acc) ->
>     Sizes = filter(fun({_,{integer,0}}) -> false;
>                      (_) -> true end, Sizes0),
>     case Sizes of
> +       [] ->
> +           {bs_init2,[{integer,0}]};
>        [{1,_}|_] ->
>            {bs_init_bits,cg_binary_bytes_to_bits(Sizes, [])};
>        [{8,_}|_] ->
>
>
> but I don't know it that makes any sense or not. Could someone from the
> compiler team look at this and say if I should nuke this or submit a
> proper patch request so it can be included in the pu branch...
>

Thanks! It makes sense. Please include a test case in the patch
to ensure that the new clause will be tested.

-- 
Björn Gustavsson, Erlang/OTP, Ericsson AB


More information about the erlang-patches mailing list