[ dup n>> 0 < [ bad-peek ] [ ##peek, ] if ] each-insertion ;
: insert-replaces ( from to -- )
- 2drop ;
+ [ inserting-replaces ] keep
+ [ dup n>> 0 < [ 2drop ] [ ##replace, ] if ] each-insertion ;
: visit-edge ( from to -- )
! If both blocks are subroutine calls, don't bother
[ loc>> n>> 0 >= ] filter ;
: changes>insns ( replaces height-state -- insns )
- [ drop replaces>copy-insns ]
- [ nip height-state>insns ]
- [ replaces>replace-insns ] 2tri 3append ;
+ [ replaces>copy-insns ] [ height-state>insns ] bi* append ;
-: emit-changes ( replaces height-state -- )
+: emit-changes ( replaces state -- )
building get pop -rot changes>insns % , ;
: peek-loc ( loc -- vreg )