Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/noun/manage.c
Original file line number Diff line number Diff line change
Expand Up @@ -1525,6 +1525,14 @@ u3m_soft_top(c3_w mil_w, // timer ms
*/
u3z(arg);

/* Clear build caches if needed.
*/
if ( !u3R->par_p && (u3C.wag_w & u3o_free_ford) ) {
u3h_free(u3R->cax.for_p);
u3R->cax.for_p = u3h_new_cache(u3C.per_w);
u3C.wag_w &= ~(c3_w)u3o_free_ford;
}

/* Return the product.
*/
return pro;
Expand Down
6 changes: 6 additions & 0 deletions pkg/noun/nock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1032,6 +1032,7 @@ _n_bint(u3_noun* ops, u3_noun hif, u3_noun nef, c3_o los_o, c3_o tel_o)
case c3__nara:
case c3__hela:
case c3__loop:
case c3__drop:
case c3__bout: {
u3_noun fen = u3_nul;
c3_w nef_w = _n_comp(&fen, nef, los_o, c3n);
Expand Down Expand Up @@ -1920,6 +1921,11 @@ _n_hilt_fore(u3_noun hin, u3_noun bus, u3_noun* out)
*out = u3i_cell(tag, u3i_cell(har, per));
} break;

case c3__drop: {
u3C.wag_w |= u3o_free_ford;
*out = u3_nul;
} break;

case c3__loop: {
u3_noun key = u3nc(u3k(bus), u3k(fol));
if ( u3_none != u3h_git(u3R->lop_p, key) ) {
Expand Down
1 change: 1 addition & 0 deletions pkg/noun/options.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
u3o_toss = 1 << 13, // reclaim often
u3o_leak_crash = 1 << 14, // crash if leak when gc
u3o_yolo = 1 << 15, // no brakes!
u3o_free_ford = 1 << 16, // free ford caches when done
};

/** Globals.
Expand Down
Loading