aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/bs_match_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-01-12 09:54:22 +0100
committerBjörn Gustavsson <[email protected]>2015-01-12 09:54:22 +0100
commit90f9d6b8c6277f68c75d347aff60ecc44ca22dfe (patch)
tree4fe87375bcda6db063bc8d7ee304b5b1b643d480 /lib/compiler/test/bs_match_SUITE.erl
parent821d84c5860a9a26185efa19be407796422e3090 (diff)
parent5d9aa72a69bd3fd2054558036838fab6434c20df (diff)
downloadotp-90f9d6b8c6277f68c75d347aff60ecc44ca22dfe.tar.gz
otp-90f9d6b8c6277f68c75d347aff60ecc44ca22dfe.tar.bz2
otp-90f9d6b8c6277f68c75d347aff60ecc44ca22dfe.zip
Merge branch 'bjorn/compiler/beam_dead/OTP-12393'
* bjorn/compiler/beam_dead/OTP-12393: Update the comments that explain what beam_dead does Improve optimization of bs_start_match2 Extend count_bits_matched/3 to handle the UTF instructions misc_SUITE: Cover the exception handling code in beam_dead Generalize optimizations using shortcut_rel_op/4 beam_dead: Optimize branches from relational conditionals
Diffstat (limited to 'lib/compiler/test/bs_match_SUITE.erl')
-rw-r--r--lib/compiler/test/bs_match_SUITE.erl26
1 files changed, 21 insertions, 5 deletions
diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl
index 149b9bbb8f..2d3fa7353a 100644
--- a/lib/compiler/test/bs_match_SUITE.erl
+++ b/lib/compiler/test/bs_match_SUITE.erl
@@ -368,11 +368,20 @@ partitioned_bs_match_3(Var, <<_>>) -> Var;
partitioned_bs_match_3(1, 2) -> ok.
function_clause(Config) when is_list(Config) ->
- ?line ok = function_clause_1(<<0,7,0,7,42>>),
- ?line fc(function_clause_1, [<<0,1,2,3>>],
- catch function_clause_1(<<0,1,2,3>>)),
- ?line fc(function_clause_1, [<<0,1,2,3>>],
- catch function_clause_1(<<0,7,0,1,2,3>>)),
+ ok = function_clause_1(<<0,7,0,7,42>>),
+ fc(function_clause_1, [<<0,1,2,3>>],
+ catch function_clause_1(<<0,1,2,3>>)),
+ fc(function_clause_1, [<<0,1,2,3>>],
+ catch function_clause_1(<<0,7,0,1,2,3>>)),
+
+ ok = function_clause_2(<<0,7,0,7,42>>),
+ ok = function_clause_2(<<255>>),
+ ok = function_clause_2(<<13:4>>),
+ fc(function_clause_2, [<<0,1,2,3>>],
+ catch function_clause_2(<<0,1,2,3>>)),
+ fc(function_clause_2, [<<0,1,2,3>>],
+ catch function_clause_2(<<0,7,0,1,2,3>>)),
+
ok.
function_clause_1(<<0:8,7:8,T/binary>>) ->
@@ -380,6 +389,13 @@ function_clause_1(<<0:8,7:8,T/binary>>) ->
function_clause_1(<<_:8>>) ->
ok.
+function_clause_2(<<0:8,7:8,T/binary>>) ->
+ function_clause_2(T);
+function_clause_2(<<_:8>>) ->
+ ok;
+function_clause_2(<<_:4>>) ->
+ ok.
+
unit(Config) when is_list(Config) ->
?line 42 = peek1(<<42>>),
?line 43 = peek1(<<43,1,2>>),