aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/sys_core_fold.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-27 07:49:12 +0100
committerBjörn Gustavsson <[email protected]>2015-01-27 07:57:18 +0100
commit1fcdcd50e9dc09c78259434ae7ba189e6a47ced4 (patch)
treec35c8f25f7f75d8d8b05e6d511b5fff48450d954 /lib/compiler/src/sys_core_fold.erl
parent142da57a6790e879f0e593f97cf5a65459693c34 (diff)
downloadotp-1fcdcd50e9dc09c78259434ae7ba189e6a47ced4.tar.gz
otp-1fcdcd50e9dc09c78259434ae7ba189e6a47ced4.tar.bz2
otp-1fcdcd50e9dc09c78259434ae7ba189e6a47ced4.zip
core_parse: Always fold literal conses
v3_core is careful to always create literals whenever possible. Correct core_parse so it, too, always creates literals out of literal conses. With that correction, we can remove the workaround in sys_core_fold (introduced in 26a5dea3cb5e101) that handles non-literal flags in a binary.
Diffstat (limited to 'lib/compiler/src/sys_core_fold.erl')
-rw-r--r--lib/compiler/src/sys_core_fold.erl8
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index e079fc072a..08b1c0d7b7 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -607,14 +607,6 @@ eval_binary_1([#c_bitstr{val=#c_literal{val=Val},size=#c_literal{val=Sz},
error:_ ->
throw(impossible)
end;
-eval_binary_1([#c_bitstr{val=#c_literal{},size=#c_literal{},
- unit=#c_literal{},type=#c_literal{},
- flags=#c_cons{}=Flags}=Bitstr|Ss], Acc0) ->
- case cerl:fold_literal(Flags) of
- #c_literal{} = Flags1 ->
- eval_binary_1([Bitstr#c_bitstr{flags=Flags1}|Ss], Acc0);
- _ -> throw(impossible)
- end;
eval_binary_1([], Acc) -> Acc;
eval_binary_1(_, _) -> throw(impossible).