aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2019-03-13 15:15:06 +0100
committerGitHub <[email protected]>2019-03-13 15:15:06 +0100
commitffa252a6e6a353acffb95130b44a89d6e286a7c6 (patch)
tree3add4f7a028980401df640e5d51b2506e83c96bf /lib/compiler
parentbb522c71838f8b46425f4156ee2ed58d155e13b5 (diff)
parent2d2e78ad6e667655560a67e848153dbb218914f7 (diff)
downloadotp-ffa252a6e6a353acffb95130b44a89d6e286a7c6.tar.gz
otp-ffa252a6e6a353acffb95130b44a89d6e286a7c6.tar.bz2
otp-ffa252a6e6a353acffb95130b44a89d6e286a7c6.zip
Merge pull request #2177 from bjorng/bjorn/erts/tail-recursive-bifs
Optimize tail-recursive calls of BIFs OTP-15674
Diffstat (limited to 'lib/compiler')
-rw-r--r--lib/compiler/test/beam_except_SUITE.erl13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/compiler/test/beam_except_SUITE.erl b/lib/compiler/test/beam_except_SUITE.erl
index 9380fe06c8..8e3b373d29 100644
--- a/lib/compiler/test/beam_except_SUITE.erl
+++ b/lib/compiler/test/beam_except_SUITE.erl
@@ -84,9 +84,16 @@ coverage(_) ->
{'EXIT',{function_clause,
[{?MODULE,fc,[y],[File,{line,2}]}|_]}} =
(catch fc(y)),
- {'EXIT',{function_clause,
- [{?MODULE,fc,[[a,b,c]],[File,{line,6}]}|_]}} =
- (catch fc([a,b,c])),
+ case ?MODULE of
+ beam_except_no_opt_SUITE ->
+ %% There will be a different stack fram in
+ %% unoptimized code.
+ ok;
+ _ ->
+ {'EXIT',{function_clause,
+ [{?MODULE,fc,[[a,b,c]],[File,{line,6}]}|_]}} =
+ (catch fc([a,b,c]))
+ end,
{'EXIT',{undef,[{erlang,error,[a,b,c],_}|_]}} =
(catch erlang:error(a, b, c)),