aboutsummaryrefslogtreecommitdiffstats
path: root/lib
AgeCommit message (Collapse)Author
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.
2019-07-05beam_validator: Slightly improve type/tag-related commentsJohn Högberg
2019-07-05beam_validator: Improve negative type inferenceJohn Högberg
The previous implementation of infer_types had a general problem with negative inference, and relied on an ugly hack to make simple subtraction work for type tests. This gets rid of that hack and makes it possible to subtract types on tuple size and element comparisons.
2019-07-05beam_validator: Clean up abstract/match context type handlingJohn Högberg
2019-07-05beam_call_types: Index must be >= 1 in setelement/2John Högberg
2019-07-05beam_types_SUITE: Fix shrinking of bitstringsJohn Högberg
2019-07-05beam_types: Fix an integer consistency in meet/2John Högberg
The test was brainfart; integers that don't overlap *AT ALL* should never meet. It's okay to meet as long as they overlap to some degree.
2019-07-05beam_types: Extend the type lattice testsJohn Högberg
2019-07-04Merge branch 'maint'John Högberg
* maint: beam_ssa_bsm: Leave ?BADARG_BLOCK alone when cloning fail path beam_ssa_opt: Do not apply tuple_size optimization outside guards
2019-07-04Merge branch 'john/compiler/fix-fail-path-exceptions-bsm/OTP-15946' into maintJohn Högberg
* john/compiler/fix-fail-path-exceptions-bsm/OTP-15946: beam_ssa_bsm: Leave ?BADARG_BLOCK alone when cloning fail path
2019-07-04Merge branch 'john/compiler/fix-unsafe-tuple_size-opt/OTP-15945' into maintJohn Högberg
* john/compiler/fix-unsafe-tuple_size-opt/OTP-15945: beam_ssa_opt: Do not apply tuple_size optimization outside guards
2019-07-04Merge branch 'maint'Ingela Anderton Andin
2019-07-04Merge pull request #2308 from igobul/inets/test/httpc_SUITEIngela Andin
ERL-989: Fix typo in httpc_SUITE:content_length/1
2019-07-03beam_ssa_bsm: Leave ?BADARG_BLOCK alone when cloning fail pathJohn Högberg
2019-07-03beam_ssa_opt: Do not apply tuple_size optimization outside guardsJohn Högberg
Rewriting `tuple_size` to `is_tuple` + `tuple_size` will cause it not to throw an exception, either crashing the compiler or the emulator when the code runs.
2019-07-03Merge branch 'maint'John Högberg
* maint: Updated OTP version Prepare release # Conflicts: # OTP_VERSION
2019-07-03Merge branch 'maint-22' into maintJohn Högberg
* maint-22: Updated OTP version Prepare release # Conflicts: # make/otp_version_tickets
2019-07-03Merge branch 'maint'John Högberg
* maint: Updated OTP version Prepare release
2019-07-03Merge branch 'maint-21' into maintJohn Högberg
* maint-21: Updated OTP version Prepare release # Conflicts: # OTP_VERSION # erts/doc/src/notes.xml # erts/vsn.mk # lib/ssl/doc/src/notes.xml # lib/ssl/vsn.mk # make/otp_version_tickets # otp_versions.table
2019-07-03Merge branch 'maint'Ingela Anderton Andin
2019-07-03Merge branch 'ingela/ssl/alert-error-enhancment/OTP-15943' into maintIngela Anderton Andin
* ingela/ssl/alert-error-enhancment/OTP-15943: ssl: Enhance error handling
2019-07-03Merge branch 'kostis/erl_syntax/fix-types'Hans Bolinder
* kostis/erl_syntax/fix-types: erl_parse: Add documentation for exported types erl_syntax: Fix some type declarations erl_parse: Export some types needed for syntax_tools
2019-07-02Merge branch 'maint'Rickard Green
* maint: Updated stdlib runtime dependency to erts Convert generated re replace and split tests from latin1 to UTF8 Adjust generated re replacement and split tests Generate new re replacement and split tests using perl 5.22.1 Update internal PCRE to version 8.43
2019-07-02Merge branch 'rickard/pcre-8.43/OTP-15889' into maintRickard Green
* rickard/pcre-8.43/OTP-15889: Updated stdlib runtime dependency to erts Convert generated re replace and split tests from latin1 to UTF8 Adjust generated re replacement and split tests Generate new re replacement and split tests using perl 5.22.1 Update internal PCRE to version 8.43
2019-07-02Merge branch 'maint'Ingela Anderton Andin
2019-07-02Merge branch 'ingela/ssl/kill-openssl-zombie' into maintIngela Anderton Andin
* ingela/ssl/kill-openssl-zombie: ssl: Kill OpenSSL processes that survived test run
2019-07-02Prepare releaseErlang/OTP
2019-07-02Merge branch 'ingela/ssl/TLS-hibernate-bug/OTP-15910' into maint-21Erlang/OTP
* ingela/ssl/TLS-hibernate-bug/OTP-15910: ssl: Fix hibernation bug # Conflicts: # lib/ssl/src/tls_connection.erl
2019-07-02Merge branch 'john/erts/lists_subtract_fixes/OTP-15938/OTP-15939' into maint-21Erlang/OTP
* john/erts/lists_subtract_fixes/OTP-15938/OTP-15939: erts: Fix integer overflow in loader erts: Fix integer overflow in list subtraction
2019-07-02Prepare releaseErlang/OTP
2019-07-02Merge branch ↵Erlang/OTP
'josevalim/dialyzer/formatting_fallback/OTP-15922/PR-2240/ERL-949' into maint-22 * josevalim/dialyzer/formatting_fallback/OTP-15922/PR-2240/ERL-949: Always fallback to source when we can't parse AST
2019-07-02Merge branch 'peterdmv/inets/httpc-uri-scheme/ERL-969/OTP-15930' into maint-22Erlang/OTP
* peterdmv/inets/httpc-uri-scheme/ERL-969/OTP-15930: inets: Return error if URI has no scheme (httpc)
2019-07-02Merge branch 'peterdmv/ssl/fix-cert-error-handling/OTP-15900' into maint-22Erlang/OTP
* peterdmv/ssl/fix-cert-error-handling/OTP-15900: ssl: Fix handling of certificate decoding problems
2019-07-02Merge branch 'peterdmv/ssl/fix-sign-algs-cert/OTP-15913' into maint-22Erlang/OTP
* peterdmv/ssl/fix-sign-algs-cert/OTP-15913: ssl: Backport fix for signature_algorithms_cert
2019-07-02Merge branch 'ingela/ssl/TLS-hibernate-bug/OTP-15910' into maint-22Erlang/OTP
* ingela/ssl/TLS-hibernate-bug/OTP-15910: ssl: Fix hibernation bug # Conflicts: # lib/ssl/src/tls_connection.erl
2019-07-02Merge branch 'john/erts/lists_subtract_fixes/OTP-15938/OTP-15939' into maint-22Erlang/OTP
* john/erts/lists_subtract_fixes/OTP-15938/OTP-15939: erts: Fix integer overflow in loader erts: Fix integer overflow in list subtraction
2019-07-02Merge branch 'maint'Siri Hansen
2019-07-02Merge branch 'siri/ct/release_test_paths/OTP-15934' into maintSiri Hansen
* siri/ct/release_test_paths/OTP-15934: [ct] Store correct paths with from-release in ct_release_test
2019-07-02erl_parse: Add documentation for exported typesKostis Sagonas
2019-07-01Merge branch 'maint'Micael Karlberg
2019-07-01Merge branch 'bmk/megaco/20190625/timer_test' into maintMicael Karlberg
2019-07-01Merge branch 'maint'Micael Karlberg
2019-07-01[megaco|test] Make sure more of the (mess) test suite printouts are shownMicael Karlberg
Make the test suite log more readable. Normal io and the debug printouts from megaco does not mix well. Its difficult to know the proper timeline. So add some "sleeps" so that its easier to read.
2019-07-01Merge branch 'maint'Micael Karlberg