PHP Class Zephir\Operators\Arithmetical\ArithmeticalBaseOperator

This is the base operator for commutative, associative and distributive arithmetic operators
Inheritance: extends Zephir\Operators\BaseOperator
Afficher le fichier Open project: phalcon/zephir

Protected Properties

Свойство Type Description
$_literalOnly

Méthodes publiques

Méthode Description
compile ( array $expression, Zephir\CompilationContext $compilationContext ) Compiles the arithmetical operation
optimizeConstantFolding ( array $expression, Zephir\CompilationContext $compilationContext ) : boolean | Zephir\CompiledExpression This tries to perform arithmetical operations Probably gcc/clang will optimize them without this optimization

Private Methods

Méthode Description
getDynamicTypes ( Variable $left, Variable $right ) : string Returns proper dynamic types

Method Details

compile() public méthode

Compiles the arithmetical operation
public compile ( array $expression, Zephir\CompilationContext $compilationContext )
$expression array
$compilationContext Zephir\CompilationContext

optimizeConstantFolding() public méthode

This tries to perform arithmetical operations Probably gcc/clang will optimize them without this optimization
See also: http://en.wikipedia.org/wiki/Constant_folding
public optimizeConstantFolding ( array $expression, Zephir\CompilationContext $compilationContext ) : boolean | Zephir\CompiledExpression
$expression array
$compilationContext Zephir\CompilationContext
Résultat boolean | Zephir\CompiledExpression

Property Details

$_literalOnly protected_oe property

protected $_literalOnly