Commit e3793ef5 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbolizer] Don't show empty gaps in sequence view

Also show constant for ArchNops that encode assigning from a
constant.

Change-Id: I84590005dda62ebf445aada57f826f5ffcd5a802
Bug: v8:7327
Notry: true
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1672943
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarDaniel Clifford <danno@chromium.org>
Cr-Commit-Position: refs/heads/master@{#62388}
parent 3b329c5b
......@@ -107,10 +107,11 @@ export class SequenceView extends TextView {
// Print gap moves.
const gapEl = createElement("div", "gap", "gap");
instContentsEl.appendChild(gapEl);
let hasGaps = false;
for (const gap of instruction.gaps) {
const moves = createElement("div", ["comma-sep-list", "gap-move"]);
for (const move of gap) {
hasGaps = true;
const moveEl = createElement("div", "move");
const destinationEl = elementForOperand(move[0], searchInfo);
moveEl.appendChild(destinationEl);
......@@ -122,6 +123,9 @@ export class SequenceView extends TextView {
}
gapEl.appendChild(moves);
}
if (hasGaps) {
instContentsEl.appendChild(gapEl);
}
const instEl = createElement("div", "instruction");
instContentsEl.appendChild(instEl);
......@@ -137,8 +141,12 @@ export class SequenceView extends TextView {
instEl.appendChild(assignEl);
}
const text = instruction.opcode + instruction.flags;
const instLabel = createElement("div", "node-label", text);
let text = instruction.opcode + instruction.flags;
const instLabel = createElement("div", "node-label", text)
if (instruction.opcode == "ArchNop" && instruction.outputs.length == 1 && instruction.outputs[0].tooltip) {
instLabel.innerText = instruction.outputs[0].tooltip;
}
searchInfo.push(text);
view.addHtmlElementForNodeId(text, instLabel);
instEl.appendChild(instLabel);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment