[erlang-patches] Forbid local fun names in Core Erlang guards

Anthony Ramine n.oxyde@REDACTED
Wed Jan 16 14:47:10 CET 2013


Oops.

I was simply trying to replicate this in my rm-reverse-eta-conversion branch.

Will investigate on the proper branch now.

Regards,

-- 
Anthony Ramine

Le 16 janv. 2013 à 14:29, Anthony Ramine a écrit :

> Thanks for the details.
> 
> I'll rebase against current master and try again, line 428 of compilation_SUITE
> can't fail that way in my current branch.
> 
> -- 
> Anthony Ramine
> 
> Le 16 janv. 2013 à 14:24, Fredrik a écrit :
> 
>> It was not the bootstrap, I think you have to take a look at those testcases,
>> Here's the reason's:
>> compilation_SUITE:self_compile_1
>>     failed on line 428
>>     Reason: suite_failed
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> inline_SUITE:try_inline failed on line 117
>>     Reason: {badmatch,error}
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> inline_SUITE:try_inline
>>     failed on line 117
>>     Reason: {badmatch,error}
>> 
>> 
>> BR Fredrik Gustafsson
>> Erlang OTP Team
>> On 01/16/2013 12:02 PM, Anthony Ramine wrote:
>>> I can't reproduce any of these failures.
>>> 
>>> Could I have more informations about how they failed?
>>> 
>>> My wild guess is that it is related (maybe) to the bootstrap compiler,
>>> but I'm probably wrong.
>>> 
>>> Björn, any idea?
>>> 
>>> Regards,
>>> 
>>> 
>>> -- 
>>> Anthony Ramine
>>> 
>>> Le 16 janv. 2013 à 11:46, Fredrik a écrit :
>>> 
>>> 
>>>>> 
>>>> Hello Anthony,
>>>> 
>>>>> 
>>>> Your patch is failing the following testsuites and testcases:
>>>> 
>>>>> 
>>>> compilation_SUITE : self_compile
>>>> 
>>>>> 
>>>> inline_SUITE : decode1
>>>> 
>>>>> 
>>>> inline_SUITE : pseudoknot
>>>> 
>>>>> 
>>>>> 
>>>> Please correct and give me notice,
>>>> 
>>>>> 
>>>>> 
>>>> BR Fredrik Gustafsson
>>>> 
>>>>> 
>>>> Erlang OTP Team
>>>> 
>>>>> 
>>>> On 01/15/2013 11:40 AM, Fredrik wrote:
>>>> 
>>>>>>> Hello Anthony ;)
>>>>>>> 
>>>>> It is now in the 'master-pu' branch.
>>>>> 
>>>>>>> 
>>>>> Thanks,
>>>>> 
>>>>>>> 
>>>>>>> 
>>>>> BR Fredrik Gustafsson
>>>>> 
>>>>>>> 
>>>>> Erlang OTP Team
>>>>> 
>>>>>>> 
>>>>> On 01/15/2013 11:28 AM, Anthony Ramine wrote:
>>>>> 
>>>>>>>>> 
>>>>>> Repost on only erlang-patches so that Fredrik's MUA see it;)
>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>>>>>> -- Anthony Ramine Début du message réexpédié :
>>>>>> 
>>>>>>>>>>>>> De : Anthony Ramine<n.oxyde@REDACTED>
>>>>>>>>>>>>> 
>>>>>>>> Objet : Rép : Local function names in Core Erlang guards
>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>> Date : 11 janvier 2013 17:12:37 HNEC
>>>>>>>> 
>>>>>>>>>>>>> À : erlang-bugs Bugs<erlang-bugs@REDACTED>, erlang patches<erlang-patches@REDACTED>
>>>>>>>>>>>>> Cc : Bjorn Gustavsson<bjorn@REDACTED>
>>>>>>>>>>>>>>> 
>>>>>>>>> Hi,
>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>> I wrote a really small patch to forbid local fun variables in Core Erlang guards.
>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>> There is no test case as there is no test suite for core_lint.
>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>> I know the code freeze for R16 is soon but this is really a very small thing.
>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>>    git fetchhttps://github.com/nox/otp.git  forbid-locals-in-core-guards
>>>>>>>>> 
>>>>>>>>>>>>>>>    https://github.com/nox/otp/compare/erlang:master...forbid-locals-in-core-guards
>>>>>>>>>>>>>    https://github.com/nox/otp/compare/erlang:master...forbid-locals-in-core-guards.patch
>>>>>>>>>>>>>>> 
>>>>>>>>> Regards,
>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>> -- >  Anthony Ramine
>>>>>>>>> 
>>>>>>>>>>>>>>> 
>>>>>>>>> Le 19 nov. 2012 à 11:02, Anthony Ramine a écrit :
>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>> Hi,
>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>> While patching the compiler to allow substitutions of variables which values are
>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>> local function names [1], I discovered that core_lint doesn't forbid them in guards,
>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>> even though that makes the compiler passes further down the road generate badly-formed
>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>> BEAM code.
>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>> Is that a bug in core_lint or a bug in the BEAM code generation? Should local function
>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>> names be allowed in guards?
>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>> If it is a bug in core_lint, I can make a patch for that; if it is a bug in the BEAM
>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>> code generation I would love to fix it and remove the code I wrote to avoid the
>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>> substitution in guards... but I lack knowledge about the BEAM innards.
>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>> Regards,
>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> [1]http://erlang.org/pipermail/erlang-patches/2012-November/003137.html
>>>>>>>>>>>> 
>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>> -- >>  Anthony Ramine
>>>>>>>>>>>> 
>>>>>>>>>>>>>>>>> 
>>>>>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>> _______________________________________________
>>>>> 
>>>>>>> 
>>>>> erlang-patches mailing list
>>>>> 
>>>>>>> erlang-patches@REDACTED
>>>>>>> http://erlang.org/mailman/listinfo/erlang-patches
>>>>> 
>> 
> 




More information about the erlang-patches mailing list