aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-05-08 16:08:34 +0200
committerBjörn Gustavsson <[email protected]>2017-05-10 10:37:11 +0200
commit8f84553cb56a6cbe0ae6785dba18c81ed6e47641 (patch)
tree31f0519c91b1ea265907e74491fd13d209a03ae9 /lib/compiler/test
parent2bcc3f97e9273c543b803a812da393e640464978 (diff)
downloadotp-8f84553cb56a6cbe0ae6785dba18c81ed6e47641.tar.gz
otp-8f84553cb56a6cbe0ae6785dba18c81ed6e47641.tar.bz2
otp-8f84553cb56a6cbe0ae6785dba18c81ed6e47641.zip
erl_bifs: Remove pure BIFs serving no useful purpose
Functions that can are known be pure can be evaluated at compile-time if the arguments are literals and if the result is expressible as a literal. list_to_ref/1 and list_to_port/1 returns terms that cannot be expressed as literals, so the optimization is not possible. The argument for port_to_list/1 is never a literal, so there is no way to evaluate it at compile-time. Therefore, marking those functions as pure serves no useful purpose. Note: list_to_pid/1 *is* marked as pure, but only so that we can test the code in sys_core_fold that rejects pure functions that evaluate to at term that is not possible to express as a literal. It is sufficient to have one pure function of that kind.
Diffstat (limited to 'lib/compiler/test')
0 files changed, 0 insertions, 0 deletions