diff options
author | Björn Gustavsson <[email protected]> | 2016-05-23 20:13:48 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-09-21 14:07:53 +0200 |
commit | 01835845579e9f0a8da3574864747cd3ba10db6e (patch) | |
tree | 024bddef605721cc1c22a1827ceb0fdb8df93525 /lib/compiler/test/beam_utils_SUITE.erl | |
parent | 97820c026969de7e98d948b301da1e6956f0504d (diff) | |
download | otp-01835845579e9f0a8da3574864747cd3ba10db6e.tar.gz otp-01835845579e9f0a8da3574864747cd3ba10db6e.tar.bz2 otp-01835845579e9f0a8da3574864747cd3ba10db6e.zip |
Simplify beam_utils
When beam_utils was first written, it did not have the functions
for testing whether a register was not used. Those were added
later, in sort of a hacky way.
Also, is_killed*() and is_not_used*() for Y registers would
return the same answer. Fix that to make the API more consistent
(an Y register can only be killed by a deallocate/1 instruction).
We will need to change beam_trim to call beam_utils:is_not_used/3
instead of beam_utils:is_killed/3.
Diffstat (limited to 'lib/compiler/test/beam_utils_SUITE.erl')
-rw-r--r-- | lib/compiler/test/beam_utils_SUITE.erl | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/compiler/test/beam_utils_SUITE.erl b/lib/compiler/test/beam_utils_SUITE.erl index f6d4a311bb..5e29f8d7b4 100644 --- a/lib/compiler/test/beam_utils_SUITE.erl +++ b/lib/compiler/test/beam_utils_SUITE.erl @@ -283,6 +283,9 @@ coverage(_Config) -> {'EXIT',{function_clause,_}} = (catch town(overall, {{abc},alcohol})), + self() ! junk_message, + {"url",#{true:="url"}} = appointment(#{"resolution" => "url"}), + ok. %% Cover check_liveness/3. @@ -352,6 +355,9 @@ yellow(Hill) -> Hill, id(42). +do(A, B) -> {A,B}. +appointment(#{"resolution" := Url}) -> + do(receive _ -> Url end, #{true => Url}). %% The identity function. id(I) -> I. |