PHP Class Zephir\Call

Base class for common functionality in functions/calls
Show file Open project: phalcon/zephir Class Usage Examples

Protected Properties

Property Type Description
$_expression zephir\Expression Call expression
$_isExpecting
$_mustCheckForCopy
$_mustInit
$_reflection
$_resolvedDynamicTypes
$_resolvedParams
$_resolvedTypes
$_symbolVariable
$_temporalVariables

Public Methods

Method Description
addCallStatusFlag ( zephir\CompilationContext $compilationContext ) Add the last-call-status flag to the current symbol table
addCallStatusOrJump ( zephir\CompilationContext $compilationContext ) Checks the last call status or make a label jump to the next catch block
checkTempParameters ( zephir\CompilationContext $compilationContext ) Checks if temporary parameters must be copied or not
getMustCheckForCopyVariables ( ) : array Parameters to check if they must be copied
getReadOnlyResolvedParams ( array $parameters, zephir\CompilationContext $compilationContext, array $expression ) : array Resolve parameters using zvals in the stack and without allocating memory for constants
getResolvedDynamicTypes ( ) : array Return resolved parameter dynamic types
getResolvedParams ( array $parameters, zephir\CompilationContext $compilationContext, array $expression, array $calleeDefinition = null ) : array Resolve parameters getting aware that the target function/method could retain or change the parameters
getResolvedParamsAsExpr ( array $parameters, zephir\CompilationContext $compilationContext, array $expression, boolean $readOnly = false ) : array Resolves parameters
getResolvedTypes ( ) : array Return resolved parameter types
getSymbolVariable ( boolean $useTemp = false, zephir\CompilationContext $compilationContext = null ) : Variable Returns the symbol variable that must be returned by the call
getTemporalVariables ( ) : Variable[] Returns the temporal variables generated during the parameter resolving
isExpectingReturn ( ) : boolean Check if an external expression is expecting the call return a value
mustInitSymbolVariable ( ) : boolean Returns if the symbol to be returned by the call must be initialized
processExpectedComplexLiteralReturn ( zephir\CompilationContext $compilationContext ) Processes the symbol variable that will be used to return the result of the symbol call. If a temporal variable is used as returned value only the body is freed between calls
processExpectedObservedReturn ( zephir\CompilationContext $compilationContext ) Processes the symbol variable that will be used to return the result of the symbol call
processExpectedReturn ( zephir\CompilationContext $compilationContext ) Processes the symbol variable that will be used to return the result of the symbol call

Method Details

addCallStatusFlag() public method

Add the last-call-status flag to the current symbol table
public addCallStatusFlag ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

addCallStatusOrJump() public method

Checks the last call status or make a label jump to the next catch block
public addCallStatusOrJump ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

checkTempParameters() public method

Checks if temporary parameters must be copied or not
public checkTempParameters ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

getMustCheckForCopyVariables() public method

Parameters to check if they must be copied

getReadOnlyResolvedParams() public method

Resolve parameters using zvals in the stack and without allocating memory for constants
public getReadOnlyResolvedParams ( array $parameters, zephir\CompilationContext $compilationContext, array $expression ) : array
$parameters array
$compilationContext zephir\CompilationContext
$expression array
return array

getResolvedDynamicTypes() public method

Return resolved parameter dynamic types
public getResolvedDynamicTypes ( ) : array
return array

getResolvedParams() public method

Resolve parameters getting aware that the target function/method could retain or change the parameters
public getResolvedParams ( array $parameters, zephir\CompilationContext $compilationContext, array $expression, array $calleeDefinition = null ) : array
$parameters array
$compilationContext zephir\CompilationContext
$expression array
$calleeDefinition array
return array

getResolvedParamsAsExpr() public method

Resolves parameters
public getResolvedParamsAsExpr ( array $parameters, zephir\CompilationContext $compilationContext, array $expression, boolean $readOnly = false ) : array
$parameters array
$compilationContext zephir\CompilationContext
$expression array
$readOnly boolean
return array

getResolvedTypes() public method

Return resolved parameter types
public getResolvedTypes ( ) : array
return array

getSymbolVariable() public method

Returns the symbol variable that must be returned by the call
public getSymbolVariable ( boolean $useTemp = false, zephir\CompilationContext $compilationContext = null ) : Variable
$useTemp boolean
$compilationContext zephir\CompilationContext
return Variable

getTemporalVariables() public method

Returns the temporal variables generated during the parameter resolving
public getTemporalVariables ( ) : Variable[]
return Variable[]

isExpectingReturn() public method

Check if an external expression is expecting the call return a value
public isExpectingReturn ( ) : boolean
return boolean

mustInitSymbolVariable() public method

Returns if the symbol to be returned by the call must be initialized
public mustInitSymbolVariable ( ) : boolean
return boolean

processExpectedComplexLiteralReturn() public method

Processes the symbol variable that will be used to return the result of the symbol call. If a temporal variable is used as returned value only the body is freed between calls
public processExpectedComplexLiteralReturn ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

processExpectedObservedReturn() public method

Processes the symbol variable that will be used to return the result of the symbol call
public processExpectedObservedReturn ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

processExpectedReturn() public method

Processes the symbol variable that will be used to return the result of the symbol call
public processExpectedReturn ( zephir\CompilationContext $compilationContext )
$compilationContext zephir\CompilationContext

Property Details

$_expression protected property

Call expression
protected Expression,zephir $_expression
return zephir\Expression

$_isExpecting protected property

protected $_isExpecting

$_mustCheckForCopy protected property

protected $_mustCheckForCopy

$_mustInit protected property

protected $_mustInit

$_reflection protected property

protected $_reflection

$_resolvedDynamicTypes protected property

protected $_resolvedDynamicTypes

$_resolvedParams protected property

protected $_resolvedParams

$_resolvedTypes protected property

protected $_resolvedTypes

$_symbolVariable protected property

protected $_symbolVariable

$_temporalVariables protected property

protected $_temporalVariables