Lines Matching refs:InsertRes
104 /// split the node, populate InsertRes with info about the split, and return
106 bool DoInsertion(unsigned FileIndex, int Delta, InsertResult *InsertRes);
108 void DoSplit(InsertResult &InsertRes);
177 /// split the node, populate InsertRes with info about the split, and return
180 InsertResult *InsertRes) {
215 assert(InsertRes && "No result location specified");
216 DoSplit(*InsertRes);
218 if (InsertRes->Split.FileLoc > FileIndex)
219 InsertRes->LHS->DoInsertion(FileIndex, Delta, nullptr /*can't fail*/);
221 InsertRes->RHS->DoInsertion(FileIndex, Delta, nullptr /*can't fail*/);
227 if (!IN->Children[i]->DoInsertion(FileIndex, Delta, InsertRes))
239 IN->Children[i] = InsertRes->LHS;
240 IN->Children[i+1] = InsertRes->RHS;
244 Values[i] = InsertRes->Split;
252 IN->Children[i] = InsertRes->LHS;
253 DeltaTreeNode *SubRHS = InsertRes->RHS;
254 SourceDelta SubSplit = InsertRes->Split;
257 DoSplit(*InsertRes);
261 if (SubSplit.FileLoc < InsertRes->Split.FileLoc)
262 InsertSide = cast<DeltaTreeInteriorNode>(InsertRes->LHS);
264 InsertSide = cast<DeltaTreeInteriorNode>(InsertRes->RHS);
292 /// Return the pieces in InsertRes.
293 void DeltaTreeNode::DoSplit(InsertResult &InsertRes) {
326 InsertRes.LHS = this;
327 InsertRes.RHS = NewNode;
328 InsertRes.Split = Values[WidthFactor-1];
455 DeltaTreeNode::InsertResult InsertRes;
456 if (MyRoot->DoInsertion(FileIndex, Delta, &InsertRes)) {
457 Root = MyRoot = new DeltaTreeInteriorNode(InsertRes);