PHP Класс Zephir\Cache\FunctionCache

Calls in Zephir implement monomorphic and polymorphic caches to improve performance. Method/Functions lookups are cached in a standard first-level method lookup cache. The concept of inline caching is based on the empirical observation that the objects that occur at a particular call site are often of the same type Internal functions are considered monomorphic since they do not change across execution. Final and private methods are also monomorphic because of their own nature. Due to the Ahead-Of-Time (AOT) compilation approach provided by Zephir, is not possible to implement inline caches, however is possible to add barriers/guards to take advantage of profile guided optimizations (PGO) and branch prediction. This implementation is based on the work of Hölzle, Chambers and Ungar [1]. [1] http://www.cs.ucsb.edu/~urs/oocsb/papers/ecoop91.pdf
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$cache
$gatherer

Открытые методы

Метод Описание
__construct ( Zephir\Passes\CallGathererPass $gatherer = null ) FunctionCache constructor
get ( string $functionName, Zephir\CompilationContext $compilationContext, Call $call, boolean $exists ) : string Retrieves/Creates a function cache for a function call

Описание методов

__construct() публичный Метод

FunctionCache constructor
public __construct ( Zephir\Passes\CallGathererPass $gatherer = null )
$gatherer Zephir\Passes\CallGathererPass

get() публичный Метод

Retrieves/Creates a function cache for a function call
public get ( string $functionName, Zephir\CompilationContext $compilationContext, Call $call, boolean $exists ) : string
$functionName string
$compilationContext Zephir\CompilationContext
$call Zephir\Call
$exists boolean
Результат string

Описание свойств

$cache защищенное свойство

protected $cache

$gatherer защищенное свойство

protected $gatherer