aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/core_lint.erl
AgeCommit message (Collapse)Author
2018-06-18Update copyright yearHenrik Nord
2018-04-18core_lint: Handle repeated variables in map patterns correctlyBjörn Gustavsson
Keys in map patterns are input variables, not pattern variables.
2017-12-04Fix number of values for 'after infinity' clauseBjörn Gustavsson
We used to not care about the number of values returned from the 'after infinity' clause in a receive (because it could never be executed). It is time to start caring because this will cause problem when we will soon start to do some more aggressive optimizizations.
2015-10-09Update CompilerHans Bolinder
A record field type has been modified due to commit 8ce35b2: "Take out automatic insertion of 'undefined' from typed record fields".
2015-06-18Change license text to APLv2Bruce Yinhe
2015-02-12core_lint: Eliminate call to core_lib:is_literal/1Björn Gustavsson
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.
2014-08-07Remove obsolete comment in core_lintAnthony Ramine
2014-08-07Handle return mismatches for calls and primopsAnthony Ramine
Only exit BIFs and the match_fail primop are allowed to run where more than one value is expected.
2014-08-07Check for more return mismatchesAnthony Ramine
All expressions but calls and primops are now checked for return mismatches.
2014-03-04Properly lint calls in Core Erlang guardsAnthony Ramine
Not all calls to the erlang module are legal guards in Core Erlang.
2014-01-29compiler: Squash #c_map_pair_*{} to #c_map_pair{}Björn-Egil Dahlberg
Simplify compiler internals and parsing of core format.
2014-01-28compiler: Teach Maps understanding to inlinerBjörn-Egil Dahlberg
2013-09-09core_lint: Correct the type error() to conform to the codeBjörn Gustavsson
Commit 60984ade updated the code, but not the type spec. Noticed-by: Kostis Sagonas
2013-09-05compiler: Conform returned errors to the documented formatBjörn Gustavsson
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
2013-02-03Forbid multiple values in Core Erlang sequence argumentsAnthony Ramine
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
2013-01-25Update copyright yearsBjörn-Egil Dahlberg
2013-01-16Forbid local fun variables in Core Erlang guardsAnthony Ramine
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.
2010-10-08core_lint: Fix the err_desc() type specBjörn Gustavsson
Silence the Dialyzer warning introduced in commit 7b283aa9507b45f2cd403b061ad92ab059fb71b5.
2010-10-07core_lint: Enforce that tail segments only occur at the endBjörn Gustavsson
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP