Lines Matching refs:mutator
571 func (c *Context) RegisterTopDownMutator(name string, mutator TopDownMutator) MutatorHandle {
579 topDownMutator: mutator,
598 func (c *Context) RegisterBottomUpMutator(name string, mutator BottomUpMutator) MutatorHandle {
606 bottomUpMutator: mutator,
623 func (mutator *mutatorInfo) Parallel() MutatorHandle {
624 mutator.parallel = true
625 return mutator
643 func (c *Context) RegisterEarlyMutator(name string, mutator EarlyMutator) {
652 mutator(mctx)
2415 for _, mutator := range mutators {
2416 pprof.Do(ctx, pprof.Labels("mutator", mutator.name), func(context.Context) {
2418 if mutator.topDownMutator != nil {
2419 newDeps, errs = c.runMutator(config, mutator, topDownMutator)
2420 } else if mutator.bottomUpMutator != nil {
2421 newDeps, errs = c.runMutator(config, mutator, bottomUpMutator)
2423 panic("no mutator set on " + mutator.name)
2444 run(mutator *mutatorInfo, ctx *mutatorContext)
2451 func (bottomUpMutatorImpl) run(mutator *mutatorInfo, ctx *mutatorContext) {
2452 mutator.bottomUpMutator(ctx)
2465 func (topDownMutatorImpl) run(mutator *mutatorInfo, ctx *mutatorContext) {
2466 mutator.topDownMutator(ctx)
2487 func (c *Context) runMutator(config interface{}, mutator *mutatorInfo,
2526 name: mutator.name,
2530 module.startedMutator = mutator
2535 in := fmt.Sprintf("%s %q for %s", direction, mutator.name, module)
2544 direction.run(mutator, mctx)
2547 module.finishedMutator = mutator
2597 c.startedMutator = mutator
2600 if mutator.parallel {
2610 c.finishedMutators[mutator] = true