Age | Commit message (Collapse) | Author |
|
A record field type has been modified due to commit 8ce35b2:
"Take out automatic insertion of 'undefined' from typed record fields".
|
|
|
|
Attributes must be literals. Since 1fcdcd50, both core_parse and
v3_core guarantees all Core Erlang terms that may be represented as
literals in fact are represented as literals.
Therefore, we no longer need to call core_lib:is_literal/1, but
can test for a #c_literal{} directly.
|
|
|
|
Only exit BIFs and the match_fail primop are allowed to run where more than one
value is expected.
|
|
All expressions but calls and primops are now checked for return mismatches.
|
|
Not all calls to the erlang module are legal guards in Core Erlang.
|
|
Simplify compiler internals and parsing of core format.
|
|
|
|
Commit 60984ade updated the code, but not the type spec.
Noticed-by: Kostis Sagonas
|
|
ErrorInfo is documented to be:
{ErrorLine,Module,ErrorDescriptor}
but for some errors with line numbers it would look like:
{Module,ErrorDescriptor}
Ensure that all ErrorInfo tuples have three elements. Use 'none'
instead of a line number:
{none,Module,ErrorDescriptor}
There already are errors that return 'none' when no line number is
available, but that convention was not documented. Mention it in the
documentation.
Also make sure that the compiler will not print 'none' as a line
number in error messages (if the 'report_errors' option is given) as
that looks stupid. That is, when attempting to compile a non-existing
module, the error message should be:
non-existing.erl: no such file or directory
and not:
non-existing.erl:none: no such file or directory
|
|
It does not make sense to return multiple values from a sequence
argument and the Kernel Erlang passes can't cope with it.
The linting pass now knows how to detect this kind of defunct code and
the Core code folding pass is changed to not generate code like that
when optimizing away multiple-valued lets in effect mode.
Reported-by: José Valim
|
|
|
|
Local fun variables are disallowed in both Erlang and Core Erlang guards
but core_lint doesn't detect this kind of error, making the compilation
fail later in the BEAM assembly generation. A guard is added to only
allow #c_var{} terms where the name is an atom or an integer, which is
the type used by the inliner when introducing new variables.
|
|
Silence the Dialyzer warning introduced in commit
7b283aa9507b45f2cd403b061ad92ab059fb71b5.
|
|
|
|
|