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

Method selectOrigins

deps/v8/tools/turbolizer/src/views/graph-view.ts:718–742  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

716 }
717
718 private selectOrigins(): void {
719 const selection = new SelectionStorage();
720 const origins = new Array<GraphNode>();
721 let phase = this.phaseName;
722 for (const node of this.state.selection) {
723 const origin = node.nodeLabel.origin;
724 if (origin && origin instanceof NodeOrigin) {
725 phase = origin.phase;
726 const node = this.graph.nodeMap[origin.identifier()];
727 if (phase === this.phaseName && node) {
728 origins.push(node);
729 } else {
730 selection.adaptNode(origin.identifier());
731 }
732 }
733 }
734 // Only go through phase reselection if we actually need
735 // to display another phase.
736 if (selection.isAdapted() && phase !== this.phaseName) {
737 this.showPhaseByName(phase, selection);
738 } else if (origins.length > 0) {
739 this.nodeSelectionHandler.clear();
740 this.nodeSelectionHandler.select(origins, true, false);
741 }
742 }
743}

Callers 1

svgKeyDownMethod · 0.95

Calls 6

adaptNodeMethod · 0.95
isAdaptedMethod · 0.95
clearMethod · 0.65
selectMethod · 0.65
identifierMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected