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

Unified Diff: tools/turbolizer/text-view.js

Issue 2133663002: [turbolizer] Improve code comments in disassembly (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [turbolizer] Improve code comments in disassembly 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/turbolizer/disassembly-view.js ('k') | tools/turbolizer/turbo-visualizer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/turbolizer/text-view.js
diff --git a/tools/turbolizer/text-view.js b/tools/turbolizer/text-view.js
index c41c25b768253e6d9c1b1a3cc744bcf6553bbfc4..5a3639d5bc7c0b14031a027b6af1cefd4d2f82a1 100644
--- a/tools/turbolizer/text-view.js
+++ b/tools/turbolizer/text-view.js
@@ -28,6 +28,7 @@ class TextView extends View {
i.classList.remove("selected");
}
}
+ broker.clear(selectionHandler);
broker.select(selectionHandler, view.getRanges(items), selected);
},
selectionDifference: function(span1, inclusive1, span2, inclusive2) {
@@ -68,7 +69,8 @@ class TextView extends View {
for (let range of ranges) {
let start = range[0];
let end = range[1];
- let location = { pos_start: start, pos_end: end };
+ let block_id = range[3];
+ let location = { pos_start: start, pos_end: end, block_id: block_id };
if (range[2] !== null && range[2] != -1) {
location.node_id = range[2];
if (range[0] == -1 && range[1] == -1) {
@@ -185,9 +187,13 @@ class TextView extends View {
let start = -1;
let end = -1;
let node_id = -1;
+ let block_id = -1;
if (location.node_id !== undefined) {
node_id = location.node_id;
}
+ if (location.block_id !== undefined) {
+ block_id = location.block_id;
+ }
if (location.pos_start !== undefined) {
start = location.pos_start;
end = location.pos_end;
@@ -200,8 +206,9 @@ class TextView extends View {
if (lastObject == null ||
(lastObject[2] != node_id ||
lastObject[0] != start ||
- lastObject[1] != end)) {
- lastObject = [start, end, node_id];
+ lastObject[1] != end ||
+ lastObject[3] != block_id)) {
+ lastObject = [start, end, node_id, block_id];
result.push(lastObject);
}
}
« no previous file with comments | « tools/turbolizer/disassembly-view.js ('k') | tools/turbolizer/turbo-visualizer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698