aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-01-12 11:45:12 +0100
committerGitHub <[email protected]>2017-01-12 11:45:12 +0100
commit19e33117de1c44c0e4200ca8ee280cb843842b4c (patch)
tree4d7bec0485a0d2db95060999125f82a2dac67dc6
parenta31d0d047d4993003e71c1c3febbf6b8b9eb318e (diff)
parent8fabcae494ae09bbcbd485501085c33a435adde5 (diff)
downloadotp-19e33117de1c44c0e4200ca8ee280cb843842b4c.tar.gz
otp-19e33117de1c44c0e4200ca8ee280cb843842b4c.tar.bz2
otp-19e33117de1c44c0e4200ca8ee280cb843842b4c.zip
Merge pull request #1300 from bjorng/bjorn/compiler/fix-case-opt
Improve compilation speed for huge literal case expressions
-rw-r--r--lib/compiler/src/sys_core_fold.erl6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index 50d28c0a5f..3673a339f6 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -1893,10 +1893,10 @@ case_opt_arg_1(E0, Cs0, LitExpr) ->
true ->
E = case_opt_compiler_generated(E0),
Cs = case_opt_nomatch(E, Cs0, LitExpr),
- case cerl:data_type(E) of
- {atomic,_} ->
+ case cerl:is_literal(E) of
+ true ->
case_opt_lit(E, Cs);
- _ ->
+ false ->
case_opt_data(E, Cs)
end
end.