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

Method finalizeRootMap

deps/v8/tools/system-analyzer/log/map.mjs:68–82  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

66 }
67
68 finalizeRootMap(id) {
69 let stack = [this];
70 while (stack.length > 0) {
71 let current = stack.pop();
72 if (current.leftId !== 0) {
73 console.warn('Skipping potential parent loop between maps:', current)
74 continue;
75 }
76 current.finalize(id);
77 id += 1;
78 current.children.forEach(edge => stack.push(edge.to));
79 // TODO implement rightId
80 }
81 return id;
82 }
83
84 finalize(id) {
85 // Initialize preorder tree traversal Ids for fast subtree inclusion checks

Callers 1

finalizeMethod · 0.80

Calls 5

popMethod · 0.80
warnMethod · 0.80
forEachMethod · 0.65
finalizeMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected