| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 }; |
| OLD | NEW |