MCPcopy Index your code
hub / github.com/nodejs/node / getOrCreateFunction

Method getOrCreateFunction

deps/v8/tools/parse-processor.mjs:895–906  ·  view source on GitHub ↗
(
      scriptId, startPosition, endPosition, duration, timestamp, functionName)

Source from the content-addressed store, hash-verified

893 }
894
895 getOrCreateFunction(
896 scriptId, startPosition, endPosition, duration, timestamp, functionName) {
897 if (scriptId == -1) {
898 return this.lookupFunktionByRange(startPosition, endPosition);
899 }
900 let script = this.lookupScript(scriptId);
901 let funktion = script.getFunktionAtStartPosition(startPosition);
902 if (funktion === undefined) {
903 funktion = new Funktion(functionName, startPosition, endPosition, script);
904 }
905 return funktion;
906 }
907
908 // Iterates over all functions and tries to find matching ones.
909 lookupFunktionsByRange(start, end) {

Callers 6

processFullMethod · 0.95
processParseFunctionMethod · 0.95
processCompileLazyMethod · 0.95
processDeserializeMethod · 0.95

Calls 3

lookupFunktionByRangeMethod · 0.95
lookupScriptMethod · 0.95

Tested by

no test coverage detected