diff options
author | Björn Gustavsson <[email protected]> | 2015-01-29 09:40:35 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-01-29 09:40:35 +0100 |
commit | f5aa1d9943fbf401fed9799c204e893d0d4b4644 (patch) | |
tree | 3efd898883f790989528492916c4976bb266ecdb /lib/compiler/src | |
parent | 44b9dba3eac0864e80851af6bd8375d597043645 (diff) | |
parent | 11dcd4774a6beb28306b9e6e1b80b00d9596bf5f (diff) | |
download | otp-f5aa1d9943fbf401fed9799c204e893d0d4b4644.tar.gz otp-f5aa1d9943fbf401fed9799c204e893d0d4b4644.tar.bz2 otp-f5aa1d9943fbf401fed9799c204e893d0d4b4644.zip |
Merge branch 'bjorn/compiler/coverage'
* bjorn/compiler/coverage:
sys_core_fold: Remove uncovered clauses matching #c_map{}
beam_z: Remove the uncovered to_typed_literal/1 function
Speed up running of compiler test suites in coverage mode
Diffstat (limited to 'lib/compiler/src')
-rw-r--r-- | lib/compiler/src/beam_z.erl | 14 | ||||
-rw-r--r-- | lib/compiler/src/sys_core_fold.erl | 2 |
2 files changed, 3 insertions, 13 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. diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl index 09716d0866..f3e90f8eb2 100644 --- a/lib/compiler/src/sys_core_fold.erl +++ b/lib/compiler/src/sys_core_fold.erl @@ -1378,7 +1378,6 @@ eval_is_record(Call, _, _, _, _) -> Call. is_not_integer(#c_literal{val=Val}) when not is_integer(Val) -> true; is_not_integer(#c_tuple{}) -> true; is_not_integer(#c_cons{}) -> true; -is_not_integer(#c_map{}) -> true; is_not_integer(_) -> false. %% is_not_tuple(Core) -> true | false. @@ -1386,7 +1385,6 @@ is_not_integer(_) -> false. is_not_tuple(#c_literal{val=Val}) when not is_tuple(Val) -> true; is_not_tuple(#c_cons{}) -> true; -is_not_tuple(#c_map{}) -> true; is_not_tuple(_) -> false. %% eval_setelement(Call, Pos, Tuple, NewVal) -> Core. |