     src>> needs-write-barrier? ;
 
 M: gc-map-insn eliminate-write-barrier
-    fresh-allocations get clear-assoc ;
+    fresh-allocations get clear-set ;
 
 M: ##copy eliminate-write-barrier
     [ src>> resolve-copy ] [ dst>> ] bi copies get set-at t ;

M: insn eliminate-write-barrier drop t ;

: write-barriers-step ( insns -- insns' )
    H{ } clone fresh-allocations set
    H{ } clone mutated-objects set
    H{ } clone copies set
    [ eliminate-write-barrier ] filter! ;



: needs-write-barrier? ( insn -- ? )
    resolve-copy {
        [ fresh-allocations get in? not ]
        [ mutated-objects get in? ]
    } 1&& ;

M: ##write-barrier eliminate-write-barrier
