class name (SsaPropOptimizer). */ public array $stableObjects = []; /** Map of hoisted property refs: objName => [propName => true] (SsaPropOptimizer). */ public array $hoistedProps = []; /** Map of properties that must not be hoisted: objName => [propName|'*' => true] (SsaPropOptimizer). */ public array $unsafeObjectProps = []; /** * @var array */ public array $objects = []; /** * @var array */ public array $stdArrays = []; /** * @var array */ public array $stdContainers = []; public array $localVars = []; public array $staticVars = []; public array $globalVars = []; /** * @var array */ public array $ceWrappers = []; public int $tmpVarIndex = 0; public array $arguments = []; public bool $inLoop = false; public bool $inClosure = false; /** True if any break N (N > 1) appears in this function. */ public bool $hasMultiLevelBreak = false; /** True if any continue N (N > 1) appears in this function. */ public bool $hasMultiLevelContinue = false; /** * 赋值表达式的左值,写操作,右值为读操作. */ public bool $inAssignExpr = false; public array $beforeStmtLines = []; public array $afterStmtLines = []; public array $objectProps; /** Map of static property local slots. int/float keep stable zval* slots; other types use Var slots. */ public array $staticPropRefs = []; public int $scopeLevel = 0; /** * @var array */ public array $scopeLayouts = []; public function __construct() { $this->localVars = []; $this->staticVars = []; $this->arguments = []; $this->objects = []; $this->stdArrays = []; $this->stdContainers = []; $this->objectProps = []; $this->ssaBuilder = null; $this->stableObjects = []; $this->hoistedProps = []; $this->unsafeObjectProps = []; $this->staticPropRefs = []; $this->ceWrappers = []; $this->tmpVarIndex = 0; $this->scopeLayouts = []; $this->scopeLevel = 0; $this->inLoop = false; $this->inClosure = false; $this->inAssignExpr = false; } public function enterScope(): void { $this->scopeLayouts[$this->scopeLevel] = new ScopeContext(); $this->scopeLevel++; } public function leaveScope(): void { $this->scopeLevel--; unset($this->scopeLayouts[$this->scopeLevel]); } public function resetAnalysisTemporaries(array $localVars, int $tmpVarIndex): void { $this->localVars = $localVars; $this->tmpVarIndex = $tmpVarIndex; $this->beforeStmtLines = []; $this->afterStmtLines = []; $this->objectProps = []; $this->hoistedProps = []; $this->staticPropRefs = []; $this->scopeLayouts = []; $this->scopeLevel = 0; $this->inLoop = false; $this->inAssignExpr = false; } }