Lines Matching defs:parents
174 * Stack tops equal, parents merge is same; return left graph.
176 * Same stack top, parents differ; merge parents giving array node, then
178 * merged parents.
184 * Different stack tops pointing to different parents. Make array node for
225 throw new \RuntimeException('Unexpected null parents.');
241 // Merge parents x and y, giving array node with x,y then remainders
252 // see if we can collapse parents due to $+x parents if local ctx
263 // parents are same
272 $parents = [$singleParent, $singleParent];
273 $apc = new ArrayPredictionContext($parents, $payloads);
282 // parents differ and can't merge them. Just pack together
286 $parents = [$a->parent, $b->parent];
292 $parents = [$b->parent, $a->parent];
295 $a_ = new ArrayPredictionContext($parents, $payloads);
362 $parents = [$b->parent, null];
364 return new ArrayPredictionContext($parents, $payloads);
370 $parents = [$a->parent, null];
372 return new ArrayPredictionContext($parents, $payloads);
382 * Different tops, different parents.
386 * Shared top, same parents.
390 * Shared top, different parents.
394 * Shared top, all shared parents.
398 * Equal tops, merge parents and reduce top to
433 $a_parent = $a->parents[$i];
434 $b_parent = $b->parents[$j];
451 throw new \RuntimeException('Unexpected null parents.');
480 $mergedParents[$k] = $a->parents[$p];
486 $mergedParents[$k] = $b->parents[$p];
540 * @param array<PredictionContext> $parents
542 protected static function combineCommonParents(array &$parents) : void
546 foreach ($parents as $parent) {
552 foreach ($parents as $i => $parent) {
553 $parents[$i] = $uniqueParents[$parent];
584 $parents = [];
596 $parents = [];
599 $parents[$j] = $context->getParent($j);
605 $parents[$i] = $parent;
619 if (\count($parents) === 0) {
621 } elseif (\count($parents) === 1) {
622 $updated = SingletonPredictionContext::create($parents[0], $context->getReturnState(0));
628 $updated = new ArrayPredictionContext($parents, $context->returnStates);