Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(843)

Unified Diff: tools/turbolizer/node.js

Issue 2230313002: [turbolizer] Enlarge node labels and bubbles. Fix dead node display on old JSON. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@t-p2-base
Patch Set: Fix arrowheads. Fix dead nodes on old JSONs. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/turbolizer/graph-view.js ('k') | tools/turbolizer/turbo-visualizer.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/turbolizer/node.js
diff --git a/tools/turbolizer/node.js b/tools/turbolizer/node.js
index 18b74d021882709a6934e89f8e038422f385979d..16f31cef8cb438c829fa63a653387bb6b4a38b8a 100644
--- a/tools/turbolizer/node.js
+++ b/tools/turbolizer/node.js
@@ -2,12 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-var DEFAULT_NODE_WIDTH = 240;
-var DEFAULT_NODE_HEIGHT = 40;
var TYPE_HEIGHT = 25;
-var DEFAULT_NODE_BUBBLE_RADIUS = 4;
-var NODE_INPUT_WIDTH = 20;
-var MINIMUM_NODE_INPUT_APPROACH = 20;
+var DEFAULT_NODE_BUBBLE_RADIUS = 12;
+var NODE_INPUT_WIDTH = 50;
+var MINIMUM_NODE_INPUT_APPROACH = 15 + 2 * DEFAULT_NODE_BUBBLE_RADIUS;
var MINIMUM_NODE_OUTPUT_APPROACH = 15;
function isNodeInitiallyVisible(node) {
@@ -22,7 +20,7 @@ var Node = {
return this.opcode == 'Parameter' || this.opcode.endsWith('Constant');
},
isLive: function() {
- return this.live;
+ return this.live !== false;
},
isJavaScript: function() {
return this.opcode.startsWith('JS');
@@ -127,7 +125,7 @@ var Node = {
(index % 4) * MINIMUM_EDGE_SEPARATION - DEFAULT_NODE_BUBBLE_RADIUS
},
getOutputApproach: function(graph, index) {
- return this.y + this.outputApproach + graph.getNodeHeight() +
+ return this.y + this.outputApproach + graph.getNodeHeight(this) +
+ DEFAULT_NODE_BUBBLE_RADIUS;
},
getInputX: function(index) {
« no previous file with comments | « tools/turbolizer/graph-view.js ('k') | tools/turbolizer/turbo-visualizer.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698