Library/SymbolTable.php
public function markTemporalVariablesIdle(CompilationContext $compilationContext)
    {
        $compilationContext = $compilationContext ?: $this->compilationContext;
        $branchId = $compilationContext->branchManager->getCurrentBranchId();

        if (!isset($this->branchTempVariables[$branchId])) {
            return;
        }

        foreach ($this->branchTempVariables[$branchId] as $location => $typeVariables) {
            foreach ($typeVariables as $type => $variables) {
                foreach ($variables as $variable) {
                    $pos = strpos($variable->getName(), Variable::BRANCH_MAGIC);
                    $otherBranchId = 1;
                    if ($pos > -1) {
                        $otherBranchId = (int) (substr($variable->getName(), $pos + \strlen(Variable::BRANCH_MAGIC)));
                    }
                    if ($branchId == $otherBranchId) {
                        $variable->setIdle(true);
                    }
                }
            }
        }
    }
public function markTemporalVariablesIdle(CompilationContext $compilationContext)
    {
        $compilationContext = $compilationContext ?: $this->compilationContext;
        $branchId = $compilationContext->branchManager->getCurrentBranchId();

        if (!isset($this->branchTempVariables[$branchId])) {
            return;
        }

        foreach ($this->branchTempVariables[$branchId] as $location => $typeVariables) {
            foreach ($typeVariables as $type => $variables) {
                foreach ($variables as $variable) {
                    $pos = strpos($variable->getName(), Variable::BRANCH_MAGIC);
                    $otherBranchId = 1;
                    if ($pos > -1) {
                        $otherBranchId = (int) (substr($variable->getName(), $pos + \strlen(Variable::BRANCH_MAGIC)));
                    }
                    if ($branchId == $otherBranchId) {
                        $variable->setIdle(true);
                    }
                }
            }
        }
    }
public function markTemporalVariablesIdle ( CompilationContext $ compilationContext ) { $ compilationContext = $ compilationContext ? : $ this -> compilationContext ; $ branchId = $ compilationContext -> branchManager -> getCurrentBranchId ( ) ; if ( ! isset ( $ this -> branchTempVariables [ $ branchId ] ) ) { return ; } foreach ( $ this -> branchTempVariables [ $ branchId ] as $ location => $ typeVariables ) { foreach ( $ typeVariables as $ type => $ variables ) { foreach ( $ variables as $ variable ) { $ pos = strpos ( $ variable -> getName ( ) , Variable :: BRANCH_MAGIC ) ; $ otherBranchId = 1 ; if ( $ pos > - 1 ) { $ otherBranchId = ( int ) ( substr ( $ variable -> getName ( ) , $ pos + \ strlen ( Variable :: BRANCH_MAGIC ) ) ) ; } if ( $ branchId == $ otherBranchId ) { $ variable -> setIdle ( true ) ; } } } } }
Traverses temporal variables created in a specific branch
marking them as idle.

@param CompilationContext $compilationContext
Traverses temporal variables created in a specific branch marking them as idle .