anchor.diff:  %%  These expressions are processed "in parallel" for purposes of variable
   %%  definition etc.
   
  -expr_list([E0|Es]) ->
  -    E1 = expr(E0, false),
  -    [E1|expr_list(Es)];
  -expr_list([]) -> [].
  -
  -icr_clauses([C0|Cs], Lc) ->
  -    C1 = clause(C0, Lc),
  -    [C1|icr_clauses(Cs, Lc)];
  -icr_clauses([], _) -> [].
  -
  -fun_clauses([{clause,A,H,G,B}|Cs]) ->
  -    [{clause,ln(A),head(H),guard(G),exprs(B, true)}|fun_clauses(Cs)];
  -fun_clauses([]) -> [].
  -
  -
  -new_map(Fs0, Anno, F) ->
  +expr_list([E0|Es], St) ->
  +    E1 = expr(E0, false, St),
  +    [E1|expr_list(Es, St)];
  +expr_list([], _St) -> [].
  +
  +icr_clauses([C0|Cs], Lc, St) ->
  +    C1 = clause(C0, Lc, St),
  +    [C1|icr_clauses(Cs, Lc, St)];
  +icr_clauses([], _, _St) -> [].
  +
  +fun_clauses([{clause,A,H,G,B}|Cs], St) ->
  +    [{clause,ln(A),head(H, St),guard(G, St),exprs(B, true, St)}|fun_clauses(Cs, St)];
  +fun_clauses([], _St) -> [].
  +
  +new_map(Fs0, Anno, St, F) ->
       Line = ln(Anno),
  -    Fs1 = map_fields(Fs0, F),
  +    Fs1 = map_fields(Fs0, St, F),
       Fs2 = [{L,K,V} || {map_field_assoc,L,K,V} <- Fs1],
       try
   	{value,Line,map_literal(Fs2, #{})}
  
positive.code: %%% Rewrite the abstract syntax tree to that it will be easier (== faster)
  %%% to interpret.
  
  clauses([C0|Cs]) ->
      C1 = clause(C0, true),
      [C1|clauses(Cs)];
  clauses([]) -> [].
  
  clause({clause,Anno,H0,G0,B0}, Lc) ->
      H1 = head(H0),
      G1 = guard(G0),
      B1 = exprs(B0, Lc),
      {clause,ln(Anno),H1,G1,B1}.
  
  head(Ps) -> patterns(Ps).
  
  %%  These patterns are processed "sequentially" for purposes of variable
  %%  definition etc.
  
  patterns([P0|Ps]) ->
      P1 = pattern(P0),
      [P1|patterns(Ps)];
  patterns([]) -> [].
  
  %%  N.B. Only valid patterns are included here.
  
  pattern({var,Anno,V}) -> {var,ln(Anno),V};
  pattern({char,Anno,I}) -> {value,ln(Anno),I};
  pattern({integer,Anno,I}) -> {value,ln(Anno),I};
  pattern({match,Anno,Pat1,Pat2}) ->
      {match,ln(Anno),pattern(Pat1),pattern(Pat2)};
  pattern({float,Anno,F}) -> {value,ln(Anno),F};
  pattern({atom,Anno,A}) -> {value,ln(Anno),A};
  pattern({string,Anno,S}) -> {value,ln(Anno),S};
  pattern({nil,Anno}) -> {value,ln(Anno),[]};
  pattern({cons,Anno,H0,T0}) ->
      H1 = pattern(H0),
      T1 = pattern(T0),
      {cons,ln(Anno),H1,T1};
  pattern({tuple,Anno,Ps0}) ->
      Ps1 = pattern_list(Ps0),
      {tuple,ln(Anno),Ps1};
  pattern({map,Anno,Fs0}) ->
      Fs1 = lists:map(fun ({map_field_exact,L,K,V}) ->
                              {map_field_exact,L,gexpr(K),pattern(V)}
                      end, Fs0),
      {map,ln(Anno),Fs1};
  pattern({op,_,'-',{integer,Anno,I}}) ->
      {value,ln(Anno),-I};
  pattern({op,_,'+',{integer,Anno,I}}) ->
      {value,ln(Anno),I};
  pattern({op,_,'-',{char,Anno,I}}) ->
      {value,ln(Anno),-I};
  pattern({op,_,'+',{char,Anno,I}}) ->
      {value,ln(Anno),I};
  pattern({op,_,'-',{float,Anno,I}}) ->
      {value,ln(Anno),-I};
  pattern({op,_,'+',{float,Anno,I}}) ->
      {value,ln(Anno),I};
  pattern({bin,Anno,Grp}) ->
      Grp1 = pattern_list(bin_expand_strings(Grp)),
      {bin,ln(Anno),Grp1};
  pattern({bin_element,Anno,Expr0,Size0,Type0}) ->
      {Size1,Type} = make_bit_type(Anno, Size0, Type0),
      Expr1 = pattern(Expr0),
      Expr = coerce_to_float(Expr1, Type0),
      Size = expr(Size1, false),
      {bin_element,ln(Anno),Expr,Size,Type};
  %% Evaluate compile-time expressions.
  pattern({op,_,'++',{nil,_},R}) ->
      pattern(R);
  pattern({op,_,'++',{cons,Li,H,T},R}) ->
      pattern({cons,Li,H,{op,Li,'++',T,R}});
  pattern({op,_,'++',{string,Li,L},R}) ->
      pattern(string_to_conses(Li, L, R));
  pattern({op,_Line,_Op,_A}=Op) ->
      pattern(erl_eval:partial_eval(Op));
  pattern({op,_Line,_Op,_L,_R}=Op) ->
      pattern(erl_eval:partial_eval(Op)).
  
  string_to_conses(Anno, Cs, Tail) ->
      lists:foldr(fun (C, T) -> {cons,Anno,{char,Anno,C},T} end, Tail, Cs).
  
negative.code:     {ok,Size,Bt} = erl_bits:set_bit_type(Size, Type0),
      {Size,erl_bits:as_list(Bt)}.
  
  expr_lc_bc({Tag,Anno,E0,Gs0}, St) ->
      Gs = lists:map(fun ({generate,L,P0,Qs}) ->
  			   {generate,L,pattern(P0, St),expr(Qs, false, St)};
  		       ({b_generate,L,P0,Qs}) -> %R12.
  			   {b_generate,L,pattern(P0, St),expr(Qs, false, St)};
  		       (Expr) ->
  			   case is_guard_test(Expr, St) of
  			       true -> {guard,guard([[Expr]], St)};
  			       false -> expr(Expr, false, St)
  			   end
  		   end, Gs0),
      {Tag,ln(Anno),expr(E0, false, St),Gs}.
  
  is_guard_test(Expr, _St) ->
      IsOverridden = fun({_,_}) -> true end,
      erl_lint:is_guard_test(Expr, [], IsOverridden).
  
  