aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/src/beam_z.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-26 16:27:32 +0100
committerBjörn Gustavsson <[email protected]>2015-01-26 16:27:32 +0100
commit81d728c44774a4e0367b30d377ac9f136ecf853e (patch)
tree3bcd0af09f0d91665a1d8763c3ebe0d607de71c8 /lib/compiler/src/beam_z.erl
parent8a2f26a103e0538cbe571d2bd8b1eb87cfe42743 (diff)
downloadotp-81d728c44774a4e0367b30d377ac9f136ecf853e.tar.gz
otp-81d728c44774a4e0367b30d377ac9f136ecf853e.tar.bz2
otp-81d728c44774a4e0367b30d377ac9f136ecf853e.zip
beam_z: Remove the uncovered to_typed_literal/1 function
It was a workaround for a bug that has been fixed.
Diffstat (limited to 'lib/compiler/src/beam_z.erl')
-rw-r--r--lib/compiler/src/beam_z.erl14
1 files changed, 3 insertions, 11 deletions
diff --git a/lib/compiler/src/beam_z.erl b/lib/compiler/src/beam_z.erl
index c2a6ef604e..0c7bef9183 100644
--- a/lib/compiler/src/beam_z.erl
+++ b/lib/compiler/src/beam_z.erl
@@ -79,17 +79,9 @@ undo_rename({put_map,Fail,assoc,S,D,R,L}) ->
undo_rename({put_map,Fail,exact,S,D,R,L}) ->
{put_map_exact,Fail,S,D,R,L};
undo_rename({test,has_map_fields,Fail,[Src|List]}) ->
- {test,has_map_fields,Fail,Src,{list,[to_typed_literal(V)||V<-List]}};
-undo_rename({get_map_elements,Fail,Src,{list, List}}) ->
- {get_map_elements,Fail,Src,{list,[to_typed_literal(V)||V<-List]}};
+ {test,has_map_fields,Fail,Src,{list,List}};
+undo_rename({get_map_elements,Fail,Src,{list,List}}) ->
+ {get_map_elements,Fail,Src,{list,List}};
undo_rename({select,I,Reg,Fail,List}) ->
{I,Reg,Fail,{list,List}};
undo_rename(I) -> I.
-
-%% to_typed_literal(Arg)
-%% transform Arg to specific literal i.e. float | integer | atom if applicable
-to_typed_literal({literal, V}) when is_float(V) -> {float, V};
-to_typed_literal({literal, V}) when is_atom(V) -> {atom, V};
-to_typed_literal({literal, V}) when is_integer(V) -> {integer, V};
-to_typed_literal({literal, []}) -> nil;
-to_typed_literal(V) -> V.