MCPcopy Create free account
hub / github.com/nodejs/node / mutate

Method mutate

deps/v8/tools/clusterfuzz/js_fuzzer/mutators/mutator.js:62–72  ·  view source on GitHub ↗
(source, context=EMPTY_DEFAULT_CONTEXT)

Source from the content-addressed store, hash-verified

60 }
61
62 mutate(source, context=EMPTY_DEFAULT_CONTEXT) {
63 this.context = context;
64 const result = this.visitor;
65 if (Array.isArray(result)) {
66 for (const visitor of result) {
67 this._traverse(source.ast, visitor);
68 }
69 } else {
70 this._traverse(source.ast, result);
71 }
72 }
73
74 get _skipPropertyName() {
75 return '__skip' + this.constructor.name;

Callers 15

mainFunction · 0.45
testMutatorsFunction · 0.45
loadAndMutateFunction · 0.45
testCloneSiblingsFunction · 0.45
test_normalize.jsFile · 0.45
testMutationsFunction · 0.45
testSuperFunction · 0.45
testTryCatchFunction · 0.45
test_context.jsFile · 0.45

Calls 1

_traverseMethod · 0.95

Tested by

no test coverage detected