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

GENERIC: eliminate-write-barrier ( insn -- ? )

: fresh-allocation ( vreg -- )
    fresh-allocations get conjoin ;

M: ##allot eliminate-write-barrier
    dst>> fresh-allocation t ;

: mutated-object ( vreg -- )
    resolve-copy mutated-objects get conjoin ;

M: ##set-slot eliminate-write-barrier
    obj>> mutated-object t ;

    src>> needs-write-barrier? ;

M: gc-map-insn eliminate-write-barrier
    fresh-allocations get clear-set ;

M: ##copy eliminate-write-barrier
    [ src>> resolve-copy ] [ dst>> ] bi copies get set-at t ;
