Commit 574939c6 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[turbolizer] Detect in-place updates of nodes

..and display them in the extended node title (on hover).

Notry: true
Bug: v8:7327
Change-Id: Ic9cd6207269686edb42ecf1bee8f7ef7b6caa035
Reviewed-on: https://chromium-review.googlesource.com/c/1407054
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58783}
parent 3113fa4f
......@@ -24,6 +24,7 @@ export class NodeLabel {
control: boolean;
opinfo: string;
type: string;
inplaceUpdatePhase: string;
constructor(id: number, label: string, title: string, live: boolean, properties: string, sourcePosition: any, origin: any, opcode: string, control: boolean, opinfo: string, type: string) {
this.id = id;
......@@ -37,6 +38,7 @@ export class NodeLabel {
this.control = control;
this.opinfo = opinfo;
this.type = type;
this.inplaceUpdatePhase = null;
}
equals(that?: NodeLabel) {
......@@ -64,6 +66,9 @@ export class NodeLabel {
if (this.origin) {
title += `\nOrigin: ${formatOrigin(this.origin)}`;
}
if (this.inplaceUpdatePhase) {
title += `\nInplace update in phase: ${this.inplaceUpdatePhase}`;
}
return title;
}
......@@ -75,4 +80,7 @@ export class NodeLabel {
return result;
}
setInplaceUpdatePhase(name: string): any {
this.inplaceUpdatePhase = name;
}
}
......@@ -488,6 +488,9 @@ export class SourceResolver {
n.opinfo, n.type);
const previous = nodeLabelMap[label.id];
if (!label.equals(previous)) {
if (previous != undefined) {
label.setInplaceUpdatePhase(phase.name);
}
nodeLabelMap[label.id] = label;
}
n.nodeLabel = nodeLabelMap[label.id];
......
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