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

Method fullRebuild

deps/v8/tools/turbolizer/src/graph-layout.ts:40–58  ·  view source on GitHub ↗
(showTypes: boolean)

Source from the content-addressed store, hash-verified

38 }
39
40 private fullRebuild(showTypes: boolean): void {
41 this.startTime = performance.now();
42 this.maxRank = 0;
43 this.visitOrderWithinRank = 0;
44
45 const [startNodes, endNodes] = this.initNodes();
46 this.initWorkList(startNodes);
47
48 let visited = new Array<boolean>();
49 startNodes.forEach((sn: GraphNode) => this.dfsFindRankLate(visited, sn));
50 visited = new Array<boolean>();
51 startNodes.forEach((sn: GraphNode) => this.dfsRankOrder(visited, sn));
52 endNodes.forEach((node: GraphNode) => node.rank = this.maxRank + 1);
53
54 const rankSets = this.getRankSets(showTypes);
55 this.placeNodes(rankSets, showTypes);
56 this.calculateBackEdgeNumbers();
57 this.graph.graphPhase.stateType = GraphStateType.Cached;
58 }
59
60 private cachedRebuild(): void {
61 this.calculateBackEdgeNumbers();

Callers 1

rebuildMethod · 0.95

Calls 9

initNodesMethod · 0.95
initWorkListMethod · 0.95
dfsFindRankLateMethod · 0.95
dfsRankOrderMethod · 0.95
getRankSetsMethod · 0.95
placeNodesMethod · 0.95
nowMethod · 0.80
forEachMethod · 0.65

Tested by

no test coverage detected