@@ -204,30 +204,6 @@ public function processNodes(
204204 }
205205 }
206206
207- /** The stored result an outside asker may consume. */
208- public function findSettledExpressionResult (ExpressionResultStorage $ storage , Expr $ expr ): ?ExpressionResult
209- {
210- return $ storage ->findExpressionResult ($ expr );
211- }
212-
213- /** An effect-free result carrying eagerly known types, positioned at the given scope. */
214- protected function createEagerExpressionResult (MutatingScope $ scope , Expr $ expr , Type $ type , Type $ nativeType ): ExpressionResult
215- {
216- return $ this ->expressionResultFactory ->create (
217- $ scope ,
218- beforeScope: $ scope ,
219- expr: $ expr ,
220- hasYield: false ,
221- isAlwaysTerminating: false ,
222- throwPoints: [],
223- impurePoints: [],
224- typeCallback: null ,
225- specifyTypesCallback: SpecifiedTypes ::emptySpecifyCallback (),
226- type: $ type ,
227- nativeType: $ nativeType ,
228- );
229- }
230-
231207 public function storeExpressionResult (ExpressionResultStorage $ storage , Expr $ expr , ExpressionResult $ expressionResult ): void
232208 {
233209 if (self ::$ guardNewWorld ) {
@@ -506,7 +482,20 @@ public function processExprOnDemand(Expr $expr, MutatingScope $scope, Expression
506482 ExprHandlerRegistry ::resolve ($ expr , $ this ->container ) === null
507483 && !($ expr instanceof Expr \CallLike && $ expr ->isFirstClassCallable ())
508484 ) {
509- return $ this ->createEagerExpressionResult ($ scope , $ expr , new MixedType (), new MixedType ());
485+ $ mixed = new MixedType ();
486+ return $ this ->expressionResultFactory ->create (
487+ $ scope ,
488+ beforeScope: $ scope ,
489+ expr: $ expr ,
490+ hasYield: false ,
491+ isAlwaysTerminating: false ,
492+ throwPoints: [],
493+ impurePoints: [],
494+ typeCallback: null ,
495+ specifyTypesCallback: SpecifiedTypes ::emptySpecifyCallback (),
496+ type: $ mixed ,
497+ nativeType: $ mixed ,
498+ );
510499 }
511500
512501 // save/restore, never reset: on-demand walks nest (a typeCallback
@@ -532,18 +521,6 @@ public function processExprOnDemand(Expr $expr, MutatingScope $scope, Expression
532521 }
533522 }
534523
535- /**
536- * Processes an expression for an independent analysis pass - a reflection-
537- * level lazy computation that builds its own scope from scratch (e.g.
538- * private property type inference from constructor assignments). Such a
539- * pass legitimately prices real AST nodes outside the file's main walk,
540- * on a fresh storage of its own.
541- */
542- public function processIndependentPassExpr (Expr $ expr , MutatingScope $ scope ): ExpressionResult
543- {
544- return $ this ->processExprOnDemand ($ expr , $ scope , new ExpressionResultStorage ());
545- }
546-
547524 /**
548525 * The stored ExpressionResult of a node processExprNode() already processed
549526 * into the given storage - the caller asserts the processing order by
0 commit comments