*/
constructor() {
this.m_originalStart = Constants.MAX_SAFE_SMALL_INTEGER;
this.m_modifiedStart = Constants.MAX_SAFE_SMALL_INTEGER;
this.m_originalCount = 0;
this.m_modifiedCount = 0;
}
/**
Frontier kind: Code frontier
unlabeled · c_acd44dd316ee
79 tests · 6212 LOC · 31 files · introduces 0 tests · 67 LOC · 1 file
The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.
Introduced files, introduced tests, and structurally relevant concept specialization
In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.
Graph controls are ready.
Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.
Every exact file and test below is linked only from the concept that introduces it.
mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/charCode.test|title=CharCode has good values|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/path.test|title=Paths (Node Implementation) path|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI File paths containing apostrophes break URI parsing and cannot be opened #276075|occurrence=1mocha:v1|namespace=vscode@05c208e9e28d8c1c723fa08f85e2b7a96092e8e5|file=vs/base/test/common/uri.test|title=URI URI#file, win-speciale|occurrence=1Every collected test enters the hierarchy at exactly one concept.
No tests are introduced at this concept. Its intent tests are introduced by other concepts.
Every collected source range enters the hierarchy at exactly one concept.
1 file ranked by introduced lines: 67 introduced LOC across 10 ranges. Expand a file to inspect source; the > gutter marks introduced lines.
*/
constructor() {
this.m_originalStart = Constants.MAX_SAFE_SMALL_INTEGER;
this.m_modifiedStart = Constants.MAX_SAFE_SMALL_INTEGER;
this.m_originalCount = 0;
this.m_modifiedCount = 0;
}
/**
*/
public MarkNextChange(): void {
if (this.m_originalCount > 0 || this.m_modifiedCount > 0) {
// Add the new change to our list
this.m_changes.push(new DiffChange(this.m_originalStart, this.m_originalCount,
this.m_modifiedStart, this.m_modifiedCount));
}
// Reset for the next change
this.m_originalCount = 0;
this.m_modifiedCount = 0;
this.m_originalStart = Constants.MAX_SAFE_SMALL_INTEGER;
this.m_modifiedStart = Constants.MAX_SAFE_SMALL_INTEGER;
}
/**
*/
public getReverseChanges(): DiffChange[] {
// Finish up on whatever is left
this.MarkNextChange();
}
this.m_changes.reverse();
return this.m_changes;
}
}
if (result !== null) {
// searching for the recursion point
return result;
} else if (!quitEarlyArr[0]) {
// We can break the problem down recursively by finding the changes in the
private WALKTRACE(diagonalForwardBase: number, diagonalForwardStart: number, diagonalForwardEnd: number, diagonalForwardOffset: number,
diagonalReverseBase: number, diagonalReverseStart: number, diagonalReverseEnd: number, diagonalReverseOffset: number,
diff.ts
forwardPoints: Int32Array, reversePoints: Int32Array,
originalIndex: number, originalEnd: number, midOriginalArr: number[],
modifiedIndex: number, modifiedEnd: number, midModifiedArr: number[],
deltaIsEven: boolean, quitEarlyArr: boolean[]
): DiffChange[] {
let forwardChanges: DiffChange[] | null = null;
let reverseChanges: DiffChange[] | null = null;
// First, walk backward through the forward diagonals history
let changeHelper = new DiffChangeHelper();
let diagonalMin = diagonalForwardStart;
let diagonalMax = diagonalForwardEnd;
let diagonalRelative = (midOriginalArr[0] - midModifiedArr[0]) - diagonalForwardOffset;
let lastOriginalIndex = Constants.MIN_SAFE_SMALL_INTEGER;
let historyIndex = this.m_forwardHistory.length - 1;
do {
// Get the diagonal index from the relative diagonal number
const diagonal = diagonalRelative + diagonalForwardBase;
// Figure out where we came from
if (diagonal === diagonalMin || (diagonal < diagonalMax && forwardPoints[diagonal - 1] < forwardPoints[diagonal + 1])) {
// Vertical line (the element is an insert)
originalIndex = forwardPoints[diagonal + 1];
changeHelper.AddModifiedElement(originalIndex + 1, modifiedIndex);
diagonalRelative = (diagonal + 1) - diagonalForwardBase; //Setup for the next iteration
// Horizontal line (the element is a deletion)
originalIndex = forwardPoints[diagonal - 1] + 1;
diagonalRelative = (diagonal - 1) - diagonalForwardBase; //Setup for the next iteration
}
if (historyIndex >= 0) {
forwardPoints = this.m_forwardHistory[historyIndex];
diagonalForwardBase = forwardPoints[0]; //We stored this in the first spot
diagonalMax = forwardPoints.length - 1;
}
// Ironically, we get the forward changes as the reverse of the
// order we added them since we technically added them backwards
forwardChanges = changeHelper.getReverseChanges();
if (quitEarlyArr[0]) {
// TODO: Calculate a partial from the reverse diagonals.
// For now, just assume everything after the midOriginal/midModified point is a diff
modifiedStartPoint, modifiedEnd - modifiedStartPoint + 1)
];
// Now walk backward through the reverse diagonals history
changeHelper = new DiffChangeHelper();
reverseChanges = changeHelper.getChanges();
}
return this.ConcatenateChanges(forwardChanges, reverseChanges);
}
/**