[erlang-bugs] parameterised types for orddict:is_key/1
Thorsten Schütt
schuett@REDACTED
Tue Jun 9 10:01:59 CEST 2015
I am really sorry for the noise. I can confirm that the problem is gone on the current master.
We are building Erlang from the master every night and run our test-suite against the master. In the given version, we noticed a different kind of var (without a line number). But it seems to have disappeared by now.
Thorsten
> On 08 Jun 2015, at 18:59, Kostis Sagonas <kostis@REDACTED> wrote:
>
> On 06/08/2015 04:16 PM, Thorsten Schütt wrote:
>> Hi Hans,
>>
>> we parse all beam files with beam_lib:chunks, which are reachable from the Scalaris code. With the mentioned commit, we hit for the first time this variant of var. When I looked through the rest of the standard library there are indeed both versions. It is just by accident that we saw this variant of var for the first time at this commit.
>
> You are not making it easy for us to understand and possibly also reproduce what you are experiencing. For example, in the current 'master' the following sequence of commands produce what is shown below:
>
> Eshell V7.0 (abort with ^G)
> 1> cd('lib/stdlib/ebin').
> /home/kostis/HiPE/otp/lib/stdlib/ebin
> ok
> 2> {ok, {_, [{_, {_,A}}]}} = beam_lib:chunks(orddict, [abstract_code]).
> {ok,{orddict,[{abstract_code,{raw_abstract_v1,[{attribute,1,
> ... MANY MORE LINES DELETED ...
> 3> lists:keyfind(42, 2, A).
> {attribute,42,spec,
> {{is_key,2},
> [{type,42,bounded_fun,
> [{type,42,'fun',
> [{type,42,product,[{var,42,'Key'},{var,42,'Orddict'}]},
> {type,42,boolean,[]}]},
> [{type,43,constraint,
> [{atom,43,is_subtype},
> [{var,43,'Orddict'},
> {user_type,43,orddict,
> [{var,43,...},{ann_type,...}]}]]}]]}]}}
>
>
> I do not see any 'var' structure without line information in the above. (or different kinds of 'var' structures.)
>
> Do you get something different? If so, what commands are you using?
>
> Kostis
>
>>
>>> On 08 Jun 2015, at 15:49, Hans Bolinder <hans.bolinder@REDACTED> wrote:
>>>
>>> Hi,
>>>
>>>> did the following commit introduce a new element to the abstract
>>>> representation of Erlang? Or is it the first occurrence of {var,
>>>> ¡Variablename¢} without a line number? All other occurrences of
>>>> variables have the form {var, LineNumber, ¡Variablename¢}.
>>>>
>>>> Commit:
>>>> https://github.com/erlang/otp/commit/966e9e7ed0951db306c3c5dc4b1fd4c6eac25cf9
>>>
>>> Not that I know of.
>>>
>>> When compiling the commit you're referring to, I cannot see the same
>>> abstract representation as you do (I'm using beam_lib:chunks()).
>>> I've asked Kostis and some colleagues, and they can't either. How did
>>> you create the the file?
>>>
>>> Best regards,
>>>
>>> Hans Bolinder, Erlang/OTP team, Ericsson
>>
>> _______________________________________________
>> erlang-bugs mailing list
>> erlang-bugs@REDACTED
>> http://erlang.org/mailman/listinfo/erlang-bugs
>>
>
More information about the erlang-bugs
mailing list