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

Side by Side Diff: tools/turbolizer/node.js

Issue 2093013002: [turbolizer] Show a label with a shorter parameter for some opcodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merge with master Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « tools/turbolizer/graph-view.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var DEFAULT_NODE_WIDTH = 240; 5 var DEFAULT_NODE_WIDTH = 240;
6 var DEFAULT_NODE_HEIGHT = 40; 6 var DEFAULT_NODE_HEIGHT = 40;
7 var TYPE_HEIGHT = 25; 7 var TYPE_HEIGHT = 25;
8 var DEFAULT_NODE_BUBBLE_RADIUS = 4; 8 var DEFAULT_NODE_BUBBLE_RADIUS = 4;
9 var NODE_INPUT_WIDTH = 20; 9 var NODE_INPUT_WIDTH = 20;
10 var MINIMUM_NODE_INPUT_APPROACH = 20; 10 var MINIMUM_NODE_INPUT_APPROACH = 20;
(...skipping 29 matching lines...) Expand all
40 (this.opcode.startsWith('Store') && this.opcode.length > 5); 40 (this.opcode.startsWith('Store') && this.opcode.length > 5);
41 }, 41 },
42 isMachine: function() { 42 isMachine: function() {
43 return !(this.isControl() || this.isInput() || 43 return !(this.isControl() || this.isInput() ||
44 this.isJavaScript() || this.isSimplified()); 44 this.isJavaScript() || this.isSimplified());
45 }, 45 },
46 getTotalNodeWidth: function() { 46 getTotalNodeWidth: function() {
47 var inputWidth = this.inputs.length * NODE_INPUT_WIDTH; 47 var inputWidth = this.inputs.length * NODE_INPUT_WIDTH;
48 return Math.max(inputWidth, this.width); 48 return Math.max(inputWidth, this.width);
49 }, 49 },
50 getLabel: function() { 50 getTitle: function() {
51 return this.label; 51 return this.title;
52 }, 52 },
53 getDisplayLabel: function() { 53 getDisplayLabel: function() {
54 var result = this.id + ":" + this.label; 54 var result = this.id + ":" + this.label;
55 if (result.length > 30) { 55 if (result.length > 30) {
56 return this.id + ":" + this.opcode; 56 return this.id + ":" + this.opcode;
57 } else { 57 } else {
58 return result; 58 return result;
59 } 59 }
60 }, 60 },
61 getType: function() { 61 getType: function() {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 }, 129 },
130 getFunctionRelativeSourcePosition: function(graph) { 130 getFunctionRelativeSourcePosition: function(graph) {
131 return this.pos - graph.sourcePosition; 131 return this.pos - graph.sourcePosition;
132 }, 132 },
133 hasBackEdges: function() { 133 hasBackEdges: function() {
134 return (this.opcode == "Loop") || 134 return (this.opcode == "Loop") ||
135 ((this.opcode == "Phi" || this.opcode == "EffectPhi") && 135 ((this.opcode == "Phi" || this.opcode == "EffectPhi") &&
136 this.inputs[this.inputs.length - 1].source.opcode == "Loop"); 136 this.inputs[this.inputs.length - 1].source.opcode == "Loop");
137 } 137 }
138 }; 138 };
OLDNEW
« no previous file with comments | « tools/turbolizer/graph-view.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698