aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/socket.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-05-25 10:23:20 +0200
committerJohn Högberg <[email protected]>2019-05-28 10:35:37 +0200
commita034ff64abab5f5cbf5c6aa38762044c968fe377 (patch)
tree6055ccc07bc571870ff25af7d064347451c8efde /erts/preloaded/src/socket.erl
parentd32991afaf3fc5f9f73e3e2448672bb9a1b80101 (diff)
downloadotp-a034ff64abab5f5cbf5c6aa38762044c968fe377.tar.gz
otp-a034ff64abab5f5cbf5c6aa38762044c968fe377.tar.bz2
otp-a034ff64abab5f5cbf5c6aa38762044c968fe377.zip
Fix unsafe optimizations where guard tests could be removed
A repeated test could be optimized away. Example: bar(A) -> if is_bitstring(A) -> if is_binary(A) -> binary; true -> bitstring end; true -> other end. In the example, the `is_binary/1` test would be optimized away, basically turning the example into: bar(A) -> if is_bitstring(A) -> bitstring; true -> other end. Thanks user Marcus Kruse in the Elixir forum for noticing this bug.
Diffstat (limited to 'erts/preloaded/src/socket.erl')
0 files changed, 0 insertions, 0 deletions