public function get($functionName, CompilationContext $compilationContext, Call $call, $exists)
{
if (isset($this->cache[$functionName])) {
return $this->cache[$functionName] . ', ' . SlotsCache::getExistingFunctionSlot($functionName);
}
if (!$exists) {
return 'NULL, 0';
}
$cacheSlot = SlotsCache::getFunctionSlot($functionName);
$number = 0;
if (!$compilationContext->insideCycle) {
$gatherer = $this->gatherer;
if ($gatherer) {
$number = $gatherer->getNumberOfFunctionCalls($functionName);
if ($number <= 1) {
return 'NULL, ' . $cacheSlot;
}
}
}
if ($compilationContext->insideCycle || $number > 1) {
$functionCacheVariable = $compilationContext->symbolTable->getTempVariableForWrite('zephir_fcall_cache_entry', $compilationContext);
$functionCacheVariable->setMustInitNull(true);
$functionCacheVariable->setReusable(false);
$functionCache = '&' . $functionCacheVariable->getName();
} else {
$functionCache = 'NULL';
}
$this->cache[$functionName] = $functionCache;
return $functionCache . ', ' . $cacheSlot;
}