aboutsummaryrefslogblamecommitdiffstats
path: root/lib/compiler/test/beam_validator_SUITE_data/no_exception_in_catch.S
blob: 1a5b417a5f0ed38b9a5a15740aee64b81f6629d4 (plain) (tree)



























                                                                     
                              






                                                                            
                              











































































































































































                                                          
{module, no_exception_in_catch}.  %% version = 0

{exports, [{foo,1},{module_info,0},{module_info,1},{nested_of_1,4}]}.

{attributes, []}.

{labels, 22}.


{function, nested_of_1, 4, 2}.
  {label,1}.
    {func_info,{atom,no_exception_in_catch},{atom,nested_of_1},4}.
  {label,2}.
    {test,is_tuple,{f,1},[{x,0}]}.
    {test,test_arity,{f,1},[{x,0},3]}.
    {allocate_zero,15,4}.
    {get_tuple_element,{x,0},0,{y,9}}.
    {get_tuple_element,{x,0},1,{y,10}}.
    {get_tuple_element,{x,0},2,{y,11}}.
    {move,{x,3},{y,14}}.
    {move,{x,2},{y,13}}.
    {move,{x,1},{y,12}}.
    {move,{atom,nested3},{x,0}}.
    {call_ext,1,{extfunc,erlang,erase,1}}.
    {move,{atom,nested4},{x,0}}.
    {call_ext,1,{extfunc,erlang,erase,1}}.
    {move,{atom,nested},{x,0}}.
    {call_ext,1,{extfunc,erlang,erase,1}}.
    {bif,self,{f,0},[],{x,0}}.
    {'try',{y,8},{f,13}}.
    {'try',{y,7},{f,11}}.
    {'try',{y,6},{f,9}}.
    {'try',{y,5},{f,7}}.
%% Because the following instructions can't possible throw an exception,
%% label 7 used to get no state. Now the try_end itself will save the state.
    {move,{x,0},{y,4}}.
    {bif,self,{f,0},[],{x,0}}.
    {'%live',1}.
    {try_end,{y,5}}.
    {test,is_eq_exact,{f,15},[{x,0},{y,4}]}.
    {'try',{y,5},{f,6}}.
    {'try',{y,3},{f,3}}.
    {move,{y,9},{x,0}}.
    {call,1,{f,17}}.
    {try_end,{y,3}}.
    {test,is_eq_exact,{f,15},[{x,0},{y,11}]}.
    {move,{y,12},{x,0}}.
    {call,1,{f,17}}.
    {test_heap,3,1}.
    {put_tuple,2,{x,1}}.
    {put,{atom,value1}}.
    {put,{x,0}}.
    {move,{x,1},{x,0}}.
    {jump,{f,5}}.
  {label,3}.
    {try_case,{y,3}}.
    {move,{x,1},{y,1}}.
    {move,{x,0},{y,2}}.
    {move,{x,2},{y,3}}.
    {bif,'=:=',{f,4},[{x,0},{y,10}],{x,3}}.
    {move,{x,3},{y,0}}.
    {bif,'=:=',{f,4},[{x,1},{y,11}],{x,4}}.
    {bif,'and',{f,4},[{x,3},{x,4}],{x,3}}.
    {test,is_eq_exact,{f,4},[{x,3},{atom,true}]}.
    {kill,{y,0}}.
    {kill,{y,1}}.
    {kill,{y,2}}.
    {kill,{y,3}}.
    {move,{y,12},{x,0}}.
    {call,1,{f,17}}.
    {test_heap,3,1}.
    {put_tuple,2,{x,1}}.
    {put,{atom,caught1}}.
    {put,{x,0}}.
    {move,{x,1},{x,0}}.
    {jump,{f,5}}.
  {label,4}.
    {bif,raise,{f,0},[{x,2},{x,1}],{x,0}}.
    {'%live',1}.
  {label,5}.
    {try_end,{y,5}}.
    {move,{x,0},{y,5}}.
    {move,{y,13},{x,0}}.
    {call,1,{f,17}}.
    {move,{x,0},{x,1}}.
    {move,{atom,nested3},{x,0}}.
    {call_ext,2,{extfunc,erlang,put,2}}.
    {move,{y,5},{x,0}}.
    {jump,{f,8}}.
  {label,6}.
    {try_case,{y,5}}.
    {move,{x,2},{y,5}}.
    {move,{x,1},{y,3}}.
    {move,{y,13},{x,0}}.
    {call,1,{f,17}}.
    {move,{x,0},{x,1}}.
    {move,{atom,nested3},{x,0}}.
    {call_ext,2,{extfunc,erlang,put,2}}.
    {bif,raise,{f,0},[{y,5},{y,3}],{x,0}}.
    {'%live',1}.
    {jump,{f,8}}.
  {label,7}.
%% The instructions here used to be not checked.
    {move,{x,3},{x,0}}.
    {try_case,{y,5}}.
    {bif,raise,{f,0},[{x,2},{x,1}],{x,0}}.
    {'%live',1}.
  {label,8}.
    {try_end,{y,6}}.
    {move,{x,0},{y,13}}.
    {kill,{y,3}}.
    {kill,{y,4}}.
    {kill,{y,5}}.
    {kill,{y,9}}.
    {kill,{y,10}}.
    {kill,{y,11}}.
    {kill,{y,12}}.
    {move,{y,14},{x,0}}.
    {call,1,{f,17}}.
    {move,{x,0},{x,1}}.
    {move,{atom,nested4},{x,0}}.
    {call_ext,2,{extfunc,erlang,put,2}}.
    {move,{y,13},{x,0}}.
    {jump,{f,10}}.
  {label,9}.
    {try_case,{y,6}}.
    {move,{x,2},{y,13}}.
    {move,{x,1},{y,12}}.
    {kill,{y,3}}.
    {kill,{y,4}}.
    {kill,{y,5}}.
    {kill,{y,9}}.
    {kill,{y,10}}.
    {kill,{y,11}}.
    {move,{y,14},{x,0}}.
    {call,1,{f,17}}.
    {move,{x,0},{x,1}}.
    {move,{atom,nested4},{x,0}}.
    {call_ext,2,{extfunc,erlang,put,2}}.
    {bif,raise,{f,0},[{y,13},{y,12}],{x,0}}.
    {'%live',1}.
  {label,10}.
    {try_end,{y,7}}.
    {test_heap,3,1}.
    {put_tuple,2,{x,1}}.
    {put,{atom,value}}.
    {put,{x,0}}.
    {move,{x,1},{x,0}}.
    {jump,{f,12}}.
  {label,11}.
    {try_case,{y,7}}.
    {test_heap,6,3}.
    {put_tuple,2,{x,3}}.
    {put,{x,0}}.
    {put,{x,1}}.
    {put_tuple,2,{x,0}}.
    {put,{atom,caught}}.
    {put,{x,3}}.
    {'%live',1}.
  {label,12}.
    {try_end,{y,8}}.
    {move,{x,0},{y,14}}.
    {move,{atom,finalized},{x,1}}.
    {kill,{y,12}}.
    {kill,{y,13}}.
    {move,{atom,nested},{x,0}}.
    {call_ext,2,{extfunc,erlang,put,2}}.
    {move,{y,14},{x,0}}.
    {jump,{f,14}}.
  {label,13}.
    {try_case,{y,8}}.
    {move,{x,2},{y,14}}.
    {move,{x,1},{y,13}}.
    {move,{atom,finalized},{x,1}}.
    {kill,{y,12}}.
    {move,{atom,nested},{x,0}}.
    {call_ext,2,{extfunc,erlang,put,2}}.
    {bif,raise,{f,0},[{y,14},{y,13}],{x,0}}.
    {'%live',1}.
  {label,14}.
    {move,{x,0},{y,14}}.
    {kill,{y,13}}.
    {move,{atom,nested3},{x,0}}.
    {call_ext,1,{extfunc,erlang,erase,1}}.
    {move,{x,0},{y,13}}.
    {move,{atom,nested4},{x,0}}.
    {call_ext,1,{extfunc,erlang,erase,1}}.
    {move,{x,0},{y,12}}.
    {move,{atom,nested},{x,0}}.
    {call_ext,1,{extfunc,erlang,erase,1}}.
    {test_heap,5,1}.
    {put_tuple,4,{x,1}}.
    {put,{y,14}}.
    {put,{y,13}}.
    {put,{y,12}}.
    {put,{x,0}}.
    {move,{x,1},{x,0}}.
    {deallocate,15}.
    return.
  {label,15}.
    {try_case_end,{x,0}}.


{function, foo, 1, 17}.
  {label,16}.
    {func_info,{atom,no_exception_in_catch},{atom,foo},1}.
  {label,17}.
    {move,{atom,ok},{x,0}}.
    return.