diff options
author | Kostis Sagonas <[email protected]> | 2014-03-28 17:08:15 +0100 |
---|---|---|
committer | Kostis Sagonas <[email protected]> | 2014-03-28 17:08:15 +0100 |
commit | 3e8449e112be0fbd06786e14fd07148c1e8f5b53 (patch) | |
tree | 4c8e18c3e75837c5d1bfa74827a9b1443669070f /lib/hipe | |
parent | 8964e0f9430fba4f1827734f8e1551ef7c715d0a (diff) | |
download | otp-3e8449e112be0fbd06786e14fd07148c1e8f5b53.tar.gz otp-3e8449e112be0fbd06786e14fd07148c1e8f5b53.tar.bz2 otp-3e8449e112be0fbd06786e14fd07148c1e8f5b53.zip |
Support the translation of the is_map BEAM instruction to Icode
Diffstat (limited to 'lib/hipe')
-rw-r--r-- | lib/hipe/icode/hipe_beam_to_icode.erl | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl index 81249c958e..dcd547fd5f 100644 --- a/lib/hipe/icode/hipe_beam_to_icode.erl +++ b/lib/hipe/icode/hipe_beam_to_icode.erl @@ -509,6 +509,10 @@ trans_fun([{test,test_arity,{f,Lbl},[Reg,N]}|Instructions], Env) -> I = hipe_icode:mk_type([trans_arg(Reg)],{tuple,N}, hipe_icode:label_name(True),map_label(Lbl)), [I,True | trans_fun(Instructions,Env)]; +%%--- is_map --- +trans_fun([{test,is_map,{f,Lbl},[Arg]}|Instructions], Env) -> + {Code,Env1} = trans_type_test(map,Lbl,Arg,Env), + [Code | trans_fun(Instructions,Env1)]; %%-------------------------------------------------------------------- %%--- select_val --- trans_fun([{select_val,Reg,{f,Lbl},{list,Cases}}|Instructions], Env) -> |