diff options
author | Björn Gustavsson <[email protected]> | 2019-08-22 13:40:54 +0200 |
---|---|---|
committer | GitHub <[email protected]> | 2019-08-22 13:40:54 +0200 |
commit | cabdfc991278d6322564ef7342e80b3dd3cdbc92 (patch) | |
tree | 1f8e3b6e13563ae43dd047fda505320a24cc057d /erts/emulator/test/bif_SUITE.erl | |
parent | d670fe64723ed348c8829a6528292cdc9d0ad5a1 (diff) | |
parent | 07a323813a47f92abf05bdf2255dc1354e82c55c (diff) | |
download | otp-cabdfc991278d6322564ef7342e80b3dd3cdbc92.tar.gz otp-cabdfc991278d6322564ef7342e80b3dd3cdbc92.tar.bz2 otp-cabdfc991278d6322564ef7342e80b3dd3cdbc92.zip |
Merge pull request #2351 from bjorng/bjorn/erts/optimize-cp-management/OTP-15077
Optimize continuation pointer management
Diffstat (limited to 'erts/emulator/test/bif_SUITE.erl')
-rw-r--r-- | erts/emulator/test/bif_SUITE.erl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/erts/emulator/test/bif_SUITE.erl b/erts/emulator/test/bif_SUITE.erl index c5abd04e07..2a965d2095 100644 --- a/erts/emulator/test/bif_SUITE.erl +++ b/erts/emulator/test/bif_SUITE.erl @@ -860,6 +860,7 @@ error_stacktrace_test() -> Types = [apply_const_last, apply_const, apply_last, apply, double_apply_const_last, double_apply_const, double_apply_last, double_apply, multi_apply_const_last, + apply_const_only, apply_only, multi_apply_const, multi_apply_last, multi_apply, call_const_last, call_last, call_const, call], lists:foreach(fun (Type) -> @@ -897,6 +898,8 @@ error_stacktrace_test() -> ok. stk([], Type, Func) -> + put(erlang, erlang), + put(tail, []), tail(Type, Func, jump), ok; stk([_|L], Type, Func) -> @@ -910,6 +913,12 @@ tail(Type, error_1, do) -> tail(Type, error_2, do) -> do_error_2(Type). +do_error_2(apply_const_only) -> + apply(erlang, error, [oops, [apply_const_only]]); +do_error_2(apply_only) -> + Erlang = get(erlang), + Tail = get(tail), + apply(Erlang, error, [oops, [apply_only|Tail]]); do_error_2(apply_const_last) -> erlang:apply(erlang, error, [oops, [apply_const_last]]); do_error_2(apply_const) -> @@ -951,6 +960,12 @@ do_error_2(call) -> erlang:error(id(oops), id([call])). +do_error_1(apply_const_only) -> + apply(erlang, error, [oops]); +do_error_1(apply_only) -> + Erlang = get(erlang), + Tail = get(tail), + apply(Erlang, error, [oops|Tail]); do_error_1(apply_const_last) -> erlang:apply(erlang, error, [oops]); do_error_1(apply_const) -> |