classDestructuringLowering
final class DestructuringLowering
Restricted visibility: declared "@visibility Deriver\Deriver\Lowerer\Declaration" and "@visibility Deriver\Deriver\Lowerer" and "@visibility Deriver\Deriver\Sources". Code outside that scope must not name this declaration.
Preserves array snapshots and shared cells while lowering assignment patterns.
Properties§
public LoweringScope $loweringMethods§
public function __construct(public LoweringScope $lowering)Parameters
$lowering | LoweringScope | Current callable compiler |
public function assignment(Assign $node): stringEvaluates a destructured source once before assigning its entries in order.
Parameters
$node | Assign | Assignment with an array or list pattern |
Returns
string Assigned source valueCalled from 1
Calls 6
- method-call AssignmentLowering::lower() line 36
- new AssignmentLowering line 36
- static-call AssignmentPatterns::references() line 39
- method-call DestructuringLowering::assign() line 40
- method-call LoweringScope::expression() line 40
- method-call DestructuringLowering::source() line 42
public function assign(List_|Array_ $pattern, string $value, string $address = ''): stringAssigns nested patterns from an immutable value or a previously anchored reference.
Parameters
$pattern | List_|Array_ | Destination pattern |
$value | string | Captured value register for ordinary destructuring |
$address | string | Anchored source cell when the pattern contains references |
Returns
string Assigned source valueTest cases 1
Called from 5
- method-call Deriver\Deriver\Lowerer\AssignmentLowering::assign() packages/deriver/src/Deriver/Lowerer/AssignmentLowering.php:69
- method-call Deriver\Deriver\Lowerer\Control\DestructuringLowering::assignment() packages/deriver/src/Deriver/Lowerer/Control/DestructuringLowering.php:40
- method-call Deriver\Deriver\Lowerer\Control\DestructuringLowering::assignment() packages/deriver/src/Deriver/Lowerer/Control/DestructuringLowering.php:45
- method-call Deriver\Deriver\Lowerer\Control\DestructuringLowering::assign() packages/deriver/src/Deriver/Lowerer/Control/DestructuringLowering.php:68
- method-call Deriver\Deriver\Lowerer\Control\LoopLowering::bindIteration() packages/deriver/src/Deriver/Lowerer/Control/LoopLowering.php:125
Calls 7
- static-call Literal::constant() line 62
- method-call LoweringScope::expression() line 62
- static-call AssignmentPatterns::references() line 63
- method-call DestructuringLowering::assign() line 68
- method-call LoweringScope::location() line 70
- method-call AssignmentLowering::assign() line 76
- new AssignmentLowering line 76
public function source(Expr $expression, bool $diagnostic): stringAnchors writable storage or a temporary returned array before reference iteration.
Parameters
$expression | Expr | Evaluated source expression |
$diagnostic | bool | Whether a non-reference return requires a target notice |
Returns
string Source address registerTest cases 1
Called from 2
Calls 2
- method-call LoweringScope::location() line 90
- method-call LoweringScope::expression() line 92
Test cases 100§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Dedicated tests 3
Other tests reaching this symbol 97
ResultRefTestcallsSnapshotTestcallsStatisticsTestcallsDeriverConfigTestcallsLatticeTestcallsFrontierTestcallsAllocationTestcallsCallExecutorTestcallsBindingTestcallsCaptureTestcallsAccessTestcallsMethodInvocationTestcallsInvocationTestcallsParameterBindingTestcallsPassedArgumentTestcallsArgumentsTestcallsCreationTestcallsMethodsTestcallsResolutionTestcallsUnpackTestcallsUnknownCallTestcallsAlternativeTestcallsAssessmentTestcallsCompletionTestcallsContextTestcallsCollectionCallsTestcallsIterationStepTestcallsIteratorCursorTestcallsLoopConvergenceTestcallsStateJoinTestcallsUnwindingTestcallsHavocTestcallsInstructionTransferTestcallsLocationTestcallsMemoryTestcallsObservationCollectorTestcallsProtocolTestcallsTransferTestcallsConversionsTestcallsCountableCallsTestcallsStateTestcallsEvaluationTestcallsInvocationTestcallsIsolationTestcallsDerivationTestcallsCallableTransferTestcallsCompoundAssignmentTestcallsConstantTransferTestcallsMemoryStepTestcallsObjectAccessTestcallsPropertyAccessCheckTestcallsPropertyMagicTestcallsPropertyReferenceTestcallsPropertyTransferTestcallsPureStepTestcallsReferenceAssignmentTestcallsProjectionTestcallsBudgetTestcallsEntryPointTestcallsObservationTestcallsQueryScopeTestcallsReturnQueryTestcallsStateQueryTestcallsTupleQueryTestcallsValueQueryTestcallsArithmeticTestcallsArraysTestcallsTargetProfileTestcallsTermTestcallsQueryExecutionTestcallsResultAssessmentTestcallsAggregateLoweringTestcallsAssignmentLoweringTestcallsCallLoweringTestcallsConditionalLoweringTestcallsGotoLoweringTestcallsLoopLoweringTestcallsSwitchLoweringTestcallsIndexerTestcallsIndexTestcallsPropertyDeclarationTestcallsSymbolRefTestcallsEffectInspectionTestcallsBasicBlockTestcallsCallableGraphTestcallsCatchTargetTestcallsExpressionRefTestcallsInstructionTestcallsPointRefTestcallsTerminatorTestcallsDispatchTestcallsInstructionEmitterTestcallsLowererTestcallsLoweringScopeTestcallsStatementLoweringTestcallsCallObservationsTestcallsDeriverTestcalls
Relations§
Instantiated in 4
- new Deriver\Deriver\Lowerer\AssignmentLowering::lower() packages/deriver/src/Deriver/Lowerer/AssignmentLowering.php:35
- new Deriver\Deriver\Lowerer\AssignmentLowering::assign() packages/deriver/src/Deriver/Lowerer/AssignmentLowering.php:69
- new Deriver\Deriver\Lowerer\Control\LoopLowering::initialize() packages/deriver/src/Deriver/Lowerer/Control/LoopLowering.php:85
- new Deriver\Deriver\Lowerer\Control\LoopLowering::bindIteration() packages/deriver/src/Deriver/Lowerer/Control/LoopLowering.php:125
Method calls 4
- method-call Deriver\Deriver\Lowerer\AssignmentLowering::lower() packages/deriver/src/Deriver/Lowerer/AssignmentLowering.php:35
- method-call Deriver\Deriver\Lowerer\AssignmentLowering::assign() packages/deriver/src/Deriver/Lowerer/AssignmentLowering.php:69
- method-call Deriver\Deriver\Lowerer\Control\LoopLowering::initialize() packages/deriver/src/Deriver/Lowerer/Control/LoopLowering.php:85
- method-call Deriver\Deriver\Lowerer\Control\LoopLowering::bindIteration() packages/deriver/src/Deriver/Lowerer/Control/LoopLowering.php:125