From 80d43738f1e4c648ccfc4599e17dc8ba455fe1ea Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sat, 14 Mar 2020 16:42:00 +0100 Subject: prog: rename target.SanitizeCall to Neutralize We will need a wrapper for target.SanitizeCall that will do more than just calling the target-provided function. To avoid confusion and potential mistakes, give the target function and prog function different names. Prog package will continue to call this "sanitize", which will include target's "neutralize" + more. Also refactor API a bit: we need a helper function that sanitizes the whole program because that's needed most of the time. Fixes #477 Fixes #502 --- prog/minimization.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'prog/minimization.go') diff --git a/prog/minimization.go b/prog/minimization.go index 9a71dd067..93a986556 100644 --- a/prog/minimization.go +++ b/prog/minimization.go @@ -13,9 +13,7 @@ import ( // the simplification attempt is committed and the process continues. func Minimize(p0 *Prog, callIndex0 int, crash bool, pred0 func(*Prog, int) bool) (*Prog, int) { pred := func(p *Prog, callIndex int) bool { - for _, call := range p.Calls { - p.Target.SanitizeCall(call) - } + p.sanitizeFix() p.debugValidate() return pred0(p, callIndex) } -- cgit mrf-deployment