Age | Commit message (Collapse) | Author |
|
Coverage removed by literals.
|
|
* nox/maps-v3_core-lit_vars:
Properly collect variables in map expressions in v3_core
|
|
* bjorn/compiler/utf8-warning/OTP-11791:
Don't fail compilation for modules that contain invalid UTF-8
epp: Make it possible to specify a default encoding
|
|
The default encoding for Erlang modules is now UTF-8, and the
compilation would fail if a module contained byte sequences that
are not valid UTF-8 sequences.
In a large project with say many hundreds of Erlang modules
with names of developers such as "Björn" or "Håkan" encoded in
latin-1, that could mean that many hundreds of files would need
to be modified just to get started testing OTP 17.
As a temporary measure to ease the transition, automatically
fall back to the latin-1 encoding with a warning for any module
that contains invalid byte sequences and for which no encoding
has been specified.
The intention is to remove this workaround in OTP 18 or 19.
|
|
Reported-by: José Valim
|
|
Ex.
Instead of:
M~{~<K,V>}~
The format is now:
~{~<K,V>|M}~
This also removes a shift/reduce warning.
The changes in core_pp now requires compiler-5.0 to compile
because of is_map/1 guard, i.e. a need for a compiler with Maps know-how.
|
|
* nox/compiler/beam_bool-mixed-boolean:
Properly detect reused boolean values in beam_bool
|
|
Boolean case expressions with redundant clauses could make the compiler
crash:
case X == 0 of
false -> no;
false -> no;
true -> yes
end.
Reported-by: Ulf Norell
|
|
The following code could crash the compiler:
f(X = true) when X or true or X -> ok.
Reported-by: Ulf Norell
|
|
* nox/maps-beam_jump-put_map:
Properly collect labels in put_map instructions in beam_jump
|
|
* nox/maps-cerl_clauses:
Support maps in cerl_clauses:match/2
|
|
* nox/maps-beam_jump:
Properly check label use in get_map_elements in beam_jump
|
|
* nox/maps-v3_codegen-sort-nil-keys:
Properly sort map pairs in v3_codegen
|
|
* nox/maps-complex-mixed-values:
Properly order Kernel code for maps with mixed pairs
|
|
* nox/compiler/v3_core-comprehension-no-export:
Do not export variables from comprehension cases in v3_core
OTP-11770
|
|
* nox/compiler/beam_bool-not_boolean_expr:
Compile BIF calls and operator expressions to Core the same way
Do not try to optimize non-boolean guards
|
|
Reported-by: Ulf Norell
|
|
* nox/compiler/beam_bool-bad-protected:
Properly detect nonboolean protected expressions in beam_bool
|
|
* nox/compiler/live_opt-wait_timeout-nil:
Handle nil as a wait_timeout argument in beam_utils:live_opt/4
|
|
* nox/compiler/sys_core_fold-erlang-is_function-2:
Do not mark all calls to erlang:is_function/2 as safe
|
|
Code like the following snippet could make the compiler crash:
f() -> [X = a || false] ++ [X = a || false].
Reported-by: Ulf Norell
|
|
Expressions such as erlang:'or'(bar, true) can make beam_bool crash if it tries
to optimize them, as this code is not quite really written by users, no attempt
to rewrite them more efficiently should be done, for simplicity's sake.
Reported-by: Ulf Norell
|
|
Reported-by: Ulf Norell
|
|
Without this, sys_core_fold could crash on non-matching clauses using maps
patterns.
Reported-by: Ulf Norell
|
|
The Kernel instructions were not properly ordered when compiling maps with
complex values mixed in assoc and exact pairs.
Reported-by: Ulf Norell
|
|
Literal nil values aren't tagged tuple but the bare atom nil.
The function lists:sort/2 expects the passed function to return true if the first
element is less than or equal to the second, not strictly less than. The original
base clause is changed accordingly.
Reported-by: Ulf Norell
|
|
* nox/maps-fix-beam_bool-put_map:
Properly collect labels in put_map instructions in beam_bool
|
|
* nox/maps-expand-update:
Fix expansion of map update arguments
|
|
* nox/compiler/v3_core-mismatched-apply:
Do not emit blatantly illformed Core Erlang apply expressions
|
|
Reported-by: Ulf Norell
|
|
Silly code such as the following could make the compiler crash:
f() when erlang:float(self()); true -> ok.
Reported-by: Ulf Norell
|
|
Reported-by: Ulf Norell
|
|
Calls to erlang:is_function/2 where the second is not a literal nonnegative
integer can crash at runtime and thus can't be marked as safe.
|
|
Calls to erlang:is_record/3 where the second and third arguments are not
respectively a literal atom and a literal integer can't be transformed to guards
and thus are not safe.
Reported-by: Ulf Norell
|
|
(fun f/1)() should be compiled to let X = 'f'/1 in apply X () to let the compiler
properly generate code that will fail with badarity at runtime.
Reported-by: Ulf Norell
|
|
Reported-by: José Valim
|
|
* egil/maps/fix-cerl-inlining:
compiler: Update map_SUITE to handle inlining
erts: Maps src instructions can't be literals
compiler: Fix map inlining
compiler: Add variable coverage of map in cerl
|
|
* schlagert/fix_basic_appups:
Dynamically configure typer_SUITE according to environment
Disable hipe_SUITE when environment doesn't support it
Make hipe non-upgradable by setting appup file empty
Fix missing module on hipe app file template
Add test suites performing app and appup file checks
Introduce appup test utility
Fix library application appup files
Fix non-library appup files according to issue #240
OTP-11744
|
|
Add the mentioned test suites for *all* library and touched
non-library applications.
|
|
|
|
Added coverage of operating map variable.
|
|
* egil/compiler/maps-get_map_elements:
compiler: Strengthen Maps compile tests
compiler: Remove dead warning
erts: Fix erts_debug:disassemble/1
compiler: Transform list of Args to exact literal type
compiler: Test Maps aliasing
compiler: Use aliasing in map pair patterns
compiler: Check literal order in beam_validator
erts: Introduce new instructions for combined key fetches
compiler: Change map instructions for fetching values
|
|
|
|
|
|
* bjorn/compiler/optimizations/OTP-11584:
Teach sys_core_fold:eval_case/2 to cope with handwritten Core Erlang
sys_core_fold: Remove a redundant word in a comment
|
|
Starting in e12b7d5331c58b41db06cadfa4af75b78b62a2b1,
sys_core_fold:eval_case/2 will crash on handwritten but legal
Core Erlang programs such as:
case let <Var> = Arg in {'x',Var} of
{x,X} -> X
end
The problem is that the only clause *is* guaranteed to match, but
cerl_clauses:match_list/2 does not understand that; all it can say is
that the clause *may* match. In those circumstances, we will need to
keep the case.
Also make sure that we keep the case if the guard is something else
than 'true'. That is not strictly necessary, because in a legal Core
Erlang program the guard in the last clause in a case must always
evaluate to 'true', so removing the guard test would still leave the
program correct. Keeping the guard, however, will make it somewhat
easier to debug an incorrect Core Erlang program. (The unsafe_case
test case has guard test in the only clause in a case, so we don't
need to write a new test case to test that.)
Reported-by: Anthony Ramine
|
|
* egil/compiler/maps-fix-sys_core_fold:
compiler: Fix sys_core_fold let optimization
compiler: Add debug listing after sys_core_fold
|
|
* egil/compiler/maps-fix-codegen:
compiler: Fix codegen multiple updates for Maps
erts,compiler: Correct and amend tests for Maps
|
|
Map variable was not covered and faulty optimization could occur.
Ex.
t() ->
M0 = id(#{ "a" => 1 }),
#{ "a" := _ } = M0,
M0#{ "a" := b }.
M0 was lost in let expression optimization.
|
|
Faulty test for maps update
|