| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 944 this._edgeInternalType = this._edgeTypes.indexOf("internal"); | 944 this._edgeInternalType = this._edgeTypes.indexOf("internal"); |
| 945 this._edgeShortcutType = this._edgeTypes.indexOf("shortcut"); | 945 this._edgeShortcutType = this._edgeTypes.indexOf("shortcut"); |
| 946 this._edgeWeakType = this._edgeTypes.indexOf("weak"); | 946 this._edgeWeakType = this._edgeTypes.indexOf("weak"); |
| 947 this._edgeInvisibleType = this._edgeTypes.indexOf("invisible"); | 947 this._edgeInvisibleType = this._edgeTypes.indexOf("invisible"); |
| 948 | 948 |
| 949 this.nodeCount = this._nodes.length / this._nodeFieldCount; | 949 this.nodeCount = this._nodes.length / this._nodeFieldCount; |
| 950 this._edgeCount = this._containmentEdges.length / this._edgeFieldsCount; | 950 this._edgeCount = this._containmentEdges.length / this._edgeFieldsCount; |
| 951 | 951 |
| 952 this._progress.updateStatus("Building edge indexes\u2026"); | 952 this._progress.updateStatus("Building edge indexes\u2026"); |
| 953 this._buildEdgeIndexes(); | 953 this._buildEdgeIndexes(); |
| 954 this._progress.updateStatus("Marking invisible edges\u2026"); | |
| 955 this._markInvisibleEdges(); | |
| 956 this._progress.updateStatus("Building retainers\u2026"); | 954 this._progress.updateStatus("Building retainers\u2026"); |
| 957 this._buildRetainers(); | 955 this._buildRetainers(); |
| 958 this._progress.updateStatus("Calculating node flags\u2026"); | 956 this._progress.updateStatus("Calculating node flags\u2026"); |
| 959 this._calculateFlags(); | 957 this._calculateFlags(); |
| 960 this._progress.updateStatus("Calculating distances\u2026"); | 958 this._progress.updateStatus("Calculating distances\u2026"); |
| 961 this._calculateDistances(); | 959 this._calculateDistances(); |
| 962 this._progress.updateStatus("Building postorder index\u2026"); | 960 this._progress.updateStatus("Building postorder index\u2026"); |
| 963 var result = this._buildPostOrderIndex(); | 961 var result = this._buildPostOrderIndex(); |
| 964 // Actually it is array that maps node ordinal number to dominator node
ordinal number. | 962 // Actually it is array that maps node ordinal number to dominator node
ordinal number. |
| 965 this._progress.updateStatus("Building dominator tree\u2026"); | 963 this._progress.updateStatus("Building dominator tree\u2026"); |
| (...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1730 // Fill up the dominatedNodes array with indexes of dominated nodes. Ski
p the root (node at | 1728 // Fill up the dominatedNodes array with indexes of dominated nodes. Ski
p the root (node at |
| 1731 // index 0) as it is the only node that dominates itself. | 1729 // index 0) as it is the only node that dominates itself. |
| 1732 for (var nodeOrdinal = fromNodeOrdinal; nodeOrdinal < toNodeOrdinal; ++n
odeOrdinal) { | 1730 for (var nodeOrdinal = fromNodeOrdinal; nodeOrdinal < toNodeOrdinal; ++n
odeOrdinal) { |
| 1733 var dominatorOrdinal = dominatorsTree[nodeOrdinal]; | 1731 var dominatorOrdinal = dominatorsTree[nodeOrdinal]; |
| 1734 var dominatedRefIndex = indexArray[dominatorOrdinal]; | 1732 var dominatedRefIndex = indexArray[dominatorOrdinal]; |
| 1735 dominatedRefIndex += (--dominatedNodes[dominatedRefIndex]); | 1733 dominatedRefIndex += (--dominatedNodes[dominatedRefIndex]); |
| 1736 dominatedNodes[dominatedRefIndex] = nodeOrdinal * nodeFieldCount; | 1734 dominatedNodes[dominatedRefIndex] = nodeOrdinal * nodeFieldCount; |
| 1737 } | 1735 } |
| 1738 }, | 1736 }, |
| 1739 | 1737 |
| 1740 _markInvisibleEdges: function() | |
| 1741 { | |
| 1742 throw new Error("Not implemented"); | |
| 1743 }, | |
| 1744 | |
| 1745 _calculateFlags: function() | 1738 _calculateFlags: function() |
| 1746 { | 1739 { |
| 1747 throw new Error("Not implemented"); | 1740 throw new Error("Not implemented"); |
| 1748 }, | 1741 }, |
| 1749 | 1742 |
| 1750 _calculateStatistics: function() | 1743 _calculateStatistics: function() |
| 1751 { | 1744 { |
| 1752 throw new Error("Not implemented"); | 1745 throw new Error("Not implemented"); |
| 1753 }, | 1746 }, |
| 1754 | 1747 |
| (...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2290 * @param {number} windowRight | 2283 * @param {number} windowRight |
| 2291 */ | 2284 */ |
| 2292 sort: function(comparator, leftBound, rightBound, windowLeft, windowRight) | 2285 sort: function(comparator, leftBound, rightBound, windowLeft, windowRight) |
| 2293 { | 2286 { |
| 2294 this._iterationOrder.sortRange(this._buildCompareFunction(comparator), l
eftBound, rightBound, windowLeft, windowRight); | 2287 this._iterationOrder.sortRange(this._buildCompareFunction(comparator), l
eftBound, rightBound, windowLeft, windowRight); |
| 2295 }, | 2288 }, |
| 2296 | 2289 |
| 2297 __proto__: WebInspector.HeapSnapshotItemProvider.prototype | 2290 __proto__: WebInspector.HeapSnapshotItemProvider.prototype |
| 2298 } | 2291 } |
| 2299 | 2292 |
| OLD | NEW |