From 3e8449e112be0fbd06786e14fd07148c1e8f5b53 Mon Sep 17 00:00:00 2001 From: Kostis Sagonas Date: Fri, 28 Mar 2014 17:08:15 +0100 Subject: Support the translation of the is_map BEAM instruction to Icode --- lib/hipe/icode/hipe_beam_to_icode.erl | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/hipe/icode/hipe_beam_to_icode.erl') 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) -> -- cgit v1.2.3