aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
2019-07-11Merge branch ↵Erlang/OTP
'raimo/ssl/fix-zero-fragment-buffer-handling/ERIERL-379/OTP-15328' into maint-21 * raimo/ssl/fix-zero-fragment-buffer-handling/ERIERL-379/OTP-15328: Do not call dist_ctrl_put_data with empty binaries Refine the queue code Fix extracting 0 bytes from queue
2019-07-11Merge branch 'maint'John Högberg
* maint: Updated OTP version Prepare release # Conflicts: # OTP_VERSION # make/otp_version_tickets_in_merge
2019-07-11Merge branch 'maint-22' into maintJohn Högberg
* maint-22: Updated OTP version Prepare release # Conflicts: # make/otp_version_tickets
2019-07-11beam_validator: Improve type inference on inequalityJohn Högberg
Both sides need to be inferred, and we should infer as if we've made an exact match when we know that LHS is single-valued. This was done for select_val, but we failed to do so for is_ne_exact et al.
2019-07-11beam_validator: Remove redundant calls to infer_typesJohn Högberg
2019-07-11Merge branch 'maint'John Högberg
* maint: compiler: Fix compiler crash introduced by OTP-15952
2019-07-11Merge branch 'john/compiler/fix-bad-try_catch-recv-fix/OTP-15953/ERL-999' ↵John Högberg
into maint * john/compiler/fix-bad-try_catch-recv-fix/OTP-15953/ERL-999: compiler: Fix compiler crash introduced by OTP-15952
2019-07-10Prepare releaseErlang/OTP
2019-07-10compiler: Fix compiler crash introduced by OTP-15952John Högberg
An assertion in code generation would fail when the common exit block was ?BADARG_BLOCK, as some operations expect to always "fail" directly to that block (= throw an exception) and we had inserted a dummy block in between. Other operations could also get funny fail labels, jumping to blocks that immediately jumped to {f,0}, but these were all cleaned up by beam_jump, sweeping the bug under the rug.
2019-07-10Merge branch 'maint'John Högberg
* maint: Updated OTP version Prepare release # Conflicts: # OTP_VERSION # make/otp_version_tickets_in_merge
2019-07-10Merge branch 'maint-22' into maintJohn Högberg
* maint-22: Updated OTP version Prepare release # Conflicts: # make/otp_version_tickets
2019-07-09Prepare releaseErlang/OTP
2019-07-09Merge branch 'ingela/ssl/alert-error-enhancment/OTP-15943' into maint-22Erlang/OTP
* ingela/ssl/alert-error-enhancment/OTP-15943: ssl: Enhance error handling
2019-07-09Merge branch 'john/compiler/fix-fail-path-exceptions-bsm/OTP-15946' into ↵Erlang/OTP
maint-22 * john/compiler/fix-fail-path-exceptions-bsm/OTP-15946: beam_ssa_bsm: Leave ?BADARG_BLOCK alone when cloning fail path
2019-07-09Merge branch 'john/compiler/fix-unsafe-tuple_size-opt/OTP-15945' into maint-22Erlang/OTP
* john/compiler/fix-unsafe-tuple_size-opt/OTP-15945: beam_ssa_opt: Do not apply tuple_size optimization outside guards
2019-07-09Merge branch 'john/hipe/catch-miscompilation/OTP-15949' into maint-22Erlang/OTP
* john/hipe/catch-miscompilation/OTP-15949: dialyzer: Remove native code compilation hipe: Disable compilation on encountering try/catch
2019-07-09Merge branch 'maint'John Högberg
* maint: compiler: Fix broken 'receive' in try/catch blocks
2019-07-09Merge branch 'john/compiler/fix-try_catch-receives/OTP-15952' into maintJohn Högberg
* john/compiler/fix-try_catch-receives/OTP-15952: compiler: Fix broken 'receive' in try/catch blocks
2019-07-09compiler: Fix broken 'receive' in try/catch blocksJohn Högberg
This fix is rather ugly and tacked-on, but I'm not comfortable refactoring the pass in an emergency patch.
2019-07-08Merge branch 'maint'Raimo Niskanen
* maint: Refine test cases Remove test code that fails on Windows
2019-07-08Merge branch 'raimo/udp-send-TOS/OTP-15422' into maintRaimo Niskanen
* raimo/udp-send-TOS/OTP-15422: Refine test cases Remove test code that fails on Windows
2019-07-08Merge branch 'maint'Micael Karlberg
2019-07-08Merge branch 'bmk/erts/esock/20190614/split_modules/OTP-15765' into maintMicael Karlberg
2019-07-08Merge branch 'maint'Micael Karlberg
2019-07-08Merge branch 'bmk/snmp/20190624/compile_time_info/OTP-15330' into maintMicael Karlberg
2019-07-08[snmp] Compile time no longer availableMicael Karlberg
The function 'snmp:print_version_info/0' which prints various (version) info, attempted to extract the "compile time" of each module in the snmp app. This info used to be availabe in the module_info of each module, but has been removed (a "long" time ago). This resulted in a pointless "Not Found" beeing printed. This has now been removed from the into printed. OTP-15330
2019-07-08Merge branch 'maint'Micael Karlberg
2019-07-08Merge branch 'bmk/snmp/20190627/dialyzer/OTP-15932' into maintMicael Karlberg
2019-07-08[snmp] Updated copyright end dateMicael Karlberg
OTP-15932
2019-07-08Merge branch 'maint'Micael Karlberg
2019-07-08Merge branch 'bmk/snmp/20190607/discover_slooow_vm_issues' into maintMicael Karlberg
2019-07-08Merge pull request #2318 from jhogberg/john/compiler/union-types/OTP-15892John Högberg
Extend the compiler's type representation
2019-07-08Merge branch 'maint'John Högberg
* maint: dialyzer: Remove native code compilation hipe: Disable compilation on encountering try/catch
2019-07-08Merge branch 'john/hipe/catch-miscompilation/OTP-15949' into maintJohn Högberg
* john/hipe/catch-miscompilation/OTP-15949: dialyzer: Remove native code compilation hipe: Disable compilation on encountering try/catch
2019-07-05beam_ssa_opt: Sink get_tuple_element before type optimizationJohn Högberg
Eagerly extracting elements can be quite problematic now that we have union types. Consider the following: 0: %% _0 is {ok, #record{}} | {error,atom()} _1 = get_tuple_element _0, literal 0 _2 = get_tuple_element _0, literal 1 switch _1, label 0, [ { literal ok, label 1 }, { literal error, label 2 } ] 1: %% _0 is known to be {ok,#record{}} here 2: %% _0 is known to be {error,atom()} here The type pass is clever enough to see that _0 has the types noted above, but because the type of _2 is set in the first block where we didn't have that information yet, it's still #record{} | atom() in both branches. Sinking these instructions to when they are used greatly improves the type information in many cases, but it does have a few limitations and using it in both of the above branches would take us back to square one.
2019-07-05beam_ssa_type: Infer types on switch failureJohn Högberg
If we know that the checked value is a singleton at the fail block, it's safe to infer types as if we've made a direct comparison against that value.
2019-07-05Do not call dist_ctrl_put_data with empty binariesRaimo Niskanen
2019-07-05dialyzer: Remove native code compilationJohn Högberg
2019-07-05Merge branch 'sverker/ets_SUITE-fixtable_iter_bag'Sverker Eriksson
* sverker/ets_SUITE-fixtable_iter_bag: stdlib: ets_SUITE:fixtable_iter_bag
2019-07-05stdlib: ets_SUITE:fixtable_iter_bagSverker Eriksson
Turns out the bug in ets:next() that I tried to provoke with this new test wasn't really there. Oh well.
2019-07-05hipe: Disable compilation on encountering try/catchJohn Högberg
code_SUITE:upgrade would consistently fail in the HiPE case because two clauses were mixed up. Disabling it altogether may seem a bit harsh but we don't have the resources to fix it at the moment.
2019-07-05Merge pull request #2314 from josevalim/jv-set-unusedJohn Högberg
Collect unused vars instead of used ones
2019-07-05beam_ssa_type: Subtract more types inferred from '=:='/2John Högberg
2019-07-05beam_call_types: Add lists:keyfind/3 and lists:search/2John Högberg
2019-07-05compiler: Introduce union typesJohn Högberg
Consider the type `{ok, #record{}} | {error,atom()}`; in our current type representation this will be flattened down to `{ok | error, #record{} | atom()}`, which is fairly useful but has no connection between the elements. Testing that the first element is 'error' lets us skip checking that it's 'ok' on failure, but the second element is still `#record{} | atom()` and we'll eventually need to test that, even though it can only be a `#record{}`. Another example would be `false | {value, term()}`, the return value of lists:keyfind/3, which we're forced to flatten to `any` since there's nothing in common between an atom and a tuple. Union types let us express these types directly, greatly improving type optimization.
2019-07-05compiler: Explain and rename ?BADARG_BLOCKJohn Högberg
2019-07-05beam_ssa_type: Skip impossible branchesJohn Högberg
Whenever there's a type conflict during type inference we know that the branch will not be taken. Previously we'd go down the branch with garbage type information which would crash in some cases. There's no test case for the crashes because the ones I've found require union types to happen, and we already have good coverage once they're in place.
2019-07-05compiler: Introduce exception trampolinesJohn Högberg
When the compiler is smart enough to figure out that something will always succeed, it will get rid of the failure branch, but the inverse has not been possible because liveness optimization could end up removing the instruction altogether (since it's never used on the failure path), which is not okay when exceptions are in the picture. To prevent exception-generating instructions from being optimized away when their branches are, we introduce a dummy instruction that refers to the result on the failure path, ensuring that it won't be optimized away.
2019-07-05beam_ssa_type: Fix type inference on BIFs without a success checkJohn Högberg
2019-07-05compiler: Remove beam_call_types:never_throws/3John Högberg
The idea was to look at the argument types to see if we could get rid of failure branches, but this didn't turn out to be useful and the function ended up being a copy of erl_bifs:is_safe/3, so we may as well get rid of it.