Age | Commit message (Collapse) | Author |
|
* maint:
Fix compiler crash when compiling some receive statements
|
|
bjorng/bjorn/compiler/fix-receive-bug/ERL-1022/OTP-15982
Fix compiler crash when compiling some receive statements
|
|
The compiler would crash when compiling the following code:
do(Acc) ->
receive
{Pid, abc} ->
ok;
{Pid, []} ->
ok;
{Pid, _Res} ->
exit(_Res)
end,
do([Pid | Acc]).
The last clause that always raises an exception would confuse the
compiler so that it would think that the `receive` statement was at the
end of the function and it would generate incorrect code for the `do/1`
call following the `receive`.
https://bugs.erlang.org/browse/ERL-1022
|
|
* maint:
erts: Create heap binaries in binary:split/2-3
erts: Create heap binaries in binary_part/2-3
erts: Create heap binaries in split_binary/2
erts: Create heap binaries in bs_get_binary2
erts: Remove size check in bs_start_match
erts: Disallow binaries whose size in bits exceeds UWORD_MAX
|
|
* john/erts/bs_get_binary2-heap-binaries/OTP-15977:
erts: Create heap binaries in binary:split/2-3
erts: Create heap binaries in binary_part/2-3
erts: Create heap binaries in split_binary/2
erts: Create heap binaries in bs_get_binary2
erts: Remove size check in bs_start_match
erts: Disallow binaries whose size in bits exceeds UWORD_MAX
|
|
* maint:
Correct dump_log_write_threshold default value
|
|
Correct documentation on dump_log_write_threshold default value
|
|
* maint:
Handle clicking links more than once in Observer's "Expanded term"
|
|
* upstream/pr/2201:
Handle clicking links more than once in Observer's "Expanded term"
OTP-15980
|
|
ErlSubBin is a large struct that often dwarfs the region of memory
it points at, and it's common for them to refer to a ProcBin which
must be kept around as long as the SubBin lives, using up even more
heap space and keeping the referenced binary alive regardless of
how small the sub-binary is.
|
|
* maint:
mnesia: Bump protocol version
mnesia: Introduce sync_asym_trans protocol
observer: Fixes for html viewers
observer: Support darkmode gui
|
|
* dgud/observer/fix-darkmode/OTP-15916:
observer: Fixes for html viewers
observer: Support darkmode gui
|
|
* dgud/mnesia/sticky-bug/ERL-768/OTP-15979:
mnesia: Bump protocol version
mnesia: Introduce sync_asym_trans protocol
|
|
* maint:
mnesia: Fix deadlock caused by add_table_copy
|
|
* dgud/mnesia/add_table_copy_deadlock/ERL-872/OTP-15933:
mnesia: Fix deadlock caused by add_table_copy
|
|
* john/compiler/fix-bs_skip-succeeded-oddity:
compiler: Fix awkward match context substitution
beam_ssa_lint: Use #b_var{} instead of variable names
|
|
* john/compiler/remove-dead-code-beam_ssa_type:
beam_ssa_type: Remove unreachable code
|
|
Expand and squeeze literal integers/utf8 bin segments
|
|
This worked out by accident since codegen never actually looks at
the arguments for 'succeeded'; it just assumes that they reference
the preceding instruction.
|
|
|
|
* maint:
Update java doc
Print last lines of configure log
Force xenial builds in travis
|
|
Replace deprecated <tt> with <code>
|
|
Now that impossible branches are skipped altogether, it's no
longer possible to encounter get_tuple_element with a 'none'
argument.
|
|
|
|
* john/compiler/validator-improve-try_case-handling:
beam_validator: Disallow jumps to try_case handlers
|
|
* john/compiler/explicit-call-exceptions:
compiler: Simplify set_tuple_element optimization
compiler: Make 'succeeded' optimization more general
compiler: Simplify call type optimization
compiler: All calls may throw, so they all need success checks
erts_debug: Turn off unsafe optimizations in test case
|
|
For instance musl does not recognize the %L modifier.
|
|
* lukas/otp/add-dialyzer-make-target/OTP-15915:
otp: Add make dialyzer and make xmllint documentation
Add 'make dialyzer' target to top and apps
|
|
|
|
|
|
By keeping track of the tag types in the exception handler list,
we can reject direct jumps to try_case handlers such as those
provoked by OTP-15945.
|
|
By removing 'succeeded' tests on setelement/3 when we know it
succeeds, all sequences that are eligible for set_tuple_element
will be nicely bundled in the same block, so we won't need to
bother with special try/catch handling.
The new version is slightly worse in the case where the first
setelement/3 is used to infer the tuple size as that call will
remain in its own block, but in practice this only occurs when
the user manually spells them out and I couldn't find any
examples of this in OTP or Elixir. It's equivalent for record
updates.
|
|
|
|
|
|
Only adding them when in try/catch worked, but made the exceptions
implicit and forced all later optimization passes to keep them in
mind. Making them explicit lets us simplify later passes.
|
|
The test case alters the return value of a function that the
compiler expects will never return, resulting in undefined
behavior.
Note that the debugger (which may change variables/return values)
is unaffected since the affected module is purged and "replaced"
with an interpreted variant.
|
|
* maint:
Ensure that the stack slots are initialized when matching maps
|
|
* bjorn/compiler/fix-stack-init/ERL-1017/OTP-15968:
Ensure that the stack slots are initialized when matching maps
|
|
When matching a map, the compiler could fail to generate code that
would initialize all stack slots (Y registers) properly. Here is a
general outline of code that *could* cause this problem:
foo(Key, Map) ->
Res = case Map of
#{Key := Val} ->
%% Do something with Val here.
.
.
.
#{} ->
[]
end,
%% The stack slot for Val might not have been initialized
%% here if the key was not present in the map.
.
.
.
%% Use Res.
.
.
.
The code generator would wrongly assume that the map matching would
always initialize the stack slot, and if nothing else happened to
force that stack slot to be initialized, it would remain
uninitialized, which would likely crash the runtime system at the next
garbage collection.
`beam_validator` is supposed to find these kind of problems, but a bug
in `beam_validator` prevented it from detecting this problem.
https://bugs.erlang.org/browse/ERL-1017
|
|
This commit adds two operations when handling literal
integers and literal utf8 segments in the v3_kernel pass.
The first operation is to expand all literal integers with
size more than 8 and literal utf8s into integers with size
of 8 (and potentially an integer with size less than 8 at
the end).
This expansion simplifies the code in other operations
inside v3_kernel and ensure they apply more consistently.
For instance, literal binary matching now applies to both
regular and utf8 strings. Furthermore, we can more
efficiently group clauses.
For instance, the following code:
foo(<<$á/utf8, X/binary>>) -> foo(X);
foo(<<$é/utf8, X/binary>>) -> foo(X);
foo(<<>>) -> ok.
Becomes a bs_get_integer_16 comparing 50089 and 50081,
allowing us to skip the utf8 conversion at runtime.
However, since expanding an integer of size 16 into two of
size 8 can be less efficient when matching at runtime,
later we do another pass, where we squeeze all of those
integers together into an integer with maximum size of 24.
This allows prefix matching, such as:
foo(<<"aaaa", X/binary>>) -> foo(X);
foo(<<"bbbb", X/binary>>) -> foo(X);
foo(<<>>) -> ok.
To run more than 2x faster (as long as all clauses match on
a given prefix).
Compilation times and binary size are roughly the same.
|
|
* maint:
beam_validator: Values referenced by other values must be merged
|
|
into maint
* john/compiler/fix-delayed-type-inference/OTP-15954/ERL-995:
beam_validator: Values referenced by other values must be merged
|
|
Optimize is_subset and is_disjoint in cerl_sets
|
|
* maint:
Avoid extremely long compilation times for huge functions
|
|
bjorng/bjorn/compiler/fix-slow-beam_ssa_dead/ERL-1014/OTP-15966
Avoid extremely long compilation times for huge functions
|
|
* maint:
Fix compiler crash when compiling with +no_type_opt
Eliminate a crash in the type optimizer pass
|
|
https://github.com/bjorng/otp into maint
OTP-15970
* 'bjorn/compiler/length-misuse/ERL-1013' of https://github.com/bjorng/otp:
Eliminate a crash in the type optimizer pass
|
|
https://github.com/bjorng/otp into maint
OTP-15969
* 'bjorn/compiler/fix-no_type_opt/ERL-997' of https://github.com/bjorng/otp:
Fix compiler crash when compiling with +no_type_opt
|
|
|
|
|