summaryrefslogtreecommitdiff
path: root/deps/v8/tools/turbolizer/src/selection/selection-broker.ts
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/tools/turbolizer/src/selection/selection-broker.ts')
-rw-r--r--deps/v8/tools/turbolizer/src/selection/selection-broker.ts30
1 files changed, 16 insertions, 14 deletions
diff --git a/deps/v8/tools/turbolizer/src/selection/selection-broker.ts b/deps/v8/tools/turbolizer/src/selection/selection-broker.ts
index 9240551b32..6611d77ce8 100644
--- a/deps/v8/tools/turbolizer/src/selection/selection-broker.ts
+++ b/deps/v8/tools/turbolizer/src/selection/selection-broker.ts
@@ -106,21 +106,23 @@ export class SelectionBroker {
}
// Select the lines from the source and bytecode panels (left panels)
- const pcOffsets = this.sourceResolver.instructionsPhase
- .instructionsToKeyPcOffsets(instructionOffsets);
-
- for (const offset of pcOffsets) {
- const nodes = this.sourceResolver.instructionsPhase.nodesForPCOffset(offset);
- const sourcePositions = this.sourceResolver.nodeIdsToSourcePositions(nodes);
- for (const handler of this.sourcePositionHandlers) {
- if (handler != from) handler.brokeredSourcePositionSelect(sourcePositions, selected);
- }
- const bytecodePositions = this.sourceResolver.nodeIdsToBytecodePositions(nodes);
- for (const handler of this.bytecodeOffsetHandlers) {
- if (handler != from) handler.brokeredBytecodeOffsetSelect(bytecodePositions, selected);
+ const nodes = this.sourceResolver.instructionsPhase.nodesForInstructions(instructionOffsets);
+ const sourcePositions = this.sourceResolver.nodeIdsToSourcePositions(nodes);
+ for (const handler of this.sourcePositionHandlers) {
+ if (handler != from) handler.brokeredSourcePositionSelect(sourcePositions, selected);
+ }
+ const bytecodePositions = this.sourceResolver.nodeIdsToBytecodePositions(nodes);
+ for (const handler of this.bytecodeOffsetHandlers) {
+ if (handler != from) handler.brokeredBytecodeOffsetSelect(bytecodePositions, selected);
+ }
+
+ // Select the lines from the middle panel for the register allocation phase.
+ for (const b of this.registerAllocationHandlers) {
+ if (b != from) {
+ b.brokeredRegisterAllocationSelect(instructionOffsets.map(instr => [instr, instr]),
+ selected);
}
}
- // The middle panel lines have already been selected so there's no need to reselect them.
}
public broadcastSourcePositionSelect(from, sourcePositions: Array<GenericPosition>,
@@ -206,7 +208,7 @@ export class SelectionBroker {
this.selectInstructionsAndRegisterAllocations(from, nodes, selected);
}
- public broadcastBlockSelect(from, blocksIds: Array<string>, selected: boolean): void {
+ public broadcastBlockSelect(from, blocksIds: Array<number>, selected: boolean): void {
for (const handler of this.blockHandlers) {
if (handler != from) handler.brokeredBlockSelect(blocksIds, selected);
}