Lines Matching refs:FileIndex
25 /// DeltaTree implements a key/value mapping from FileIndex to Delta, allowing
26 /// fast lookup by FileIndex. However, an added (important) bonus is that it
105 /// DoInsertion - Do an insertion of the specified FileIndex/Delta pair into
109 bool DoInsertion(unsigned FileIndex, int Delta, InsertResult *InsertRes);
180 /// DoInsertion - Do an insertion of the specified FileIndex/Delta pair into
184 bool DeltaTreeNode::DoInsertion(unsigned FileIndex, int Delta,
189 // Find the insertion point, the first delta whose index is >= FileIndex.
191 while (i != e && FileIndex > getValue(i).FileLoc)
196 if (i != e && getValue(i).FileLoc == FileIndex) {
206 // specified index is > FileIndex. Handle the leaf case first.
213 Values[i] = SourceDelta::get(FileIndex, Delta);
223 if (InsertRes->Split.FileLoc > FileIndex)
224 InsertRes->LHS->DoInsertion(FileIndex, Delta, nullptr /*can't fail*/);
226 InsertRes->RHS->DoInsertion(FileIndex, Delta, nullptr /*can't fail*/);
232 if (!IN->Children[i]->DoInsertion(FileIndex, Delta, InsertRes))
408 int DeltaTree::getDeltaAt(unsigned FileIndex) const {
423 if (Val.FileLoc >= FileIndex)
442 Node->getValue(NumValsGreater).FileLoc == FileIndex)
454 /// into the current DeltaTree at offset FileIndex.
455 void DeltaTree::AddDelta(unsigned FileIndex, int Delta) {
460 if (MyRoot->DoInsertion(FileIndex, Delta, &InsertRes)) {