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

Side by Side Diff: tools/turbolizer/schedule-view.js

Issue 2230083004: [turbolizer] Use locations rather than ranges everywhere (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Remove stray change 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 unified diff | Download patch
« no previous file with comments | « tools/turbolizer/graph-view.js ('k') | tools/turbolizer/selection.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "use strict"; 5 "use strict";
6 6
7 class ScheduleView extends TextView { 7 class ScheduleView extends TextView {
8 constructor(id, broker, nodePositionMap) { 8 constructor(id, broker) {
9 super(id, broker, null, false); 9 super(id, broker, null, false);
10 let view = this; 10 let view = this;
11 let BLOCK_STYLE = { 11 let BLOCK_STYLE = {
12 css: 'tag' 12 css: 'tag'
13 }; 13 };
14 const BLOCK_HEADER_STYLE = { 14 const BLOCK_HEADER_STYLE = {
15 css: 'com', 15 css: 'com',
16 block_id: -1, 16 block_id: -1,
17 location: function(text) { 17 location: function(text) {
18 let matches = /\d+/.exec(text); 18 let matches = /\d+/.exec(text);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 [/^B\d+$/, BLOCK_LINK_STYLE, -1], 96 [/^B\d+$/, BLOCK_LINK_STYLE, -1],
97 [/^B\d+/, BLOCK_LINK_STYLE], 97 [/^B\d+/, BLOCK_LINK_STYLE],
98 [/^, /, null] 98 [/^, /, null]
99 ], 99 ],
100 [ 100 [
101 [/^ -> /, ARROW_STYLE], 101 [/^ -> /, ARROW_STYLE],
102 [/^B\d+$/, BLOCK_LINK_STYLE, -1] 102 [/^B\d+$/, BLOCK_LINK_STYLE, -1]
103 ] 103 ]
104 ]; 104 ];
105 this.setPatterns(patterns); 105 this.setPatterns(patterns);
106 this.setNodePositionMap(nodePositionMap);
107 } 106 }
108 107
109 initializeContent(data, rememberedSelection) { 108 initializeContent(data, rememberedSelection) {
110 super.initializeContent(data, rememberedSelection); 109 super.initializeContent(data, rememberedSelection);
111 var graph = this; 110 var graph = this;
112 var locations = []; 111 var locations = [];
113 for (var id of rememberedSelection) { 112 for (var id of rememberedSelection) {
114 locations.push({ node_id : id }); 113 locations.push({ node_id : id });
115 } 114 }
116 this.selectLocations(locations, true, false); 115 this.selectLocations(locations, true, true);
117 } 116 }
118 117
119 detachSelection() { 118 detachSelection() {
120 var selection = this.selection.detachSelection(); 119 var selection = this.selection.detachSelection();
121 var s = new Set(); 120 var s = new Set();
122 for (var i of selection) { 121 for (var i of selection) {
123 s.add(i.location.node_id); 122 if (i.location.node_id != undefined && i.location.node_id > 0) {
123 s.add(i.location.node_id);
124 }
124 }; 125 };
125 return s; 126 return s;
126 } 127 }
127 } 128 }
OLDNEW
« no previous file with comments | « tools/turbolizer/graph-view.js ('k') | tools/turbolizer/selection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698