diff options
author | Björn Gustavsson <[email protected]> | 2011-11-30 10:59:59 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-11-30 10:59:59 +0100 |
commit | a4029940e309518f5500fc2c403ccdf62f9fa4e4 (patch) | |
tree | 7bc28a603eeac3070debe8c55bec8c0e80767a4c /erts/emulator/test/big_SUITE.erl | |
parent | ca03aa3d8a97e5d63c1055c19d2bd5a037acc28f (diff) | |
parent | 99615c70dcfddc01b70b51e30dbfa7f476cb733a (diff) | |
download | otp-a4029940e309518f5500fc2c403ccdf62f9fa4e4.tar.gz otp-a4029940e309518f5500fc2c403ccdf62f9fa4e4.tar.bz2 otp-a4029940e309518f5500fc2c403ccdf62f9fa4e4.zip |
Merge branch 'bjorn/deprecate-tuple-funs/OTP-9649'
* bjorn/deprecate-tuple-funs/OTP-9649:
erts: Warn the first time a tuple fun is called
otp_mibs: Eliminate use of tuple fun
os_mon: Eliminate use of tuple fun
asn1: Eliminate use of tuple fun
parsetools: Eliminate use of tuple fun
mnesia tests: Eliminate use of tuple fun
snmp: Eliminate use of tuple fun
wrap_log_reader_SUITE: Eliminate use of tuple fun
big_SUITE: Eliminate use of tuple fun
file_SUITE: Eliminate use of tuple fun
fprof: Eliminate use of tuple fun
xref_compiler: Eliminate use of tuple fun
shell: Eliminate use of tuple funs
erl_eval: Eliminate use of tuple funs
user_sup: Eliminate use of tuple fun
Diffstat (limited to 'erts/emulator/test/big_SUITE.erl')
-rw-r--r-- | erts/emulator/test/big_SUITE.erl | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/erts/emulator/test/big_SUITE.erl b/erts/emulator/test/big_SUITE.erl index 3487917677..413bd3bcae 100644 --- a/erts/emulator/test/big_SUITE.erl +++ b/erts/emulator/test/big_SUITE.erl @@ -26,7 +26,7 @@ shift_limit_1/1, powmod/1, system_limit/1, otp_6692/1]). %% Internal exports. --export([eval/1, funcall/2]). +-export([eval/1]). -export([init/3]). -export([fac/1, fib/1, pow/2, gcd/2, lcm/2]). @@ -162,12 +162,15 @@ multi_match([Node|Ns], Expr, Rs) -> multi_match([], _, Rs) -> Rs. eval(Expr) -> - Fun = {?MODULE,funcall}, - {value,V,_} = erl_eval:expr(Expr, [], Fun), %Applied arithmetic BIFs. - V = eval(Expr, Fun), %Real arithmetic instructions. - V. + LFH = fun(Name, As) -> apply(?MODULE, Name, As) end, + + %% Applied arithmetic BIFs. + {value,V,_} = erl_eval:expr(Expr, [], {value,LFH}), -funcall(F, As) -> apply(?MODULE, F, As). + %% Real arithmetic instructions. + V = eval(Expr, LFH), + + V. %% Like a subset of erl_eval:expr/3, but uses real arithmetic instructions instead of %% applying them (it does make a difference). |