public function observeVariant(CompilationContext $compilationContext)
{
if ($this->numberSkips) {
$this->numberSkips--;
return;
}
$name = $this->getName();
if ($name != 'this_ptr' && $name != 'return_value') {
if ($this->initBranch === false) {
$this->initBranch = $compilationContext->currentBranch;
}
$compilationContext->headersManager->add('kernel/memory');
$compilationContext->symbolTable->mustGrownStack(true);
$symbol = $compilationContext->backend->getVariableCode($this);
if ($this->variantInits > 0 || $compilationContext->insideCycle) {
$this->mustInitNull = true;
$compilationContext->codePrinter->output('ZEPHIR_OBS_NVAR(' . $symbol . ');');
} else {
$compilationContext->codePrinter->output('ZEPHIR_OBS_VAR(' . $symbol . ');');
}
$this->variantInits++;
}
}