anchor.diff:      assert_type(#t_map{}, Src, Vst0),
       verify_live(Live, Vst0),
       verify_y_init(Vst0),
  +
       _ = [assert_term(Term, Vst0) || Term <- List],
       Vst = heap_alloc(0, Vst0),
   
  -    branch(Fail, Vst,
  -           fun(SuccVst0) ->
  -                   SuccVst = prune_x_regs(Live, SuccVst0),
  -                   Keys = extract_map_keys(List),
  -                   assert_unique_map_keys(Keys),
  -
  -                   Type = put_map_type(Src, List, Vst),
  -                   create_term(Type, Op, [Src], Dst, SuccVst, SuccVst0)
  -           end).
  +    SuccFun = fun(SuccVst0) ->
  +                      SuccVst = prune_x_regs(Live, SuccVst0),
  +                      Keys = extract_map_keys(List),
  +                      assert_unique_map_keys(Keys),
  +
  +                      Type = put_map_type(Src, List, Vst),
  +                      create_term(Type, Op, [Src], Dst, SuccVst, SuccVst0)
  +              end,
  +
  +    case Op of
  +        put_map_exact ->
  +            branch(Fail, Vst, SuccFun);
  +        put_map_assoc ->
  +            %% This instruction cannot fail.
  +            ?EXCEPTION_LABEL = Fail,            %Assertion.
  +            SuccFun(Vst)
  +    end.
   
   put_map_type(Map0, List, Vst) ->
       Map = normalize(get_term_type(Map0, Vst)),
  
positive.code:             ok
      end.
  
  assert_term(Src, Vst) ->
      _ = get_term_type(Src, Vst),
      ok.
  
negative.code: validate_var_info([], _Reg, Vst) ->
      Vst.
  
  %% Tail call.
  %%  The stackframe must have a known size and be initialized.
  %%  Does not return to the instruction following the call.
  validate_tail_call(Deallocate, Func, Live, #vst{current=#st{numy=NumY}}=Vst0) ->
      assert_float_checked(Vst0),
  
      verify_y_init(Vst0),
      verify_live(Live, Vst0),
      verify_call_args(Func, Live, Vst0),
  
      case will_call_succeed(Func, Vst0) of
          yes when Deallocate =:= NumY ->
              %% The call cannot fail; we don't need to handle exceptions
              Vst = deallocate(Vst0),
              verify_return(Vst);
          maybe when Deallocate =:= NumY ->
              %% The call may fail; make sure we update exception state
              Vst = deallocate(Vst0),
              branch(?EXCEPTION_LABEL, Vst, fun verify_return/1);
          no ->
              %% Note that the compiler is allowed to emit garbage values for
              %% "Deallocate" as we know that it will not be used in this case.
              branch(?EXCEPTION_LABEL, Vst0, fun kill_state/1);
          _ when Deallocate =/= NumY ->
              error({allocated, NumY})
      end.
  
  %% A "plain" call.
  %%  The stackframe must be initialized.
  %%  The instruction will return to the instruction following the call.
  validate_body_call(Func, Live,
                     #vst{current=#st{numy=NumY}}=Vst) when is_integer(NumY)->
      assert_float_checked(Vst),
  
      verify_y_init(Vst),
      verify_live(Live, Vst),
      verify_call_args(Func, Live, Vst),
  
      SuccFun = fun(#vst{current=St0}=SuccVst0) -> 
                        {RetType, _, _} = call_types(Func, Live, SuccVst0),
                        true = RetType =/= none,  %Assertion.
  
                        St = St0#st{f=init_fregs()},
                        SuccVst = prune_x_regs(0, SuccVst0#vst{current=St}),
  
                        create_term(RetType, call, [], {x,0}, SuccVst)
                end,
  
      case will_call_succeed(Func, Vst) of
          yes ->
              SuccFun(Vst);
          maybe ->
              branch(?EXCEPTION_LABEL, Vst, SuccFun);
          no ->
              branch(?EXCEPTION_LABEL, Vst, fun kill_state/1)
      end;
  validate_body_call(_, _, #vst{current=#st{numy=NumY}}) ->
      error({allocated, NumY}).
  