Skip to content

Commit 01737c5

Browse files
committed
Do not pile up too many fibers for synthetic nodes
1 parent 44b744c commit 01737c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Analyser/NodeScopeResolver.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,9 @@ private function processStmtNode(
688688
array_merge($statementResult->getImpurePoints(), $functionImpurePoints),
689689
$functionReflection,
690690
), $functionScope, $storage);
691+
if (!$scope->isInAnonymousFunction()) {
692+
$this->processPendingFibers($storage);
693+
}
691694
} elseif ($stmt instanceof Node\Stmt\ClassMethod) {
692695
$hasYield = false;
693696
$throwPoints = [];
@@ -882,6 +885,9 @@ private function processStmtNode(
882885

883886
}
884887
}
888+
if (!$scope->getClassReflection()->isAnonymous() && !$scope->isInAnonymousFunction()) {
889+
$this->processPendingFibers($storage);
890+
}
885891
} elseif ($stmt instanceof Echo_) {
886892
$hasYield = false;
887893
$throwPoints = [];

0 commit comments

Comments
 (0)