anchor.diff:      %% Lock variables that are alive before try and used afterwards.
       %% Don't lock variables that are only used inside the try expression.
       Pdb0 = vdb_sub(I, I+1, Vdb),
  -    {T,MaxI,Pdb1} = guard_body(Ts, I+1, Pdb0),
  +    {T,MaxI,Pdb1} = body(Ts, I+1, Pdb0),
       Pdb2 = use_vars(A#k.ns, MaxI+1, Pdb1),	%Save "return" values
  -    #l{ke={protected,T,var_list(Rs)},i=I,a=A#k.a,vdb=Pdb2};
  -guard(#k_seq{}=G, I, Vdb0) ->
  -    {Es,_,Vdb1} = guard_body(G, I, Vdb0),
  -    #l{ke={block,Es},i=I,vdb=Vdb1,a=[]};
  -guard(G, I, Vdb) -> guard_expr(G, I, Vdb).
  -
  -%% guard_body(Kbody, I, Vdb) -> {[Expr],MaxI,Vdb}.
  -
  -guard_body(#k_seq{arg=Ke,body=Kb}, I, Vdb0) ->
  -    A = get_kanno(Ke),
  -    Vdb1 = use_vars(A#k.us, I, new_vars(A#k.ns, I, Vdb0)),
  -    {Es,MaxI,Vdb2} = guard_body(Kb, I+1, Vdb1), 
  -    E = guard_expr(Ke, I, Vdb2),
  -    {[E|Es],MaxI,Vdb2};
  -guard_body(Ke, I, Vdb0) ->
  -    A = get_kanno(Ke),
  -    Vdb1 = use_vars(A#k.us, I, new_vars(A#k.ns, I, Vdb0)),
  -    E = guard_expr(Ke, I, Vdb1),
  -    {[E],I,Vdb1}.
  -
  -%% guard_expr(Call, I, Vdb) -> Expr
  -
  -guard_expr(#k_test{anno=A,op=Op,args=As}, I, _Vdb) ->
  +    #l{ke={protected,T,var_list(Rs)},i=I,a=A#k.a,vdb=Pdb2}.
  +
  +%% expr(Kexpr, I, Vdb) -> Expr.
  +
  +expr(#k_test{anno=A,op=Op,args=As}, I, _Vdb) ->
       #l{ke={test,test_op(Op),atomic_list(As)},i=I,a=A#k.a};
  -guard_expr(#k_bif{anno=A,op=Op,args=As,ret=Rs}, I, _Vdb) ->
  -    Name = bif_op(Op),
  -    Ar = length(As),
  -    case is_gc_bif(Name, Ar) of
  -	false ->
  -	    #l{ke={bif,Name,atomic_list(As),var_list(Rs)},i=I,a=A#k.a};
  -	true ->
  -	    #l{ke={gc_bif,Name,atomic_list(As),var_list(Rs)},i=I,a=A#k.a}
  -    end;
  -guard_expr(#k_put{anno=A,arg=Arg,ret=Rs}, I, _Vdb) ->
  -    #l{ke={set,var_list(Rs),literal(Arg, [])},i=I,a=A#k.a};
  -guard_expr(#k_guard_match{anno=A,body=Kb,ret=Rs}, I, Vdb) ->
  -    %% Support for andalso/orelse in guards.
  -    %% Work out imported variables which need to be locked.
  -    Mdb = vdb_sub(I, I+1, Vdb),
  -    M = match(Kb, A#k.us, I+1, [], Mdb),
  -    #l{ke={guard_match,M,var_list(Rs)},i=I,vdb=use_vars(A#k.us, I+1, Mdb),a=A#k.a};
  -guard_expr(G, I, Vdb) -> guard(G, I, Vdb).
  -
  -%% expr(Kexpr, I, Vdb) -> Expr.
  -
   expr(#k_call{anno=A,op=Op,args=As,ret=Rs}, I, _Vdb) ->
       #l{ke={call,call_op(Op),atomic_list(As),var_list(Rs)},i=I,a=A#k.a};
   expr(#k_enter{anno=A,op=Op,args=As}, I, _Vdb) ->
  
positive.code: expr(#k_return{anno=A,args=As}, I, _Vdb) ->
      #l{ke={return,atomic_list(As)},i=I,a=A#k.a}.
  
  %% call_op(Op) -> Op.
  %% bif_op(Op) -> Op.
  %% test_op(Op) -> Op.
  
negative.code: 	 true -> Vd
        end || {V,F,L}=Vd <- Vdb, F < Min, L >= Min ].
  
  %% is_in_guard() -> true|false.
  
  is_in_guard() ->
      get(guard_refc) > 0.
  